Re: [PATCH v3 1/1] docs/devel: Add VFIO device migration documentation

2021-04-01 Thread Tarun Gupta (SW-GPU)
On 3/27/2021 11:34 AM, Shenming Lu wrote: On 2021/3/26 21:18, Tarun Gupta wrote: Document interfaces used for VFIO device migration. Added flow of state changes during live migration with VFIO device. Tested by building docs with the new vfio-migration.rst file. v3: - Add introductory line a

Re: [PATCH] tap-win32: correctly recycle buffers

2021-04-01 Thread Jason Wang
在 2021/3/29 上午11:01, Bin Meng 写道: On Mon, Mar 29, 2021 at 10:20 AM Jason Wang wrote: Commit 969e50b61a28 ("net: Pad short frames to minimum size before sending from SLiRP/TAP") tries to pad frames but try to recyle the local array that is used for padding to tap thread. This patch fixes this

Re: [PATCH v5 0/7] eBPF RSS support for virtio-net

2021-04-01 Thread Andrew Melnichenko
The skeleton is generated file. Style issues with rss.bpf.c would be fixed in upcoming patches. On Thu, Mar 25, 2021 at 5:58 PM wrote: > Patchew URL: > https://patchew.org/QEMU/20210325153529.75831-1-and...@daynix.com/ > > > > Hi, > > This series seems to have some coding style problems. See out

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases

2021-04-01 Thread Jason Wang
在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say Qemu doesn't support those OpenBSD release? The (OpenBSD itself and QEMU) p

Re: [PATCH for-6.0] Revert "target/arm: Make number of counters in PMCR follow the CPU"

2021-04-01 Thread Zenghui Yu
This works for me. Tested-by: Zenghui Yu

[PATCH v3 00/11] esp: fix asserts/segfaults discovered by fuzzer

2021-04-01 Thread Mark Cave-Ayland
Recently there have been a number of issues raised on Launchpad as a result of fuzzing the am53c974 (ESP) device. I spent some time over the past couple of days checking to see if anything had improved since my last patchset: from what I can tell the issues are still present, but the cmdfifo relate

[PATCH v3 01/11] esp: always check current_req is not NULL before use in DMA callbacks

2021-04-01 Thread Mark Cave-Ayland
After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len != 0) then the next TI (Transfer Information) command will attempt to reference the NULL pointer causing

[PATCH v3 03/11] esp: consolidate esp_cmdfifo_push() into esp_fifo_push()

2021-04-01 Thread Mark Cave-Ayland
Each FIFO currently has its own push functions with the only difference being the capacity check. The original reason for this was that the fifo8 implementation doesn't have a formal API for retrieving the FIFO capacity, however there are multiple examples within QEMU where the capacity field is ac

[PATCH v3 09/11] esp: don't overflow cmdfifo if TC is larger than the cmdfifo size

2021-04-01 Thread Mark Cave-Ayland
If a guest transfers the message out/command phase data using DMA with a TC that is larger than the cmdfifo size then the cmdfifo overflows triggering an assert. Limit the size of the transfer to the free space available in cmdfifo. Buglink: https://bugs.launchpad.net/qemu/+bug/1919036 Signed-off-

[PATCH v3 02/11] esp: rework write_response() to avoid using the FIFO for DMA transactions

2021-04-01 Thread Mark Cave-Ayland
The code for write_response() has always used the FIFO to store the data for the status/message in phases, even for DMA transactions. Switch to using a separate buffer that can be used directly for DMA transactions and restrict the FIFO use to the non-DMA case. Signed-off-by: Mark Cave-Ayland ---

[PATCH v3 11/11] tests/qtest: add tests for am53c974 device

2021-04-01 Thread Mark Cave-Ayland
Use the autogenerated fuzzer test cases as the basis for a set of am53c974 regression tests. Signed-off-by: Mark Cave-Ayland --- MAINTAINERS | 1 + tests/qtest/am53c974-test.c | 216 tests/qtest/meson.build | 1 + 3 files changed, 218

[PATCH v3 04/11] esp: consolidate esp_cmdfifo_pop() into esp_fifo_pop()

2021-04-01 Thread Mark Cave-Ayland
Each FIFO currently has its own pop functions with the only difference being the capacity check. The original reason for this was that the fifo8 implementation doesn't have a formal API for retrieving the FIFO capacity, however there are multiple examples within QEMU where the capacity field is acc

Re: Status update for maintainers file

2021-04-01 Thread Philippe Mathieu-Daudé
On 3/31/21 7:42 PM, Sarah Harris wrote: > Hi all, > > I was added as a reviewer (in MAINTAINERS) for the AVR target for the > duration of my research work using it. > The funding for my project expires in the middle of April, so I will not be > able to provide time for reviewing patches from tha

[PATCH v3 05/11] esp: introduce esp_fifo_pop_buf() and use it instead of fifo8_pop_buf()

2021-04-01 Thread Mark Cave-Ayland
The const pointer returned by fifo8_pop_buf() lies directly within the array used to model the FIFO. Building with address sanitisers enabled shows that if the caller expects a minimum number of bytes present then if the FIFO is nearly full, the caller may unexpectedly access past the end of the

[PATCH v3 06/11] esp: ensure cmdfifo is not empty and current_dev is non-NULL

2021-04-01 Thread Mark Cave-Ayland
When about to execute a SCSI command, ensure that cmdfifo is not empty and current_dev is non-NULL. This can happen if the guest tries to execute a TI (Transfer Information) command without issuing one of the select commands first. Buglink: https://bugs.launchpad.net/qemu/+bug/1910723 Buglink: htt

[PATCH v3 07/11] esp: don't underflow cmdfifo in do_cmd()

2021-04-01 Thread Mark Cave-Ayland
If the guest tries to execute a CDB when cmdfifo is not empty before the start of the message out phase then clearing the message out phase data will cause cmdfifo to underflow due to cmdfifo_cdb_offset being larger than the amount of data within. Since this can only occur by issuing deliberately

Re: [PATCH] MAINTAINERS: replace Huawei's email to personal one

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 8:34 AM, Thomas Huth wrote: > On 23/03/2021 05.04, Dongjiu Geng wrote: >> ping... >> >> sorry for the noise. >> On 3/11/2021 19:29,Dongjiu Geng >> wrote: >> >>     In order to conveniently receive email, replace the Huawei >>     email address with my perso

[PATCH v3 08/11] esp: don't overflow cmdfifo in get_cmd()

2021-04-01 Thread Mark Cave-Ayland
If the guest tries to read a CDB using DMA and cmdfifo is not empty then it is possible to overflow cmdfifo. Since this can only occur by issuing deliberately incorrect instruction sequences, ensure that the maximum length of the CDB transferred to cmdfifo is limited to the available free space wi

Re: [PATCH] docs: Fix typo in the default name of the qemu-system-x86_64 binary

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 7:18 AM, Thomas Huth wrote: > It's a '-' between 'qemu' and 'system', not a '_'. > > Fixes: 324b2298fe ("docs/system: convert Texinfo documentation to rST") > Signed-off-by: Thomas Huth > --- > docs/defs.rst.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Phil

[PATCH v3 10/11] esp: don't reset async_len directly in esp_select() if cancelling request

2021-04-01 Thread Mark Cave-Ayland
Instead let the SCSI layer invoke the .cancel callback itself to cancel and reset the request state. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index b7f2680617..ca062a0400 100644 --- a/hw/sc

Re: [PATCH v2 0/6] esp: fix asserts/segfaults discovered by fuzzer

2021-04-01 Thread Mark Cave-Ayland
On 30/03/2021 10:59, Paolo Bonzini wrote: Hi, I also had some failures of the tests on CI, which is why I hadn't incorporated these changes yet.  Thanks for the advance warning, I'll wait for your v3. Paolo Hi Paolo, I've just posted the latest v3 which passes all my local boot tests and

Re: [PATCH v3 2/4] block: check for sys/disk.h

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 7:08 AM, Joelle van Dyne wrote: > On Mon, Mar 15, 2021 at 11:03 AM Joelle van Dyne wrote: >> >> Some BSD platforms do not have this header. >> >> Reviewed-by: Peter Maydell >> Reviewed-by: Philippe Mathieu-Daudé >> Signed-off-by: Joelle van Dyne > > Please bear with me as I am still

[PATCH v5 00/10] Fixed some bugs and optimized some codes for COLO

2021-04-01 Thread leirao
From: Rao,Lei Changes since v4: --Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD in colo_bitmap_clear_dirty. --Modify some minor issues about variable definition. --Add some performance test data in the commit message. Changes since v3: --Remove cpu_throttle

[PATCH v5 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c b/so

[PATCH v5 01/10] Remove some duplicate trace code.

2021-04-01 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9d1ad99..c142c08 100644 --- a

[PATCH v5 07/10] Reset the auto-converge counter at every checkpoint.

2021-04-01 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 4 +

[PATCH v5 04/10] Remove migrate_set_block_enabled in checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian --- migra

[PATCH v5 03/10] Optimize the function of filter_send

2021-04-01 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/filter-mirror.c | 8 1 file changed, 4 in

答复: [PATCH 1/1] Remove flatview_simplify()

2021-04-01 Thread FelixCui-oc
>That said, perhaps it's better to keep the simplification within a >page-sized range, to avoid introducing subpages unnecessarily. hi paolo, The sizes of all flatranges merged by flatview_simplify() are page aligned. Flatview_simplify() seems to have the opport

[PATCH v5 09/10] Add the function of colo_bitmap_clear_dirty

2021-04-01 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. The performance test for COLO as follow: Server configuraton: CPU :Intel(R)

[PATCH v5 06/10] Add the function of colo_compare_cleanup

2021-04-01 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v5 05/10] Add a function named packet_new_nocopy for COLO.

2021-04-01 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 23 +++ net/colo.h| 1 + net/filter-r

[PATCH v5 08/10] Reduce the PVM stop time during Checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert --- migration

[PATCH v5 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-04-01 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of c

Re: [PATCH v3 06/11] esp: ensure cmdfifo is not empty and current_dev is non-NULL

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > When about to execute a SCSI command, ensure that cmdfifo is not empty and > current_dev is non-NULL. This can happen if the guest tries to execute a TI > (Transfer Information) command without issuing one of the select commands > first. > > Buglink: ht

Re: [PATCH] migration: Remove time_t cast for OpenBSD

2021-04-01 Thread Daniel P . Berrangé
On Wed, Mar 31, 2021 at 03:26:16PM -0400, Brad Smith wrote: > On 3/13/2021 6:33 PM, Brad Smith wrote: > > On 3/11/2021 1:39 PM, Daniel P. Berrangé wrote: > > > On Thu, Mar 11, 2021 at 06:28:57PM +, Dr. David Alan Gilbert wrote: > > > > * Laurent Vivier (laur...@vivier.eu) wrote: > > > > > Le 08

Re: [PATCH v3 07/11] esp: don't underflow cmdfifo in do_cmd()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > If the guest tries to execute a CDB when cmdfifo is not empty before the start > of the message out phase then clearing the message out phase data will cause > cmdfifo to underflow due to cmdfifo_cdb_offset being larger than the amount of > data within.

Re: [PATCH v3 08/11] esp: don't overflow cmdfifo in get_cmd()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > If the guest tries to read a CDB using DMA and cmdfifo is not empty then it is > possible to overflow cmdfifo. > > Since this can only occur by issuing deliberately incorrect instruction > sequences, ensure that the maximum length of the CDB transferred

Re: [PATCH v3 03/11] esp: consolidate esp_cmdfifo_push() into esp_fifo_push()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > Each FIFO currently has its own push functions with the only difference being > the capacity check. The original reason for this was that the fifo8 > implementation doesn't have a formal API for retrieving the FIFO capacity, > however there are multiple

[PATCH v3] replay: notify CPU on event

2021-04-01 Thread Pavel Dovgalyuk
This patch enables vCPU notification to wake it up when new async event comes in replay mode. The motivation of this patch is the following. Consider recorded block async event. It is saved into the log with one of the checkpoints. This checkpoint may be passed in vCPU loop. In replay mode when th

Re: [PATCH v3 04/11] esp: consolidate esp_cmdfifo_pop() into esp_fifo_pop()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > Each FIFO currently has its own pop functions with the only difference being > the capacity check. The original reason for this was that the fifo8 > implementation doesn't have a formal API for retrieving the FIFO capacity, > however there are multiple e

[PATCH v2 1/2] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
Type 41 defines the attributes of devices that are onboard. The original intent was to imply the BIOS had some level of control over the enablement of the associated devices. If network devices are present in this table, by default, udev will name the corresponding interfaces enoX, X being the ins

[Bug 1909247] Re: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c

2021-04-01 Thread Mark Cave-Ayland
Thanks again Alex. I've just posted a v3 to the list which fixes your extra test cases, and also those contained within the uaf and hw-esp-oob attachments: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg00015.html -- You received this bug notification because you are a member of qemu-

Re: [PATCH v3 02/11] esp: rework write_response() to avoid using the FIFO for DMA transactions

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > The code for write_response() has always used the FIFO to store the data for > the status/message in phases, even for DMA transactions. Switch to using a > separate buffer that can be used directly for DMA transactions and restrict > the FIFO use to the

[PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
Instead of specifying the PCI address manually, the device can be specified by ID: $QEMU -netdev user,id=internet -device virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ -smbios type=41,designation='Onboard LAN',instance=1,kind=ethernet,pcidev=inter

Re: [PATCH v6 1/4] Add NVMM accelerator: configure and build logic

2021-04-01 Thread Paolo Bonzini
On 31/03/21 22:07, Reinoud Zandijk wrote: Signed-off-by: Reinoud Zandijk Signed-off-by: Kamil Rytarowski Incorrect order for the S-o-b headers, you should be last. --- @@ -886,7 +887,7 @@ for opt do ;; --python=*) python="$optarg" ; explicit_python=yes ;; - --sphinx-build=*) sp

Re: [PATCH] iotests: Test mirror-top filter permissions

2021-04-01 Thread Vladimir Sementsov-Ogievskiy
31.03.2021 15:28, Max Reitz wrote: Add a test accompanying commit 53431b9086b2832ca1aeff0c55e186e9ed79bd11 ("block/mirror: Fix mirror_top's permissions"). Signed-off-by: Max Reitz --- tests/qemu-iotests/tests/mirror-top-perms | 121 ++ tests/qemu-iotests/tests/mirror-top-

Re: [PATCH v6 2/4] Add NVMM accelerator: x86 CPU support

2021-04-01 Thread Paolo Bonzini
On 31/03/21 22:07, Reinoud Zandijk wrote: +void nvmm_vcpu_kick(CPUState *cpu); Not defined anywhere. +{ +#if NVMM_USER_VERSION == 1 +struct sigaction sigact; +sigset_t set; + +/* Install the IPI handler. */ +memset(&sigact, 0, sizeof(sigact)); +sigact.sa_handler = nvmm_ipi

Re: [PATCH v6 0/4] Implements the NetBSD Virtual Machine Monitor accelerator

2021-04-01 Thread Paolo Bonzini
On 31/03/21 22:07, Reinoud Zandijk wrote: The NetBSD team has been working hard on a new user-mode API for our hypervisor that will be released as part of the upcoming NetBSD 9.0. The NetBSD team has implemented its new hypervisor called NVMM. It has been included since NetBSD 9.0 and has been i

Re: [PATCH v2 1/2] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Daniel P . Berrangé
On Thu, Apr 01, 2021 at 10:25:43AM +0200, Vincent Bernat wrote: > Type 41 defines the attributes of devices that are onboard. The > original intent was to imply the BIOS had some level of control over > the enablement of the associated devices. > > If network devices are present in this table, by

Re: [RFC PATCH 0/6] Introduce cluster cpu topology support

2021-04-01 Thread wangyanan (Y)
Hi Paolo, On 2021/3/31 18:00, Paolo Bonzini wrote: On 31/03/21 11:53, Yanan Wang wrote: A cluster means a group of cores that share some resources (e.g. cache) among them under the LLC. For example, ARM64 server chip Kunpeng 920 has 6 or 8 clusters in each NUMA, and each cluster has 4 cores. Al

Re: [PATCH v2 1/2] hw/smbios: support for type 41 (onboard devices extended information)

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 09:41 +01, Daniel P. Berrangé: >> +t = calloc(1, sizeof(struct type41_instance)); >> +if (!t) { >> +error_setg(errp, >> + "Unable to allocate memory for a new type 41 >> instance"); >> +return; >> +

Re: [PATCH v3] replay: notify CPU on event

2021-04-01 Thread Paolo Bonzini
On 01/04/21 10:19, Pavel Dovgalyuk wrote: This patch enables vCPU notification to wake it up when new async event comes in replay mode. The motivation of this patch is the following. Consider recorded block async event. It is saved into the log with one of the checkpoints. This checkpoint may be

Re: [PATCH v3 03/11] esp: consolidate esp_cmdfifo_push() into esp_fifo_push()

2021-04-01 Thread Mark Cave-Ayland
On 01/04/2021 09:15, Philippe Mathieu-Daudé wrote: On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: Each FIFO currently has its own push functions with the only difference being the capacity check. The original reason for this was that the fifo8 implementation doesn't have a formal API for retrieving

Re: [PATCH v3 07/11] esp: don't underflow cmdfifo in do_cmd()

2021-04-01 Thread Mark Cave-Ayland
On 01/04/2021 09:19, Philippe Mathieu-Daudé wrote: On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: If the guest tries to execute a CDB when cmdfifo is not empty before the start of the message out phase then clearing the message out phase data will cause cmdfifo to underflow due to cmdfifo_cdb_offse

Re: [PATCH v3 08/11] esp: don't overflow cmdfifo in get_cmd()

2021-04-01 Thread Mark Cave-Ayland
On 01/04/2021 09:19, Philippe Mathieu-Daudé wrote: On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: If the guest tries to read a CDB using DMA and cmdfifo is not empty then it is possible to overflow cmdfifo. Since this can only occur by issuing deliberately incorrect instruction sequences, ensure t

Re: [PATCH v3 2/4] block: check for sys/disk.h

2021-04-01 Thread Paolo Bonzini
On 01/04/21 10:03, Philippe Mathieu-Daudé wrote: On 4/1/21 7:08 AM, Joelle van Dyne wrote: On Mon, Mar 15, 2021 at 11:03 AM Joelle van Dyne wrote: Some BSD platforms do not have this header. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne Pl

Re: [PATCH v3 03/11] esp: consolidate esp_cmdfifo_push() into esp_fifo_push()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 10:50 AM, Mark Cave-Ayland wrote: > On 01/04/2021 09:15, Philippe Mathieu-Daudé wrote: > >> On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: >>> Each FIFO currently has its own push functions with the only >>> difference being >>> the capacity check. The original reason for this was that the f

Re: [PATCH] MAINTAINERS: replace Huawei's email to personal one

2021-04-01 Thread Thomas Huth
On 01/04/2021 09.58, Philippe Mathieu-Daudé wrote: On 4/1/21 8:34 AM, Thomas Huth wrote: On 23/03/2021 05.04, Dongjiu Geng wrote: ping... sorry for the noise. On 3/11/2021 19:29,Dongjiu Geng wrote:     In order to conveniently receive email, replace the Huawei

Re: [PATCH 1/2] spapr: number of SMP sockets must be equal to NUMA nodes

2021-04-01 Thread Cédric Le Goater
On 4/1/21 4:59 AM, David Gibson wrote: > On Wed, Mar 31, 2021 at 05:18:45PM +0200, Cédric Le Goater wrote: >> On 3/31/21 2:57 AM, David Gibson wrote: >>> On Mon, Mar 29, 2021 at 03:32:37PM -0300, Daniel Henrique Barboza wrote: On 3/29/21 12:32 PM, Cédric Le Goater wrote: > On 3/2

[BUG FIX][PATCH v3 0/3] vhost-user-blk: fix bug on device disconnection during initialization

2021-04-01 Thread Denis Plotnikov
This is a series fixing a bug in host-user-blk. Is there any chance for it to be considered for the next rc? Thanks! Denis On 29.03.2021 16:44, Denis Plotnikov wrote: ping! On 25.03.2021 18:12, Denis Plotnikov wrote: v3: * 0003: a new patch added fixing the problem on vm shutdown I

[PATCH for-6.0 v1 2/4] migration: Inhibit virtio-balloon for the duration of background snapshot

2021-04-01 Thread Andrey Gruzdev
The same thing as for incoming postcopy - we cannot deal with concurrent RAM discards when using background snapshot feature in outgoing migration. Fixes: 8518278a6af589ccc401f06e35f171b1e6fae800 (migration: implementation of background snapshot thread) Signed-off-by: Andrey Gruzdev Reported-by

[PATCH for-6.0 v1 1/4] migration: Fix missing qemu_fflush() on buffer file in bg_migration_thread

2021-04-01 Thread Andrey Gruzdev
Added missing qemu_fflush() on buffer file holding precopy device state. Increased initial QIOChannelBuffer allocation to 512KB to avoid reallocs. Typical configurations often require >200KB for device state and VMDESC. Fixes: 8518278a6af589ccc401f06e35f171b1e6fae800 (migration: implementation o

[PATCH for-6.0 v1 4/4] migration: Rename 'bs' to 'block' in background snapshot code

2021-04-01 Thread Andrey Gruzdev
Rename 'bs' to commonly used 'block' in migration/ram.c background snapshot code. Signed-off-by: Andrey Gruzdev Reported-by: David Hildenbrand --- migration/ram.c | 86 + 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/migration/ra

[PATCH for-6.0 v1 3/4] migration: Pre-fault memory before starting background snasphot

2021-04-01 Thread Andrey Gruzdev
This commit solves the issue with userfault_fd WP feature that background snapshot is based on. For any never poluated or discarded memory page, the UFFDIO_WRITEPROTECT ioctl() would skip updating PTE for that page, thereby loosing WP setting for it. So we need to pre-fault pages for each RAM bloc

[PATCH for-6.0 v1 0/4] migration: Fixes to the 'background-snapshot' code

2021-04-01 Thread Andrey Gruzdev
Changes v0->v1: * Fixes to coding style and commit messages * Renamed 'bs' to 'block' in migration/ram.c background snapshot code This patch series contains: * Fix to the issue with occasionally truncated non-iterable device state * Solution to compatibility issues with virtio-balloon device

[RFC v2 1/4] target/riscv: add RNMI cpu feature

2021-04-01 Thread frank . chang
From: Frank Chang Signed-off-by: Frank Chang --- hw/riscv/riscv_hart.c | 8 +++ include/hw/riscv/riscv_hart.h | 2 ++ target/riscv/cpu.c| 40 +++ target/riscv/cpu.h| 12 ++- target/riscv/cpu_bits.h | 6 ++

[RFC v2 2/4] target/riscv: add RNMI CSRs

2021-04-01 Thread frank . chang
From: Frank Chang Signed-off-by: Frank Chang --- target/riscv/cpu.h | 4 +++ target/riscv/cpu_bits.h | 9 +++ target/riscv/csr.c | 59 + 3 files changed, 72 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 7d2bb7e7

[RFC v2 3/4] target/riscv: handle RNMI interrupt and exception

2021-04-01 Thread frank . chang
From: Frank Chang Signed-off-by: Frank Chang --- target/riscv/cpu_bits.h | 4 target/riscv/cpu_helper.c | 49 +++ 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index a376ede0cc5..937b

[RFC v2 0/4] target/riscv: add RNMI support

2021-04-01 Thread frank . chang
From: Frank Chang This patchset add suport of Resumable NMI (RNMI) in RISC-V. There are four new CSRs and one new instruction added to allow NMI to be resumable in RISC-V, which are: = * mnscratch (0x350) * mnepc (0x351) * mn

[RFC v2 4/4] target/riscv: add RNMI mnret instruction

2021-04-01 Thread frank . chang
From: Frank Chang Signed-off-by: Frank Chang --- target/riscv/helper.h | 1 + target/riscv/insn32.decode| 3 ++ .../riscv/insn_trans/trans_privileged.c.inc | 13 target/riscv/op_helper.c | 31 +++ 4 fi

Re: [PATCH v3 05/11] esp: introduce esp_fifo_pop_buf() and use it instead of fifo8_pop_buf()

2021-04-01 Thread Philippe Mathieu-Daudé
On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: > The const pointer returned by fifo8_pop_buf() lies directly within the array > used > to model the FIFO. Building with address sanitisers enabled shows that if the Typo "sanitizers" > caller expects a minimum number of bytes present then if the FIFO i

Re: [RFC v2 0/4] target/riscv: add RNMI support

2021-04-01 Thread Frank Chang
於 2021年4月1日 週四 下午5:27寫道: > From: Frank Chang > > This patchset add suport of Resumable NMI (RNMI) in RISC-V. > > There are four new CSRs and one new instruction added to allow NMI to be > resumable in RISC-V, which are: > > = > * mnsc

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Daniel P . Berrangé
On Thu, Apr 01, 2021 at 10:25:44AM +0200, Vincent Bernat wrote: > Instead of specifying the PCI address manually, the device can be > specified by ID: > > $QEMU -netdev user,id=internet > -device > virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ > -s

Re: [RFC PATCH] block: always update auto_backing_file to full path

2021-04-01 Thread Max Reitz
On 01.04.21 06:22, Joe Jin wrote: Some time after created snapshot, auto_backing_file only has filename, this confused overridden check, update it to full path if it is not. Signed-off-by: Joe Jin ---  block.c | 13 +  1 file changed, 13 insertions(+) Do you have a test for this?

[1/1] tcg/mips: Fix SoftTLB comparison on mips backend

2021-04-01 Thread Kele Huang
The addrl used to compare with SoftTLB entry should be sign-extended in common case, and it will cause constant failing in SoftTLB comparisons for the addrl whose address is over 0x8000 on the emulation of 32-bit guest on 64-bit host. This is an important performance bug fix. Spec2000 gzip rat

Re: [PATCH] iotests: Test mirror-top filter permissions

2021-04-01 Thread Max Reitz
On 01.04.21 10:32, Vladimir Sementsov-Ogievskiy wrote: 31.03.2021 15:28, Max Reitz wrote: Add a test accompanying commit 53431b9086b2832ca1aeff0c55e186e9ed79bd11 ("block/mirror: Fix mirror_top's permissions"). Signed-off-by: Max Reitz ---   tests/qemu-iotests/tests/mirror-top-perms | 121 +

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Vincent Bernat
❦ 1 avril 2021 10:38 +01, Daniel P. Berrangé: >> hw/smbios/smbios.c | 47 +- >> qemu-options.hx| 2 +- >> 2 files changed, 22 insertions(+), 27 deletions(-) > > It doesn't really make sense to have this as a separate patch > when it is deleting h

Re: [PATCH v2 2/2] hw/smbios: retrieve PCI address from specified device for Type 41

2021-04-01 Thread Daniel P . Berrangé
On Thu, Apr 01, 2021 at 12:07:30PM +0200, Vincent Bernat wrote: > ❦ 1 avril 2021 10:38 +01, Daniel P. Berrangé: > > >> hw/smbios/smbios.c | 47 +- > >> qemu-options.hx| 2 +- > >> 2 files changed, 22 insertions(+), 27 deletions(-) > > > > It does

[PATCH v2 04/11] tests/tcg/configure.sh: make sure we pick up x86_64 cross compilers

2021-04-01 Thread Alex Bennée
While it's hard to find cross compilers packaged for arches other than x86_64 the same cannot be said for the x86_64 compiler which is available on Debians i386, arm64 and ppc64el release architectures. Signed-off-by: Alex Bennée --- tests/tcg/configure.sh | 5 + 1 file changed, 5 insertions

[PATCH v2 09/11] docs/system/gdb.rst: Document how to debug multicore machines

2021-04-01 Thread Alex Bennée
From: Peter Maydell Document how multicore machines appear to GDB when debugged via the debug stub. This is particularly non-intuitive for the "multiple heterogenous clusters" case, but unfortunately as far as I know there is no way with the remote protocol for the stub to tell gdb "I have 2 infe

[PATCH v2 02/11] tests/docker: don't set DOCKER_REGISTRY on non-x86_64

2021-04-01 Thread Alex Bennée
Currently our gitlab registry is x86_64 only so attempting to pull an image from it on something else will end in tears. Reviewed-by: Willian Rampazzo Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 5 - 1 file changed

[PATCH for 6.0-rc2 v2 00/11] various fixes, pre-PR (check-tcg, gdbstub, gitlab)

2021-04-01 Thread Alex Bennée
Hi, A few more patches have been added: - gdbstub documentation - tweak the gdbstub sha1 test - tweaks for gitlab as well as fixing the i386-linux-user cross compile case (including detecting the support for -no-pie for cross compilers). Other than that it's just review tags. I plan to cut

[PATCH v2 05/11] tests/tcg/i386: expand .data sections for system tests

2021-04-01 Thread Alex Bennée
Newer compilers might end up putting some data in .data.rel.local which was getting skipped resulting in hilarious confusion on some tests. Fix that. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- tests/tcg/i386/system/kernel.ld | 2 +- 1 file changed, 1

[PATCH v2 11/11] gitlab-ci.yml: Test the dtrace backend in one of the jobs

2021-04-01 Thread Alex Bennée
From: Thomas Huth We are using the dtrace backend in downstream RHEL, so testing this in the CentOS 8 task seems to be a good fit. Signed-off-by: Thomas Huth Reviewed-by: Willian Rampazzo Message-Id: <20210331160351.3071279-1-th...@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.yml

[PATCH v2 07/11] tests/tcg: relax the next step precision of the gdb sha1 test

2021-04-01 Thread Alex Bennée
Depending on the version of gdb we may not execute the first line of SHA1Init when executing the first "next" command - instead just stepping over the preamble. As we don't actually care about the position of the PC after the steps and want to be sure the context->state[] has been loaded before we

[PATCH v2 01/11] tests/tcg: update the defaults for x86 compilers

2021-04-01 Thread Alex Bennée
You don't usually notice this is broken on developer system on x86 as we use the normal host compiler. However on other systems the -pc was extraneous. Also for 32 bit only i686 packages exist now so we should use those when available. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --

[PATCH v2 03/11] tests/tcg: add concept of container_hosts

2021-04-01 Thread Alex Bennée
While docker is nominally multarch these days it doesn't mean our distros actually package all cross compilers for all architectures. The upcoming Debian bullseye release will improve things further. At least for now we can get things like the 32 bit ARM compiler on it's 64 bit cousin. Signed-off-

[PATCH v2 08/11] docs/system/gdb.rst: Add some more heading structure

2021-04-01 Thread Alex Bennée
From: Peter Maydell We're about to add a new section to gdb.rst. In preparation, add some more headings so it isn't just one huge run-on section. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210325175023.13838-2-peter.mayd...@linaro.org> Signed-off-by: Alex B

[PATCH v2 10/11] gitlab-ci.yml: Fix the filtering for the git submodules

2021-04-01 Thread Alex Bennée
From: Thomas Huth Commit 7d7dbf9dc15be6e introduced a new line starting with "GIT_SUBMODULES_ACTION=" in the config-host.mak file. The grep that tries to determine the submodules in the gitlab-ci.yml file matches this new line, too, causing a warning message when updating the modules: warn: ign

[PATCH v2 06/11] tests/tcg/i386: force -fno-pie for test-i386

2021-04-01 Thread Alex Bennée
The containerised compiler defaults to no-pie anyway but if we are relying on the users installed cross compiler we need to check it works for building 16 bit code first. Signed-off-by: Alex Bennée --- tests/tcg/configure.sh | 6 ++ tests/tcg/i386/Makefile.target | 16 +-

[PATCH v2 1/6] Update linux header with new arm64 NV macro

2021-04-01 Thread Haibo Xu
Signed-off-by: Haibo Xu --- linux-headers/asm-arm64/kvm.h | 2 ++ linux-headers/linux/kvm.h | 1 + 2 files changed, 3 insertions(+) diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h index b6a0eaa32a..77b995a26c 100644 --- a/linux-headers/asm-arm64/kvm.h +++ b/linux-h

[PATCH v2 4/6] hw/intc/arm_gicv3: Enable support for setting vGIC maintenance IRQ

2021-04-01 Thread Haibo Xu
Using the new VGIC KVM device attribute to set the maintenance IRQ. This is fixed to use IRQ 25(PPI 9), as a platform decision matching the arm64 SBSA recommendation. Signed-off-by: Haibo Xu --- hw/arm/virt.c | 5 + hw/intc/arm_gicv3_common.c | 1 + hw/intc/arm

[PATCH v2 0/6] target/arm: Add nested virtualization support

2021-04-01 Thread Haibo Xu
v2: - Move the NV to a CPU feature flag(Andrea&Andrew) - Add CPU feature 'el2' test(Andrew) Many thanks to Andrea and Andrew for their comments! This series add support for ARMv8.3/8.4 nested virtualization support in KVM mode. It's based on Marc Zyngier's kernel KVM patches[1], and has been

[PATCH v2 5/6] target/arm/cpu: Enable 'el2' to work with host/max cpu

2021-04-01 Thread Haibo Xu
Turn off the 'el2' cpu property by default to keep in line with that in TCG mode, i.e. we can now use '-cpu max|host,el2=on' to enable the nested virtualization. Signed-off-by: Haibo Xu --- hw/arm/virt.c | 14 ++ target/arm/cpu.c | 3 ++- target/arm/cpu64.c | 1 + target/arm

[PATCH v2 2/6] target/arm/kvm: Add helper to detect el2 when using KVM

2021-04-01 Thread Haibo Xu
Signed-off-by: Haibo Xu --- target/arm/kvm64.c | 5 + target/arm/kvm_arm.h | 13 + 2 files changed, 18 insertions(+) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index dff85f6db9..9cacaf2eb8 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -721,6 +721,11 @@

[PATCH v2 6/6] target/arm: Add vCPU feature 'el2' test.

2021-04-01 Thread Haibo Xu
Signed-off-by: Haibo Xu --- target/arm/monitor.c | 2 +- tests/qtest/arm-cpu-features.c | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/target/arm/monitor.c b/target/arm/monitor.c index 80c64fa355..6c39238925 100644 --- a/target/arm/monitor.c +++ b/target/a

[PATCH v2 3/6] target/arm/kvm: Add an option to turn on/off el2 support

2021-04-01 Thread Haibo Xu
Adds an el2=[on/off] option to enable/disable el2(nested virtualization) support in KVM guest vCPU. Signed-off-by: Haibo Xu --- target/arm/cpu.c | 11 ++ target/arm/cpu.h | 4 target/arm/cpu64.c | 52 ++ 3 files changed, 67 insertions

Re: [PATCH RESEND] docs: clarify absence of set_features in vhost-user

2021-04-01 Thread Alex Bennée
Alyssa Ross writes: > The previous wording was (at least to me) ambiguous about whether a > backend should enable features immediately after they were set using > VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol > features to be acknowledged if it hasn't been yet before enabli

Re: [PATCH v3 05/11] esp: introduce esp_fifo_pop_buf() and use it instead of fifo8_pop_buf()

2021-04-01 Thread Mark Cave-Ayland
On 01/04/2021 10:34, Philippe Mathieu-Daudé wrote: On 4/1/21 9:49 AM, Mark Cave-Ayland wrote: The const pointer returned by fifo8_pop_buf() lies directly within the array used to model the FIFO. Building with address sanitisers enabled shows that if the Typo "sanitizers" Ha. It's definitel

  1   2   3   >