Re: [PATCH 06/30] bsd-user/arm/target_arch_cpu.h: Correct code pointer

2022-01-14 Thread Peter Maydell
On Fri, 14 Jan 2022 at 06:38, Warner Losh wrote: > > > > On Thu, Jan 13, 2022 at 10:15 AM Peter Maydell > wrote: >> >> On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: >> > >> > The code has moved in FreeBSD since the emulator was started, update the >> > comment to reflect that change. Remove n

Re: [PULL V3 00/13] Net patches

2022-01-14 Thread Peter Maydell
On Fri, 14 Jan 2022 at 09:19, Jason Wang wrote: > > > 在 2022/1/14 下午1:08, Jason Wang 写道: > > The following changes since commit f8d75e10d3e0033a0a29a7a7e4777a4fbc17a016: > > > >Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220112' > > into staging (2022-01-13 11:18:24 +)

Re max ISA serial ports

2022-01-14 Thread Ani Sinha
I have a question re the following commit : commit def337ffda34d331404bd7f1a42726b71500df22 Author: Peter Maydell Date: Fri Apr 20 15:52:46 2018 +0100 serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS Does this mean that this limit of 4 slots qemu / hypervisor specific or

Re: [PATCH 01/17] ppc/pnv: use PHB4 obj in pnv_pec_stk_pci_xscom_ops

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: The current relationship between PnvPhb4PecStack and PnvPHB4 objects is overly complex. Recent work done in pnv_phb4.c and pnv_phb4_pec.c shows that the stack obj role in the overall design is more of a placeholder for its 'phb' object, having no a

Re: [PATCH 00/17] remove PnvPhb4PecStack from Powernv9

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: Hi, After all the done enabling pnv-phb4 user devices, it became clear that the stack object is just a container of the PHB and its resources than something that needs to be maintained by its own. Removing the PnvPhb4PecStack object promotes a sim

Re: [PATCH 02/17] ppc/pnv: move PCI registers to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: Previous patch changed pnv_pec_stk_pci_xscom_read() and pnv_pec_stk_pci_xscom_write() to use a PnvPHB4 opaque, making it easier to move both pci_regs[] and the pci_regs_mr MemoryRegion to the PnvHB4 object. Signed-off-by: Daniel Henrique Barboza

Re: [PATCH 06/17] ppc/pnv: move mmbar0/mmbar1 and friends to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: These 2 MemoryRegions, together with mmio(0|1)_base and mmio(0|1)_size variables, are used together in the same functions. We're better of moving them all in a single step. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater

Re: [PATCH 04/17] ppc/pnv: move intbar to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This MemoryRegion can also be moved in a single step. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 18 +- include/hw/pci-host/pnv_phb4.h | 2 +-

Re: [PATCH 03/17] ppc/pnv: move phbbar to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This MemoryRegion is simple enough to be moved in a single step. A 'stack->phb' pointer had to be introduced in pnv_pec_stk_update_map() because this function isn't ready to be fully converted to use a PnvPHB4 pointer instead. This will be dealt w

Re: [PATCH 07/17] ppc/pnv: move nest_regs[] to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: stack->nest_regs[] is used in several XSCOM functions and it's one of the main culprits of having to deal with stack->phb pointers around the code. Sure, we're having to add 2 extra stack->phb pointers to ease nest_regs[] migration to PnvPHB4. The

Re: [PATCH 08/17] ppc/pnv: change pnv_pec_stk_update_map() to use PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: stack->nest_regs_mr wasn't migrated to PnvPHB4 together with phb->nest_regs[] in the previous patch. We were unable to cleanly convert its write MemoryRegionOps, pnv_pec_stk_nest_xscom_write(), to use PnvPHB4 instead of PnvPhb4PecStack due to pnv_p

Re: [PATCH 05/17] ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: The function does not rely on stack for anything it does anymore. This is also one less instance of 'stack->phb' that we need to worry about. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-hos

Re: [PATCH 10/17] ppc/pnv: move phb_regs_mr to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: After recent changes, this MemoryRegion can be migrated to PnvPHB4 without too much trouble. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 6 +++--- include/hw/pci-

Re: [PATCH 09/17] ppc/pnv: move nest_regs_mr to PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: We're now able to cleanly move nest_regs_mr to the PnvPHB4 device. One thing of notice here is the need to use a phb->stack->pec pointer because pnv_pec_stk_nest_xscom_write requires a PEC object. Another thing that can be noticed in the use of 's

Re: Re max ISA serial ports

2022-01-14 Thread Peter Maydell
On Fri, 14 Jan 2022 at 10:31, Ani Sinha wrote: > > I have a question re the following commit : > > commit def337ffda34d331404bd7f1a42726b71500df22 > Author: Peter Maydell > Date: Fri Apr 20 15:52:46 2018 +0100 > > serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS > > > Does t

Re: [PULL v5 00/18] Build system and KVM changes for 2021-12-23

2022-01-14 Thread Peter Maydell
On Wed, 12 Jan 2022 at 15:23, Paolo Bonzini wrote: > > The following changes since commit b37778b840f6dc6d1bbaf0e8e0641b3d48ad77c5: > > linux-user: Fix clang warning for nios2-linux-user code (2022-01-12 > 09:22:01 +) > > are available in the Git repository at: > > https://gitlab.com/bonz

Re: [PATCH 12/17] ppc/pnv: introduce PnvPHB4 'pec' property

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This property will track the owner PEC of this PHB. For now it's redundant since we can retrieve the PEC via phb->stack->pec but it will not be redundant when we get rid of the stack device. Signed-off-by: Daniel Henrique Barboza Reviewed-by:

Re: [PATCH 13/17] ppc/pnv: remove stack pointer from PnvPHB4

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This pointer was being used for two reasons: pnv_phb4_update_regions() was using it to access the PHB and phb4_realize() was using it as a way to determine if the PHB was user created. We can determine if the PHB is user created via phb->pec, intr

Re: [PATCH 17/17] ppc/pnv: rename pnv_pec_stk_update_map()

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This function does not use 'stack' anymore. Rename it to pnv_pec_phb_update_map(). Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH 11/17] ppc/pnv: introduce PnvPHB4 'phb_number' property

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: One of the remaining dependencies we have on the PnvPhb4PecStack object is the stack->stack_no property. This is set as the position the stack occupies in the pec->stacks[] array. We need a way to report this same value in the PnvPHB4. This patch

Re: [PATCH 16/17] ppc/pnv: remove PnvPhb4PecStack object

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: All the complexity that was scattered between PnvPhb4PecStack and PnvPHB4 are now centered in the PnvPHB4 device. PnvPhb4PecStack does not serve any purpose in the current code base. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric L

Re: [PATCH 15/17] ppc/pnv: convert pec->stacks[] into pec->phbs[]

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This patch changes the design of the PEC device to use PHB4s instead of PecStacks. After all the recent changes, PHB4s now contain all the information needed for their proper functioning, not relying on PecStack in any capacity. All changes are be

Re: [PATCH 14/17] ppc/pnv: move default_phb_realize() to pec_realize()

2022-01-14 Thread Cédric Le Goater
On 1/13/22 20:29, Daniel Henrique Barboza wrote: This is the last step before making the PEC device uses PHB4s directly. Move the current pnv_pec_stk_default_phb_realize() call to pec_realize(), renaming the function to pnv_pec_default_phb_realize(), and set the PHB attributes using the PEC objec

Re: [PATCH v2 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > When building QEMU with --disable-vhost-user and using introspection, > query-qmp-schema lists vhost-user-blk even though it's not actually > available: > > { "execute": "query-qmp-schema" } > { > "return": [ > ... > { >

Re: [PATCH V2 for-6.2 2/2] block/rbd: workaround for ceph issue #53784

2022-01-14 Thread Ilya Dryomov
On Thu, Jan 13, 2022 at 3:44 PM Peter Lieven wrote: > > librbd had a bug until early 2022 that affected all versions of ceph that > supported fast-diff. This bug results in reporting of incorrect offsets > if the offset parameter to rbd_diff_iterate2 is not object aligned. > > This patch works aro

Re: [PATCH] Mark remaining global TypeInfo instances as const

2022-01-14 Thread Philippe Mathieu-Daudé via
On 13/1/22 18:10, Bernhard Beschow wrote: More than 1k of TypeInfo instances are already marked as const. Mark the remaining ones, too. Signed-off-by: Bernhard Beschow --- hw/core/generic-loader.c | 2 +- hw/core/guest-loader.c | 2 +- hw/display/bcm2835_fb.c| 2 +- hw/display/i2

Re: [PATCH V2 for-6.2 0/2] fixes for bdrv_co_block_status

2022-01-14 Thread Ilya Dryomov
On Thu, Jan 13, 2022 at 3:44 PM Peter Lieven wrote: > > V1->V2: > Patch 1: Treat a hole just like an unallocated area. [Ilya] > Patch 2: Apply workaround only for pre-Quincy librbd versions and > ensure default striping and non child images. [Ilya] > > Peter Lieven (2): > block/rbd:

Re: [PATCH 2/2] docker: add msitools to Fedora/mingw cross

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 09:43, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau That should help catch build issues/regressions with wixl. Signed-off-by: Marc-André Lureau --- tests/docker/dockerfiles/fedora-win32-cross.docker | 1 + tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +

Re: [PATCH 1/2] build-sys: fix undefined ARCH error

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 09:43, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../qga/meson.build:76:4: ERROR: Key ARCH is not in the dictionary. Fixes commit 823eb013 ("configure, meson: move ARCH to meson.build") Signed-off-by: Marc-André Lureau --- qga/meson.build | 2 +- 1 file changed,

Re: [PATCH 23/30] bsd-user/signal.c: sigset manipulation routines.

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:53, Warner Losh wrote: > > target_sigemptyset: resets a set to having no bits set > qemu_sigorset: computes the or of two sets > target_sigaddset: adds a signal to a set > target_sigismember: returns true when signal is a member > host_to_target_sigset_internal: con

Re: [PATCH 4/6] migration: Add ram-only capability

2022-01-14 Thread Markus Armbruster
Nikita Lapshin writes: > If this capability is enabled migration stream > will have RAM section only. > > Signed-off-by: Nikita Lapshin [...] > diff --git a/qapi/migration.json b/qapi/migration.json > index d53956852c..626fc59d14 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json >

Re: [PATCH v5 02/14] hw/core/machine: Introduce CPU cluster topology support

2022-01-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi, > > On 12/28/21 10:22, Yanan Wang wrote: [...] >> diff --git a/qapi/machine.json b/qapi/machine.json >> index edeab6084b..ff0ab4ca20 100644 >> --- a/qapi/machine.json >> +++ b/qapi/machine.json >> @@ -1404,7 +1404,9 @@ >> # >> # @dies: number of dies per s

Re: [PATCH 11/17] ppc/pnv: introduce PnvPHB4 'phb_number' property

2022-01-14 Thread Daniel Henrique Barboza
On 1/14/22 07:46, Cédric Le Goater wrote: On 1/13/22 20:29, Daniel Henrique Barboza wrote: One of the remaining dependencies we have on the PnvPhb4PecStack object is the stack->stack_no property. This is set as the position the stack occupies in the pec->stacks[] array. We need a way to repo

Re: [PATCH 4/6] migration: Add ram-only capability

2022-01-14 Thread Daniel P . Berrangé
On Fri, Jan 14, 2022 at 12:22:13PM +0100, Markus Armbruster wrote: > Nikita Lapshin writes: > > > If this capability is enabled migration stream > > will have RAM section only. > > > > Signed-off-by: Nikita Lapshin > > [...] > > > diff --git a/qapi/migration.json b/qapi/migration.json > > inde

Re: [PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-14 Thread Philippe Mathieu-Daudé via
On 13/1/22 20:44, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the e

Re: [PATCH 24/30] bsd-user/signal.c: setup_frame

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:36, Warner Losh wrote: > > setup_frame sets up a signalled stack frame. Associated routines to > extract the pointer to the stack frame and to support alternate stacks. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-u

Re: [PATCH 11/17] ppc/pnv: introduce PnvPHB4 'phb_number' property

2022-01-14 Thread Cédric Le Goater
On 1/14/22 12:29, Daniel Henrique Barboza wrote: On 1/14/22 07:46, Cédric Le Goater wrote: On 1/13/22 20:29, Daniel Henrique Barboza wrote: One of the remaining dependencies we have on the PnvPhb4PecStack object is the stack->stack_no property. This is set as the position the stack occupies i

Re: [PATCH 1/4] tests: acpi: manually pad OEM_ID/OEM_TABLE_ID for test_oem_fields() test

2022-01-14 Thread Igor Mammedov
On Wed, 12 Jan 2022 08:44:19 -0500 "Michael S. Tsirkin" wrote: > On Wed, Jan 12, 2022 at 08:03:29AM -0500, Igor Mammedov wrote: > > The next commit will revert OEM fields padding with whitespace to > > padding with '\0' as it was before [1]. As result test_oem_fields() will > > fail due to unexpe

Re: [PATCH 25/30] bsd-user/signal.c: handle_pending_signal

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:47, Warner Losh wrote: > > Handle a queued signal. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > +static void handle_pending_signal(CPUArchState *cpu_env, int sig, > + struct emulated_sigtable

Re: [PATCH 26/30] bsd-user/signal.c: tswap_siginfo

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:56, Warner Losh wrote: > > Convert siginfo from targer to host. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 34 ++ > 1 file changed, 34 insertions(+) > > diff --git a

Re: [PATCH 27/30] bsd-user/signal.c: process_pending_signals

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:57, Warner Losh wrote: > > Process the currently queued signals. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 34 ++ > 1 file changed, 34 insertions(+) > > diff --git

Re: [PATCH v6 18/23] hw/intc: Add RISC-V AIA APLIC device emulation

2022-01-14 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午8:55寫道: > From: Anup Patel > > The RISC-V AIA (Advanced Interrupt Architecture) defines a new > interrupt controller for wired interrupts called APLIC (Advanced > Platform Level Interrupt Controller). The APLIC is capabable of > forwarding wired interupts to RISC-V

Re: [PATCH 28/30] bsd-user/signal.c: implement do_sigreturn

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 17:00, Warner Losh wrote: > > Implements the meat of a sigreturn(2) system call via do_sigreturn, and > helper reset_signal_mask. Fix the prototype of do_sigreturn in qemu.h > and remove do_rt_sigreturn since it's linux only. > > Signed-off-by: Stacey Son > Signed-off-by: Ky

Re: [PATCH 1/1] softmmu: fix device deletion events with -device JSON syntax

2022-01-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > The -device JSON syntax impl leaks a reference on the created > DeviceState instance. As a result when you hot-unplug the > device, the device_finalize method won't be called and thus > it will fail to emit the required DEVICE_DELETED event. > > A 'json-cli' feature w

Re: [PATCH 0/2] block-backend: Retain permissions after migration

2022-01-14 Thread Hanna Reitz
On 25.11.21 14:53, Hanna Reitz wrote: Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when they weren’t before. The cause of the pro

Re: [PATCH 0/2] block-backend: Retain permissions after migration

2022-01-14 Thread Hanna Reitz
On 10.01.22 12:51, Peng Liang wrote: On 11/25/2021 9:53 PM, Hanna Reitz wrote: Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-14 Thread Liu Yi L
On 2022/1/14 15:22, Jason Wang wrote: On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: Right, but I think you meant to do this only when scalable mode is disabled. Yes IMHO it will definitely suite for !scalable case since that's ex

Re: [PATCH v6 18/23] hw/intc: Add RISC-V AIA APLIC device emulation

2022-01-14 Thread Anup Patel
On Fri, Jan 14, 2022 at 5:33 PM Frank Chang wrote: > > Anup Patel 於 2021年12月30日 週四 下午8:55寫道: >> >> From: Anup Patel >> >> The RISC-V AIA (Advanced Interrupt Architecture) defines a new >> interrupt controller for wired interrupts called APLIC (Advanced >> Platform Level Interrupt Controller). Th

Re: [PATCH 1/4] tests: acpi: manually pad OEM_ID/OEM_TABLE_ID for test_oem_fields() test

2022-01-14 Thread Michael S. Tsirkin
On Fri, Jan 14, 2022 at 12:48:20PM +0100, Igor Mammedov wrote: > On Wed, 12 Jan 2022 08:44:19 -0500 > "Michael S. Tsirkin" wrote: > > > On Wed, Jan 12, 2022 at 08:03:29AM -0500, Igor Mammedov wrote: > > > The next commit will revert OEM fields padding with whitespace to > > > padding with '\0' as

Re: [PATCH 29/30] bsd-user/signal.c: implement do_sigaction

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:32, Warner Losh wrote: > > Implement the meat of the sigaction(2) system call with do_sigaction and > helper routiner block_signals (which is also used to implemement signal > masking so it's global). > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off

Re: [PATCH 30/30] bsd-user/signal.c: do_sigaltstack

2022-01-14 Thread Peter Maydell
On Sun, 9 Jan 2022 at 17:08, Warner Losh wrote: > > Implement the meat of the sigaltstack(2) system call with do_sigaltstack. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/qemu.h | 1 + > bsd-user/signal.c | 66 ++

Re: [PATCH v2 0/2] hw/intc/arm_gic: Allow reset of the running priority

2022-01-14 Thread Peter Maydell
On Thu, 13 Jan 2022 at 15:19, Petr Pavlu wrote: > > Thank you Peter for review of the first version of the patch. v2 splits > the changes into two commits and updates the code as suggested. > Applied to target-arm.next, thanks. -- PMM

Re: [PULL 0/6] Block patches

2022-01-14 Thread Peter Maydell
On Wed, 12 Jan 2022 at 17:14, Stefan Hajnoczi wrote: > > The following changes since commit 91f5f7a5df1fda8c34677a7c49ee8a4bb5b56a36: > > Merge remote-tracking branch > 'remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request' into staging > (2022-01-12 11:51:47 +) > > are available in

Re: [PATCH 3/3] isa/piix4: Resolve global variables

2022-01-14 Thread Peter Maydell
On Wed, 12 Jan 2022 at 22:02, Bernhard Beschow wrote: > > Now that piix4_set_irq's opaque parameter references own PIIX4State, > piix4_dev becomes redundant and pci_irq_levels can be moved into PIIX4State. > > Signed-off-by: Bernhard Beschow > --- > hw/isa/piix4.c| 22 +--

Re: [PATCH 2/3] pci: Always pass own DeviceState to pci_map_irq_fn's

2022-01-14 Thread Peter Maydell
On Wed, 12 Jan 2022 at 21:36, Bernhard Beschow wrote: > > Passing own DeviceState rather than just the IRQs allows for resolving > global variables. > > Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 15/17] ppc/pnv: convert pec->stacks[] into pec->phbs[]

2022-01-14 Thread Cédric Le Goater
@@ -1520,14 +1520,19 @@ static PnvPhb4PecStack *pnv_phb4_get_stack(PnvChip *chip, PnvPHB4 *phb, for (i = 0; i < chip->num_pecs; i++) { /* - * For each PEC, check the amount of stacks it supports - * and see if the given phb4 index matches a stack. + * F

Re: [PATCH 0/2] Introduce printer subsystem and USB printer device

2022-01-14 Thread Ruien Zhang
On 1/14/22 5:32 PM, Gerd Hoffmann wrote: Hi, This patchset introduces: 1) Skeleton of QEMU printer subsystem with a dummy builtin driver. 2) USB printer device emulation, with definitions in the extension of IPP-over- USB [3]. WIP: 1) QEMU printer subsystem interfaces, which will be

Re: [PATCH v3 2/3] target/riscv: add support for svinval extension

2022-01-14 Thread Anup Patel
On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > --- > target/riscv/cpu.c | 1 + > target/riscv/cpu.h | 1 + > target/riscv/insn32.decode | 7 ++ > target/riscv/in

Re: [PATCH 15/17] ppc/pnv: convert pec->stacks[] into pec->phbs[]

2022-01-14 Thread Daniel Henrique Barboza
On 1/14/22 10:33, Cédric Le Goater wrote: @@ -1520,14 +1520,19 @@ static PnvPhb4PecStack *pnv_phb4_get_stack(PnvChip *chip, PnvPHB4 *phb,   for (i = 0; i < chip->num_pecs; i++) {   /* - * For each PEC, check the amount of stacks it supports - * and see if the given

[PULL 05/16] docs: Correct 'vhost-user-blk' spelling

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Reported-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220107105420.395011-2-f4...@amsat.org> Signed-off-by: Kevin Wolf --- docs/tools/qemu-storage-daemon.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/qemu

[PULL 03/16] include/sysemu/blockdev.h: remove drive_get_max_devs

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Remove drive_get_max_devs, as it is not used by anyone. Last use was removed in commit 8f2d75e81d5 ("hw: Drop superfluous special checks for orphaned -drive"). Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Ha

[PULL 01/16] block_int: make bdrv_backing_overridden static

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_backing_overridden is only used in block.c, so there is no need to leave it in block_int.h Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Message-Id: <20211215121140.456939-2-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- incl

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-14 Thread Cédric Le Goater
On 1/7/22 14:39, Greg Kurz wrote: On Fri, 7 Jan 2022 23:19:03 +1100 David Gibson wrote: On Fri, Jan 07, 2022 at 12:57:47PM +0100, Greg Kurz wrote: On Fri, 7 Jan 2022 18:24:23 +1100 Alexey Kardashevskiy wrote: "PowerPC Processor binding to IEEE 1275" says in "8.2.1. Initial Register Values"

[PULL 04/16] softmmu: fix device deletion events with -device JSON syntax

2022-01-14 Thread Kevin Wolf
From: Daniel P. Berrangé The -device JSON syntax impl leaks a reference on the created DeviceState instance. As a result when you hot-unplug the device, the device_finalize method won't be called and thus it will fail to emit the required DEVICE_DELETED event. A 'json-cli' feature was previously

[PULL 08/16] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-14 Thread Kevin Wolf
From: Stefan Hajnoczi The BlockBackend root child can change when aio_poll() is invoked. This happens when a temporary filter node is removed upon blockjob completion, for example. Functions in block/block-backend.c must be aware of this when using a blk_bs() pointer across aio_poll() because th

[PULL 00/16] Block layer patches

2022-01-14 Thread Kevin Wolf
The following changes since commit 67b6526cf042f22521feff5ea521a05d3dd2bf8f: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2022-01-13 13:59:56 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[PULL 07/16] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé When building QEMU with --disable-vhost-user and using introspection, query-qmp-schema lists vhost-user-blk even though it's not actually available: { "execute": "query-qmp-schema" } { "return": [ ... { "name": "312",

[PULL 09/16] iotests/stream-error-on-reset: New test

2022-01-14 Thread Kevin Wolf
From: Hanna Reitz Test the following scenario: - Simple stream block in two-layer backing chain (base and top) - The job is drained via blk_drain(), then an error occurs while the job settles the ongoing request - And so the job completes while in blk_drain() This was reported as a segfault, b

[PULL 06/16] qemu-storage-daemon: Add vhost-user-blk help

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Add missing vhost-user-blk help: $ qemu-storage-daemon -h ... --export [type=]vhost-user-blk,id=,node-name=, addr.type=unix,addr.path=[,writable=on|off] [,logical-block-size=][,num-queues=] export the speci

[PULL 02/16] include/sysemu/blockdev.h: remove drive_mark_claimed_by_board and inline drive_def

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito drive_def is only a particular use case of qemu_opts_parse_noisily, so it can be inlined. Also remove drive_mark_claimed_by_board, as it is only defined but not implemented (nor used) anywhere. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <202112151211

[PULL 16/16] iotests/testrunner.py: refactor test_field_width

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy A lot of Optional[] types doesn't make code beautiful. test_field_width defaults to 8, but that is never used in the code. More over, if we want some default behavior for single call of test_run(), it should just print the whole test name, not limiting or expan

[PULL 10/16] iotests/308: Fix for CAP_DAC_OVERRIDE

2022-01-14 Thread Kevin Wolf
From: Hanna Reitz With CAP_DAC_OVERRIDE (which e.g. root generally has), permission checks will be bypassed when opening files. 308 in one instance tries to open a read-only file (FUSE export) with qemu-io as read/write, and expects this to fail. However, when running it as root, opening will s

[PATCH v5 5/6] hw/arm/virt: Disable highmem devices that don't fit in the PA range

2022-01-14 Thread Marc Zyngier
In order to only keep the highmem devices that actually fit in the PA range, check their location against the range and update highest_gpa if they fit. If they don't, mark them as disabled. Signed-off-by: Marc Zyngier --- hw/arm/virt.c | 34 -- 1 file changed, 28

[PULL 11/16] vvfat: Fix size of temporary qcow file

2022-01-14 Thread Kevin Wolf
The size of the qcow size was calculated so that only the FAT partition would fit on it, but not the whole disk. However, offsets relative to the whole disk are used to access it, so increase its size to be large enough for that. Signed-off-by: Kevin Wolf Message-Id: <20211209151815.23495-1-kw...

[PULL 14/16] qemu-img: make is_allocated_sectors() more efficient

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Consider the case when the whole buffer is zero and end is unaligned. If i <= tail, we return 1 and do one unaligned WRITE, RMW happens. If i > tail, we do on aligned WRITE_ZERO (or skip if target is zeroed) and again one unaligned WRITE, RMW happens. Let's d

[PULL 15/16] block: drop BLK_PERM_GRAPH_MOD

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy First, this permission never protected a node from being changed, as generic child-replacing functions don't check it. Second, it's a strange thing: it presents a permission of parent node to change its child. But generally, children are replaced by different m

[PULL 13/16] iotests: Test qemu-img convert of zeroed data cluster

2022-01-14 Thread Kevin Wolf
This demonstrates what happens when the block status changes in sub-min_sparse granularity, but all of the parts are zeroed out. The alignment logic in is_allocated_sectors() prevents that the target image remains fully sparse as expected, but turns it into a data cluster of explicit zeros. Signed

Re: [PATCH v3 2/3] target/riscv: add support for svinval extension

2022-01-14 Thread Weiwei Li
Thanks for your comments. 在 2022/1/14 下午9:40, Anup Patel 写道: On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 1 + target/riscv/ins

Re: [PATCH v3 3/3] target/riscv: add support for svpbmt extension

2022-01-14 Thread Anup Patel
On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: > > It uses two PTE bits, but otherwise has no effect on QEMU, since QEMU is > sequentially consistent and doesn't model PMAs currently > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Tested-by: Heiko Stuebner > --- > target/riscv

[PULL 12/16] vvfat: Fix vvfat_write() for writes before the root directory

2022-01-14 Thread Kevin Wolf
The calculation in sector2cluster() is done relative to the offset of the root directory. Any writes to blocks before the start of the root directory (in particular, writes to the FAT) result in negative values, which are not handled correctly in vvfat_write(). This changes sector2cluster() to ret

Re: [PATCH v3 2/3] target/riscv: add support for svinval extension

2022-01-14 Thread Anup Patel
On Fri, Jan 14, 2022 at 7:24 PM Weiwei Li wrote: > > Thanks for your comments. > > 在 2022/1/14 下午9:40, Anup Patel 写道: > > On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > --- > target/riscv/cpu.c | 1 + > t

Re: [PATCH 1/2] hw/virtio: add boilerplate for vhost-user-gpio device

2022-01-14 Thread Alex Bennée
Viresh Kumar writes: > This creates the QEMU side of the vhost-user-gpio device which connects > to the remote daemon. It is based of vhost-user-i2c code. > > Signed-off-by: Viresh Kumar Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v5 0/6] target/arm: Reduced-IPA space and highmem fixes

2022-01-14 Thread Marc Zyngier
Here's yet another stab at enabling QEMU on systems with pathologically reduced IPA ranges such as the Apple M1 (previous version at [1]). Eventually, we're able to run a KVM guest with more than just 3GB of RAM on a system with a 36bit IPA space, and at most 123 vCPUs. This also addresses some pa

[PATCH 5/4] tests: acpi: test short OEM_ID/OEM_TABLE_ID values in test_oem_fields()

2022-01-14 Thread Igor Mammedov
Previous patch [1] added explicit whitespace padding to OEM_ID/OEM_TABLE_ID values used in test_oem_fields() testcase to avoid false positive and bisection issues when QEMU is switched to \0' padding. As result testcase ceased to test values that were shorter than max possible length values. Updat

[PATCH v5 4/6] hw/arm/virt: Use the PA range to compute the memory map

2022-01-14 Thread Marc Zyngier
The highmem attribute is nothing but another way to express the PA range of a VM. To support HW that has a smaller PA range then what QEMU assumes, pass this PA range to the virt_set_memmap() function, allowing it to correctly exclude highmem devices if they are outside of the PA range. Signed-off

[PATCH v5 3/6] hw/arm/virt: Honor highmem setting when computing the memory map

2022-01-14 Thread Marc Zyngier
Even when the VM is configured with highmem=off, the highest_gpa field includes devices that are above the 4GiB limit. Similarily, nothing seem to check that the memory is within the limit set by the highmem=off option. This leads to failures in virt_kvm_type() on systems that have a crippled IPA

[PATCH v5 2/6] hw/arm/virt: Add a control for the the highmem redistributors

2022-01-14 Thread Marc Zyngier
Just like we can control the enablement of the highmem PCIe region using highmem_ecam, let's add a control for the highmem GICv3 redistributor region. Similarily to highmem_ecam, these redistributors are disabled when highmem is off. Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier --- hw

[PATCH v5 1/6] hw/arm/virt: Add a control for the the highmem PCIe MMIO

2022-01-14 Thread Marc Zyngier
Just like we can control the enablement of the highmem PCIe ECAM region using highmem_ecam, let's add a control for the highmem PCIe MMIO region. Similarily to highmem_ecam, this region is disabled when highmem is off. Signed-off-by: Marc Zyngier --- hw/arm/virt-acpi-build.c | 10 -- h

[PATCH v5 6/6] hw/arm/virt: Drop superfluous checks against highmem

2022-01-14 Thread Marc Zyngier
Now that the devices present in the extended memory map are checked against the available PA space and disabled when they don't fit, there is no need to keep the same checks against highmem, as highmem really is a shortcut for the PA space being 32bit. Reviewed-by: Eric Auger Signed-off-by: Marc

Re: [PATCH v3 2/3] target/riscv: add support for svinval extension

2022-01-14 Thread Weiwei Li
在 2022/1/14 下午10:01, Anup Patel 写道: On Fri, Jan 14, 2022 at 7:24 PM Weiwei Li wrote: Thanks for your comments. 在 2022/1/14 下午9:40, Anup Patel 写道: On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 15:09, Hanna Reitz wrote: On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get:    ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]    kernResult = IOMasterPort( MACH_PO

Re: [PATCH 1/2] hw/virtio: add boilerplate for vhost-user-gpio device

2022-01-14 Thread Alex Bennée
Viresh Kumar writes: > This creates the QEMU side of the vhost-user-gpio device which connects > to the remote daemon. It is based of vhost-user-i2c code. > > Signed-off-by: Viresh Kumar > +++ b/include/hw/virtio/vhost-user-gpio.h > @@ -0,0 +1,35 @@ > +/* > + * Vhost-user GPIO virtio device >

Re: [PATCH v3 3/3] target/riscv: add support for svpbmt extension

2022-01-14 Thread Weiwei Li
在 2022/1/14 下午9:59, Anup Patel 写道: On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote: It uses two PTE bits, but otherwise has no effect on QEMU, since QEMU is sequentially consistent and doesn't model PMAs currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Tested-by: Heiko Stue

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Hanna Reitz
On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get: ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, &masterPort );

Re: [PATCH 2/2] hw/virtio: add vhost-user-gpio-pci boilerplate

2022-01-14 Thread Alex Bennée
Viresh Kumar writes: > This allows is to instantiate a vhost-user-gpio device as part of a PCI > bus. It is mostly boilerplate which looks pretty similar to the > vhost-user-fs-pci device. > > Signed-off-by: Viresh Kumar Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-14 Thread Cédric Le Goater
On 1/10/22 03:52, Alexey Kardashevskiy wrote: On 08/01/2022 00:39, Greg Kurz wrote: On Fri, 7 Jan 2022 23:19:03 +1100 David Gibson wrote: On Fri, Jan 07, 2022 at 12:57:47PM +0100, Greg Kurz wrote: On Fri, 7 Jan 2022 18:24:23 +1100 Alexey Kardashevskiy wrote: "PowerPC Processor binding t

Re: [PATCH 5/4] tests: acpi: test short OEM_ID/OEM_TABLE_ID values in test_oem_fields()

2022-01-14 Thread Ani Sinha
On Fri, Jan 14, 2022 at 7:57 PM Igor Mammedov wrote: > Previous patch [1] added explicit whitespace padding to OEM_ID/OEM_TABLE_ID > values used in test_oem_fields() testcase to avoid false positive and > bisection issues when QEMU is switched to \0' padding. As result > testcase ceased to test v

Re: [PULL 07/16] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 14:52, Kevin Wolf wrote: From: Philippe Mathieu-Daudé When building QEMU with --disable-vhost-user and using introspection, query-qmp-schema lists vhost-user-blk even though it's not actually available: { "execute": "query-qmp-schema" } { "return": [ ...

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Hanna Reitz
On 14.01.22 15:15, Philippe Mathieu-Daudé wrote: On 14/1/22 15:09, Hanna Reitz wrote: On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get:    ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declar

Re: [PATCH v5 12/12] docs/devel: Add documentation for the DMA control interface

2022-01-14 Thread Francisco Iglesias
On [2022 Jan 07] Fri 16:07:17, Peter Maydell wrote: > On Tue, 14 Dec 2021 at 11:04, Francisco Iglesias > wrote: > > > > Also, since being the author, list myself as maintainer for the file. > > > > Signed-off-by: Francisco Iglesias > > > > +DmaCtrlIfClass > > +-- > > + > > +The ``Dm

  1   2   >