[PATCH v6 11/40] accel/hax: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Since there is no specific HAX handling for cpu_has_work() in cpu_thread_is_idle(), implement HAX has_work() handler as a simple 'return false' code. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hax/hax-accel-ops.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v6 22/40] target/hppa: Restrict has_work() handler to sysemu

2021-09-24 Thread Philippe Mathieu-Daudé
Restrict has_work() to sysemu. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index e8edd189bfc..be940ae2246 100644 --- a/target/hppa/cpu.c

[PATCH v6 20/40] target/cris: Restrict has_work() handler to sysemu

2021-09-24 Thread Philippe Mathieu-Daudé
Restrict has_work() to sysemu. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/cris/cpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index c2e7483f5bd..b2761f8b110 100644 --- a/target/cris/cpu.c

[PATCH v6 18/40] target/arm: Restrict has_work() handler to sysemu and TCG

2021-09-24 Thread Philippe Mathieu-Daudé
Restrict arm_cpu_has_work() and has_work() handler to TCG sysemu. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 4 +++- target/arm/cpu.c | 7 +-- target/arm/cpu_tcg.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/target/arm/internals.h

[PATCH v6 10/40] accel/xen: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Since there is no specific Xen handling for cpu_has_work() in cpu_thread_is_idle(), implement Xen has_work() handler as a simple 'return false' code. Acked-by: Paul Durrant Signed-off-by: Philippe Mathieu-Daudé --- accel/xen/xen-all.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v6 09/40] accel/hvf: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Since there is no specific HVF handling for cpu_has_work() in cpu_thread_is_idle(), implement HVF has_work() handler as a simple 'return false' code. Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v6 19/40] target/avr: Restrict has_work() handler to sysemu

2021-09-24 Thread Philippe Mathieu-Daudé
Restrict has_work() to sysemu. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/avr/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 5d70e34dd54..6d51f91ca2c 100644 --- a/target/avr/cpu.c +++

[PATCH v6 15/40] accel: Simplify cpu_has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Now that all accelerators implement a has_work() handler, we can simplify cpu_has_work() by removing the non-NULL handler check. Add an assertion in cpus_register_accel() for future accelerators. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpus.c | 6

[PATCH v6 07/40] accel/kvm: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Implement KVM has_work() handler in AccelOpsClass and remove it from cpu_thread_is_idle() since cpu_has_work() is already called. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 6 ++ softmmu/cpus.c| 2 +- 2 files changed, 7

[PATCH v6 04/40] hw/core: Un-inline cpu_has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
We want to make cpu_has_work() per-accelerator. Only declare its prototype and move its definition to softmmu/cpus.c. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 8 +--- softmmu/cpus.c| 8 2 files changed, 9

[PATCH v6 12/40] accel/nvmm: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Since there is no specific NVMM handling for cpu_has_work() in cpu_thread_is_idle(), implement NVMM has_work() handler as a simple 'return false' code. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-accel-ops.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v6 05/40] hw/core: Move cpu_common_has_work() to cpu_has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
cpu_class_init() always register cpu_common_has_work() as CPUClass::has_work() handler, so the assertion check in cpu_has_work() is pointless. Since cpu_common_has_work() simply returns 'false', we can inline it in cpu_has_work(), improving the function readability. Suggested-by: Richard

[PATCH v6 03/40] hw/core: Restrict cpu_has_work() to sysemu

2021-09-24 Thread Philippe Mathieu-Daudé
cpu_has_work() is only called from system emulation code. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/hw/core/cpu.h

[PATCH v6 08/40] accel/whpx: Implement AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Implement WHPX has_work() handler in AccelOpsClass and remove it from cpu_thread_is_idle() since cpu_has_work() is already called. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpus.c| 4 +--- target/i386/whpx/whpx-accel-ops.c | 6 ++

[PATCH v6 06/40] accel: Introduce AccelOpsClass::has_work()

2021-09-24 Thread Philippe Mathieu-Daudé
Introduce an accelerator-specific has_work() handler. Eventually call it from cpu_has_work(). Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.h | 5 + softmmu/cpus.c | 3 +++ 2 files changed, 8 insertions(+) diff --git

[PATCH v6 02/40] accel/tcg: Restrict cpu_handle_halt() to sysemu

2021-09-24 Thread Philippe Mathieu-Daudé
Commit 372579427a5 ("tcg: enable thread-per-vCPU") added the following comment describing EXCP_HALTED in qemu_tcg_cpu_thread_fn(): case EXCP_HALTED: /* during start-up the vCPU is reset and the thread is * kicked several times. If we don't ensure we go back * to

[PATCH v6 01/40] accel: Simplify qemu_init_vcpu()

2021-09-24 Thread Philippe Mathieu-Daudé
cpus_register_accel() already checks for ops->create_vcpu_thread being non-NULL, so it is pointless to re-check for it in qemu_init_vcpu(). Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpus.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/softmmu/cpus.c

[PATCH v6 00/40] accel: Move has_work() from CPUClass to AccelOpsClass

2021-09-24 Thread Philippe Mathieu-Daudé
Hi, CPU has_work() is a per-accelerator handler. This series is organized in 2 parts: - Patches 1-15: Move has_work() from CPUClass to AccelOpsClass - Patches 16-40: Move remainging has_work() to TCGCPUOps I prefer to send as a single big series to be sure it is merged at once, since the 2nd

Re: [question] VFIO Device Migration: The vCPU may be paused during vfio device DMA in iommu nested stage mode && vSVA

2021-09-24 Thread Kirti Wankhede
On 9/24/2021 12:17 PM, Tian, Kevin wrote: From: Kunkun Jiang Sent: Friday, September 24, 2021 2:19 PM Hi all, I encountered a problem in vfio device migration test. The vCPU may be paused during vfio-pci DMA in iommu nested stage mode && vSVA. This may lead to migration fail and other

Re: Ping: [PATCH 0/2] cocoa.m: keyboard quality of life reborn

2021-09-24 Thread Peter Maydell
On Fri, 24 Sept 2021 at 00:08, Programmingkid wrote: > > Hi Peter, are you reviewing cocoa patches? Should someone else see these > patches? Gerd sent out a message a while back suggesting that people interested in the cocoa UI (we have had several people recently submit patches) ought to start

Re: [PATCH v3 2/2] docs/sphinx: change default role to "any"

2021-09-24 Thread Peter Maydell
On Thu, 23 Sept 2021 at 20:14, John Snow wrote: > > This interprets single-backtick syntax in all of our Sphinx docs as a > cross-reference to *something*, including Python symbols. > > From here on out, new uses of `backticks` will cause a build failure if > the target cannot be referenced. > >

[PATCH 08/11] qdev: Base object creation on QDict rather than QemuOpts

2021-09-24 Thread Kevin Wolf
QDicts are both what QMP natively uses and what the keyval parser produces. Going through QemuOpts isn't useful for either one, so switch the main device creation function to QDicts. By sharing more code with the -object/object-add code path, we can even reduce the code size a bit. This commit

[PATCH 07/11] qemu-option: Allow deleting opts during qemu_opts_foreach()

2021-09-24 Thread Kevin Wolf
Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted while iterating through the whole list. Signed-off-by: Kevin Wolf --- util/qemu-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index

[PATCH 10/11] vl: Enable JSON syntax for -device

2021-09-24 Thread Kevin Wolf
Like we already do for -object, introduce support for JSON syntax in -device, which can be kept stable in the long term and guarantees that a single code path with identical behaviour is used for both QMP and the command line. Compared to the QemuOpts based code, the parser contains less surprises

[PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-09-24 Thread Kevin Wolf
Directly call qdev_device_add_from_qdict() for QMP device_add instead of first going through QemuOpts and converting back to QDict. Note that this changes the behaviour of device_add, though in ways that should be considered bug fixes: QemuOpts ignores differences between data types, so you

Re: [PATCH v5 18/20] nubus: add support for slot IRQs

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 11:01, Philippe Mathieu-Daudé wrote: On 9/24/21 09:06, Mark Cave-Ayland wrote: On 23/09/2021 10:49, Philippe Mathieu-Daudé wrote: On 9/23/21 11:13, Mark Cave-Ayland wrote: Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the

[PATCH 05/11] qdev: Make DeviceState.id independent of QemuOpts

2021-09-24 Thread Kevin Wolf
DeviceState.id is a pointer to a string that is stored in the QemuOpts object DeviceState.opts and freed together with it. We want to create devices without going through QemuOpts in the future, so make this a separately allocated string. Signed-off-by: Kevin Wolf --- include/hw/qdev-core.h

[PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-24 Thread Kevin Wolf
We want to switch both from QemuOpts to the keyval parser in the future, which results in some incompatibilities, mainly around list handling. Mark the non-JSON version of both as unstable syntax so that management tools switch to JSON and we can later make the change without breaking things.

[PATCH 04/11] qdev: Avoid using string visitor for properties

2021-09-24 Thread Kevin Wolf
The only thing the string visitor adds compared to a keyval visitor is list support. git grep for 'visit_start_list' and 'visit.*List' shows that devices don't make use of this. In a world with a QAPIfied command line interface, the keyval visitor is used to parse the command line. In order to

[PATCH 02/11] iotests/245: Fix type for iothread property

2021-09-24 Thread Kevin Wolf
iothread is a string property, so None (= JSON null) is not a valid value for it. Pass the empty string instead to get the default iothread. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/245 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/245

[PATCH 03/11] iotests/051: Fix typo

2021-09-24 Thread Kevin Wolf
The iothread isn't called 'iothread0', but 'thread0'. Depending on the order that properties are parsed, the error message may change from the expected one to another one saying that the iothread doesn't exist. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051| 2 +-

[PATCH 06/11] qdev: Add Error parameter to qdev_set_id()

2021-09-24 Thread Kevin Wolf
object_property_add_child() fails (with _abort) if an object with the same name already exists. As long as QemuOpts is in use for -device and device_add, it catches duplicate IDs before qdev_set_id() is even called. However, for enabling non-QemuOpts code paths, we need to make sure that the

[PATCH 00/11] qdev: Add JSON -device and fix QMP device_add

2021-09-24 Thread Kevin Wolf
It's still a long way until we'll have QAPIfied devices, but there are some improvements that we can already make now to make the future switch easier. One important part of this is having code paths without QemuOpts, which we want to get rid of and replace with the keyval parser in the long run.

[PATCH 01/11] qom: Reduce use of error_propagate()

2021-09-24 Thread Kevin Wolf
ERRP_GUARD() makes debugging easier by making sure that _abort still fails at the real origin of the error instead of error_propagate(). Signed-off-by: Kevin Wolf --- qom/object.c| 7 +++ qom/object_interfaces.c | 17 ++--- 2 files changed, 9 insertions(+), 15

Re: [PATCH v6 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 09:37, Mark Cave-Ayland wrote: Allow Nubus to manage the slot allocations itself using the BusClass check_address() virtual function rather than managing this during NubusDevice realize(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/nubus/nubus-bus.c|

Re: [PATCH v6 04/20] nubus: use bitmap to manage available slots

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 09:37, Mark Cave-Ayland wrote: Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line using a new qdev "slot" parameter for nubus devices. Update mac_nubus_bridge_init() to

Re: [PATCH v5 18/20] nubus: add support for slot IRQs

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 09:06, Mark Cave-Ayland wrote: On 23/09/2021 10:49, Philippe Mathieu-Daudé wrote: On 9/23/21 11:13, Mark Cave-Ayland wrote: Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the Nubus bridge so that they can be wired up using

Re: [PATCH v5 04/20] nubus: use bitmap to manage available slots

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 09:16, Mark Cave-Ayland wrote: On 23/09/2021 15:16, BALATON Zoltan wrote: On Thu, 23 Sep 2021, Mark Cave-Ayland wrote: Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command

Re: [PATCH] hw/misc: Add an iBT device model

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 01:48, Titus Rwantare wrote: Hello all, I'd like some clarification on how the following code transfers irqs back and forth: b/hw/arm/aspeed_soc.c +/* iBT */ +if (!sysbus_realize(SYS_BUS_DEVICE(>ibt), errp)) { +return; +} +

[PATCH v6 20/20] q800: configure nubus available slots for Quadra 800

2021-09-24 Thread Mark Cave-Ayland
Slot 0x9 is reserved for use by the in-built framebuffer whilst only slots 0xc, 0xd and 0xe physically exist on the Quadra 800. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/m68k/q800.c | 9 + 1 file changed, 9 insertions(+)

[PATCH v6 11/20] nubus-device: add romfile property for loading declaration ROMs

2021-09-24 Thread Mark Cave-Ayland
The declaration ROM is located at the top-most address of the standard slot space. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/nubus/nubus-device.c | 44 +++- include/hw/nubus/nubus.h | 6 ++ 2 files changed, 49 insertions(+), 1

[PATCH v6 04/20] nubus: use bitmap to manage available slots

2021-09-24 Thread Mark Cave-Ayland
Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line using a new qdev "slot" parameter for nubus devices. Update mac_nubus_bridge_init() to only allow slots 0x9 to 0xe on Macintosh

[PATCH v6 19/20] q800: wire up nubus IRQs

2021-09-24 Thread Mark Cave-Ayland
Nubus IRQs are routed to the CPU through the VIA2 device so wire up the IRQs using gpios accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/m68k/q800.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/m68k/q800.c

[PATCH v6 16/20] nubus-bridge: embed the NubusBus object directly within nubus-bridge

2021-09-24 Thread Mark Cave-Ayland
Since nubus-bridge is a container for NubusBus then it should be embedded directly within the bridge device using qbus_create_inplace(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/m68k/q800.c | 2 +-

[PATCH v6 18/20] nubus: add support for slot IRQs

2021-09-24 Thread Mark Cave-Ayland
Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the Nubus bridge so that they can be wired up using qdev gpios accordingly, and introduce a new nubus_set_irq() function that can be used by Nubus devices to control the slot IRQ. Signed-off-by:

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-24 Thread Klaus Jensen
On Sep 24 08:05, Hannes Reinecke wrote: > On 9/23/21 10:09 PM, Klaus Jensen wrote: > > On Sep 9 13:37, Hannes Reinecke wrote: > > > On 9/9/21 12:47 PM, Klaus Jensen wrote: > > > > On Sep 9 11:43, Hannes Reinecke wrote: > > > > > With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") >

[PATCH v6 13/20] nubus-bridge: introduce separate NubusBridge structure

2021-09-24 Thread Mark Cave-Ayland
This is to allow the Nubus bridge to store its own additional state. Also update the comment in the file header to reflect that nubus-bridge is not specific to the Macintosh. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier ---

[PATCH v6 15/20] nubus: move NubusBus from mac-nubus-bridge to nubus-bridge

2021-09-24 Thread Mark Cave-Ayland
Now that Nubus has its own address space rather than mapping directly into the system bus, move the Nubus reference from MacNubusBridge to NubusBridge. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/m68k/q800.c | 2

[PATCH v6 17/20] nubus-bridge: make slot_available_mask a qdev property

2021-09-24 Thread Mark Cave-Ayland
This is to allow Macintosh machines to further specify which slots are available since the number of addressable slots may not match the number of physical slots present in the machine. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé ---

[PATCH v6 09/20] macfb: don't register declaration ROM

2021-09-24 Thread Mark Cave-Ayland
The macfb device is an on-board framebuffer and so is initialised by the system declaration ROM included within the MacOS toolbox ROM. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/display/macfb.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/display/macfb.c

[PATCH v6 14/20] mac-nubus-bridge: rename MacNubusState to MacNubusBridge

2021-09-24 Thread Mark Cave-Ayland
This better reflects that the mac-nubus-bridge device is derived from the nubus-bridge device, and that the structure represents the state of the bridge device and not the Nubus itself. Also update the comment in the file header to reflect that mac-nubus-bridge is specific to the Macintosh.

[PATCH v6 10/20] nubus-device: remove nubus_register_rom() and nubus_register_format_block()

2021-09-24 Thread Mark Cave-Ayland
Since there is no need to generate a dummy declaration ROM, remove both nubus_register_rom() and nubus_register_format_block(). These will shortly be replaced with a mechanism to optionally load a declaration ROM from disk to allow real images to be used within QEMU. Signed-off-by: Mark

[PATCH v6 08/20] nubus: generate bus error when attempting to access empty slots

2021-09-24 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" any attempt to access an unimplemented address location on Nubus generates a bus error. MacOS uses a custom bus error handler to detect empty Nubus slots, and with the current implementation assumes that all slots are occupied

[PATCH v6 12/20] nubus: move nubus to its own 32-bit address space

2021-09-24 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" the Nubus has its own 32-bit address space based upon physical slot addressing. Move Nubus to its own 32-bit address space and then use memory region aliases to map available slot and super slot ranges into the q800 system

[PATCH v6 03/20] nubus-device: expose separate super slot memory region

2021-09-24 Thread Mark Cave-Ayland
According to "Designing Cards and Drivers for the Macintosh Family" each physical nubus slot can access 2 separate address ranges: a super slot memory region which is 256MB and a standard slot memory region which is 16MB. Currently a Nubus device uses the physical slot number to determine

[PATCH v6 02/20] nubus-device: rename slot_nb variable to slot

2021-09-24 Thread Mark Cave-Ayland
This is in preparation for creating a qdev property of the same name. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/nubus/nubus-device.c | 14 +++--- include/hw/nubus/nubus.h | 2 +- 2 files changed, 8 insertions(+), 8

[PATCH v6 06/20] nubus: implement BusClass get_dev_path()

2021-09-24 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/nubus/nubus-bus.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/nubus/nubus-bus.c b/hw/nubus/nubus-bus.c index 96ef027bad..04f11edd24 100644 ---

[PATCH v6 07/20] nubus: add trace-events for empty slot accesses

2021-09-24 Thread Mark Cave-Ayland
Increase the max_access_size to 4 bytes for empty Nubus slot and super slot accesses to allow tracing of the Nubus enumeration process by the guest OS. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/nubus/nubus-bus.c | 10 +++---

[PATCH v6 00/20] nubus: bus, device, bridge, IRQ and address space improvements

2021-09-24 Thread Mark Cave-Ayland
This patchset is the next set of changes required to boot MacOS on the q800 machine. The main aim of these patches is to improve the Nubus support so that devices can be plugged into the Nubus from the command line i.e. -device nubus-macfb[,slot=num][,romfile=decl.rom] At the moment the

[PATCH v6 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-24 Thread Mark Cave-Ayland
Allow Nubus to manage the slot allocations itself using the BusClass check_address() virtual function rather than managing this during NubusDevice realize(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/nubus/nubus-bus.c| 29 +

[PATCH v6 01/20] nubus: add comment indicating reference documents

2021-09-24 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/nubus/nubus-bus.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/nubus/nubus-bus.c b/hw/nubus/nubus-bus.c index 5c13452308..f4410803ff

[PATCH 0/2] hw/nvme: fix namespace attachment on controller hotplug

2021-09-24 Thread Klaus Jensen
From: Klaus Jensen First patch from Hannes fixes the subsystem registration process such that shared (but non-detached) namespaces are automatically attached to hotplugged controllers. The second patch changes the default for 'shared' such that namespaces are shared by default and will thus by

[PATCH 1/2] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-24 Thread Klaus Jensen
From: Hannes Reinecke With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one is specified. That keeps the namespaces alive after a controller hot-unplug, but after a controller hotplug we have to reconnect the namespaces

[PATCH 2/2] hw/nvme: change nvme-ns 'shared' default

2021-09-24 Thread Klaus Jensen
From: Klaus Jensen Change namespaces to be shared namespaces by default (parameter shared=on). Keep shared=off for older machine types. Signed-off-by: Klaus Jensen --- docs/system/devices/nvme.rst | 24 ++-- hw/core/machine.c| 4 +++- hw/nvme/ns.c

Re: [PATCH v5 04/20] nubus: use bitmap to manage available slots

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 15:16, BALATON Zoltan wrote: On Thu, 23 Sep 2021, Mark Cave-Ayland wrote: Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line using a new qdev "slot" parameter for

Re: [PATCH v5 17/20] nubus-bridge: make slot_available_mask a qdev property

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 10:52, Philippe Mathieu-Daudé wrote: On 9/23/21 11:13, Mark Cave-Ayland wrote: This is to allow Macintosh machines to further specify which slots are available since the number of addressable slots may not match the number of physical slots present in the machine. Signed-off-by:

[PULL 2/3] hw/nvme: fix verification of select field in namespace attachment

2021-09-24 Thread Klaus Jensen
From: Naveen Nagar Fix is added to check for reserved value in select field for namespace attachment CC: Minwoo Im Signed-off-by: Naveen Nagar Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 15 --- include/block/nvme.h | 5 + 2 files changed, 17 insertions(+), 3

Re: [PATCH v5 18/20] nubus: add support for slot IRQs

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 10:49, Philippe Mathieu-Daudé wrote: On 9/23/21 11:13, Mark Cave-Ayland wrote: Each Nubus slot has an IRQ line that can be used to request service from the CPU. Connect the IRQs to the Nubus bridge so that they can be wired up using qdev gpios accordingly, and introduce a new

Re: [PATCH v5 05/20] nubus: move slot bitmap checks from NubusDevice realize() to BusClass check_address()

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 10:45, Philippe Mathieu-Daudé wrote: On 9/23/21 11:12, Mark Cave-Ayland wrote: Allow Nubus to manage the slot allocations itself using the BusClass check_address() virtual function rather than managing this during NubusDevice realize(). Signed-off-by: Mark Cave-Ayland

Re: [PATCH v5 04/20] nubus: use bitmap to manage available slots

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 10:42, Philippe Mathieu-Daudé wrote: On 9/23/21 11:12, Mark Cave-Ayland wrote: Convert nubus_device_realize() to use a bitmap to manage available slots to allow for future Nubus devices to be plugged into arbitrary slots from the command line using a new qdev "slot" parameter

[PULL 3/3] hw/nvme: Return error for fused operations

2021-09-24 Thread Klaus Jensen
From: Pankaj Raghav Currently, FUSED operations are not supported by QEMU. As per the 1.4 SPEC, controller should abort the command that requested a fused operation with an INVALID FIELD error code if they are not supported. Changes from v1: Added FUSE flag check also to the admin cmd

Re: [PATCH] block: introduce max_hw_iov for use in scsi-generic

2021-09-24 Thread Christian Borntraeger
Peter, Michael, do we still do stable releases for QEMU or has this stopped? Am 24.09.21 um 07:27 schrieb Paolo Bonzini: Yes, the question is whether it still exists... Paolo El jue., 23 sept. 2021 16:48, Christian Borntraeger escribió: Am 23.09.21 um 15:04 schrieb Paolo Bonzini: > Linux

Re: [PATCH v3] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()

2021-09-24 Thread Alistair Francis
On Tue, Sep 21, 2021 at 12:03 PM wrote: > > From: Frank Chang > > When V=1, both vsstauts.FS and HS-level sstatus.FS are in effect. > Modifying the floating-point state when V=1 causes both fields to > be set to 3 (Dirty). > > However, it's possible that HS-level sstatus.FS is Clean and VS-level

Re: [PATCH v2 2/3] target/riscv: Implement the stval/mtval illegal instruction

2021-09-24 Thread Alistair Francis
On Wed, Sep 8, 2021 at 4:48 PM Richard Henderson wrote: > > On 9/8/21 6:54 AM, Alistair Francis wrote: > > @@ -967,6 +967,16 @@ void riscv_cpu_do_interrupt(CPUState *cs) > > write_tval = true; > > tval = env->badaddr; > > break; > > +case

[PULL 1/3] hw/nvme: fix validation of ASQ and ACQ

2021-09-24 Thread Klaus Jensen
From: Klaus Jensen Address 0x0 is a valid address. Fix the admin submission and completion queue address validation to not error out on this. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/nvme/ctrl.c | 8 hw/nvme/trace-events | 2 -- 2 files changed, 10

RE: [question] VFIO Device Migration: The vCPU may be paused during vfio device DMA in iommu nested stage mode && vSVA

2021-09-24 Thread Tian, Kevin
> From: Kunkun Jiang > Sent: Friday, September 24, 2021 2:19 PM > > Hi all, > > I encountered a problem in vfio device migration test. The > vCPU may be paused during vfio-pci DMA in iommu nested > stage mode && vSVA. This may lead to migration fail and > other problems related to device

[PULL 0/3] hw/nvme updates

2021-09-24 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, The following changes since commit 2c3e83f92d93fbab071b8a96b8ab769b01902475: Merge remote-tracking branch 'remotes/alistair23/tags/pull-riscv-to-apply-20210921' into staging (2021-09-21 10:57:48 -0700) are available in the Git repository at:

Re: [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu and TCG

2021-09-24 Thread Alistair Francis
On Tue, Sep 21, 2021 at 8:09 AM Philippe Mathieu-Daudé wrote: > > Restrict has_work() to TCG sysemu. > > Reviewed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 8 +++- > 1 file changed, 3 insertions(+), 5

Re: [PATCH v3] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()

2021-09-24 Thread Alistair Francis
On Tue, Sep 21, 2021 at 12:03 PM wrote: > > From: Frank Chang > > When V=1, both vsstauts.FS and HS-level sstatus.FS are in effect. > Modifying the floating-point state when V=1 causes both fields to > be set to 3 (Dirty). > > However, it's possible that HS-level sstatus.FS is Clean and VS-level

Re: [PATCH v5 14/20] mac-nubus-bridge: rename MacNubusState to MacNubusBridge

2021-09-24 Thread Mark Cave-Ayland
On 23/09/2021 17:03, Mark Cave-Ayland wrote: On 23/09/2021 14:53, Laurent Vivier wrote: Le 23/09/2021 à 14:50, Mark Cave-Ayland a écrit : On 23/09/2021 11:35, Laurent Vivier wrote: Le 23/09/2021 à 11:13, Mark Cave-Ayland a écrit : This better reflects that the mac-nubus-bridge device is

[PATCH 0/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-24 Thread pdel
From: Peter Delevoryas Hey everyone, I think there might be a bug aspeed_gpio_update, when it's selecting a GPIO IRQ to update. I was testing booting Facebook's OpenBMC platform "YosemiteV2" (fby2), and I was hitting a segfault in QEMU: qemu-system-arm -machine ast2500-evb \ -drive

[PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-24 Thread pdel
From: Peter Delevoryas The gpio array is declared as a dense array: ... qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g. gpio[NR_SETS][NR_PINS_PER_SET] = gpio[8][32]) size_t offset = set *

[question] VFIO Device Migration: The vCPU may be paused during vfio device DMA in iommu nested stage mode && vSVA

2021-09-24 Thread Kunkun Jiang
Hi all, I encountered a problem in vfio device migration test. The vCPU may be paused during vfio-pci DMA in iommu nested stage mode && vSVA. This may lead to migration fail and other problems related to device hardware and driver implementation. It may be a bit early to discuss this issue,

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-24 Thread Hannes Reinecke
On 9/23/21 10:09 PM, Klaus Jensen wrote: On Sep 9 13:37, Hannes Reinecke wrote: On 9/9/21 12:47 PM, Klaus Jensen wrote: On Sep 9 11:43, Hannes Reinecke wrote: With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one

<    1   2   3   4