Re: [PULL 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-08 Thread Denis V. Lunev
On 9/8/23 13:24, Denis V. Lunev wrote: On 9/8/23 13:03, Stefan Hajnoczi wrote: Please resolve the following CI failure: https://gitlab.com/qemu-project/qemu/-/jobs/5045998355 ninja: job failed: cc -m64 -mcx16 -Iqemu-nbd.p -I. -I.. -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/p11-kit-1 -I/usr

Re: [PULL 12/17] net: add initial support for AF_XDP network backend

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 02:45:02PM +0800, Jason Wang wrote: > From: Ilya Maximets > > AF_XDP is a network socket family that allows communication directly > with the network device driver in the kernel, bypassing most or all > of the kernel networking stack. In the essence, the technology is > p

Re: [PULL 00/17] Net patches

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 01:34:54PM +0200, Ilya Maximets wrote: > On 9/8/23 13:19, Stefan Hajnoczi wrote: > > Hi Ilya and Jason, > > There is a CI failure related to a missing Debian libxdp-dev package: > > https://gitlab.com/qemu-project/qemu/-/jobs/5046139967 > > > > I think the issue is that the

Re: [PATCH v4 12/15] vfio/common: Support device dirty page tracking with vIOMMU

2023-09-08 Thread Duan, Zhenzhong
On 9/8/2023 6:11 PM, Joao Martins wrote: On 08/09/2023 07:11, Duan, Zhenzhong wrote: Hi Joao, On 6/23/2023 5:48 AM, Joao Martins wrote: Currently, device dirty page tracking with vIOMMU is not supported, and a blocker is added and the migration is prevented. When vIOMMU is used, IOVA ranges

Re: [PULL 12/17] net: add initial support for AF_XDP network backend

2023-09-08 Thread Ilya Maximets
On 9/8/23 13:48, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023 at 02:45:02PM +0800, Jason Wang wrote: >> From: Ilya Maximets >> >> AF_XDP is a network socket family that allows communication directly >> with the network device driver in the kernel, bypassing most or all >> of the kernel network

Re: [PATCH v5 00/12] Implement Most ARMv8.3 Pointer Authentication Features

2023-09-08 Thread Peter Maydell
On Wed, 30 Aug 2023 at 00:24, Richard Henderson wrote: > > Changes for v5: > * Updates for review. > * Include linux-user ESR changes. > > Patch 10 is the only one without review. > > > r~ Applied to target-arm.next. Thanks to both you and Aaron for this work. -- PMM

Re: [PATCH] hw/intc/arm_gicv3_its: Avoid maybe-uninitialized error in get_vte()

2023-09-08 Thread Peter Maydell
On Thu, 31 Aug 2023 at 14:13, Philippe Mathieu-Daudé wrote: > > Fix when using GCC v11.4 (Ubuntu 11.4.0-1ubuntu1~22.04) with CFLAGS=-Og: > > [4/6] Compiling C object libcommon.fa.p/hw_intc_arm_gicv3_its.c.o > FAILED: libcommon.fa.p/hw_intc_arm_gicv3_its.c.o > inlined from ‘lookup_vte’ at

Re: [PULL 00/17] Net patches

2023-09-08 Thread Ilya Maximets
On 9/8/23 13:49, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023 at 01:34:54PM +0200, Ilya Maximets wrote: >> On 9/8/23 13:19, Stefan Hajnoczi wrote: >>> Hi Ilya and Jason, >>> There is a CI failure related to a missing Debian libxdp-dev package: >>> https://gitlab.com/qemu-project/qemu/-/jobs/504

Re: [virtio-dev] [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-08 Thread Alex Bennée
Stefan Hajnoczi writes: > On Fri, 8 Sept 2023 at 02:43, Alex Bennée wrote: >> >> >> Stefan Hajnoczi writes: >> >> > On Tue, Sep 05, 2023 at 10:34:11AM +0100, Alex Bennée wrote: >> >> >> >> Albert Esteve writes: >> >> >> >> > This looks great! Thanks for this proposal. >> >> > >> >> > On Fri,

Re: [PATCH v5 0/8] Xilinx Versal CFI support

2023-09-08 Thread Peter Maydell
On Thu, 31 Aug 2023 at 17:57, Francisco Iglesias wrote: > > Hi, > > This series adds support for the Configuration Frame Unit (CFU) and the > Configuration Frame controllers (CFRAME) to the Xilinx Versal machine > ([1], chapter 21) for emulaing bitstream loading and readback. > > The series starts

[PATCH RFC] vfio/common: Add an option to relax vIOMMU migration blocker

2023-09-08 Thread Joao Martins
Add an option 'x-migration-iommu-pt' to VFIO that allows it to relax whether the vIOMMU usage blocks the migration. The current behaviour is kept and we block migration in the following conditions: * By default if the guest does try to use vIOMMU migration is blocked when migration is attempted, j

Re: [PATCH v4 12/15] vfio/common: Support device dirty page tracking with vIOMMU

2023-09-08 Thread Joao Martins
On 08/09/2023 12:52, Duan, Zhenzhong wrote: > On 9/8/2023 6:11 PM, Joao Martins wrote: >> On 08/09/2023 07:11, Duan, Zhenzhong wrote: >>> Hi Joao, >>> >>> On 6/23/2023 5:48 AM, Joao Martins wrote: Currently, device dirty page tracking with vIOMMU is not supported, and a blocker is added a

Re: [PULL 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-08 Thread Eric Blake
On Fri, Sep 08, 2023 at 01:42:00PM +0200, Denis V. Lunev wrote: > On 9/8/23 13:24, Denis V. Lunev wrote: > > On 9/8/23 13:03, Stefan Hajnoczi wrote: > > > Please resolve the following CI failure: > > > > > > https://gitlab.com/qemu-project/qemu/-/jobs/5045998355 > > > > > > ../qemu-nbd.c: In func

Re: [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-08 Thread Alex Bennée
Stefan Hajnoczi writes: > On Fri, Sep 01, 2023 at 12:00:18PM +0100, Alex Bennée wrote: >> Currently QEMU has to know some details about the VirtIO device >> supported by a vhost-user daemon to be able to setup the guest. This >> makes it hard for QEMU to add support for additional vhost-user >>

Re: [PATCH v2] target/arm: Do not use gen_mte_checkN in trans_STGP

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 21:31, Richard Henderson wrote: > > STGP writes to tag memory, it does not check it. > This happened to work because we wrote tag memory first > so that the check always succeeded. > > Signed-off-by: Richard Henderson Applied to target-arm.next, thanks. -- PMM

Re: [PULL 00/17] Net patches

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 02:00:47PM +0200, Ilya Maximets wrote: > On 9/8/23 13:49, Daniel P. Berrangé wrote: > > On Fri, Sep 08, 2023 at 01:34:54PM +0200, Ilya Maximets wrote: > >> On 9/8/23 13:19, Stefan Hajnoczi wrote: > >>> Hi Ilya and Jason, > >>> There is a CI failure related to a missing Debia

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-08 Thread Kevin Wolf
Am 08.09.2023 um 11:27 hat Daniel P. Berrangé geschrieben: > On Fri, Sep 08, 2023 at 11:25:54AM +0200, Kevin Wolf wrote: > > Am 07.09.2023 um 11:35 hat Peter Maydell geschrieben: > > > On Thu, 7 Sept 2023 at 10:33, Markus Armbruster wrote: > > > > > > > > Kevin Wolf writes: > > > > > > > > > Am 0

Re: [PATCH] hw/intc/arm_gicv3: Simplify gicv3_class_name() logic

2023-09-08 Thread Peter Maydell
On Tue, 5 Sept 2023 at 15:56, Philippe Mathieu-Daudé wrote: > > Simplify gicv3_class_name() logic. No functional change intended. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/intc/arm_gicv3_common.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/hw/intc

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 02:16:35PM +0200, Kevin Wolf wrote: > Am 08.09.2023 um 11:27 hat Daniel P. Berrangé geschrieben: > > On Fri, Sep 08, 2023 at 11:25:54AM +0200, Kevin Wolf wrote: > > > Am 07.09.2023 um 11:35 hat Peter Maydell geschrieben: > > > > On Thu, 7 Sept 2023 at 10:33, Markus Armbruste

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-08 Thread Kevin Wolf
Am 08.09.2023 um 11:53 hat Peter Maydell geschrieben: > On Fri, 8 Sept 2023 at 10:26, Kevin Wolf wrote: > > > > Am 07.09.2023 um 11:35 hat Peter Maydell geschrieben: > > > On Thu, 7 Sept 2023 at 10:33, Markus Armbruster wrote: > > > > > > > > Kevin Wolf writes: > > > > > > > > > Am 04.09.2023 um

Re: [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing

2023-09-08 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:12, Philippe Mathieu-Daudé wrote: > > Fix: > > target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’: > target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’ > shadows a previous local [-Wshadow=compatible-local] > 509 |

Re: [PATCH] hw: forbid DEFINE_PROP_ARRAY for user creatable devices

2023-09-08 Thread Kevin Wolf
Am 08.09.2023 um 11:29 hat Daniel P. Berrangé geschrieben: > The DEFINE_PROP_ARRAY macro is a clever trick for defining array > properties. It initially creates a property "len-$FOO". When that > property is set, then it creates a sequence "$FOO[NN]" for NN > in the range 0 to "len-$FOO". > > The

Re: [PATCH v2 03/22] target/arm/hvf: Clean up local variable shadowing

2023-09-08 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:12, Philippe Mathieu-Daudé wrote: > > Per Peter Maydell analysis [*]: > > The hvf_vcpu_exec() function is not documented, but in practice > its caller expects it to return either EXCP_DEBUG (for "this was > a guest debug exception you need to deal with") or somethin

[PULL v2 00/13] NBD patches for 2023-09-07

2023-09-08 Thread Eric Blake
The following changes since commit 03a3a62fbd0aa5227e978eef3c67d3978aec9e5f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-09-07 10:29:06 -0400) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2023-09-07-v2 for you to

[PULL v2 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-08 Thread Eric Blake
From: "Denis V. Lunev" Closing stderr earlier is good for daemonized qemu-nbd under ssh earlier, but breaks the case where -v is being used to track what is happening in the server, as in iotest 233. When we know we are verbose, we should preserve original stderr and restore it once the setup st

Re: [PATCH v2 07/22] hw/arm/armv7m: Clean up local variable shadowing

2023-09-08 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:13, Philippe Mathieu-Daudé wrote: > > Fix: > > hw/arm/armv7m.c: In function ‘armv7m_realize’: > hw/arm/armv7m.c:520:27: warning: declaration of ‘sbd’ shadows a previous > local [-Wshadow=compatible-local] > 520 | SysBusDevice *sbd = SYS_BUS_DEVICE(&s-

Re: [PATCH v2 18/22] semihosting/arm-compat: Clean up local variable shadowing

2023-09-08 Thread Peter Maydell
On Mon, 4 Sept 2023 at 17:15, Philippe Mathieu-Daudé wrote: > > Fix: > > semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: > semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ shadows > a previous local [-Wshadow=local] > 379 | int ret, err = 0;

Re: [virtio-dev] [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-08 Thread Stefan Hajnoczi
A QEMU built-in VIRTIO device will also call virtio_add_queue() for the maximum number of virtqueues. I'm not sure what the concern is about adding as few virtqueues as possible? If the front-end's implementation is inefficient, then it should be optimized so that untouched virtqueues don't consu

[PATCH v2 01/10] target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Tim Wiederhake
Add the missing feature names for two bits in the FEAT_VMX_EPT_VPID_CAPS cpuid leaf. "vmx-ept-uc" is currently unused, but "vmx-ept-wb" is enabled for multiple cpu models. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

[PATCH v2 03/10] target/i386: Fix duplicated feature name in FEAT_KVM

2023-09-08 Thread Tim Wiederhake
The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with the documentation from https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html Fixes: 642258c6c7 ("kvm: add kvmclock to its second bit") Signed-off-by: Tim Wiederhake --

[PATCH v2 02/10] target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Tim Wiederhake
Fix a copy-paste-mistake in the FEAT_VMX_EPT_VIPD_CAPS cpuid leaf. The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with SDM volume 3, appendix A, section 10. Fixes: 20a78b02d3 ("target/i386: add VMX features") Signed-off-by: T

[PATCH v2 00/10] Generate x86 cpu features

2023-09-08 Thread Tim Wiederhake
Synchronizing the list of cpu features and models with qemu is a recurring task in libvirt. For x86, this is done by reading qom-list-properties for max-x86_64-cpu and manually filtering out everthing that does not look like a feature name, as well as parsing target/i386/cpu.c for cpu models. This

[PATCH v2 04/10] target/i386: Split out feature_word_info

2023-09-08 Thread Tim Wiederhake
The isolated part will be generated by a script. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 677 +--- target/i386/feature_word_info.c.inc | 676 +++ 2 files changed, 677 insertions(+), 676 deletions(-) create mode 1006

[PATCH v2 09/10] target/i386: Format feature_word_info.c.inc: Whitespaces and trailing commas

2023-09-08 Thread Tim Wiederhake
Having a consistent formatting minimizes the diff to the generated code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 44 + 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386/fe

[PATCH v2 07/10] target/i386: Format feature_word_info.c.inc: Fill out feat_names

2023-09-08 Thread Tim Wiederhake
This member is an array of length 64. Initializing all entries in this array allows for some simplification in the generating code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 355 +++- 1 file changed, 351 insertions(+), 4 deletions(-) diff --

[PATCH v2 08/10] target/i386: Format feature_word_info.c.inc: Unfold cpuid member

2023-09-08 Thread Tim Wiederhake
Having a consistent formatting minimizes the diff to the generated code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 101 +--- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386/fe

[PATCH v2 06/10] target/i386: Format feature_word_info.c.inc: Remove comments

2023-09-08 Thread Tim Wiederhake
The comments are preserved in the yaml file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 56 - 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386/feature_word_info.c.inc index

[PATCH v2 10/10] target/i386: Autogenerate feature_word_info.c.inc

2023-09-08 Thread Tim Wiederhake
This introduces no semantic changes to the file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 2 + target/i386/feature_word_info.py| 62 + target/i386/feature_word_info.yaml | 2 + 3 files changed, 66 insertions(+) create mode 100755

[PATCH v2 05/10] target/i386: Translate feature_word_info to yaml

2023-09-08 Thread Tim Wiederhake
This is the data file that will be used to generate the C code. All information, including the comments, is preserved. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.yaml | 695 + 1 file changed, 695 insertions(+) create mode 100644 target/i386/featu

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-08 Thread Peter Maydell
On Fri, 8 Sept 2023 at 13:22, Kevin Wolf wrote: > > Am 08.09.2023 um 11:53 hat Peter Maydell geschrieben: > > On Fri, 8 Sept 2023 at 10:26, Kevin Wolf wrote: > > > I have a patch to use QList (i.e. JSON lists) that seems to work for the > > > rocker case. Now I need to find and update all of thos

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-08 Thread Peter Maydell
On Thu, 31 Aug 2023 at 20:01, Colton Lewis wrote: > > Due to recent KVM changes, QEMU is setting a ptimer offset resulting > in unintended trap and emulate access and a consequent performance > hit. Filter out the PTIMER_CNT register to restore trapless ptimer > access. > > Quoting Andrew Jones: >

Re: [Qemu PATCH v2 7/9] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-09-08 Thread Jørgen Hansen
On 7/25/23 20:39, Fan Ni wrote: > From: Fan Ni > > Per CXL spec 3.0, two mailbox commands are implemented: > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and > Release Dynamic Capacity (Opcode 4803h) 8.2.9.8.9.4. > > Signed-off-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 253

Re: [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-08 Thread Stefan Hajnoczi
On Fri, Sep 08, 2023 at 01:03:26PM +0100, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > On Fri, Sep 01, 2023 at 12:00:18PM +0100, Alex Bennée wrote: > >> Currently QEMU has to know some details about the VirtIO device > >> supported by a vhost-user daemon to be able to setup the guest. Th

Re: [Qemu PATCH v2 6/9] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2023-09-08 Thread Jørgen Hansen
On 7/25/23 20:39, Fan Ni wrote: > From: Fan Ni > > Add dynamic capacity extent list representative to the definition of > CXLType3Dev and add get DC extent list mailbox command per > CXL.spec.3.0:.8.2.9.8.9.2. > > Signed-off-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 71

Re: [PATCH v2 15/22] net/eth: Clean up local variable shadowing

2023-09-08 Thread Eric Blake
On Mon, Sep 04, 2023 at 06:12:27PM +0200, Philippe Mathieu-Daudé wrote: > Fix: > > net/eth.c:435:20: error: declaration shadows a local variable > [-Werror,-Wshadow] > size_t input_size = iov_size(pkt, pkt_frags); >^ > net/eth.c:413:16: note: previous declarati

Re: [PULL 48/65] target/riscv/cpu.c: split kvm prop handling to its own helper

2023-09-08 Thread Philippe Mathieu-Daudé
On 8/9/23 08:04, Alistair Francis wrote: From: Daniel Henrique Barboza Future patches will split the existing Property arrays even further, and the existing code in riscv_cpu_add_user_properties() will start to scale bad with it because it's dealing with KVM constraints mixed in with TCG constr

Re: [PATCH v3 2/5] target/arm: Implement cortex-a710

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:25, Richard Henderson wrote: > > The cortex-a710 is a first generation ARMv9.0-A processor. > > Signed-off-by: Richard Henderson > --- > docs/system/arm/virt.rst | 1 + > hw/arm/virt.c| 1 + > target/arm/tcg/cpu64.c | 212 ++

Re: [PATCH v3 3/5] target/arm: Implement HCR_EL2.TIDCP

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:26, Richard Henderson wrote: > > Perform the check for EL2 enabled in the security space and the > TIDCP bit in an out-of-line helper. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.h| 1 + > target/arm/tcg/op_helper.c | 13 +

Re: [PATCH v3 1/5] target/arm: Implement RMR_ELx

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:25, Richard Henderson wrote: > > Provide a stub implementation, as a write is a "request". > > Signed-off-by: Richard Henderson I suppose in theory we should have a feature bit given that the register is not necessarily present if the CPU only supports AArch64. But we c

Re: [PATCH] pci: SLT must be RO

2023-09-08 Thread Marcin Juszkiewicz
W dniu 31.08.2023 o 12:05, Marcin Juszkiewicz pisze: W dniu 30.08.2023 o 23:48, Michael S. Tsirkin pisze: current code sets PCI_SEC_LATENCY_TIMER to WO, but for pcie to pcie bridges it must be RO 0 according to pci express spec which says: This register does not apply to PCI Express. It mus

Re: [PATCH v3 4/5] target/arm: Implement FEAT_TIDCP1

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:25, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > docs/system/arm/emulation.rst | 1 + > target/arm/cpu.h | 5 + > target/arm/helper.h| 1 + > target/arm/tcg/cpu64.c | 1 + > target/arm/tcg/op_helper.c

Re: [PATCH v3 5/5] target/arm: Enable SCTLR_EL1.TIDCP for user-only

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:25, Richard Henderson wrote: > > The linux kernel detects and enables this bit. Once trapped, > EC_SYSTEMREGISTERTRAP is treated like EC_UNCATEGORIZED, so > no changes required within linux-user/aarch64/cpu_loop.c. > > Signed-off-by: Richard Henderson Reviewed-by: Pete

Re: [PATCH v3 0/5] target/arm: Implement cortex-a710

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 00:25, Richard Henderson wrote: > > Changes for v3: > * 9 patches upstreamed > * Implement RMR_ELx generically, as a stub. > * Implement TIDCP and the closely related v8.8 FEAT_TIDCP1. > > > r~ > > > Richard Henderson (5): > target/arm: Implement RMR_ELx > target/a

Re: [PATCH 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-09-08 Thread Peter Maydell
On Fri, 1 Sept 2023 at 05:16, Ho, Tong wrote: > > Hi Richard, > > Thanks for your input. > > I have questions regarding using qemu/guest-random.h for QEMU device models. > > Using qemu/guest-random.h, how can this TRNG model ensure its independence > from > other uses of the same qemu_guest_getra

Re: [PATCH v4] arm/kvm: Enable support for KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE

2023-09-08 Thread Peter Maydell
On Tue, 5 Sept 2023 at 10:13, Shameer Kolothum wrote: > > Now that we have Eager Page Split support added for ARM in the kernel, > enable it in Qemu. This adds, > -eager-split-size to -accel sub-options to set the eager page split chunk > size. > -enable KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE. > >

Re: [PULL 00/17] Net patches

2023-09-08 Thread Ilya Maximets
On 9/8/23 14:15, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023 at 02:00:47PM +0200, Ilya Maximets wrote: >> On 9/8/23 13:49, Daniel P. Berrangé wrote: >>> On Fri, Sep 08, 2023 at 01:34:54PM +0200, Ilya Maximets wrote: On 9/8/23 13:19, Stefan Hajnoczi wrote: > Hi Ilya and Jason, > Th

Re: [PATCH v2 01/10] target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Igor Mammedov
On Fri, 8 Sep 2023 14:45:25 +0200 Tim Wiederhake wrote: > Add the missing feature names for two bits in the FEAT_VMX_EPT_VPID_CAPS > cpuid leaf. "vmx-ept-uc" is currently unused, but "vmx-ept-wb" is enabled > for multiple cpu models. > > Signed-off-by: Tim Wiederhake Reviewed-by: Igor Mammedo

Re: [PATCH 01/14] target/arm: Remove unused allocation_tag_mem() argument

2023-09-08 Thread Philippe Mathieu-Daudé
On 7/9/23 18:03, Peter Maydell wrote: The allocation_tag_mem() function takes an argument tag_size, but it never uses it. Remove the argument. In mte_probe_int() in particular this also lets us delete the code computing the value we were passing in. Signed-off-by: Peter Maydell Reviewed-by: Ric

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread Ani Sinha
> On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: > > On 08.09.23 11:50, Ani Sinha wrote: >> Depending on the number of available address bits of the current processor, a >> VM can only use a certain maximum amount of memory and no more. This change >> makes sure that a VM is not configur

Re: [PATCH 03/14] target/arm: Add ID_AA64ISAR2_EL1

2023-09-08 Thread Philippe Mathieu-Daudé
On 7/9/23 18:03, Peter Maydell wrote: From: Aaron Lindsay Signed-off-by: Aaron Lindsay [PMM: drop the HVF part of the patch and just comment that we need to do something when the register appears in that API] Signed-off-by: Peter Maydell --- target/arm/cpu.h | 1 + target/arm/helper.

Re: [PULL 00/17] Net patches

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 04:06:35PM +0200, Ilya Maximets wrote: > On 9/8/23 14:15, Daniel P. Berrangé wrote: > > On Fri, Sep 08, 2023 at 02:00:47PM +0200, Ilya Maximets wrote: > >> On 9/8/23 13:49, Daniel P. Berrangé wrote: > >>> On Fri, Sep 08, 2023 at 01:34:54PM +0200, Ilya Maximets wrote: >

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread David Hildenbrand
On 08.09.23 16:12, Ani Sinha wrote: On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor, a VM can only use a certain maximum amount of memory and no more. This change makes sure t

Re: [PATCH v2 02/10] target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Igor Mammedov
On Fri, 8 Sep 2023 14:45:26 +0200 Tim Wiederhake wrote: > Fix a copy-paste-mistake in the FEAT_VMX_EPT_VIPD_CAPS cpuid leaf. > The mistake became apparent as there were two features with the same name > in this cpuid leaf. The names are now in line with SDM volume 3, appendix A, > section 10. t

Re: [PATCH 05/14] target/arm: Pass unpriv bool to get_a64_user_mem_index()

2023-09-08 Thread Philippe Mathieu-Daudé
On 7/9/23 18:03, Peter Maydell wrote: In every place that we call the get_a64_user_mem_index() function we do it like this: memidx = a->unpriv ? get_a64_user_mem_index(s) : get_mem_index(s); Refactor so the caller passes in the bool that says whether they want the 'unpriv' or 'normal' mem_index

Re: [PATCH v2 03/10] target/i386: Fix duplicated feature name in FEAT_KVM

2023-09-08 Thread Igor Mammedov
On Fri, 8 Sep 2023 14:45:27 +0200 Tim Wiederhake wrote: > The mistake became apparent as there were two features with the same name > in this cpuid leaf. The names are now in line with the documentation from > https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html I'd describe what duplicat

[PATCH v3 01/16] vhost: Rework memslot filtering and fix "used_memslot" tracking

2023-09-08 Thread David Hildenbrand
Having multiple vhost devices, some filtering out fd-less memslots and some not, can mess up the "used_memslot" accounting. Consequently our "free memslot" checks become unreliable and we might run out of free memslots at runtime later. An example sequence which can trigger a potential issue that

[PATCH v3 03/16] softmmu/physmem: Fixup qemu_ram_block_from_host() documentation

2023-09-08 Thread David Hildenbrand
Let's fixup the documentation (e.g., removing traces of the ram_addr parameter that no longer exists) and move it to the header file while at it. Suggested-by: Igor Mammedov Acked-by: Igor Mammedov Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand ---

[PATCH v3 08/16] memory-device: Track required and actually used memslots in DeviceMemoryState

2023-09-08 Thread David Hildenbrand
Let's track how many memslots are required by plugged memory devices and how many are currently actually getting used by plugged memory devices. "required - used" is the number of reserved memslots. For now, the number of used and required memslots is always equal, and there are no reservations. T

[PATCH v3 00/16] virtio-mem: Expose device memory through multiple memslots

2023-09-08 Thread David Hildenbrand
Quoting from patch #14: Having large virtio-mem devices that only expose little memory to a VM is currently a problem: we map the whole sparse memory region into the guest using a single memslot, resulting in one gigantic memslot in KVM. KVM allocates metadata for the whole memslot

[PATCH v3 09/16] memory-device, vhost: Support memory devices that dynamically consume memslots

2023-09-08 Thread David Hildenbrand
We want to support memory devices that have a dynamically managed memory region container as device memory region. This device memory region maps multiple RAM memory subregions (e.g., aliases to the same RAM memory region), whereby these subregions can be (un)mapped on demand. Each RAM subregion w

[PATCH v3 07/16] stubs: Rename qmp_memory_device.c to memory_device.c

2023-09-08 Thread David Hildenbrand
We want to place non-qmp stubs in there, so let's rename it. While at it, put it into the MAINTAINERS file under "Memory devices". Signed-off-by: David Hildenbrand --- MAINTAINERS| 1 + stubs/{qmp_memory_device.c => memory_device.c} | 0 stubs/meson.build

[PATCH V5 0/2] migration file URI

2023-09-08 Thread Steve Sistare
Add the migration URI "file:filename[,offset=offset]". Fabiano Rosas has submitted the unit tests in the series migration: Test the new "file:" migration Changes in V5: * fixed GPL version Steve Sistare (2): migration: file URI migration: file URI offset migration/file.c | 103 ++

[PATCH v3 02/16] vhost: Remove vhost_backend_can_merge() callback

2023-09-08 Thread David Hildenbrand
Checking whether the memory regions are equal is sufficient: if they are equal, then most certainly the contained fd is equal. The whole vhost-user memslot handling is suboptimal and overly complicated. We shouldn't have to lookup a RAM memory regions we got notified about in vhost_user_get_mr_dat

[PATCH v3 13/16] memory: Clarify mapping requirements for RamDiscardManager

2023-09-08 Thread David Hildenbrand
We really only care about the RAM memory region not being mapped into an address space yet as long as we're still setting up the RamDiscardManager. Once mapped into an address space, memory notifiers would get notified about such a region and any attempts to modify the RamDiscardManager would be wr

[PATCH V5 2/2] migration: file URI offset

2023-09-08 Thread Steve Sistare
Allow an offset option to be specified as part of the file URI, in the form "file:filename,offset=offset", where offset accepts the common size suffixes, or the 0x prefix, but not both. Migration data is written to and read from the file starting at offset. If unspecified, it defaults to 0. This

[PATCH v3 05/16] vhost: Return number of free memslots

2023-09-08 Thread David Hildenbrand
Let's return the number of free slots instead of only checking if there is a free slot. Required to support memory devices that consume multiple memslots. This is a preparation for memory devices that consume multiple memslots. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c| 2

[PATCH v3 10/16] kvm: Add stub for kvm_get_max_memslots()

2023-09-08 Thread David Hildenbrand
We'll need the stub soon from memory device context. While at it, use "unsigned int" as return value and place the declaration next to kvm_get_free_memslots(). Signed-off-by: David Hildenbrand --- accel/kvm/kvm-all.c| 2 +- accel/stubs/kvm-stub.c | 5 + include/sysemu/kvm.h | 2 +- 3

Re: [PATCH V4 1/2] migration: file URI

2023-09-08 Thread Steven Sistare
On 9/8/2023 6:52 AM, Daniel P. Berrangé wrote: > On Wed, Aug 30, 2023 at 10:15:43AM -0400, Steven Sistare wrote: >> On 8/30/2023 9:16 AM, Daniel P. Berrangé wrote: >>> On Fri, Jun 30, 2023 at 07:25:07AM -0700, Steve Sistare wrote: Extend the migration URI to support file:. This can be used fo

[PATCH v3 14/16] virtio-mem: Expose device memory via multiple memslots if enabled

2023-09-08 Thread David Hildenbrand
Having large virtio-mem devices that only expose little memory to a VM is currently a problem: we map the whole sparse memory region into the guest using a single memslot, resulting in one gigantic memslot in KVM. KVM allocates metadata for the whole memslot, which can result in quite some memory w

[PATCH v3 12/16] memory-device, vhost: Support automatic decision on the number of memslots

2023-09-08 Thread David Hildenbrand
We want to support memory devices that can automatically decide how many memslots they will use. In the worst case, they have to use a single memslot. The target use cases are virtio-mem and the hyper-v balloon. Let's calculate a reasonable limit such a memory device may use, and instruct the dev

[PATCH v3 16/16] virtio-mem: Mark memslot alias memory regions unmergeable

2023-09-08 Thread David Hildenbrand
Let's mark the memslot alias memory regions as unmergable, such that flatview and vhost won't merge adjacent memory region aliases and we can atomically map/unmap individual aliases without affecting adjacent alias memory regions. This handles vhost and vfio in multiple-memslot mode correctly (whi

[PATCH v3 06/16] memory-device: Support memory devices with multiple memslots

2023-09-08 Thread David Hildenbrand
We want to support memory devices that have a memory region container as device memory region that maps multiple RAM memory regions. Let's start by supporting memory devices that statically map multiple RAM memory regions and, thereby, consume multiple memslots. We already have one device that use

[PATCH V5 1/2] migration: file URI

2023-09-08 Thread Steve Sistare
Extend the migration URI to support file:. This can be used for any migration scenario that does not require a reverse path. It can be used as an alternative to 'exec:cat > file' in minimized containers that do not contain /bin/sh, and it is easier to use than the fd: URI. It can be used in HMP c

[PATCH v3 04/16] kvm: Return number of free memslots

2023-09-08 Thread David Hildenbrand
Let's return the number of free slots instead of only checking if there is a free slot. While at it, check all address spaces, which will also consider SMM under x86 correctly. This is a preparation for memory devices that consume multiple memslots. Reviewed-by: Philippe Mathieu-Daudé Signed-off

[PATCH v3 11/16] vhost: Add vhost_get_max_memslots()

2023-09-08 Thread David Hildenbrand
Let's add vhost_get_max_memslots(). Signed-off-by: David Hildenbrand --- hw/virtio/vhost-stub.c| 5 + hw/virtio/vhost.c | 11 +++ include/hw/virtio/vhost.h | 1 + 3 files changed, 17 insertions(+) diff --git a/hw/virtio/vhost-stub.c b/hw/virtio/vhost-stub.c index d53dd

[PATCH v3 15/16] memory, vhost: Allow for marking memory device memory regions unmergeable

2023-09-08 Thread David Hildenbrand
Let's allow for marking memory regions unmergeable, to teach flatview code and vhost to not merge adjacent aliases to the same memory region into a larger memory section; instead, we want separate aliases to stay separate such that we can atomically map/unmap aliases without affecting other aliases

Re: [PATCH v2 02/10] target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Igor Mammedov
On Fri, 8 Sep 2023 16:17:31 +0200 Igor Mammedov wrote: > On Fri, 8 Sep 2023 14:45:26 +0200 > Tim Wiederhake wrote: > > > Fix a copy-paste-mistake in the FEAT_VMX_EPT_VIPD_CAPS cpuid leaf. > > The mistake became apparent as there were two features with the same name > > in this cpuid leaf. The

Re: [PATCH V5 1/2] migration: file URI

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 07:22:10AM -0700, Steve Sistare wrote: > Extend the migration URI to support file:. This can be used for > any migration scenario that does not require a reverse path. It can be > used as an alternative to 'exec:cat > file' in minimized containers that > do not contain /bi

Re: [PATCH V5 2/2] migration: file URI offset

2023-09-08 Thread Daniel P . Berrangé
On Fri, Sep 08, 2023 at 07:22:11AM -0700, Steve Sistare wrote: > Allow an offset option to be specified as part of the file URI, in > the form "file:filename,offset=offset", where offset accepts the common > size suffixes, or the 0x prefix, but not both. Migration data is written > to and read fro

Re: [PATCH v22 14/20] tests/avocado: s390x cpu topology core

2023-09-08 Thread Nina Schoetterl-Glausch
On Thu, 2023-09-07 at 10:27 +0200, Thomas Huth wrote: > On 01/09/2023 17.58, Nina Schoetterl-Glausch wrote: > > From: Pierre Morel > > > > Introduction of the s390x cpu topology core functions and > > basic tests. > > > > We test the correlation between the command line and > > the QMP results i

[PATCH v2] target/riscv: update checks on writing pmpcfg for Smepmp version 1.0

2023-09-08 Thread Alvin Chang
Current checks on writing pmpcfg for Smepmp follows Smepmp version 0.9.1. However, Smepmp specification has already been ratified, and there are some differences between version 0.9.1 and 1.0. In this commit we update the checks of writing pmpcfg to follow Smepmp version 1.0. When mseccfg.MML is s

[PATCH v2] target/riscv: update checks on writing pmpcfg for Smepmp version 1.0

2023-09-08 Thread Alvin Chang
Current checks on writing pmpcfg for Smepmp follows Smepmp version 0.9.1. However, Smepmp specification has already been ratified, and there are some differences between version 0.9.1 and 1.0. In this commit we update the checks of writing pmpcfg to follow Smepmp version 1.0. When mseccfg.MML is s

virtio-pci support for non-KVM hypervisors?

2023-09-08 Thread Srivatsa Vaddagiri
I was looking to add support for a Qualcomm hypervisor (Gunyah [1]) in Qemu and intend to publish the RFC patches soon. I noticed that hw/virtio/virtio-pci.c seems to support only KVM (esp related to use of IRQFD). Is there any efforts underway to make it support other hypervisors? I wanted to ref

[PATCH 00/11] qdev: Make array properties user accessible again

2023-09-08 Thread Kevin Wolf
Array properties have been inaccessible since commit f3558b1b both on the command line and in QMP. This series reworks them so that they are made accessible again in these external interfaces, this time as JSON lists. See patch 11 for details. Kevin Wolf (11): qdev: Add qdev_prop_set_array() h

[PATCH 05/11] hw/arm/sbsa-ref: Use qdev_prop_set_array()

2023-09-08 Thread Kevin Wolf
Instead of manually setting "foo-len" and "foo[i]" properties, build a QList and use the new qdev_prop_set_array() helper to set the whole array property with a single call. Signed-off-by: Kevin Wolf --- hw/arm/sbsa-ref.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH 06/11] hw/arm/vexpress: Use qdev_prop_set_array()

2023-09-08 Thread Kevin Wolf
Instead of manually setting "foo-len" and "foo[i]" properties, build a QList and use the new qdev_prop_set_array() helper to set the whole array property with a single call. Signed-off-by: Kevin Wolf --- hw/arm/vexpress.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions

[PATCH 03/11] hw/arm/mps2-tz: Use qdev_prop_set_array()

2023-09-08 Thread Kevin Wolf
Instead of manually setting "foo-len" and "foo[i]" properties, build a QList and use the new qdev_prop_set_array() helper to set the whole array property with a single call. Signed-off-by: Kevin Wolf --- hw/arm/mps2-tz.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --gi

[PATCH 11/11] qdev: Rework array properties based on list visitor

2023-09-08 Thread Kevin Wolf
Until now, array properties are actually implemented with a hack that uses multiple properties on the QOM level: a static "foo-len" property and after it is set, dynamically created "foo[i]" properties. In external interfaces (-device on the command line and device_add in QMP), this interface was

[PATCH 01/11] qdev: Add qdev_prop_set_array()

2023-09-08 Thread Kevin Wolf
Instead of exposing the ugly hack of how we represent arrays in qdev (a static "foo-len" property and after it is set, dynamically created "foo[i]" properties) to boards, add an interface that allows setting the whole array at once. Once all internal users of devices with array properties have bee

[PATCH 10/11] qom: Add object_property_set_default_list()

2023-09-08 Thread Kevin Wolf
This function provides a default for properties that are accessed using the list visitor interface. The default is always an empty list. Signed-off-by: Kevin Wolf --- include/qom/object.h | 8 qom/object.c | 6 ++ 2 files changed, 14 insertions(+) diff --git a/include/qom/o

<    1   2   3   4   >