Re: [PATCH v2 47/54] lasips2: switch over from update_irq() function to PS2 device gpio

2022-06-26 Thread Mark Cave-Ayland
On 24/06/2022 14:41, Mark Cave-Ayland wrote: Add a qdev gpio input in lasips2_init() by taking the existing lasips2_port_set_irq() function, updating it accordingly and then renaming to lasips2_set_irq(). Use these new qdev gpio inputs to wire up the PS2 keyboard and mouse devices. At the

Re: [PATCH] tcg: Fix returned type in alloc_code_gen_buffer_splitwx_memfd()

2022-06-26 Thread Richard Henderson
On 6/24/22 20:32, Shaobo Song wrote: This fixes a bug in POSIX-compliant environments. Since we had allocated a buffer named 'tcg-jit' with read-write access protections we need a int type to combine these access flags and return it, whereas we had inexplicably return a bool type. It may

[PATCH v2] m68k: virt: pass RNG seed via bootinfo block

2022-06-26 Thread Jason A. Donenfeld
This commit wires up bootinfo's RNG seed attribute so that Linux VMs can have their RNG seeded from the earliest possible time in boot, just like the "rng-seed" device tree property on those platforms. The link contains the corresponding Linux patch. Link:

Re: [PATCH] artist: set memory region owners for buffers to the artist device

2022-06-26 Thread Helge Deller
On 6/24/22 18:08, Mark Cave-Ayland wrote: > This fixes the output of "info qom-tree" so that the buffers appear as > children > of the artist device, rather than underneath the "unattached" container. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Helge Deller Thanks! Helge > --- >

[PATCH 0/2] Decouple Xen-HVM from PIIX

2022-06-26 Thread Bernhard Beschow
hw/i386/xen/xen-hvm.c contains logic which is PIIX-specific. This makes xen-hvm.c depend on PIIX which can be avoided if PIIX logic was isolated in PIIX itself. Bernhard Beschow (2): hw/i386/xen/xen-hvm: Allow for stubbing xen_set_pci_link_route() hw/i386/xen/xen-hvm: Inline

Re: [PATCH] Align Raspberry Pi DMA interrupts with Linux DTS

2022-06-26 Thread Peter Maydell
On Fri, 24 Jun 2022 at 21:54, Andrey Makarov wrote: > > All Raspberry Pi models 1-3 (based on bcm2835) have > Linux device tree (arch/arm/boot/dts/bcm2835-common.dtsi +25): > > /* dma channel 11-14 share one irq */ > > which mismatched the Qemu model. > In this patch channels 0--10 and 11--14

[PATCH 2/2] hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it

2022-06-26 Thread Bernhard Beschow
xen_piix_pci_write_config_client() is implemented in the xen sub tree and uses PIIX constants internally, thus creating a direct dependency on PIIX. Now that xen_set_pci_link_route() is stubbable, the logic of xen_piix_pci_write_config_client() can be moved to PIIX which resolves the dependency.

[PATCH 1/2] hw/i386/xen/xen-hvm: Allow for stubbing xen_set_pci_link_route()

2022-06-26 Thread Bernhard Beschow
The only user of xen_set_pci_link_route() is xen_piix_pci_write_config_client() which implements PIIX-specific logic in the xen namespace. This makes xen-hvm depend on PIIX which could be avoided if xen_piix_pci_write_config_client() was implemented in PIIX. In order to do this,

Re: [PATCH 2/2] hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it

2022-06-26 Thread Michael S. Tsirkin
On Sun, Jun 26, 2022 at 11:46:56AM +0200, Bernhard Beschow wrote: > xen_piix_pci_write_config_client() is implemented in the xen sub tree and > uses PIIX constants internally, thus creating a direct dependency on > PIIX. Now that xen_set_pci_link_route() is stubbable, the logic of >

[PATCH v10 2/4] cutils: Introduce bundle mechanism

2022-06-26 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files in the installation tree. The build tree will have a new directory, qemu-bundle, to

[PATCH v10 3/4] datadir: Use bundle mechanism

2022-06-26 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- pc-bios/keymaps/meson.build | 21

Re: [PULL v2 10/20] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-26 Thread Markus Armbruster
Kevin Wolf writes: > From: Xie Yongji > > VDUSE [1] is a linux framework that makes it possible to implement > software-emulated vDPA devices in userspace. This adds a library > as a subproject to help implementing VDUSE backends in QEMU. > > [1]

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-26 Thread Alexey Kardashevskiy
On 6/25/22 06:12, Daniel Henrique Barboza wrote: Alexey, The newer version of this patch is having trouble with Gitlab runners, as you can read in my feedback there. I've tested this one just in case. The same problems happen. E.g. for the cross-armel-system runner: In file included from

Re: [PATCH v3 1/1] target/riscv: Add Zihintpause support

2022-06-26 Thread Alistair Francis
On Wed, Jun 22, 2022 at 2:17 AM Dao Lu wrote: > > From what I know that's generally the way reservations are handled: > if the forward progress requirements aren't met then the implementation > is free to break any outstanding reservations (the hardware is always > free to do that to a degree,

Re: [RFC PATCH v3] RISC-V: Add Zawrs ISA extension support

2022-06-26 Thread Alistair Francis
On Fri, Jun 24, 2022 at 1:31 AM Christoph Muellner wrote: > > This patch adds support for the Zawrs ISA extension. > Given the current (incomplete) implementation of reservation sets > there seems to be no way to provide a full emulation of the WRS > instruction (wake on reservation set

Re: [PATCH] Add some documentation for "dtb" devices tree blobs

2022-06-26 Thread Alistair Francis
On Sun, Jun 26, 2022 at 8:40 AM Simon Sapin wrote: > > Signed-off-by: Simon Sapin Reviewed-by: Alistair Francis Alistair > --- > docs/specs/device-trees.rst| 57 ++ > docs/specs/index.rst | 1 + > docs/system/arm/virt.rst

Re: Booting bare-metal RISC-V virt (Was: [PATCH] Add some documentation for "dtb" devices tree blobs)

2022-06-26 Thread Alistair Francis
On Sun, Jun 26, 2022 at 9:04 AM Simon Sapin wrote: > > On 26/06/2022 00:34, Simon Sapin wrote: > > +On startup, the dtb is memory-mapped and its address is passed to the guest > > +in a target-specific way: > > + > > +* Arm: :ref:`arm-baremetal` > > +* **TODO**: document other targets > > Hello,

[PULL 22/55] pckbd: implement i8042_mmio_reset() for I8042_MMIO device

2022-06-26 Thread Mark Cave-Ayland
This allows the I8042_MMIO reset function to be registered directly within the DeviceClass rather than using qemu_register_reset() directly. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220624134109.881989-23-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell

[PULL 12/55] ps2: don't use vmstate_register() in ps2_kbd_init()

2022-06-26 Thread Mark Cave-Ayland
Since PS2_KBD_DEVICE is a qdev device then vmstate_ps2_keyboard can be registered using the DeviceClass vmsd field instead. There is no need to use qdev_set_legacy_instance_id() to ensure migration compatibility since the first 2 parameters to vmstate_register() are NULL and 0 respectively.

[PULL 26/55] pckbd: implement i8042_mmio_init() function

2022-06-26 Thread Mark Cave-Ayland
This enables use to set the required value of extended_state directly during device init rather than in i8042_mm_init(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220624134109.881989-27-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- hw/input/pckbd.c

[PULL 16/55] lasips2: spacing fixes

2022-06-26 Thread Mark Cave-Ayland
This helps improve the readability of lasips2.c. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-17-mark.cave-ayl...@ilande.co.uk> --- hw/input/lasips2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PULL 39/55] lasips2: move lasips2 QOM types from lasips2.c to lasips2.h

2022-06-26 Thread Mark Cave-Ayland
This allows the QOM types in lasips2.c to be used elsewhere by simply including lasips2.h. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-40-mark.cave-ayl...@ilande.co.uk> --- hw/input/lasips2.c | 23

[PULL 40/55] lasips2: rename lasips2_init() to lasips2_initfn() and update it to return the LASIPS2 device

2022-06-26 Thread Mark Cave-Ayland
When QOMifying a device it is typical to use _init() as the suffix for an instance_init function, however this name is already in use by the legacy LASIPS2 wrapper function. Eventually the wrapper function will be removed, but for now rename it to lasips2_initfn() to avoid a naming collision. At

[PULL 41/55] lasips2: implement lasips2_init() function

2022-06-26 Thread Mark Cave-Ayland
Move the initialisation of the keyboard and mouse memory regions to lasips2_init() and expose them as SysBus memory regions. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-42-mark.cave-ayl...@ilande.co.uk> ---

[PULL 53/55] pckbd: add QEMU interface comment for I8042 device

2022-06-26 Thread Mark Cave-Ayland
This describes the I8042 device interface implemented within QEMU. Signed-off-by: Mark Cave-Ayland Message-Id: <20220624134109.881989-54-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- include/hw/input/i8042.h | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PULL 37/55] pl050: add QEMU interface comment

2022-06-26 Thread Mark Cave-Ayland
This describes the PL050 device interface implemented within QEMU. Signed-off-by: Mark Cave-Ayland Message-Id: <20220624134109.881989-38-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- hw/input/pl050.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/input/pl050.c

[PULL 50/55] pckbd: add QEMU interface comment for I8042_MMIO device

2022-06-26 Thread Mark Cave-Ayland
This describes the I8042_MMIO device interface implemented within QEMU. Signed-off-by: Mark Cave-Ayland Message-Id: <20220624134109.881989-51-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- include/hw/input/i8042.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PULL 52/55] pckbd: switch I8042 device from update_irq() function to PS2 device gpio

2022-06-26 Thread Mark Cave-Ayland
Define a new qdev input gpio for handling incoming PS2 IRQs, and then wire up the PS2 keyboard and mouse devices to use it. At the same time set update_irq() and update_arg to NULL in ps2_kbd_init() and ps2_mouse_init() to ensure that any accidental attempt to use the legacy update_irq() function

[PULL 47/55] lasips2: switch over from update_irq() function to PS2 device gpio

2022-06-26 Thread Mark Cave-Ayland
Add a qdev gpio input in lasips2_init() by taking the existing lasips2_port_set_irq() function, updating it accordingly and then renaming to lasips2_set_irq(). Use these new qdev gpio inputs to wire up the PS2 keyboard and mouse devices. At the same time set update_irq() and update_arg to NULL

[PULL 54/55] ps2: remove update_irq() function and update_arg parameter

2022-06-26 Thread Mark Cave-Ayland
Now that all the PS2 devices have been converted to use GPIOs the update_irq() callback function and the update_arg parameter can be removed. This allows these arguments to be completely removed from ps2_kbd_init() and ps2_mouse_init(), along with the transitional logic that was added to

Re: [PATCH] artist: set memory region owners for buffers to the artist device

2022-06-26 Thread Mark Cave-Ayland
On 26/06/2022 12:15, Helge Deller wrote: On 6/24/22 18:08, Mark Cave-Ayland wrote: This fixes the output of "info qom-tree" so that the buffers appear as children of the artist device, rather than underneath the "unattached" container. Signed-off-by: Mark Cave-Ayland Reviewed-by: Helge

[PULL 02/55] ps2: QOMify PS2State

2022-06-26 Thread Mark Cave-Ayland
Make PS2State a new abstract PS2_DEVICE QOM type to represent the common functionality shared between PS2 keyboard and mouse devices. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-3-mark.cave-ayl...@ilande.co.uk>

[PULL 01/55] ps2: checkpatch fixes

2022-06-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-2-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 154 +++-- 1 file changed, 86 insertions(+), 68 deletions(-) diff

[PULL 03/55] ps2: QOMify PS2KbdState

2022-06-26 Thread Mark Cave-Ayland
Make PS2KbdState into a new PS2_KBD_DEVICE QOM type which inherits from the abstract PS2_DEVICE type. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-4-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 104

[PULL 09/55] ps2: remove duplicate setting of scancode_set in ps2_kbd_init()

2022-06-26 Thread Mark Cave-Ayland
The default value for scancode_set is already set in ps2_kbd_reset() so there is no need to duplicate this in ps2_kbd_init(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-10-mark.cave-ayl...@ilande.co.uk> ---

[PULL 10/55] ps2: implement ps2_kbd_realize() and use it to register ps2_keyboard_handler

2022-06-26 Thread Mark Cave-Ayland
Move the registration of ps2_keyboard_handler from ps2_kbd_init() to a new ps2_kbd_realize() function. Since the abstract PS2_DEVICE parent class doesn't have a realize() function then it is not necessary to store the reference to it in PS2DeviceClass and use device_class_set_parent_realize().

[PULL 05/55] ps2: move QOM type definitions from ps2.c to ps2.h

2022-06-26 Thread Mark Cave-Ayland
Move the QOM type definitions into the ps2.h header file to allow the new QOM types to be used by other devices. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-6-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c

[PULL 15/55] pl050: split pl050_update_irq() into separate pl050_set_irq() and pl050_update_irq() functions

2022-06-26 Thread Mark Cave-Ayland
This will soon allow pl050_set_irq() to be used as a GPIO input function. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-16-mark.cave-ayl...@ilande.co.uk> --- hw/input/pl050.c | 21 + 1 file

[PULL 07/55] ps2: introduce PS2DeviceClass

2022-06-26 Thread Mark Cave-Ayland
This is in preparation for allowing the new PS2_KBD_DEVICE and PS2_MOUSE_DEVICE QOM types to reference the parent PS2_DEVICE device reset() function. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id:

[PULL 13/55] ps2: don't use vmstate_register() in ps2_mouse_init()

2022-06-26 Thread Mark Cave-Ayland
Since PS2_MOUSE_DEVICE is a qdev device then vmstate_ps2_mouse can be registered using the DeviceClass vmsd field instead. There is no need to use qdev_set_legacy_instance_id() to ensure migration compatibility since the first 2 parameters to vmstate_register() are NULL and 0 respectively.

[PULL 30/55] pckbd: move ps2_kbd_init() and ps2_mouse_init() to i8042_mmio_realize()

2022-06-26 Thread Mark Cave-Ayland
Move ps2_kbd_init() and ps2_mouse_init() from i8042_mm_init() to i8042_mmio_realize() to further reduce the initialisation logic done in i8042_mm_init(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id:

[PULL 20/55] pckbd: move ISAKBDState from pckbd.c to i8042.h

2022-06-26 Thread Mark Cave-Ayland
This allows the QOM types in pckbd.c to be used elsewhere by simply including i8042.h. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-21-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 10 --

[PULL 17/55] lasips2: rename ps2dev_update_irq() to lasips2_port_set_irq()

2022-06-26 Thread Mark Cave-Ayland
This better reflects that the IRQ input opaque is a LASIPS2Port structure and not a PS2_DEVICE. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-18-mark.cave-ayl...@ilande.co.uk> --- hw/input/lasips2.c | 6 +++--- 1

[PULL 36/55] pl050: switch over from update_irq() function to PS2 device gpio

2022-06-26 Thread Mark Cave-Ayland
Add a new pl050_init() function which initialises a qdev input gpio for handling incoming PS2 IRQs, and then wire up the PS2 device to use it. At the same time set update_irq() and update_arg to NULL in ps2_kbd_init() and ps2_mouse_init() to ensure that any accidental attempt to use the legacy

[PULL 24/55] pckbd: add size qdev property to I8042_MMIO device

2022-06-26 Thread Mark Cave-Ayland
This will soon be used to set the size of the register memory region using a qdev property. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-25-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 2 ++

[PULL 32/55] ps2: use ps2_raise_irq() instead of calling update_irq() directly

2022-06-26 Thread Mark Cave-Ayland
This consolidates the logic of raising the PS2 IRQ into one single function. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-33-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL 28/55] pckbd: move mapping of I8042_MMIO registers to MIPS magnum machine

2022-06-26 Thread Mark Cave-Ayland
Now that the register memory region is exposed as a SysBus memory region, move the mapping of the I8042_MMIO registers from i8042_mm_init() to the MIPS magnum machine (which is its only user). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id:

[PULL 38/55] lasips2: QOMify LASIPS2State

2022-06-26 Thread Mark Cave-Ayland
Currently lasip2_init() creates a new LASIPS2State directly which is used by the HPPA machine. Introduce a new LASIPS2 QOM type that will soon be used to allow the HPPA machine to be wired up using standard qdev GPIOs. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter

[PULL 46/55] lasips2: use sysbus IRQ for output IRQ

2022-06-26 Thread Mark Cave-Ayland
This enables the IRQ to be wired up using sysbus_connect_irq() in lasips2_initfn(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220624134109.881989-47-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- hw/input/lasips2.c | 9 + 1 file changed, 5

[PULL 33/55] ps2: introduce ps2_lower_irq() instead of calling update_irq() directly

2022-06-26 Thread Mark Cave-Ayland
This consolidates the logic of lowering the PS2 IRQ into one single function. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-34-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 9 +++-- 1 file changed, 7

[PULL 42/55] lasips2: move mapping of LASIPS2 registers to HPPA machine

2022-06-26 Thread Mark Cave-Ayland
Now that the register memory regions are exposed as SysBus memory regions, move the mapping of the LASIPS2 registers from lasips2_initfn() to the HPPA machine (which is its only user). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id:

[PULL 35/55] pckbd: replace irq_kbd and irq_mouse with qemu_irq array in KBDState

2022-06-26 Thread Mark Cave-Ayland
This allows both IRQs to be declared as a single qdev gpio array. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-36-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 12 ++-- include/hw/input/i8042.h |

[PULL 55/55] artist: set memory region owners for buffers to the artist device

2022-06-26 Thread Mark Cave-Ayland
This fixes the output of "info qom-tree" so that the buffers appear as children of the artist device, rather than underneath the "unattached" container. Signed-off-by: Mark Cave-Ayland Message-Id: <20220624160839.886649-1-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Helge Deller ---

[PULL 44/55] lasips2: add base property

2022-06-26 Thread Mark Cave-Ayland
This is in preparation for handling vmstate_register() within the device. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220624134109.881989-45-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- hw/input/lasips2.c | 17 -

[PULL 48/55] lasips2: add QEMU interface comment

2022-06-26 Thread Mark Cave-Ayland
This describes the LASI PS2 device interface implemented within QEMU. Signed-off-by: Mark Cave-Ayland Message-Id: <20220624134109.881989-49-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Peter Maydell --- include/hw/input/lasips2.h | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PULL 51/55] pckbd: add i8042_reset() function to I8042 device

2022-06-26 Thread Mark Cave-Ayland
This means that it is no longer necessary to call qemu_register_reset() manually within i8042_realizefn(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-52-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 10

[PULL 04/55] ps2: QOMify PS2MouseState

2022-06-26 Thread Mark Cave-Ayland
Make PS2MouseState into a new PS2_MOUSE_DEVICE QOM type which inherits from the abstract PS2_DEVICE type. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-5-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 98

[PULL 00/55] qemu-sparc queue 20220626

2022-06-26 Thread Mark Cave-Ayland
The following changes since commit 40d522490714b65e0856444277db6c14c5cc3796: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-06-24 10:52:46 -0700) are available in the Git repository at: https://github.com/mcayland/qemu.git tags/qemu-sparc-20220626 for you

[PULL 08/55] ps2: implement ps2_reset() for the PS2_DEVICE QOM type based upon ps2_common_reset()

2022-06-26 Thread Mark Cave-Ayland
The functionality of ps2_common_reset() can be moved into a new ps2_reset() function for the PS2_DEVICE QOM type. Update PS2DeviceClass to hold a reference to the parent reset function and update the PS2_KBD_DEVICE and PS2_MOUSE_DEVICE types to use device_class_set_parent_reset() accordingly.

[PULL 14/55] pl050: checkpatch fixes

2022-06-26 Thread Mark Cave-Ayland
This patch also includes a couple of minor spacing updates. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-15-mark.cave-ayl...@ilande.co.uk> --- hw/input/pl050.c | 19 +-- 1 file changed, 13

[PULL 06/55] ps2: improve function prototypes in ps2.c and ps2.h

2022-06-26 Thread Mark Cave-Ayland
With the latest changes it is now possible to improve some of the function prototypes in ps2.c and ps.h to use the appropriate PS2KbdState or PS2MouseState type instead of being a void opaque. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller

[PULL 23/55] pckbd: add mask qdev property to I8042_MMIO device

2022-06-26 Thread Mark Cave-Ayland
This allows the KBDState mask value to be set using a qdev property rather than directly in i8042_mm_init(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-24-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 8 +++-

[PULL 19/55] pckbd: move KBDState from pckbd.c to i8042.h

2022-06-26 Thread Mark Cave-Ayland
This allows the QOM types in pckbd.c to be used elsewhere by simply including i8042.h. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-20-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 24

[PULL 11/55] ps2: implement ps2_mouse_realize() and use it to register ps2_mouse_handler

2022-06-26 Thread Mark Cave-Ayland
Move the registration of ps2_mouse_handler from ps2_mouse_init() to a new ps2_mouse_realize() function. Since the abstract PS2_DEVICE parent class doesn't have a realize() function then it is not necessary to store the reference to it in PS2DeviceClass and use device_class_set_parent_realize().

[PULL 31/55] ps2: make ps2_raise_irq() function static

2022-06-26 Thread Mark Cave-Ayland
This function is no longer used outside of ps2.c and so can be declared static. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-32-mark.cave-ayl...@ilande.co.uk> --- hw/input/ps2.c | 2 +- include/hw/input/ps2.h | 1

[PULL 18/55] pckbd: checkpatch fixes

2022-06-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller Message-Id: <20220624134109.881989-19-mark.cave-ayl...@ilande.co.uk> --- hw/input/pckbd.c | 150 ++- 1 file changed, 97 insertions(+), 53 deletions(-) diff

[PULL 21/55] pckbd: introduce new I8042_MMIO QOM type

2022-06-26 Thread Mark Cave-Ayland
Currently i8042_mm_init() creates a new KBDState directly which is used by the MIPS magnum machine. Introduce a new I8042_MMIO QOM type that will soon be used to allow the MIPS magnum machine to be wired up using standard qdev GPIOs. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller

[PULL 25/55] pckbd: implement i8042_mmio_realize() function

2022-06-26 Thread Mark Cave-Ayland
Move the initialisation of the register memory region to the I8042_MMIO device realize function and expose it using sysbus_init_mmio(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-26-mark.cave-ayl...@ilande.co.uk> ---

[PULL 27/55] pckbd: alter i8042_mm_init() to return a I8042_MMIO device

2022-06-26 Thread Mark Cave-Ayland
This exposes the I8042_MMIO device to the caller to allow the register memory region to be mapped outside of i8042_mm_init(). Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-28-mark.cave-ayl...@ilande.co.uk> ---

[PULL 34/55] ps2: add gpio for output IRQ and optionally use it in ps2_raise_irq() and ps2_lower_irq()

2022-06-26 Thread Mark Cave-Ayland
Define the gpio for the PS2 output IRQ in ps2_init() and add logic to optionally use it in ps2_raise_irq() and ps2_lower_irq() if the gpio is connected. If the gpio is not connected then call the legacy update_irq() function as before. This allows the incremental conversion of devices from the

[PULL 29/55] pckbd: more vmstate_register() from i8042_mm_init() to i8042_mmio_realize()

2022-06-26 Thread Mark Cave-Ayland
Note in this case it is not possible to register a (new) VMStateDescription in the DeviceClass without breaking migration compatibility for the MIPS magnum machine. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Message-Id: <20220624134109.881989-30-mark.cave-ayl...@ilande.co.uk>

[PULL 45/55] lasips2: implement lasips2_realize()

2022-06-26 Thread Mark Cave-Ayland
Move ps2_kbd_init() and ps2_mouse_init() from lasips2_initfn() to lasips2_realize. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220624134109.881989-46-mark.cave-ayl...@ilande.co.uk> --- hw/input/lasips2.c | 11 --- 1 file changed, 8

[PULL 49/55] pckbd: switch I8042_MMIO device from update_irq() function to PS2 device gpio

2022-06-26 Thread Mark Cave-Ayland
Define a new qdev input gpio for handling incoming PS2 IRQs, and then wire up the PS2 keyboard and mouse devices to use it. At the same time set update_irq() and update_arg to NULL in ps2_kbd_init() and ps2_mouse_init() to ensure that any accidental attempt to use the legacy update_irq() function

[PULL 43/55] lasips2: move initialisation of PS2 ports from lasi_initfn() to lasi_init()

2022-06-26 Thread Mark Cave-Ayland
This can be improved once the ps2_kbd_init() and ps2_mouse_init() functions have been removed, but for now move the existing logic from lasi_initfn() to lasi_init(). At the same time explicitly set keyboard port id to 0, even if it isn't technically required. Signed-off-by: Mark Cave-Ayland

[RFC v3 0/5] *** Add support for zoned device ***

2022-06-26 Thread Sam Li
*** This patch series adds support for zoned device to virtio-blk emulation. Zoned Storage can support sequential writes, which reduces write amplification in SSD, leading to higher write throughput and increased capacity. v3: - add block layer APIs resembling Linux ZoneBlockDevice ioctls

[RFC v3 3/5] file-posix: introduce get_sysfs_long_val for zoned device information.

2022-06-26 Thread Sam Li
Use sysfs attribute files to get the zoned device information in case that ioctl() commands of zone management interface won't work. It can return long type of value like chunk_sectors, zoned_append_max_bytes, max_open_zones, max_active_zones. --- block/file-posix.c | 37

Re: [PATCH] hw/riscv: boot: Reduce FDT address alignment constraints

2022-06-26 Thread Alistair Francis
On Thu, Jun 23, 2022 at 3:45 PM Atish Kumar Patra wrote: > > On Wed, Jun 22, 2022 at 9:15 PM Alistair Francis wrote: > > > > On Wed, Jun 8, 2022 at 4:41 PM Bin Meng wrote: > > > > > > +Atish > > > > > > On Wed, Jun 8, 2022 at 2:20 PM Alistair Francis > > > wrote: > > > > > > > > From: Alistair

Intermittent meson failures on msys2

2022-06-26 Thread Richard Henderson
Hi guys, There's an occasional failure on msys2, where meson fails to capture the output of a build script. E.g. https://gitlab.com/qemu-project/qemu/-/jobs/2642051161 FAILED: ui/input-keymap-qcode-to-linux.c.inc "C:/GitLab-Runner/builds/qemu-project/qemu/msys64/mingw64/bin/python3.exe"

Re: [PATCH v6 0/4] QEMU RISC-V nested virtualization fixes

2022-06-26 Thread Alistair Francis
On Sat, Jun 11, 2022 at 6:20 PM Anup Patel wrote: > > This series does fixes and improvements to have nested virtualization > on QEMU RISC-V. > > These patches can also be found in riscv_nested_fixes_v6 branch at: > https://github.com/avpatel/qemu.git > > The RISC-V nested virtualization was

QEMU Disassembler

2022-06-26 Thread Kenneth Adam Miller
Hello all, How can I call the QEMU disassembler to run on an argument set of bytes?

virgl avocado hang

2022-06-26 Thread Richard Henderson
Hi Mark, +def test_virtio_vga_virgl(self): +""" +:avocado: tags=arch:x86_64 +:avocado: tags=device:virtio-vga +""" +kernel_command_line = ( +self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash" +)

[PATCH v10 0/4] cutils: Introduce bundle mechanism

2022-06-26 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory,

[PATCH v10 1/4] tests/vm: do not specify -bios option

2022-06-26 Thread Akihiko Odaki
From: Paolo Bonzini When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is being used for the

[PATCH v10 4/4] module: Use bundle mechanism

2022-06-26 Thread Akihiko Odaki
Before this change, the directory of the executable was being added to resolve modules in the build tree. However, get_relocated_path() can now resolve them with the new bundle mechanism. Signed-off-by: Akihiko Odaki --- util/module.c | 1 - 1 file changed, 1 deletion(-) diff --git

[RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-26 Thread Sam Li
By adding zone management operations in BlockDriver, storage controller emulation can use the new block layer APIs including zone_report and zone_mgmt(open, close, finish, reset). --- block/block-backend.c| 56 block/coroutines.h | 5 + block/file-posix.c

[RFC v3 2/5] qemu-io: add zoned block device operations.

2022-06-26 Thread Sam Li
--- block/io.c | 21 +++ include/block/block-io.h | 13 + qemu-io-cmds.c | 121 +++ 3 files changed, 155 insertions(+) diff --git a/block/io.c b/block/io.c index 789e6373d5..656a1b7271 100644 --- a/block/io.c +++ b/block/io.c

[RFC v3 4/5] file-posix: introduce get_sysfs_str_val for device zoned model.

2022-06-26 Thread Sam Li
--- block/file-posix.c | 60 include/block/block-common.h | 4 +-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 73c2cdfbca..74c0245e0f 100644 --- a/block/file-posix.c +++

[RFC v3 5/5] qemu-iotests: add zone operation tests.

2022-06-26 Thread Sam Li
--- tests/qemu-iotests/tests/zoned.sh | 49 +++ 1 file changed, 49 insertions(+) create mode 100755 tests/qemu-iotests/tests/zoned.sh diff --git a/tests/qemu-iotests/tests/zoned.sh b/tests/qemu-iotests/tests/zoned.sh new file mode 100755 index 00..262c0b5427

Re: [PATCH v6 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-26 Thread Alistair Francis
On Sat, Jun 11, 2022 at 6:06 PM Anup Patel wrote: > > We should write transformed instruction encoding of the trapped > instruction in [m|h]tinst CSR at time of taking trap as defined > by the RISC-V privileged specification v1.12. > > Signed-off-by: Anup Patel > --- > target/riscv/cpu.h

Re: [PATCH v6 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-26 Thread Alistair Francis
On Sat, Jun 11, 2022 at 6:07 PM Anup Patel wrote: > > We should disable extensions in riscv_cpu_realize() if minimum required > priv spec version is not satisfied. This also ensures that machines with > priv spec v1.11 (or lower) cannot enable H, V, and various multi-letter > extensions. > >