Re: [PATCH v5 5/6] hw/arm/virt: Improve high memory region address assignment

2022-10-19 Thread Gavin Shan
Hi Eric, On 10/20/22 4:07 AM, Eric Auger wrote: On 10/12/22 01:18, Gavin Shan wrote: There are three high memory regions, which are VIRT_HIGH_REDIST2, VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses are floating on highest RAM address. However, they can be disabled in several

Re: [PATCH v5 6/6] hw/arm/virt: Add 'compact-highmem' property

2022-10-19 Thread Gavin Shan
Hi Connie, On 10/19/22 10:00 PM, Cornelia Huck wrote: On Wed, Oct 12 2022, Gavin Shan wrote: After the improvement to high memory region address assignment is applied, the memory layout can be changed, introducing possible migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory region is

Re: [PATCH v1 06/12] xen-hvm: move common functions to hw/xen/xen-hvm-common.c

2022-10-19 Thread Garhwal, Vikram
Thanks Paul & Julien for reviewing. I will update this in v2. Regards, Vikram From: Paul Durrant Date: Wednesday, October 19, 2022 at 9:16 AM To: Garhwal, Vikram , qemu-devel@nongnu.org Cc: Stabellini, Stefano , Stefano Stabellini , Anthony Perard , Michael S. Tsirkin , Marcel Apfelbaum , P

Re: [PATCH v5 6/6] hw/arm/virt: Add 'compact-highmem' property

2022-10-19 Thread Gavin Shan
Hi Eric, On 10/20/22 4:18 AM, Eric Auger wrote: On 10/12/22 01:18, Gavin Shan wrote: After the improvement to high memory region address assignment is applied, the memory layout can be changed, introducing possible migration breakage. For example, VIRT_HIGH_PCIE_MMIO memory region is disabled o

Re: [RFC PATCH] target/s390x: fake instruction loading when handling 'ex'

2022-10-19 Thread Richard Henderson
On 10/19/22 21:35, Alex Bennée wrote: The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. When plugins are enabled this breaks because we detect the ld_code2() loading from a non zero offset without the rest of the instruction

[PATCH] dump/win_dump: limit number of processed PRCBs

2022-10-19 Thread Viktor Prutyanov
When number of CPUs utilized by guest Windows is less than defined in QEMU (i.e., desktop versions of Windows severely limits number of CPU sockets), patch_and_save_context routine accesses non-existent PRCB and fails. So, limit number of processed PRCBs by NumberProcessors taken from guest Windows

Re: [PATCH v3 12/12] target/ppc: Use gvec to decode XVTSTDC[DS]P

2022-10-19 Thread Richard Henderson
On 10/19/22 22:50, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" Used gvec to translate XVTSTDCSP and XVTSTDCDP. xvtstdcsp: reptloopimm master version prev versioncurrent version 25 40000 0,2062000,040730 (-80.2%)0,0407

Re: [PATCH v4 5/5] test/acpi/bios-tables-test: SSDT: update golden master binaries

2022-10-19 Thread Robert Hoo
Ping... On Fri, 2022-10-07 at 21:27 +0800, Robert Hoo wrote: > Ping... > On Tue, 2022-09-27 at 08:30 +0800, Robert Hoo wrote: > > On Mon, 2022-09-26 at 15:22 +0200, Igor Mammedov wrote: > > > > > 0800200c9a66"), One, 0x05, Local0, One) > > > > > +CreateDWordField (Local3, Zero,

Re: [PATCH v2] vhost-vdpa: add support for vIOMMU

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 2:39 PM Cindy Lu wrote: > > Add support for vIOMMU. Register a memory listener to dma_as in > dev_start > - during region_add register a specific IOMMU notifier, and store all > notifiers in a list. > - during region_del, compare and delete the IOMMU notifier from the list

Re: [PATCH] MAINTAINERS: target/s390x/: add Ilya as reviewer

2022-10-19 Thread Richard Henderson
On 10/19/22 22:56, Christian Borntraeger wrote: Ilya has volunteered to review TCG patches for s390x. Signed-off-by: Christian Borntraeger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e3d5b7e09c46..ae5e8c8ecbb6 100644 --- a/MAINTAINERS +

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-19 Thread Richard Henderson
On 10/20/22 01:16, Greg Kurz wrote: When QEMU is started with `-daemonize`, all stdio descriptors get redirected to `/dev/null`. This basically means that anything printed with error_report() and friends is lost. One could hope that passing `-D ${logfile}` would cause the messages to go to `${lo

Re: [PATCH 2/4] target/i386: introduce function to set rounding mode from FPCW or MXCSR bits

2022-10-19 Thread Richard Henderson
On 10/20/22 01:06, Paolo Bonzini wrote: VROUND, FSTCW and STMXCSR all have to perform the same conversion from x86 rounding modes to softfloat constants. Since the ISA is consistent on the meaning of the two-bit rounding modes, extract the common code into a wrapper for set_float_rounding_mode.

Re: [PATCH 1/4] target/i386: decode-new: avoid out-of-bounds access to xmm_regs[-1]

2022-10-19 Thread Richard Henderson
On 10/20/22 01:06, Paolo Bonzini wrote: If the destination is a memory register, op->n is -1. Going through tcg_gen_gvec_dup_imm path is both useless (the value has been stored by the gen_* function already) and wrong because of the out-of-bounds access. Signed-off-by: Paolo Bonzini --- targ

Re: [PATCH 3/4] target/i386: implement F16C instructions

2022-10-19 Thread Richard Henderson
On 10/20/22 01:06, Paolo Bonzini wrote: F16C only consists of two instructions, which are a bit peculiar nevertheless. First, they access only the low half of an YMM or XMM register for the packed-half operand; the exact size still depends on the VEX.L flag. This is similar to the existing avx_m

Re: [PATCH 4/4] target/i386: implement FMA instructions

2022-10-19 Thread Richard Henderson
On 10/20/22 01:06, Paolo Bonzini wrote: The only issue with FMA instructions is that there are _a lot_ of them (30 opcodes, each of which comes in up to 4 versions depending on VEX.W and VEX.L). We can reduce the number of helpers to one third by passing four operands (one output and three input

[PATCH v8 6/9] target/arm: Change gen_jmp* to work on displacements

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/target/arm/translate.c b/tar

[PATCH v8 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/target/arm/transla

[PATCH v8 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 41 +++--- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-a6

[PATCH v8 5/9] target/arm: Remove gen_exception_internal_insn pc argument

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Since we always pass dc->pc_curr, fold the arithmetic to zero displacement. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 +++--- target/arm/translate.c | 10 ++

[PATCH v8 2/9] target/arm: Change gen_goto_tb to work on displacements

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 40 -- target/arm/translate.c | 10 ++ 2 files changed, 27 insertions(+), 23 delet

[PATCH v8 0/9] target/arm: pc-relative translation blocks

2022-10-19 Thread Richard Henderson
This is the Arm specific changes required to reduce the amount of translation for address space randomization. Changes for v8: * Add a comment to both gen_goto_tb concerning the ordering of the pc update vs the goto_tb opcode. r~ Richard Henderson (9): target/arm: Introduce curr_insn_len

[PATCH v8 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values by passing in pc difference. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-a32.h | 2 +- target/arm/translate.h | 6 ++-- target/arm/translate-a64.c | 32 +---

Re: [PATCH v4 13/24] target/arm: Add ptw_idx to S1Translate

2022-10-19 Thread Richard Henderson
On 10/17/22 20:01, Peter Maydell wrote: On Tue, 11 Oct 2022 at 04:30, Richard Henderson wrote: Hoist the computation of the mmu_idx for the ptw up to get_phys_addr_with_struct and get_phys_addr_twostage. This removes the duplicate check for stage2 disabled from the middle of the walk, performi

[PATCH v8 4/9] target/arm: Change gen_exception_insn* to work on displacements

2022-10-19 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.h| 5 +++-- target/arm/translate-a64.c| 28 ++- target/arm/translate-m-nocp.c | 6 ++--- target

[PATCH v8 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v7: Introduce DisasLabel to clean up pc_save frobbing. Adjust pc_save around tcg_remove_ops_after. --- target/arm/cpu-param.h| 1 + target/arm/translate.h| 50 +++- target/arm/cpu.c | 23 target/arm/tra

[PATCH v8 1/9] target/arm: Introduce curr_insn_len

2022-10-19 Thread Richard Henderson
A simple helper to retrieve the length of the current insn. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.h | 5 + target/arm/translate-vfp.c | 2 +- target/arm/translate.c | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) d

Re: [PATCH v2] vhost: Warn if DEVIOTLB_UNMAP is not supported and ats is set

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:27 PM Eric Auger wrote: > > Since b68ba1ca5767 ("memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP > IOMMUTLBNotificationType"), vhost attempts to register DEVIOTLB_UNMAP > notifier. This latter is supported by the intel-iommu which supports > device-iotlb if the corresponding op

Re: [PATCH] x86-iommu: Fail flag registration of DEVIOTLB if DT not supported

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 10:54 PM Peter Xu wrote: > > On Wed, Oct 19, 2022 at 04:12:22PM +0200, Eric Auger wrote: > > Hi Peter, > > > > On 10/19/22 16:01, Peter Xu wrote: > > > Hi, Eric, > > > > > > On Wed, Oct 19, 2022 at 01:24:15PM +0200, Eric Auger wrote: > > >>> @@ -1484,6 +1485,13 @@ static in

Re: [RFC PATCH v2 1/8] vdpa: Delete duplicated vdpa_feature_bits entry

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > This entry was duplicated on referenced commit. Removing it. > > Fixes: 402378407dbd ("vhost-vdpa: multiqueue support") > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > net/vhost-vdpa.c | 1 - > 1 file changed, 1 deletion(-)

Re: [PATCH v2 2/2] virtio-net: fix TX timer with tx_burst

2022-10-19 Thread Jason Wang
On Fri, Oct 14, 2022 at 9:20 PM Laurent Vivier wrote: > > When virtio_net_flush_tx() reaches the tx_burst value all > the queue is not flushed and nothing restart the timer. > > Fix that by doing for TX timer as we do for bottom half TX: > rearming the timer if we find any packet to send during th

Re: [RFC PATCH v2 2/8] vdpa: Save emulated features list in vhost_vdpa

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > At this moment only _F_LOG is added there. > > However future patches add features that depend on the kind of device. > In particular, only net devices can add VIRTIO_F_GUEST_ANNOUNCE. So > let's allow vhost_vdpa creator to set custom emulat

Re: [RFC PATCH v2 0/8] Guest announce feature emulation using Shadow VirtQueue

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > A gratuitous ARP is recommended after a live migration to reduce the amount of > time needed by the network links to be aware of the new location. A question: I think we need to deal with the case when GUSET_ANNOUNCE is not negotiated? E.d

Re: [RFC PATCH v2 3/8] vhost_net: Emulate link state up if backend doesn't expose it

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > At this moment this code path is not reached, but vdpa devices can offer > VIRTIO_NET_F_STATUS unconditionally. So I guess what you mean is that, for the parent that doesn't support VIRTIO_NET_F_STATUS, emulate one for making sure the ANNOU

Re: [RFC PATCH v2 5/8] vdpa: Remove shadow CVQ command check

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > The guest will see undefined behavior if it issue not negotiate > commands, bit it is expected somehow. > > Simplify code deleting this check. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > net/vhost-vdpa.c | 48 -

Re: [RFC PATCH v2 6/8] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > to the device. I wonder what happens for a device that has GUEST_ANNOUNCE support on its own? > Process all that command within qemu. > > Signed-off-by: Eugenio Pér

Re: [RFC PATCH v2 7/8] vhost_net: return VIRTIO_NET_S_ANNOUNCE is device model has it set

2022-10-19 Thread Jason Wang
On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > Temporal, as this affects other vhost backends and we must check status > feature first. > > Signed-off-by: Eugenio Pérez > --- > hw/net/vhost_net.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/hw/net/vhost_net.c b/hw/n

Re: [PATCH v5 4/6] hw/arm/virt: Introduce virt_get_high_memmap_enabled() helper

2022-10-19 Thread Eric Auger
On 10/12/22 01:18, Gavin Shan wrote: > This introduces virt_get_high_memmap_enabled() helper, which returns > the pointer to vms->highmem_{redists, ecam, mmio}. The pointer will > be used in the subsequent patches. > > No functional change intended. > > Signed-off-by: Gavin Shan > Tested-by: Zh

Re: [RESEND PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-10-19 Thread Pankaj Gupta
> In the ACPI specification [1], the 'unarmed' bit is set when a device > cannot accept a persistent write. This means that when a memdev is > read-only, the 'unarmed' flag must be turned on. The logic is correct, > just changing the error message. > > [1] ACPI NFIT NVDIMM Region Mapping Structure

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-19 Thread Markus Armbruster
"Christian A. Ehrhardt" writes: > Fix memset argument order: The second argument is > the value, the length goes last. Impact of the bug? > Cc: Eric DeVolder > Cc: qemu-sta...@nongnu.org > Fixes: f7e26ffa590 ("ACPI ERST: support for ACPI ERST feature") > Signed-off-by: Christian A. Ehrhardt >

Re: [PATCH] MAINTAINERS: target/s390x/: add Ilya as reviewer

2022-10-19 Thread Thomas Huth
On 19/10/2022 14.56, Christian Borntraeger wrote: Ilya has volunteered to review TCG patches for s390x. Signed-off-by: Christian Borntraeger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e3d5b7e09c46..ae5e8c8ecbb6 100644 --- a/MAINTAINERS

Re: [RFC PATCH v2 2/8] vdpa: Save emulated features list in vhost_vdpa

2022-10-19 Thread Eugenio Perez Martin
On Thu, Oct 20, 2022 at 6:23 AM Jason Wang wrote: > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > At this moment only _F_LOG is added there. > > > > However future patches add features that depend on the kind of device. > > In particular, only net devices can add VIRTIO_F_GUEST_A

Re: [RFC PATCH v2 3/8] vhost_net: Emulate link state up if backend doesn't expose it

2022-10-19 Thread Eugenio Perez Martin
On Thu, Oct 20, 2022 at 6:30 AM Jason Wang wrote: > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > At this moment this code path is not reached, but vdpa devices can offer > > VIRTIO_NET_F_STATUS unconditionally. > > So I guess what you mean is that, for the parent that doesn't su

Re: [PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-19 Thread Bin Meng
On Wed, Oct 19, 2022 at 12:00 AM Alex Bennée wrote: > > > Bin Meng writes: > > > Hi Alex, > > > > On Fri, Oct 7, 2022 at 1:31 PM Bin Meng wrote: > >> > >> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée wrote: > >> > > >> > > >> > Bin Meng writes: > >> > > >> > > In preparation to adding virtio-9p

Re: [PATCH v5 09/18] tests/qtest: Use send/recv for socket communication

2022-10-19 Thread Bin Meng
On Wed, Oct 19, 2022 at 12:47 AM Alex Bennée wrote: > > > Bin Meng writes: > > > From: Xuzhou Cheng > > > > Socket communication in the libqtest and libqmp codes uses read() > > and write() which work on any file descriptor on *nix, and sockets > > in *nix are an example of a file descriptor. >

Re: [PATCH v5 08/10] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits

2022-10-19 Thread Ani Sinha
On Wed, Oct 19, 2022 at 11:59 AM Ani Sinha wrote: > > On Wed, Oct 19, 2022 at 8:29 AM Ani Sinha wrote: > > > > This introduces QEMU acpi/smbios biosbits avocado test which is run > > from within the python virtual environment. When the bits tests are run, > > bits > > binaries are downloaded fro

Re: [PATCH v3 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-10-19 Thread Daniel P . Berrangé
On Wed, Aug 24, 2022 at 04:52:30PM +0800, Bin Meng wrote: > From: Bin Meng > > Fix the logic in qemu_add_wait_object() to avoid adding the same > HANDLE twice, as the behavior is undefined when passing an array > that contains same HANDLEs to WaitForMultipleObjects() API. Have you encountered th

Re: [PATCH v3 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-10-19 Thread Daniel P . Berrangé
On Wed, Aug 24, 2022 at 04:52:31PM +0800, Bin Meng wrote: > From: Bin Meng > > WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS > object handles. Correct the event array size in aio_poll() and > add a assert() to ensure it does not cause out of bound access. > > Signed-off-by: Bin

Re: [PATCH v3 1/3] util/main-loop: Fix maximum number of wait objects for win32

2022-10-19 Thread Daniel P . Berrangé
On Wed, Aug 24, 2022 at 04:52:29PM +0800, Bin Meng wrote: > From: Bin Meng > > The maximum number of wait objects for win32 should be > MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. > > Signed-off-by: Bin Meng > --- > > Changes in v3: > - move the check of adding the same HANDLE twice to

Re: [PATCH v10 6/9] s390x/cpu topology: add topology-disable machine property

2022-10-19 Thread Cornelia Huck
On Tue, Oct 18 2022, Cédric Le Goater wrote: > On 10/12/22 18:21, Pierre Morel wrote: >> S390 CPU topology is only allowed for s390-virtio-ccw-7.3 and >> newer S390 machines. >> We keep the possibility to disable the topology on these newer >> machines with the property topology-disable. >> >> S

Re: [PATCH v3 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-10-19 Thread Bin Meng
Hi Daniel, On Wed, Oct 19, 2022 at 4:32 PM Daniel P. Berrangé wrote: > > On Wed, Aug 24, 2022 at 04:52:30PM +0800, Bin Meng wrote: > > From: Bin Meng > > > > Fix the logic in qemu_add_wait_object() to avoid adding the same > > HANDLE twice, as the behavior is undefined when passing an array > >

[PATCH v6 1/1] hw/intc: Fix LoongArch extioi coreisr accessing

2022-10-19 Thread Xiaojuan Yang
When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. Signed-off-by: Xiaojuan Yang --- hw/intc/loongarch_extioi.c | 42 ++---

[PATCH v6 0/1] Fix LoongArch extioi coreisr accessing

2022-10-19 Thread Xiaojuan Yang
When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. Changes for v6: Only using MemTxAttrs' requester_id to get the cpu index in LoongArch extioi access

Re: [PATCH v5 09/18] tests/qtest: Use send/recv for socket communication

2022-10-19 Thread Thomas Huth
On 19/10/2022 09.09, Bin Meng wrote: On Wed, Oct 19, 2022 at 12:47 AM Alex Bennée wrote: Bin Meng writes: From: Xuzhou Cheng Socket communication in the libqtest and libqmp codes uses read() and write() which work on any file descriptor on *nix, and sockets in *nix are an example of a fi

Re: [PATCH v5 08/10] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits

2022-10-19 Thread Philippe Mathieu-Daudé
On 19/10/22 10:31, Ani Sinha wrote: On Wed, Oct 19, 2022 at 11:59 AM Ani Sinha wrote: On Wed, Oct 19, 2022 at 8:29 AM Ani Sinha wrote: This introduces QEMU acpi/smbios biosbits avocado test which is run from within the python virtual environment. When the bits tests are run, bits binaries ar

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-19 Thread Julien Grall
Hi Stefano, On 19/10/2022 01:15, Stefano Stabellini wrote: On Tue, 18 Oct 2022, Julien Grall wrote: On 18/10/2022 02:26, Stefano Stabellini wrote: On Sun, 16 Oct 2022, Julien Grall wrote: Hi, There seem to be some missing patches on xen-devel (including the cover letter). Is that expected?

Re: [PATCH v7 09/13] block: add BlockRAMRegistrar

2022-10-19 Thread Stefano Garzarella
On Thu, Oct 13, 2022 at 02:59:04PM -0400, Stefan Hajnoczi wrote: Emulated devices and other BlockBackend users wishing to take advantage of blk_register_buf() all have the same repetitive job: register RAMBlocks with the BlockBackend using RAMBlockNotifier. Add a BlockRAMRegistrar API to do this

Re: [PATCH v7 02/13] blkio: add libblkio block driver

2022-10-19 Thread Stefano Garzarella
On Thu, Oct 13, 2022 at 02:58:57PM -0400, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring, virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers under development. One of the rea

Re: [PATCH v7 00/13] blkio: add libblkio BlockDriver

2022-10-19 Thread Stefano Garzarella
I reviewed some patches (the others I do not feel confident of my knowledge). But I think we are in a very good shape and can merge from my point of view. Thanks again for this work, Stefano On Thu, Oct 13, 2022 at 02:58:55PM -0400, Stefan Hajnoczi wrote: v7: - Add nvme-io_uring and virtio-bl

Re: [External] CXL emulation in QEMU contribution

2022-10-19 Thread Jonathan Cameron via
On Tue, 18 Oct 2022 14:26:41 -0700 "Viacheslav A.Dubeyko" wrote: > Hi Jonathan, > > > On Oct 13, 2022, at 8:09 AM, Jonathan Cameron > > wrote: > > > > > > >> So, I would like to contribute to QEMU emulation of CXL memory > >> support. And I would like to see a TODO list. I hope this list

Re: [PATCH v7 13/13] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-10-19 Thread Stefano Garzarella
On Thu, Oct 13, 2022 at 02:59:08PM -0400, Stefan Hajnoczi wrote: Register guest RAM using BlockRAMRegistrar and set the BDRV_REQ_REGISTERED_BUF flag so block drivers can optimize memory accesses in I/O requests. This is for vdpa-blk, vhost-user-blk, and other I/O interfaces that rely on DMA mapp

Re: [PATCH v7 12/13] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-10-19 Thread Stefano Garzarella
On Thu, Oct 13, 2022 at 02:59:07PM -0400, Stefan Hajnoczi wrote: Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGI

Re: [PATCH v5 08/10] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits

2022-10-19 Thread Ani Sinha
On Wed, Oct 19, 2022 at 3:05 PM Philippe Mathieu-Daudé wrote: > > >>> +List, > >>> +Optional, > >>> +Sequence, > >>> +) > >>> +from qemu.machine import QEMUMachine > >>> +from avocado import skipIf > >>> +from avocado_qemu import QemuBaseTest > > >>> +@skipIf(os.getenv('GITLAB_CI'), 'R

[PATCH v4 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-10-19 Thread Bin Meng
From: Bin Meng Fix the logic in qemu_add_wait_object() to avoid adding the same HANDLE twice, as the behavior is undefined when passing an array that contains same HANDLEs to WaitForMultipleObjects() API. Signed-off-by: Bin Meng --- (no changes since v3) Changes in v3: - new patch: avoid addi

[PATCH v4 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-10-19 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil Reviewed-by: Marc-André Lureau Reviewe

[PATCH v4 1/3] util/main-loop: Fix maximum number of wait objects for win32

2022-10-19 Thread Bin Meng
From: Bin Meng The maximum number of wait objects for win32 should be MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. Signed-off-by: Bin Meng --- Changes in v4: - make the out of bounds access protection explicit Changes in v3: - move the check of adding the same HANDLE twice to a separet

Re: [PATCH v3 04/15] target/arm: ensure KVM traps set appropriate MemTxAttrs

2022-10-19 Thread Philippe Mathieu-Daudé
On 27/9/22 16:14, Alex Bennée wrote: Although most KVM users will use the in-kernel GIC emulation it is perfectly possible not to. In this case we need to ensure the MemTxAttrs are correctly populated so the GIC can divine the source CPU of the operation. Signed-off-by: Alex Bennée --- v3 -

Re: [PATCH v3 09/15] hw/timer: convert mptimer access to attrs to derive cpu index

2022-10-19 Thread Philippe Mathieu-Daudé
On 27/9/22 16:14, Alex Bennée wrote: This removes the hacks to deal with empty current_cpu. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - update for new fields - bool asserts --- hw/timer/arm_mptimer.c | 25 ++--- 1 file changed, 14 insertions

Re: [PATCH v3 11/15] gdbstub: move into its own sub directory

2022-10-19 Thread Philippe Mathieu-Daudé
On 27/9/22 16:15, Alex Bennée wrote: This is in preparation of future refactoring as well as cleaning up the source tree. Aside from the minor tweaks to meson and trace.h this is pure code motion. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- meson.build|

Re: [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub

2022-10-19 Thread Philippe Mathieu-Daudé
On 27/9/22 16:15, Alex Bennée wrote: Signed-off-by: Alex Bennée --- include/sysemu/kvm.h | 16 accel/kvm/kvm-all.c| 6 -- accel/stubs/kvm-stub.c | 5 - 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm

Re: [PATCH v6 1/1] hw/intc: Fix LoongArch extioi coreisr accessing

2022-10-19 Thread Philippe Mathieu-Daudé
On 19/10/22 11:15, Xiaojuan Yang wrote: When cpu read or write extioi COREISR reg, it should access "When the CPU reads or writes ..." the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. Signed-off-by: Xiaoj

Re: [PATCH] x86-iommu: Fail flag registration of DEVIOTLB if DT not supported

2022-10-19 Thread Eric Auger
Hi Peter, On 10/18/22 23:54, Peter Xu wrote: > All x86 IOMMUs need to fail DEVIOTLB notification registrations if DT is > not supported. Otherwise any device (e.g. vhost) can register with > DEVIOTLB but it'll never receive the notifications, causing device not > operational. > > Fixes: b68ba1ca5

Re: [PATCH] vhost: Warn if DEVIOTLB_UNMAP is not supported and ats is set

2022-10-19 Thread Eric Auger
Hi Peter, On 10/18/22 23:56, Peter Xu wrote: > On Tue, Oct 18, 2022 at 05:08:19PM +0200, Eric Auger wrote: >> Hi Peter, >> >> On 10/18/22 16:25, Peter Xu wrote: >>> Hi, Eric, >>> >>> On Tue, Oct 18, 2022 at 02:28:52PM +0200, Eric Auger wrote: Since b68ba1ca5767 ("memory: Add IOMMU_NOTIFIER_DE

[RFC PATCH] target/s390x: fake instruction loading when handling 'ex'

2022-10-19 Thread Alex Bennée
The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. When plugins are enabled this breaks because we detect the ld_code2() loading from a non zero offset without the rest of the instruction being there. Work around this with a sp

Re: Question about TCG backend correctness

2022-10-19 Thread LIU Zhiwei
On 2022/10/18 13:22, Richard Henderson wrote: On 10/18/22 01:27, LIU Zhiwei wrote: Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) to check the RISC-V backend. This is a good start for debugging a tcg backend. After fixing some bugs, RISU can run  some instructions now.

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-19 Thread Vishal Annapurve
On Thu, Sep 15, 2022 at 8:04 PM Chao Peng wrote: > > From: "Kirill A. Shutemov" > > KVM can use memfd-provided memory for guest memory. For normal userspace > accessible memory, KVM userspace (e.g. QEMU) mmaps the memfd into its > virtual address space and then tells KVM to use the virtual addres

[PATCH v2] vhost: Warn if DEVIOTLB_UNMAP is not supported and ats is set

2022-10-19 Thread Eric Auger
Since b68ba1ca5767 ("memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP IOMMUTLBNotificationType"), vhost attempts to register DEVIOTLB_UNMAP notifier. This latter is supported by the intel-iommu which supports device-iotlb if the corresponding option is set. Then 958ec334bca3 ("vhost: Unbreak SMMU and virt

Re: [PATCH v3 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-10-19 Thread David Hildenbrand
On 14.10.22 15:47, David Hildenbrand wrote: This is a follow-up on "util: NUMA aware memory preallocation" [1] by Michal. Setting the CPU affinity of threads from inside QEMU usually isn't easily possible, because we don't want QEMU -- once started and running guest code -- to be able to mess up

Re: [RESEND PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-10-19 Thread David Hildenbrand
On 18.10.22 18:49, Michael S. Tsirkin wrote: On Tue, Oct 18, 2022 at 06:17:55PM +0200, Philippe Mathieu-Daudé wrote: On 18/10/22 17:25, Julia Suvorova wrote: In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is

Re: [PATCH] MAINTAINERS: Replace my amsat.org email address

2022-10-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The amsat.org domain is having issues with DMARC / SPF / DKIM: > https://lore.kernel.org/qemu-devel/CAMVc7JUy5NeEN0q=4zfZvn_rppgqn9wicV1z=tsluhks3ry...@mail.gmail.com/ > > Consolidate all of my MAINTAINERS entries on my work address. > > Signed-off-by: Philippe Ma

[RFC PATCH v2 7/8] vhost_net: return VIRTIO_NET_S_ANNOUNCE is device model has it set

2022-10-19 Thread Eugenio Pérez
Temporal, as this affects other vhost backends and we must check status feature first. Signed-off-by: Eugenio Pérez --- hw/net/vhost_net.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 5660606c1d..300f370e2a 100644 --- a/hw/net/vhost_ne

[PATCH v3 10/12] target/ppc: Moved XVTSTDC[DS]P to decodetree

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVTSTDCSP and XVTSTDCDP to decodetree an restructured the helper to be simpler and do all decoding in the decodetree (so XB, XT and DCMX are all calculated outside the helper). Obs: The tests in this one are slightly different, these are the sum of the

[RFC PATCH v2 6/8] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-10-19 Thread Eugenio Pérez
Since this capability is emulated by qemu shadowed CVQ cannot forward it to the device. Process all that command within qemu. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

[PATCH v3 09/12] target/ppc: Use gvec to decode XVCPSGN[SD]P

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVCPSGNSP and XVCPSGNDP to decodetree and used gvec to translate them. xvcpsgnsp: reptloopmaster patch 8 12500 0,00561400 0,00537900 (-4.2%) 25 40000,00562100 0,0040 (-28.8%) 100 10000,00

[PATCH v3 01/12] target/ppc: Moved VMLADDUHM to decodetree and use gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VMLADDUHM to decodetree a creates a gvec implementation using mul_vec and add_vec. reptloopmaster patch 8 12500 0,01810500 0,00903100 (-50.1%) 25 40000,01739400 0,00747700 (-57.0%) 100

[RFC PATCH v2 0/8] Guest announce feature emulation using Shadow VirtQueue

2022-10-19 Thread Eugenio Pérez
A gratuitous ARP is recommended after a live migration to reduce the amount of time needed by the network links to be aware of the new location. A hypervisor may not have the knowledge of the guest network configuration, and this is especially true on passthrough devices, so its simpler to ask the

[PATCH v3 00/12] VMX/VSX instructions with gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Patches missing review: 12 v2 -> v3: - Used ctpop in i32 and i64 vprtyb - Changed gvec set up in xvtstdc[ds]p v1 -> v2: - Implemented instructions with fni4/fni8 and dropped the helper: * VSUBCUW * VADDCUW * VPRTYBW

[PATCH v3 02/12] target/ppc: Move VMH[R]ADDSHS instruction to decodetree

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" This patch moves VMHADDSHS and VMHRADDSHS to decodetree I couldn't find a satisfactory implementation with TCG inline. vmhaddshs: reptloopmaster patch 8 12500 0,02983400 0,02648500 (-11.2%) 25 40000,02946000

[RFC PATCH v2 3/8] vhost_net: Emulate link state up if backend doesn't expose it

2022-10-19 Thread Eugenio Pérez
At this moment this code path is not reached, but vdpa devices can offer VIRTIO_NET_F_STATUS unconditionally. While the guest must assume that link is always up by the standard, qemu will set the status bit to 1 always in this case. This makes little use by itself, but VIRTIO_NET_F_STATUS is neede

[PATCH v3 04/12] target/ppc: Move VNEG[WD] to decodtree and use gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved the instructions VNEGW and VNEGD to decodetree and used gvec to decode it. vnegw: reptloopmaster patch 8 12500 0,01053200 0,00548400 (-47.9%) 25 40000,01030500 0,0039 (-62.2%) 100 10000,0

[RFC PATCH v2 4/8] vdpa: Expose VIRTIO_NET_F_STATUS unconditionally

2022-10-19 Thread Eugenio Pérez
Now that qemu can handle and emulate it if the vdpa backend does not support it we can offer it always. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 3803452800..fca21d5b79 100644 --- a/net/vhost

[PATCH v3 05/12] target/ppc: Move VPRTYB[WDQ] to decodetree and use gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved VPRTYBW and VPRTYBD to use gvec and both of them and VPRTYBQ to decodetree. VPRTYBW and VPRTYBD now also use .fni4 and .fni8, respectively. vprtybw: reptloopmaster patch 8 12500 0,01198900 0,00703100 (-41.4%) 25

[RFC PATCH v2 1/8] vdpa: Delete duplicated vdpa_feature_bits entry

2022-10-19 Thread Eugenio Pérez
This entry was duplicated on referenced commit. Removing it. Fixes: 402378407dbd ("vhost-vdpa: multiqueue support") Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 4bc3fd01a8..eebf29f5c1 100644 --- a/n

[PATCH v3 06/12] target/ppc: Move VAVG[SU][BHW] to decodetree and use gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved the instructions VAVGUB, VAVGUH, VAVGUW, VAVGSB, VAVGSH, VAVGSW, to decodetree and use gvec with them. For these one the right shift had to be made before the sum as to avoid an overflow, so add 1 at the end if any of the entries had 1 in its LSB as to

[PATCH v3 07/12] target/ppc: Move VABSDU[BHW] to decodetree and use gvec

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved VABSDUB, VABSDUH and VABSDUW to decodetree and use gvec to translate them. vabsdub: reptloopmaster patch 8 12500 0,03601600 0,00688500 (-80.9%) 25 40000,03651000 0,00532100 (-85.4%) 100 10000

[PATCH v3 08/12] target/ppc: Use gvec to decode XV[N]ABS[DS]P/XVNEG[DS]P

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XVABSSP, XVABSDP, XVNABSSP,XVNABSDP, XVNEGSP and XVNEGDP to decodetree and used gvec to translate them. xvabssp: reptloopmaster patch 8 12500 0,00477900 0,00476000 (-0.4%) 25 40000,00442800 0,0035330

[RFC PATCH v2 8/8] vdpa: Offer VIRTIO_NET_F_GUEST_ANNOUNCE feature if SVQ is enabled

2022-10-19 Thread Eugenio Pérez
So qemu emulates it in case the device does not support it. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 5fda405a66..64442e8455 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -566,6 +56

[PATCH] MAINTAINERS: target/s390x/: add Ilya as reviewer

2022-10-19 Thread Christian Borntraeger
Ilya has volunteered to review TCG patches for s390x. Signed-off-by: Christian Borntraeger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e3d5b7e09c46..ae5e8c8ecbb6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -305,6 +305,7 @@ F: target/rx/

Re: [PATCH] MAINTAINERS: target/s390x/: add Ilya as reviewer

2022-10-19 Thread Ilya Leoshkevich
On Wed, 2022-10-19 at 14:56 +0200, Christian Borntraeger wrote: > Ilya has volunteered to review TCG patches for s390x. > > Signed-off-by: Christian Borntraeger > --- >  MAINTAINERS | 1 + >  1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index e3d5b7e09c46..ae5e8c8ec

[PATCH v3 11/12] target/ppc: Moved XSTSTDC[QDS]P to decodetree

2022-10-19 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Moved XSTSTDCSP, XSTSTDCDP and XSTSTDCQP to decodetree and moved some of its decoding away from the helper as previously the DCMX, XB and BF were calculated in the helper with the help of cpu_env, now that part was moved to the decodetree with the rest. xvts

[RFC PATCH v2 5/8] vdpa: Remove shadow CVQ command check

2022-10-19 Thread Eugenio Pérez
The guest will see undefined behavior if it issue not negotiate commands, bit it is expected somehow. Simplify code deleting this check. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 48 1 file changed, 48 deletions(-) diff --git a/net/vho

  1   2   >