Re: [PULL 11/63] hw/virtio: move stubs out of stubs/

2024-08-02 Thread Michael Tokarev
23.04.2024 18:08, Paolo Bonzini wrote: Since the virtio memory device stubs are needed exactly when the Kconfig symbol is not enabled, they can be placed in hw/virtio/ and conditionalized on CONFIG_VIRTIO_MD. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <202404081553

Re: [PATCH 10/18] bsd-user: Add RISC-V thread setup and initialization support

2024-08-02 Thread Warner Losh
On Fri, Aug 2, 2024 at 7:30 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/2/24 18:34, Ajeet Singh wrote: > > From: Mark Corbin > > > > Implemented functions for setting up and initializing threads in the > > RISC-V architecture. > > The 'target_thread_set_upcall' function set

Re: [PATCH 15/18] bsd-user: Implement RISC-V signal trampoline setup functions

2024-08-02 Thread Warner Losh
On Fri, Aug 2, 2024 at 7:46 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/2/24 18:34, Ajeet Singh wrote: > > From: Mark Corbin > > > > Added functions for setting up the RISC-V signal trampoline and signal > > frame: > > > > 'set_sigtramp_args()': Configures the RISC-V CPU st

[PATCH 16/17] bsd-user: Define validate_prot_to_pageflags and use in mprotect

2024-08-02 Thread Warner Losh
Define validate_prot_to_pageflags. Use it in target_mprotect to validate the flags. Our taraget_mmap needs more work before it can be used there, do don't copy linux-user's use of it there. This should hvae no net functional change, but does make target_mprotect more similar to linux-user's. Signe

[PATCH 14/17] bsd-user: target_mmap*: change prot to target_prot

2024-08-02 Thread Warner Losh
Adopt the linux-user convention of using target_prot for passed in protections. no functional change. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 47 --- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mm

[PATCH 15/17] bsd-user: target_mprotect: use helper host_page_size local

2024-08-02 Thread Warner Losh
Use helper variable for host_page_size. Linux-user uses a similar helper to make the code smaller after the multi-page-size migration. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mma

[PATCH 10/17] bsd-user: Pass image name down the stack

2024-08-02 Thread Warner Losh
Pass the image name down the stack so that we can give better error messages. Inspired by similar work in linux-user, and more likely to come. Signed-off-by: Warner Losh --- bsd-user/elfload.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/bsd-user/elflo

[PATCH 00/17] For 9.2: A bunch of cleanups and work towards variable pagesize support

2024-08-02 Thread Warner Losh
This series has a number of changes to reduce diffs between blitz and qemu-project. These are minor and self-contined. The second half of these changes are the next round of changes in the quest to support variable page sizes. These are building towards the final set of changes that will dynamical

[PATCH 09/17] bsd-user: target_msync unused, remove it

2024-08-02 Thread Warner Losh
Nothing calls target_msync in the upstream or blitz fork, so remove it. It will save us having to modernize it. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 17 - bsd-user/qemu.h | 1 - 2 files changed, 18 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index f3

[PATCH 11/17] bsd-user: Replace set_brk and padzero with zerobss from linux-user

2024-08-02 Thread Warner Losh
The zero_bss interface from linux-user is much better at doing this. Use it in preference to set_brk (badly named) and padzero. These both have issues with the new variable page size code, so it's best to just retire them and reuse the code from linux-user. Also start to use the error reporting cod

[PATCH 07/17] bsd-user: Remove deprecated -p argument

2024-08-02 Thread Warner Losh
FreeBSD never really used the -p argument, so it's safe to remove entirely. Signed-off-by: Warner Losh --- bsd-user/main.c | 8 1 file changed, 8 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 9ad31bd1efe..709ab10ddc1 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.

[PATCH 17/17] bsd-user: copy linux-user target_mprotect impl

2024-08-02 Thread Warner Losh
Now that we're closer to the linux-user target_mprotect code, go ahead and grab the rest of the implementation. This moves from a stard, end impl to a start, last which will allow last page mapping, etc. This also moves to a more general algorithm. We're close enough that this jump isn't so large,

[PATCH 06/17] bsd-user: Remove load_flt_binary prototype

2024-08-02 Thread Warner Losh
bsd-user doesn't have support for loading FLT binaries. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index f18a54cc933..b97a902a4c2 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -164,8 +164,6 @@ int

[PATCH 12/17] bsd-user: Use guest_range_valid_untagged to validate range

2024-08-02 Thread Warner Losh
This is the generic validation function, so remove some hand-rolled ones. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index fc69cb43ebd..ed8d31a9048 100644 --- a/bsd-user/mmap.c +

[PATCH 08/17] bsd-user: Eliminate unused qemu_uname_release

2024-08-02 Thread Warner Losh
bsd-user has never supported this, and FreeBSD make it easy to set this on a per-jail basis, so that the normal reporting routines that we pass through just work. Since this was never used, and never even in the usage(), retire it to cut down on the clutter. It was literally just a write-only varia

[PATCH 04/17] bsd-user: Implement cpu_copy()

2024-08-02 Thread Warner Losh
From: Stacey Son Catch up with 30ba0ee52d15 and implement cpu_copy(). It's needed for threading. Stacey's original code, with bug fixes from Jessica, Justin and myself. Signed-off-by: Stacey Son Signed-off-by: Jessica Clarke Signed-off-by: Justin Hibbits Signed-off-by: Warner Losh --- bsd-u

[PATCH 05/17] bsd-user: Eliminate unused regs arg in load_elf_binary

2024-08-02 Thread Warner Losh
Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 2 +- bsd-user/elfload.c | 3 +-- bsd-user/qemu.h| 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index 5b3c061a452..dcf3ca14fcc 100644 --- a/bsd-user/bsdload.c +++ b/bsd-user/bs

[PATCH 03/17] bsd-user: Make cpu_model and cpu_type file scope

2024-08-02 Thread Warner Losh
linux-user already does this since 2278b93941d4. That same commit just added them with main() scope to bsd-user. We need the cpu_type, like linux-user does, to create new CPUs outside of main to support threading. Move both cpu_model and cpu_type to mirror linux-user/main.c. Signed-off-by: Warner

[PATCH 13/17] bsd-user: target_mprotect: rename prot to target_prot

2024-08-02 Thread Warner Losh
Linux-user's target_mprotect uses this convention, so move to it. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index ed8d31a9048..d34075c5c64 100644 --- a/bsd-user/mmap.c ++

[PATCH 01/17] bsd-user: Delete TaskState next member

2024-08-02 Thread Warner Losh
The next struct member of TaskState is unused. Remove it. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 3736c417860..4ccbee265a1 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -83,7 +83,6 @@ struct

[PATCH 02/17] bsd-user: Make init_task_state global

2024-08-02 Thread Warner Losh
Restore init_task_state to its global status. It's needed for threading support outside of main. Signed-off-by: Warner Losh --- bsd-user/main.c | 2 +- bsd-user/qemu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index cc980e6f401..4d29e1

Re: [PATCH] hvf: arm: Fix hvf_sysreg_read_cp() call

2024-08-02 Thread Richard Henderson
On 8/2/24 18:37, Akihiko Odaki wrote: Commit 05b8d7249109 ("hvf: arm: Do not advance PC when raising an exception") changed val from uint64_t to a pointer to uint64_t in hvf_sysreg_read(), but didn't change its hvf_sysreg_read_cp() call. Fixes: 05b8d7249109 ("hvf: arm: Do not advance PC when rai

Re: [PULL 0/3] Migration patches for 2024-08-02

2024-08-02 Thread Richard Henderson
om/farosas/qemu.git tags/migration-20240802-pull-request for you to fetch changes up to 0bd5b9284fa94a6242a0d27a46380d93e753488b: migration/multifd: Fix multifd_send_setup cleanup when channel creation fails (2024-08-02 09:4

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Richard W.M. Jones
On Fri, Aug 02, 2024 at 02:26:06PM -0500, Eric Blake wrote: > Error messages from an NBD server must be treated as untrusted; a > malicious server can inject escape sequences to try and trigger RCE > flaws via escape sequences to whatever terminal happens to be running > qemu-img. This presentatio

[PATCH v5 2/7] acpi/generic_event_device: add an APEI error device

2024-08-02 Thread Mauro Carvalho Chehab
Adds a Generic Event Device to handle generic hardware error events, supporting General Purpose Event (GPE) as specified at ACPI 6.5 specification at 18.3.2.7.2: https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html#event-notification-for-generic-error-sources using HID PNP0C33. The PN

[PATCH v5 3/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-08-02 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling a General Purpose Event (GPE) via GED error device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan Came

[PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-02 Thread Mauro Carvalho Chehab
Using the QMP GHESv2 API requires preparing a raw data array containing a CPER record. Add a helper script with subcommands to prepare such data. Currently, only ARM Processor error CPER record is supported. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3 + scrip

[PATCH v5 1/7] arm/virt: place power button pin number on a define

2024-08-02 Thread Mauro Carvalho Chehab
Having magic numbers inside the code is not a good idea, as it is error-prone. So, instead, create a macro with the number definition. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/arm/virt-acpi-build.c | 6 +++--- hw/arm/virt.c| 7 --- include/hw/arm

[PATCH v5 0/7] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-02 Thread Mauro Carvalho Chehab
Testing OS kernel ACPI APEI CPER support is tricky, as one depends on having hardware with special-purpose BIOS and/or hardware. With QEMU, it becomes a lot easier, as it can be done via QMP. This series add support for injecting CPER records on ARM emulation. The QEMU side changes add a QAPI ab

[PATCH v5 4/7] acpi/ghes: Support GPIO error source

2024-08-02 Thread Mauro Carvalho Chehab
From: Jonathan Cameron Add error notification to GHES v2 using the GPIO source. [mchehab: do some cleanups at ACPI_HEST_SRC_ID_* checks] Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 16 ++-- include/hw/acpi/ghes.h | 3 ++- 2 f

[PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-02 Thread Mauro Carvalho Chehab
Creates a QMP command to be used for generic ACPI APEI hardware error injection (HEST) via GHESv2. The actual GHES code will be added at the followup patch. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS | 7 + hw/acpi/Kconfig | 5 hw/acpi/ghes_cper.c

[PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-02 Thread Mauro Carvalho Chehab
Provide a generic interface for error injection via GHESv2. This patch is co-authored: - original ghes logic to inject a simple ARM record by Shiju Jose; - generic logic to handle block addresses by Jonathan Cameron; - generic GHESv2 error inject by Mauro Carvalho Chehab; Co-authored-

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 21:26, Eric Blake wrote: Error messages from an NBD server must be treated as untrusted; a malicious server can inject escape sequences to try and trigger RCE flaws via escape sequences to whatever terminal happens to be running qemu-img. The easiest solution is to sanitize the output

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 21:26, Eric Blake wrote: My next patch needs to convert text from an untrusted input into an output representation that is suitable for display on a terminal is useful to more than just the json-writer; the text should normally be UTF-8, but blindly allowing all Unicode code points (inc

[PATCH-for-9.1 v5 1/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread Philippe Mathieu-Daudé
When booting Linux we see: PCI host bridge to bus :00 pci_bus :00: root bus resource [mem 0x1000-0x17ff] pci_bus :00: root bus resource [io 0x1000-0x1f] pci_bus :00: No busn resource found for root bus, will use [bus 00-ff] pci :00:00.0: [11ab:4620] type

[PATCH-for-9.1 v5 2/2] hw/pci-host/gt64120: Reset config registers during RESET phase

2024-08-02 Thread Philippe Mathieu-Daudé
Reset config values in the device RESET phase, not only once when the device is realized, because otherwise the device can use unknown values at reset. Since we are adding a new reset method, use the preferred Resettable API (for a simple leaf device reset, a DeviceClass::reset method and a Resett

[PATCH-for-9.1 v5 0/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread Philippe Mathieu-Daudé
v5: - correct wmask (Zoltan) v4: - invert patches order - set wmask in DeviceRealize - update patch descriptions (migration, Resettable API) Philippe Mathieu-Daudé (2): hw/pci-host/gt64120: Set PCI base address register write mask hw/pci-host/gt64120: Reset config registers during RESET phase

Re: [PATCH-for-9.1 v4 1/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 21:21, BALATON Zoltan wrote: On Fri, 2 Aug 2024, Philippe Mathieu-Daudé wrote: When booting Linux we see:  PCI host bridge to bus :00  pci_bus :00: root bus resource [mem 0x1000-0x17ff]  pci_bus :00: root bus resource [io  0x1000-0x1f]  pci_bus :00: No busn

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Richard W.M. Jones
On Fri, Aug 02, 2024 at 02:26:06PM -0500, Eric Blake wrote: > Error messages from an NBD server must be treated as untrusted; a > malicious server can inject escape sequences to try and trigger RCE > flaws via escape sequences to whatever terminal happens to be running > qemu-img. The easiest solu

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-02 Thread Richard W.M. Jones
On Fri, Aug 02, 2024 at 02:26:05PM -0500, Eric Blake wrote: > My next patch needs to convert text from an untrusted input into an > output representation that is suitable for display on a terminal is > useful to more than just the json-writer; the text should normally be > UTF-8, but blindly allowi

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-02 Thread Peter Xu
On Fri, Aug 02, 2024 at 12:40:33PM -0400, Michael S. Tsirkin wrote: > On Fri, Aug 02, 2024 at 12:26:22PM -0400, Peter Xu wrote: > > And that's why I was thinking (where I totally agree with you on this) that > > whether we should settle a short term plan first to be on the safe side > > that we sta

[PATCH for-9.1 0/2] NBD: don't print raw server error text to terminal

2024-08-02 Thread Eric Blake
I've requested a CVE from Red Hat, and hope to have an assigned number soon. Meanwhile, we can get review started, to make sure this is ready to include in 9.1. 'qemu-img info' should never print untrusted data in a way that might take over a user's terminal. There are probably other spots where

[PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Eric Blake
Error messages from an NBD server must be treated as untrusted; a malicious server can inject escape sequences to try and trigger RCE flaws via escape sequences to whatever terminal happens to be running qemu-img. The easiest solution is to sanitize the output with the same code we use to produce

[PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-02 Thread Eric Blake
My next patch needs to convert text from an untrusted input into an output representation that is suitable for display on a terminal is useful to more than just the json-writer; the text should normally be UTF-8, but blindly allowing all Unicode code points (including ASCII ESC) through to a termin

Re: [PATCH-for-9.1 v4 1/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread BALATON Zoltan
On Fri, 2 Aug 2024, Philippe Mathieu-Daudé wrote: When booting Linux we see: PCI host bridge to bus :00 pci_bus :00: root bus resource [mem 0x1000-0x17ff] pci_bus :00: root bus resource [io 0x1000-0x1f] pci_bus :00: No busn resource found for root bus, will use [

[PATCH-for-9.1 v4 0/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread Philippe Mathieu-Daudé
v4: - invert patches order - set wmask in DeviceRealize - update patch descriptions (migration, Resettable API) Philippe Mathieu-Daudé (2): hw/pci-host/gt64120: Set PCI base address register write mask hw/pci-host/gt64120: Reset config registers during RESET phase hw/pci-host/gt64120.c | 23

[PATCH-for-9.1 v4 2/2] hw/pci-host/gt64120: Reset config registers during RESET phase

2024-08-02 Thread Philippe Mathieu-Daudé
Reset config values in the device RESET phase, not only once when the device is realized, because otherwise the device can use unknown values at reset. Since we are adding a new reset method, use the preferred Resettable API (for a simple leaf device reset, a DeviceClass::reset method and a Resett

[PATCH-for-9.1 v4 1/2] hw/pci-host/gt64120: Set PCI base address register write mask

2024-08-02 Thread Philippe Mathieu-Daudé
When booting Linux we see: PCI host bridge to bus :00 pci_bus :00: root bus resource [mem 0x1000-0x17ff] pci_bus :00: root bus resource [io 0x1000-0x1f] pci_bus :00: No busn resource found for root bus, will use [bus 00-ff] pci :00:00.0: [11ab:4620] type

Re: [PATCH-for-9.1 v3 1/2] hw/pci-host/gt64120: Reset config registers during RESET phase

2024-08-02 Thread Philippe Mathieu-Daudé
On 1/8/24 19:13, Peter Maydell wrote: On Thu, 1 Aug 2024 at 18:03, Philippe Mathieu-Daudé wrote: +Peter who is tackling our Reset interface limitations, +Daniel for deprecation advices. On 1/8/24 17:37, Michael S. Tsirkin wrote: On Thu, Aug 01, 2024 at 05:30:38PM +0200, BALATON Zoltan wrote:

Re: [PATCH for-9.2 v11 06/11] pcie_sriov: Reuse SR-IOV VF device instances

2024-08-02 Thread Michael S. Tsirkin
On Fri, Aug 02, 2024 at 02:17:56PM +0900, Akihiko Odaki wrote: > Disable SR-IOV VF devices by reusing code to power down PCI devices > instead of removing them when the guest requests to disable VFs. This > allows to realize devices and report VF realization errors at PF > realization time. What k

Re: [PATCH v4 0/7] Rework x86 page table walks

2024-08-02 Thread Don Porter
On 7/23/24 23:39, Richard Henderson wrote: Hi Don. In addition to the other issues, this really needs to be broken up into many more patches. Every patch should do *one* thing:   - Code motion   - Introduce an API   - Introduce target-specific support for an API   - Use an API to implement a

Re: [PATCH for-9.2 v11 08/11] pcie_sriov: Remove num_vfs from PCIESriovPF

2024-08-02 Thread Michael S. Tsirkin
On Sat, Aug 03, 2024 at 12:38:10AM +0900, Akihiko Odaki wrote: > On 2024/08/02 21:58, Michael S. Tsirkin wrote: > > On Fri, Aug 02, 2024 at 02:17:58PM +0900, Akihiko Odaki wrote: > > > num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF > > > instead. > > > > > > Signed-off-by:

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-02 Thread Michael S. Tsirkin
On Fri, Aug 02, 2024 at 12:26:22PM -0400, Peter Xu wrote: > And that's why I was thinking (where I totally agree with you on this) that > whether we should settle a short term plan first to be on the safe side > that we start with migration always being compatible, then we figure the > other approa

Re: [PATCH v2] hw/mem/cxl_type3: reset dvsecs in ct3d_reset()

2024-08-02 Thread Jonathan Cameron via
On Fri, 26 Apr 2024 03:36:07 + "Zhijian Li (Fujitsu)" wrote: > ping > > Hi. I'm going to drop this again from my tree as it breaks the CDAT DOE (I was testing Dave's patches with Mike's numa memblk and access0/1 were empty :( I haven't looked in detail but it's probably because each PCIe

Re: [PATCH v3 17/24] tests/functional: Convert the virtio_gpu avocado test into a standalone test

2024-08-02 Thread Philippe Mathieu-Daudé
On 30/7/24 19:03, Daniel P. Berrangé wrote: From: Thomas Huth Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_virtio_gpu.py} | 64 +-- 2

Re: [PATCH v5 00/19] Reconstruct loongson ipi driver

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 05:07, gaosong wrote: 在 2024/7/23 下午6:19, Philippe Mathieu-Daudé 写道: On 19/7/24 15:04, Philippe Mathieu-Daudé wrote: On 19/7/24 14:56, Jiaxun Yang wrote: For the whole series: Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Yeah! Thanks! Tested on MIPS loongson3-virt with 2,

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-02 Thread Peter Xu
On Sat, Aug 03, 2024 at 12:54:51AM +0900, Akihiko Odaki wrote: > > > > I'm not sure if I read it right. Perhaps you meant something more > > > > generic > > > > than -platform but similar? > > > > > > > > For example, "-profile [PROFILE]" qemu cmdline, where PROFILE can be > > > > either > > >

Re: [PATCH v2 1/3] nbd: CVE-XXX: Use cookie to track generation of nbd-server

2024-08-02 Thread Eric Blake
On Fri, Aug 02, 2024 at 06:00:32PM GMT, Vladimir Sementsov-Ogievskiy wrote: > On 02.08.24 04:32, Eric Blake wrote: > [..] > > > -static void nbd_blockdev_client_closed(NBDClient *client, bool ignored) > > +static void nbd_blockdev_client_closed(NBDClient *client, uint32_t cookie, > > +

Re: [PATCH v3 19/24] tests/functional: Convert the ppc_amiga avocado test into a standalone test

2024-08-02 Thread Philippe Mathieu-Daudé
On 30/7/24 19:03, Daniel P. Berrangé wrote: From: Thomas Huth Use the Python standard zipfile module instead of avocado.utils for extracting the ZIP file that we download here, and use the standard subprocess module for running the "tail" command. Signed-off-by: Thomas Huth --- tests/avocad

Re: [PATCH v3 15/24] tests/functional: Convert the microblaze avocado tests into standalone tests

2024-08-02 Thread Philippe Mathieu-Daudé
On 30/7/24 19:03, Daniel P. Berrangé wrote: From: Thomas Huth The machine_microblaze.py file contained two tests, one for each endianess. Since we only support one QEMU target binary per file in the new functional test environment, we have to split this file up into two files now. Signed-off-b

Re: [PATCH v3 22/24] tests/functional: Convert the acpi-bits test into a standalone test

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 18:10, Philippe Mathieu-Daudé wrote: On 30/7/24 19:03, Daniel P. Berrangé wrote: From: Thomas Huth Mostly a straight-forward conversion. Looks like we can simply drop the avocado datadrainer stuff when not using the avocado framework anymore. Signed-off-by: Thomas Huth ---   .../ac

Re: [PATCH v3 22/24] tests/functional: Convert the acpi-bits test into a standalone test

2024-08-02 Thread Philippe Mathieu-Daudé
On 30/7/24 19:03, Daniel P. Berrangé wrote: From: Thomas Huth Mostly a straight-forward conversion. Looks like we can simply drop the avocado datadrainer stuff when not using the avocado framework anymore. Signed-off-by: Thomas Huth --- .../acpi-bits/bits-config/bits-cfg.txt| 0 .

Re: [PATCH v4 00/17] Introduce support for IGVM files

2024-08-02 Thread Daniel P . Berrangé
On Fri, Aug 02, 2024 at 04:57:13PM +0100, Roy Hopkins wrote: > On Wed, 2024-07-24 at 17:29 +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 03, 2024 at 12:05:38PM +0100, Roy Hopkins wrote: > > > Here is v4 of the set of patches to add support for IGVM files to QEMU. > > > This > > > is > > > based

Re: [PATCH 6/5] docs: Typo fix in live disk backup

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 15:30, Eric Blake wrote: Add in the missing space in the section header. Fixes: 1084159b31 ("qapi: deprecate drive-backup", v6.2.0) Signed-off-by: Eric Blake --- Noticed while figuring out where nbd docs would appear in [1] once [2] goes live: [1] https://www.qemu.org/docs/master/in

Re: [PATCH v4 00/17] Introduce support for IGVM files

2024-08-02 Thread Roy Hopkins
On Wed, 2024-07-24 at 17:29 +0100, Daniel P. Berrangé wrote: > On Wed, Jul 03, 2024 at 12:05:38PM +0100, Roy Hopkins wrote: > > Here is v4 of the set of patches to add support for IGVM files to QEMU. This > > is > > based on commit 1a2d52c7fc of qemu. > > > > This version addresses all of the revi

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-02 Thread Akihiko Odaki
On 2024/08/03 0:05, Peter Xu wrote: On Fri, Aug 02, 2024 at 01:30:51PM +0900, Akihiko Odaki wrote: On 2024/08/02 0:13, Peter Xu wrote: On Thu, Aug 01, 2024 at 02:05:54PM +0900, Akihiko Odaki wrote: On 2024/07/31 4:11, Peter Xu wrote: On Tue, Jul 30, 2024 at 07:46:12PM +0100, Daniel P. Berrang

Re: [PATCH] hvf: arm: Fix hvf_sysreg_read_cp() call

2024-08-02 Thread Philippe Mathieu-Daudé
On 2/8/24 10:37, Akihiko Odaki wrote: Commit 05b8d7249109 ("hvf: arm: Do not advance PC when raising an exception") changed val from uint64_t to a pointer to uint64_t in hvf_sysreg_read(), but didn't change its hvf_sysreg_read_cp() call. Fixes: 05b8d7249109 ("hvf: arm: Do not advance PC when rai

Re: [PATCH 6/6] qapi: expose all schema features to code

2024-08-02 Thread Daniel P . Berrangé
On Fri, Aug 02, 2024 at 03:50:33PM +0200, Markus Armbruster wrote: > Doesn't build for me: > > qapi/qapi-init-commands.c: In function ‘qmp_init_marshal’: > qapi/qapi-init-commands.c:70:84: error: > ‘QAPI_FEATURE_ALLOW_WRITE_ONLY_OVERLAY’ undeclared (first use in this > function) >

Re: [PATCH for-9.2 v11 08/11] pcie_sriov: Remove num_vfs from PCIESriovPF

2024-08-02 Thread Akihiko Odaki
On 2024/08/02 21:58, Michael S. Tsirkin wrote: On Fri, Aug 02, 2024 at 02:17:58PM +0900, Akihiko Odaki wrote: num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF instead. Signed-off-by: Akihiko Odaki --- include/hw/pci/pcie_sriov.h | 1 - hw/pci/pcie_sriov.c | 28

Re: [PATCH for-9.2] tests/qtest/migration: Remove vmstate-static-checker test

2024-08-02 Thread Peter Xu
On Fri, Aug 02, 2024 at 11:53:01AM -0300, Fabiano Rosas wrote: > I fumbled one of my last pull requests when fixing in-tree an issue > with commit 87d67fadb9 ("monitor: Stop removing non-duplicated > fds"). Basically mixed-up my `git add -p` and `git checkout -p` and > committed a piece of test inf

Re: [PATCH v2 1/2] block: zero data data corruption using prealloc-filter

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 16.07.24 16:32, Denis V. Lunev wrote: On 7/12/24 13:55, Vladimir Sementsov-Ogievskiy wrote: On 12.07.24 12:46, Andrey Drobyshev wrote: From: "Denis V. Lunev" We have observed that some clusters in the QCOW2 files are zeroed while preallocation filter is used. We are able to trace down the

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-02 Thread Peter Xu
On Fri, Aug 02, 2024 at 01:30:51PM +0900, Akihiko Odaki wrote: > On 2024/08/02 0:13, Peter Xu wrote: > > On Thu, Aug 01, 2024 at 02:05:54PM +0900, Akihiko Odaki wrote: > > > On 2024/07/31 4:11, Peter Xu wrote: > > > > On Tue, Jul 30, 2024 at 07:46:12PM +0100, Daniel P. Berrangé wrote: > > > > > On

Re: [PATCH v2 1/3] nbd: CVE-XXX: Use cookie to track generation of nbd-server

2024-08-02 Thread Vladimir Sementsov-Ogievskiy
On 02.08.24 04:32, Eric Blake wrote: As part of the QMP command nbd-server-start, the blockdev code was creating a single global nbd_server object, and telling the qio code to accept one or more client connections to the exposed listener socket. But even though we tear down the listener socket d

[PATCH v8 5/5] net/tap: Use qemu_close_all_open_fd()

2024-08-02 Thread Clément Léger
Instead of using a slow implementation to close all open fd after forking, use qemu_close_all_open_fd(). Signed-off-by: Clément Léger Reviewed-by: Richard Henderson --- net/tap.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7

[PATCH v8 4/5] qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd()

2024-08-02 Thread Clément Léger
In order for this function to be usable by tap.c code, add a list of file descriptors that should not be closed. Signed-off-by: Clément Léger --- include/qemu/osdep.h| 8 ++- system/async-teardown.c | 2 +- util/oslib-posix.c | 106 ++-- 3 files c

[PATCH v8 3/5] net/tap: Factorize fd closing after forking

2024-08-02 Thread Clément Léger
The same code is used twice to actually close all open file descriptors after forking. Factorize it in a single place. Signed-off-by: Clément Léger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- net/tap.c | 27 +-- 1 file changed, 13 insertions(+

[PATCH v8 0/5] qemu/osdep: add a qemu_close_all_open_fd() helper

2024-08-02 Thread Clément Léger
Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on POSIX"), the maximum number of file descriptors that can be opened are raised to nofile.rlim_max. On recent debian distro, this yield a maximum of 1073741816 file descriptors. Now, when forking to start qemu-bridge-helper, this ac

[PATCH v8 1/5] qemu/osdep: Move close_all_open_fds() to oslib-posix

2024-08-02 Thread Clément Léger
Move close_all_open_fds() in oslib-posix, rename it qemu_close_all_open_fds() and export it. Signed-off-by: Clément Léger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/qemu/osdep.h| 7 +++ system/async-teardown.c | 37 +-

[PATCH v8 2/5] qemu/osdep: Split qemu_close_all_open_fd() and add fallback

2024-08-02 Thread Clément Léger
In order to make it cleaner, split qemu_close_all_open_fd() logic into multiple subfunctions (close with close_range(), with /proc/self/fd and fallback). Signed-off-by: Clément Léger Reviewed-by: Richard Henderson --- util/oslib-posix.c | 50 ++ 1 fil

[PATCH for-9.2] tests/qtest/migration: Remove vmstate-static-checker test

2024-08-02 Thread Fabiano Rosas
I fumbled one of my last pull requests when fixing in-tree an issue with commit 87d67fadb9 ("monitor: Stop removing non-duplicated fds"). Basically mixed-up my `git add -p` and `git checkout -p` and committed a piece of test infra that has not been reviewed yet. This has not caused any bad symptom

Re: [PATCH v3] qmp: Use unsigned integers for address parameters

2024-08-02 Thread Josh Junon
On Fri, Aug 02, 2024 at 04:18:40PM +0200, Markus Armbruster wrote: > Let's go back to v1's title > > qmp: Fix higher half vaddrs for [p]memsave > > Josh Junon writes: > > > Fixes higher-half address parsing for QMP commands > > `[p]memsave`. > > > > Signed-off-by: Josh Junon > > --- > > q

Re: [PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-08-02 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 30, 2024 at 02:26:49PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote: >> >> QAPI's 'prefix' feature can make the connection between enumeration >> >> type and its c

[PULL 1/3] migration: Free removed SaveStateEntry

2024-08-02 Thread Fabiano Rosas
From: Akihiko Odaki This fixes LeakSanitizer warnings. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/savevm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index deb57833f8..85958d7b09 100644 ---

[PULL 2/3] migration: Fix cleanup of iochannel in file migration

2024-08-02 Thread Fabiano Rosas
The QIOChannelFile object already has its reference decremented by g_autoptr. Trying to unref an extra time causes: ERROR:../qom/object.c:1241:object_unref: assertion failed: (obj->ref > 0) Fixes: a701c03dec ("migration: Drop reference to QIOChannel if file seeking fails") Fixes: 6d3279655a ("mi

[PULL 3/3] migration/multifd: Fix multifd_send_setup cleanup when channel creation fails

2024-08-02 Thread Fabiano Rosas
When a channel fails to create, the code currently just returns. This is wrong for two reasons: 1) Channel n+1 will not get to initialize it's semaphores, leading to an assert when terminate_threads tries to post to it: qemu-system-x86_64: ../util/qemu-thread-posix.c:92: qemu_mutex_lock_impl

[PULL 0/3] Migration patches for 2024-08-02

2024-08-02 Thread Fabiano Rosas
The following changes since commit c4d242501a61093a8b80ee8f6dd071c5110a100c: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2024-08-02 15:53:54 +1000) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migration-202

Re: [PATCH v3] qmp: Use unsigned integers for address parameters

2024-08-02 Thread Markus Armbruster
Let's go back to v1's title qmp: Fix higher half vaddrs for [p]memsave Josh Junon writes: > Fixes higher-half address parsing for QMP commands > `[p]memsave`. > > Signed-off-by: Josh Junon > --- > qapi/machine.json | 11 +-- > system/cpus.c | 10 +- > 2 files changed,

[PATCH v3] qmp: Use unsigned integers for address parameters

2024-08-02 Thread Josh Junon
Fixes higher-half address parsing for QMP commands `[p]memsave`. Signed-off-by: Josh Junon --- qapi/machine.json | 11 +-- system/cpus.c | 10 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index fcfd249e2d..fb618dc99f

Re: [PATCH v2 1/3] nbd: CVE-XXX: Use cookie to track generation of nbd-server

2024-08-02 Thread Eric Blake
On Thu, Aug 01, 2024 at 08:32:06PM GMT, Eric Blake wrote: > As part of the QMP command nbd-server-start, the blockdev code was > creating a single global nbd_server object, and telling the qio code > to accept one or more client connections to the exposed listener > socket. But even though we tear

Re: [PATCH 18/18] bsd-user: Add RISC-V 64-bit Target Configuration and Debug XML Files

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Warner Losh Added configuration for RISC-V 64-bit target to the build system. Signed-off-by: Warner Losh Signed-off-by: Ajeet Singh --- configs/targets/riscv64-bsd-user.mak | 4 1 file changed, 4 insertions(+) create Reviewed-by: Richard Hen

Re: [PATCH 6/6] qapi: expose all schema features to code

2024-08-02 Thread Markus Armbruster
Doesn't build for me: qapi/qapi-init-commands.c: In function ‘qmp_init_marshal’: qapi/qapi-init-commands.c:70:84: error: ‘QAPI_FEATURE_ALLOW_WRITE_ONLY_OVERLAY’ undeclared (first use in this function) 70 | qmp_marshal_blockdev_snapshot, QCO_ALLOW_PRECONFIG

Re: [PATCH 17/18] bsd-user: Implement set_mcontext and get_ucontext_sigreturn for RISCV

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Mark Corbin Added implementations for 'set_mcontext' and 'get_ucontext_sigreturn' functions for RISC-V architecture, Both functions ensure that the CPU state and user context are properly managed. Signed-off-by: Mark Corbin Signed-off-by: Warner Losh Si

Re: [PATCH 16/18] bsd-user: Implement 'get_mcontext' for RISC-V

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Mark Corbin Added the 'get_mcontext' function to extract and populate the RISC-V machine context from the CPU state. This function is used to gather the current state of the general-purpose registers and store it in a 'target_mcontext_' structure. Signe

Re: [PATCH 15/18] bsd-user: Implement RISC-V signal trampoline setup functions

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Mark Corbin Added functions for setting up the RISC-V signal trampoline and signal frame: 'set_sigtramp_args()': Configures the RISC-V CPU state with arguments for the signal handler. It sets up the registers with the signal number,pointers to the sign

Re: [PATCH 6/5] docs: Typo fix in live disk backup

2024-08-02 Thread Eric Blake
On Fri, Aug 02, 2024 at 08:30:25AM GMT, Eric Blake wrote: > Add in the missing space in the section header. > > Fixes: 1084159b31 ("qapi: deprecate drive-backup", v6.2.0) > Signed-off-by: Eric Blake Regarding the subject line using [PATCH 6/5]: I meant to send the patch in-reply-to <202408011701

[PATCH] docs: Tweak location of qemu nbd extensions

2024-08-02 Thread Eric Blake
Upstream QEMU is moving the location of its NBD docs, as of its commit [1]. Instead of pointing to the raw git source file, point to the rendered html version built from rST. CC: qemu-devel@nongnu.org Signed-off-by: Eric Blake --- [1] Commit id TBD, I will update this patch to match realit

Re: [PATCH 14/18] bsd-user: Define RISC-V signal handling structures and constants

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Mark Corbin Added definitions for RISC-V signal handling, including structures and constants for managing signal frames and context Signed-off-by: Mark Corbin Signed-off-by: Ajeet Singh Co-authored-by: Warner Losh --- bsd-user/riscv/target_arch_signal

Re: [PATCH v2 6/7] qapi/block-core: derpecate block-job-change

2024-08-02 Thread Markus Armbruster
Typo in subject: it's "deprecate".

Re: [PATCH 13/18] bsd-user: Add generic RISC-V64 target definitions

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Warner Losh Added a generic definition for RISC-V64 target-specific details. Implemented the 'regpairs_aligned' function,which returns 'false' to indicate that register pairs are not aligned in the RISC-V64 ABI. Signed-off-by: Warner Losh Signed-off-by:

Re: [PATCH 12/18] bsd-user: Define RISC-V system call structures and constants

2024-08-02 Thread Richard Henderson
On 8/2/24 18:34, Ajeet Singh wrote: From: Mark Corbin Introduced definitions for the RISC-V system call interface, including the 'target_pt_regs' structure that outlines the register storage layout during a system call. Added constants for hardware machine identifiers. Signed-off-by: Mark Corbi

  1   2   3   >