Re: [PATCH for-6.2 7/8] arch_init.h: Don't include arch_init.h unnecessarily

2021-07-31 Thread Alistair Francis
On Fri, Jul 30, 2021 at 9:04 PM Peter Maydell wrote: > > arch_init.h only defines the QEMU_ARCH_* enumeration and the > arch_type global. Don't include it in files that don't use those. > > Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Alistair > --- > blockdev.c

Windows on ARM64 not able to use attached TPM 2

2021-07-31 Thread Stefan Berger
Hello!  I maintain the TPM support in QEMU and the TPM emulator (swtpm). I have a report from a user who would like to use QEMU on ARM64 (aarch64) with EDK2 and use an attached TPM 2 but it doesn't seem to work for him. We know that Windows on x86_64 works with EDK2 and can use an attached

[PATCH] target/i386: cmpxchg should not touch accumulator

2021-07-31 Thread yqwfh
Signed-off-by: Daniele Ahmed --- target/i386/tcg/translate.c | 9 - 1 file changed, 9 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index aacb605..41386dd 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -5366,7 +5366,6

Re: "make check-acceptance" takes way too long

2021-07-31 Thread Peter Maydell
On Sat, 31 Jul 2021 at 19:43, Alex Bennée wrote: > > > Peter Maydell writes: > > > "make check-acceptance" takes way way too long. I just did a run > > on an arm-and-aarch64-targets-only debug build and it took over > > half an hour, and this despite it skipping or cancelling 26 out > > of 58

Re: [PATCH] target/mips: Remove JR opcode unused arguments

2021-07-31 Thread Richard Henderson
On 7/30/21 12:55 PM, Philippe Mathieu-Daudé wrote: case OPC_JR: -gen_compute_branch(ctx, op1, 4, rs, rd, sa, 4); +gen_compute_branch(ctx, op1, 4, rs, 0, 0, 4); Reviewed-by: Richard Henderson r~

[PATCH] hw/char: Add config for shakti uart

2021-07-31 Thread Vijai Kumar K
Use a dedicated UART config(CONFIG_SHAKTI_UART) to select shakti uart. Signed-off-by: Vijai Kumar K --- hw/char/Kconfig | 3 +++ hw/char/meson.build | 2 +- hw/riscv/Kconfig| 5 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/char/Kconfig b/hw/char/Kconfig index

Re: "make check-acceptance" takes way too long

2021-07-31 Thread Alex Bennée
Peter Maydell writes: > "make check-acceptance" takes way way too long. I just did a run > on an arm-and-aarch64-targets-only debug build and it took over > half an hour, and this despite it skipping or cancelling 26 out > of 58 tests! > > I think that ~10 minutes runtime is reasonable. 30 is

Re: "make check-acceptance" takes way too long

2021-07-31 Thread Cleber Rosa
On Sat, Jul 31, 2021 at 2:40 AM Thomas Huth wrote: > > On 31/07/2021 00.04, Cleber Rosa wrote: > > On Fri, Jul 30, 2021 at 11:43 AM Peter Maydell > > wrote: > >> > >> On Fri, 30 Jul 2021 at 16:12, Peter Maydell > >> wrote: > >>> > >>> "make check-acceptance" takes way way too long. I just did

Please help me understand VIRTIO_F_IOMMU_PLATFORM

2021-07-31 Thread Jason Thorpe
Hey folks — I’d like to be able to use VirtIO with qemu-system-alpha but, at least on a NetBSD x86_64 host, it does not currently work. This is because virtio_bus_device_plugged() in hw/virtio/virtio-bus.c ends up picking address_space_memory as the DMA address space for the VirtIODevice.

Re: [PATCH v2 0/2] coverity-scan: Add accelerator and sysemu components

2021-07-31 Thread Philippe Mathieu-Daudé
ping^2? On 7/22/21 6:08 PM, Philippe Mathieu-Daudé wrote: > ping? > > On 7/8/21 5:57 PM, Philippe Mathieu-Daudé wrote: >> Add 'sysemu' component for issues not related to TCG. >> >> Since v1: >> - add accelerator components (Peter) >> >> Supersedes: <20210619091342.3660495-1-f4...@amsat.org> >>

[PATCH-for-6.1?] target/mips: Remove MOVZ/MOVN opcodes from Loongson 2E

2021-07-31 Thread Philippe Mathieu-Daudé
Per the "Godson-2E User Manual v0.6", the Loongson 2E processor does not implement the MOVZ/MOVN instructions However it's enhanced version, the STLS2F01 processor, does. See STLS2F01 User Manual (rev 1), chapter 13.1 "The compliance overview": The STLS2F01 processor implements several special

[PATCH v2 1/2] migration: allow multifd for socket protocol only

2021-07-31 Thread Li Zhijian
multifd with unsupported protocol will cause a segment fault. (gdb) bt #0 0x563b4a93faf8 in socket_connect (addr=0x0, errp=0x7f7f02675410) at ../util/qemu-sockets.c:1190 #1 0x563b4a797a03 in qio_channel_socket_connect_sync (ioc=0x563b4d16e8c0, addr=0x0, errp=0x7f7f02675410) at

[PATCH v2 2/2] migration: allow enabling mutilfd for specific protocol only

2021-07-31 Thread Li Zhijian
And change the default to true so that in '-incoming defer' case, user is able to change multifd capability. Signed-off-by: Li Zhijian --- migration/migration.c | 8 migration/multifd.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/migration.c

[PATCH 2/2] migration/rdma: advise prefetch write for ODP region

2021-07-31 Thread Li Zhijian
The responder mr registering with ODP will sent RNR NAK back to the requester in the face of the page fault. - ibv_poll_cq wc.status=13 RNR retry counter exceeded! ibv_poll_cq wrid=WRITE RDMA! - ibv_advise_mr(3) helps to make pages present before the actual IO is conducted so that

[PATCH 0/2] enable fsdax rdma migration

2021-07-31 Thread Li Zhijian
Previous qemu face 2 problems when migrating a fsdax memory backend with RDMA protocol. (1) ibv_reg_mr failed with Operation not supported (2) requester(source) side could receive RNR NAK. For the (1), we can try to register memory region with ODP feature which has already been implemented in

[PATCH 1/2] migration/rdma: Try to register On-Demand Paging memory region

2021-07-31 Thread Li Zhijian
Previously, for the fsdax mem-backend-file, it will register failed with Operation not supported. In this case, we can try to register it with On-Demand Paging[1] like what rpma_mr_reg() does on rpma[2]. [1]: https://community.mellanox.com/s/article/understanding-on-demand-paging--odp-x [2]:

Re: "make check-acceptance" takes way too long

2021-07-31 Thread Thomas Huth
On 31/07/2021 00.04, Cleber Rosa wrote: On Fri, Jul 30, 2021 at 11:43 AM Peter Maydell wrote: On Fri, 30 Jul 2021 at 16:12, Peter Maydell wrote: "make check-acceptance" takes way way too long. I just did a run on an arm-and-aarch64-targets-only debug build and it took over half an hour,

[PATCH 6/6] coverity-model: write models fully for non-array allocation functions

2021-07-31 Thread Paolo Bonzini
Coverity seems to have issues figuring out the properties of g_malloc0 and other non *_n functions. While this was "fixed" by removing the custom second argument to __coverity_mark_as_afm_allocated__, inline the code from the array-based allocation functions to avoid future issues.

[PATCH 4/6] coverity-model: clean up the models for array allocation functions

2021-07-31 Thread Paolo Bonzini
sz is only used in one place, so replace it with nmemb * size in that one place. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/model.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c index

[PATCH 5/6] coverity-model: constrain g_malloc/g_malloc0/g_realloc as never returning NULL

2021-07-31 Thread Paolo Bonzini
g_malloc/g_malloc0/g_realloc only return NULL if the size is 0; we do not need to cover that in the model, and so far have expected __coverity_alloc__ to model a non-NULL return value. But that apparently does not work anymore, so add some extra conditionals that invoke __coverity_panic__ for

[PATCH 1/6] coverity-model: update address_space_read/write models

2021-07-31 Thread Paolo Bonzini
Use void * for consistency with the actual function; provide a model for MemoryRegionCache functions and for address_space_rw. These let Coverity understand the bounds of the data that various functions read and write even at very high levels of inlining (e.g. pci_dma_read). Signed-off-by: Paolo

[PATCH 2/6] coverity-model: make g_free a synonym of free

2021-07-31 Thread Paolo Bonzini
Recently, Coverity has started complaining about using g_free() to free memory areas allocated by GLib functions not included in model.c, such as g_strfreev. This unfortunately goes against the GLib documentation, which suggests that g_malloc() should be matched with g_free() and plain malloc()

[PATCH 3/6] coverity-model: remove model for more allocation functions

2021-07-31 Thread Paolo Bonzini
These models are not needed anymore now that Coverity does not check anymore that the result is used with "g_free". Coverity understands GCC attributes and uses them to detect leaks. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/model.c | 105 +- 1 file

[PATCH 0/6] Updates for Coverity modeling file

2021-07-31 Thread Paolo Bonzini
Recently, an update to the Coverity tools caused it to introduce hundreds of new complaints about using g_free() to free memory areas allocated by GLib functions. The solution adopted here (patch 2) is to just make g_free a synonym of free, removing the custom g_free marker from

Re: [PATCH V5 17/25] vfio-pci: cpr part 2

2021-07-31 Thread Zheng Chuan
On 2021/7/30 20:52, Steven Sistare wrote: > On 7/28/2021 12:56 AM, Zheng Chuan wrote: >> On 2021/7/20 2:38, Steven Sistare wrote: >>> On 7/19/2021 2:10 PM, Alex Williamson wrote: On Mon, 19 Jul 2021 13:44:08 -0400 Steven Sistare wrote: > On 7/16/2021 4:51 PM, Alex Williamson