[PATCH 0/2] ui/cocoa: Add cursor composition

2024-03-18 Thread Akihiko Odaki
| 13 --- ui/cocoa.m | 97 + 6 files changed, 101 insertions(+), 23 deletions(-) --- base-commit: ba49d760eb04630e7b15f423ebecf6c871b8f77b change-id: 20240318-cursor-3491b1806582 Best regards, -- Akihiko Odaki

[PATCH 2/2] ui/console: Remove dpy_cursor_define_supported()

2024-03-18 Thread Akihiko Odaki
Remove dpy_cursor_define_supported() as it brings no benefit today and it has a few inherent problems. All graphical displays except egl-headless support cursor composition without DMA-BUF, and egl-headless is meant to be used in conjunction with another graphical display, so

Re: [PATCH-for-9.1 02/21] target/mips: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-18 Thread Zhao Liu
On Fri, Mar 15, 2024 at 02:08:50PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 15 Mar 2024 14:08:50 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 02/21] target/mips: Declare CPU QOM types using > DEFINE_TYPES() macro > X-Mailer: git-send-email 2.41.0 > > When multiple QOM

Re: Regression in v7.2.10 - ui-dbus.so requires -fPIC

2024-03-18 Thread Olaf Hering
Mon, 18 Mar 2024 11:35:54 +0400 Marc-André Lureau : > Alternatively, we could always build with pic: true (or pic: > enable_modules), but that's not ideal either. I'm sure that unconditionally building with -fPIC has no downsides in this context. Olaf pgpGUQPNKGONs.pgp Description: Digitale

Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-18 Thread Zhao Liu
On Wed, Mar 13, 2024 at 04:22:30PM +0530, Prasad Pandit wrote: > Date: Wed, 13 Mar 2024 16:22:30 +0530 > From: Prasad Pandit > Subject: Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' > initialization in machine_parse_smp_config() > > Hello Zhao, > > > (Communicating with you also

[PATCH 1/3] ui/cocoa: Fix aspect ratio

2024-03-18 Thread Akihiko Odaki
[NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will persist if nothing resizes the window. Call [NSWindow setContentSize:] in such a case. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki ---

[PATCH 2/3] ui/cocoa: Resize window after toggling zoom-to-fit

2024-03-18 Thread Akihiko Odaki
Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index d6a5b462f78b..1324be6d32fe 100644

[PATCH 3/3] ui/cocoa: Use NSTrackingInVisibleRect

2024-03-18 Thread Akihiko Odaki
I observed [NSTrackingArea rect] becomes de-synchronized with the view frame with some unknown condition. Specify NSTrackingInVisibleRect option to let Cocoa automatically update NSTrackingArea, which also saves code for synchronization. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle

[PATCH 0/3] Fixes for "ui/cocoa: Let the platform toggle fullscreen"

2024-03-18 Thread Akihiko Odaki
cocoa: Use NSTrackingInVisibleRect ui/cocoa.m | 72 -- 1 file changed, 37 insertions(+), 35 deletions(-) --- base-commit: ba49d760eb04630e7b15f423ebecf6c871b8f77b change-id: 20240318-fixes-7b187ec236a0 Best regards, -- Akihiko Odaki

Re: [PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 11:58 AM Akihiko Odaki wrote: > > console_select() is shared by other displays and a console_select() call > from one of them triggers console switching also in ui/curses, > circumventing key state reinitialization that needs to be performed in > preparation and

Re: [PATCH 0/3] 64 Bit support for hppa gdbstub

2024-03-18 Thread Sven Schnelle
Hi Richard, Sven Schnelle writes: > Hi List, > > this patchset allows to debug the hppa target when running in wide (64 bit) > mode. gdb needs a small patch to switch to 64 bit mode. I pushed the > patch to >

[PATCH 3/5] hw/loongarch: Refine fwcfg memory map

2024-03-18 Thread Bibo Mao
Memory map table for fwcfg is used for UEFI BIOS, UEFI BIOS uses the first entry from fwcfg memory map as the first memory HOB, the second memory HOB will be used if the first memory HOB is used up. Memory map table for fwcfg does not care about numa node, however in generic the first memory HOB

[PATCH 0/5] hw/loongarch: Refine numa memory map

2024-03-18 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

[PATCH 4/5] hw/loongarch: Refine system dram memory region

2024-03-18 Thread Bibo Mao
For system dram memory region, it is not necessary to use numa node information. There is only low memory region and high memory region. Remove numa node information for ddr memory region here, it can reduce memory region number about LoongArch virt machine. Signed-off-by: Bibo Mao ---

Re: [PATCH-for-9.1 04/21] target/sparc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-18 Thread Zhao Liu
On Fri, Mar 15, 2024 at 02:08:52PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 15 Mar 2024 14:08:52 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 04/21] target/sparc: Declare CPU QOM types using > DEFINE_TYPES() macro > X-Mailer: git-send-email 2.41.0 > > When multiple

[PATCH 5/5] hw/loongarch: Remove minimum and default memory size

2024-03-18 Thread Bibo Mao
Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault. Here generic default memory size is used, and also remove minimum memory size which is 1G originally. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 5 - 1 file changed, 5

[PATCH 2/5] hw/loongarch: Refine fadt memory table for numa memory

2024-03-18 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

Re: [PATCH-for-9.1 03/21] target/ppc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-18 Thread Zhao Liu
On Fri, Mar 15, 2024 at 02:08:51PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 15 Mar 2024 14:08:51 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 03/21] target/ppc: Declare CPU QOM types using > DEFINE_TYPES() macro > X-Mailer: git-send-email 2.41.0 > > When multiple QOM

Re: [QEMU PATCH v6 1/1] virtio-pci: implement No_Soft_Reset bit

2024-03-18 Thread Michael S. Tsirkin
On Thu, Feb 22, 2024 at 11:40:10AM +0800, Jiqian Chen wrote: > In current code, when guest does S3, virtio devices are reset due to > the bit No_Soft_Reset is not set. After resetting, the display resources > of virtio-gpu are destroyed, then the display can't come back and only > show blank after

[PATCH 4/4] ui/curses: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
ui/curses is the only user of console_select(). Move the implementation to ui/curses. Signed-off-by: Akihiko Odaki --- include/ui/console.h | 1 - ui/console-priv.h | 2 +- ui/console-vc-stubs.c | 2 +- ui/console-vc.c | 3 +- ui/console.c | 121

[PATCH 3/4] ui/cocoa: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
ui/cocoa needs to update the UI info and reset the keyboard state tracker when switching the console, or the new console will see the stale UI info or keyboard state. Previously, updating the UI info was done with cocoa_switch(), but it is meant to be called when the surface is being replaced, and

[PATCH 1/4] ui/vc: Do not inherit the size of active console

2024-03-18 Thread Akihiko Odaki
A chardev-vc used to inherit the size of a graphic console when its size not explicitly specified, but it often did not make sense. If a chardev-vc is instantiated during the startup, the active graphic console has no content at the time, so it will have the size of graphic console placeholder,

[PATCH 1/2] ui/cocoa: Add cursor composition

2024-03-18 Thread Akihiko Odaki
Add accelerated cursor composition to ui/cocoa. This does not only improve performance for display devices that exposes the capability to the guest according to dpy_cursor_define_supported(), but fixes the cursor display for devices that unconditionally expects the availability of the capability

[PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
console_select() is shared by other displays and a console_select() call from one of them triggers console switching also in ui/curses, circumventing key state reinitialization that needs to be performed in preparation and resulting in stuck keys. Use its internal state to track the current

[PATCH 0/4] ui/console: Remove console_select()

2024-03-18 Thread Akihiko Odaki
ui/console has a concept of "active" console; the active console is used when NULL is set for DisplayListener::con, and console_select() updates the active console state. However, the global nature of the state cause odd behaviors, and replacing NULL with the active console also resulted in extra

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-18 Thread Stefano Garzarella
On Mon, Mar 18, 2024 at 12:31:59PM +0800, Jason Wang wrote: On Fri, Mar 15, 2024 at 4:23 PM Stefano Garzarella wrote: On Thu, Mar 14, 2024 at 11:17:01AM +0800, Jason Wang wrote: >On Wed, Feb 7, 2024 at 5:27 PM Stefano Garzarella wrote: >> >> vhost_vdpa_set_vring_ready() could already fail,

[PATCH V6] target/loongarch: Fix tlb huge page loading issue

2024-03-18 Thread Xianglai Li
When we use qemu tcg simulation, the page size of bios is 4KB. When using the level 2 super huge page (page size is 1G) to create the page table, it is found that the content of the corresponding address space is abnormal, resulting in the bios can not start the operating system and graphical

Re: Regression in v7.2.10 - ui-dbus.so requires -fPIC

2024-03-18 Thread Marc-André Lureau
Hi On Sun, Mar 17, 2024 at 11:10 AM Michael Tokarev wrote: > > 17.03.2024 01:19, Olaf Hering: > > Sat, 16 Mar 2024 22:40:14 +0300 Michael Tokarev : > > > >> meson: ensure dbus-display generated code is built before other units > >> (cherry picked from commit

Re: [QEMU PATCH v6 1/1] virtio-pci: implement No_Soft_Reset bit

2024-03-18 Thread Chen, Jiqian
Hi Michael S. Tsirkin, Do you have any comments on this patch? On 2024/2/22 11:40, Jiqian Chen wrote: > In current code, when guest does S3, virtio devices are reset due to > the bit No_Soft_Reset is not set. After resetting, the display resources > of virtio-gpu are destroyed, then the display

Re: [PATCH-for-9.1 05/21] cpus: Open code OBJECT_DECLARE_TYPE() in OBJECT_DECLARE_CPU_TYPE()

2024-03-18 Thread Zhao Liu
Hi Philippe, On Fri, Mar 15, 2024 at 02:08:53PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 15 Mar 2024 14:08:53 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 05/21] cpus: Open code OBJECT_DECLARE_TYPE() in > OBJECT_DECLARE_CPU_TYPE() > X-Mailer: git-send-email 2.41.0 >

Re: [PATCH 1/4] ui/vc: Do not inherit the size of active console

2024-03-18 Thread Marc-André Lureau
On Mon, Mar 18, 2024 at 11:59 AM Akihiko Odaki wrote: > > A chardev-vc used to inherit the size of a graphic console when its > size not explicitly specified, but it often did not make sense. If a > chardev-vc is instantiated during the startup, the active graphic > console has no content at the

[PATCH 1/5] hw/loongarch: Refine acpi srat table for numa memory

2024-03-18 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

Re: [PATCH v2 2/3] qom/object_interfaces: Make object_set_properties_from_qdict return bool

2024-03-18 Thread Zhao Liu
On Mon, Mar 18, 2024 at 11:32:09AM +0800, Zhenzhong Duan wrote: > Date: Mon, 18 Mar 2024 11:32:09 +0800 > From: Zhenzhong Duan > Subject: [PATCH v2 2/3] qom/object_interfaces: Make > object_set_properties_from_qdict return bool > X-Mailer: git-send-email 2.34.1 > > Make

Re: [PATCH for 9.0 v15 03/10] target/riscv/vector_helper.c: fix 'vmvr_v' memcpy endianess

2024-03-18 Thread Alistair Francis
On Fri, Mar 15, 2024 at 3:58 AM Daniel Henrique Barboza wrote: > > vmvr_v isn't handling the case where the host might be big endian and > the bytes to be copied aren't sequential. > > Suggested-by: Richard Henderson > Fixes: f714361ed7 ("target/riscv: rvv-1.0: implement vstart CSR") >

Re: [PATCH for 9.0 v15 04/10] target/riscv: always clear vstart in whole vec move insns

2024-03-18 Thread Alistair Francis
On Fri, Mar 15, 2024 at 3:58 AM Daniel Henrique Barboza wrote: > > These insns have 2 paths: we'll either have vstart already cleared if > vstart_eq_zero or we'll do a brcond to check if vstart >= maxsz to call > the 'vmvr_v' helper. The helper will clear vstart if it executes until > the end, or

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-18 Thread Michael S. Tsirkin
On Fri, Mar 15, 2024 at 04:59:49PM +0100, Kevin Wolf wrote: > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > status flag is set; with the current API of the kernel module, it is > impossible to enable the opposite order in our block export code because > userspace is not

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-18 Thread Michael S. Tsirkin
On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > On Fri, Mar 15, 2024 at 11:59 PM Kevin Wolf wrote: > > > > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > > status flag is set; with the current API of the kernel module, it is > > impossible to enable the

Re: [PATCH 08/10] qapi: Correct error message for 'vcpu_dirty_limit' parameter

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 09:58, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 12/3/24 16:26, Zhao Liu wrote: On Tue, Mar 12, 2024 at 03:13:41PM +0100, Markus Armbruster wrote: Date: Tue, 12 Mar 2024 15:13:41 +0100 From: Markus Armbruster Subject: [PATCH 08/10] qapi: Correct error message

Re: [PATCH v1 2/2] system/cpus: Fix resume_all_vcpus() under vCPU hotplug condition

2024-03-18 Thread David Hildenbrand
On 17.03.24 09:37, Keqian Zhu via wrote: For vCPU being hotplugged, qemu_init_vcpu() is called. In this function, we set vcpu state as stopped, and then wait vcpu thread to be created. As the vcpu state is stopped, it will inform us it has been created and then wait on halt_cond. After we has

Re: [PATCH-for-9.1 3/3] ui/console: Add 'rotate_arcdegree' field to allow per-console rotation

2024-03-18 Thread Akihiko Odaki
On 2024/03/18 19:05, Philippe Mathieu-Daudé wrote: Add the 'rotate_arcdegree' field to QemuConsole and remove the use of the 'graphic_rotate' global. I think QemuGraphicConsole is a better place to put the field. Regards, Akihiko Odaki Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
--- a/migration/ram.c +++ b/migration/ram.c @@ -2836,18 +2836,31 @@ static void migration_bitmap_clear_discarded_pages(RAMState *rs) static void ram_init_bitmaps(RAMState *rs) { +Error *local_err = NULL; +bool ret = true; + qemu_mutex_lock_ramlist();

Re: [PATCH v3 for 9.1 0/6] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-18 Thread Jonah Palmer
On 3/16/24 11:45 AM, Jiri Pirko wrote: Fri, Mar 15, 2024 at 05:55:51PM CET, jonah.pal...@oracle.com wrote: The goal of these patches are to add support to a variety of virtio and vhost devices for the VIRTIO_F_NOTIFICATION_DATA transport feature. This feature indicates that a driver will

Re: [PATCH] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-18 Thread Kevin Wolf
Am 06.03.2024 um 15:28 hat Markus Armbruster geschrieben: > When external_snapshot_abort() rejects a BlockDriverState without a > medium, it creates an error like this: > > error_setg(errp, "Device '%s' has no medium", device); > > Trouble is @device can be null. My system formats null

Re: [PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 1:05 PM Akihiko Odaki wrote: > > On 2024/03/18 17:21, Marc-André Lureau wrote: > > Hi > > > > On Mon, Mar 18, 2024 at 11:58 AM Akihiko Odaki > > wrote: > >> > >> console_select() is shared by other displays and a console_select() call > >> from one of them triggers

[RFC PATCH v8 22/23] target/arm: Add FEAT_NMI to max

2024-03-18 Thread Jinjie Ruan via
Enable FEAT_NMI on the 'max' CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. - Sorted to last. --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/emulation.rst

[RFC PATCH v8 03/23] target/arm: Add support for FEAT_NMI, Non-maskable Interrupt

2024-03-18 Thread Jinjie Ruan via
Add support for FEAT_NMI. NMI (FEAT_NMI) is an mandatory feature in ARMv8.8-A and ARM v9.3-A. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. - Adjust to before the MSR patches. --- target/arm/internals.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[RFC PATCH v8 18/23] hw/intc/arm_gicv3: Handle icv_nmiar1_read() for icc_nmiar1_read()

2024-03-18 Thread Jinjie Ruan via
Implement icv_nmiar1_read() for icc_nmiar1_read(), so add definition for ICH_LR_EL2.NMI and ICH_AP1R_EL2.NMI bit. If FEAT_GICv3_NMI is supported, ich_ap_write() should consider ICH_AP1R_EL2.NMI bit. In icv_activate_irq() and icv_eoir_write(), the ICH_AP1R_EL2.NMI bit should be set or clear

[RFC PATCH v8 15/23] hw/intc/arm_gicv3: Implement GICD_INMIR

2024-03-18 Thread Jinjie Ruan via
Add GICD_INMIR, GICD_INMIRnE register and support access GICD_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Make the GICD_INMIR implementation more clearer. - Udpate the commit message. v3: - Add Reviewed-by. --- hw/intc/arm_gicv3_dist.c | 34

[RFC PATCH v8 23/23] hw/arm/virt: Add FEAT_GICv3_NMI feature support in virt GIC

2024-03-18 Thread Jinjie Ruan via
A PE that implements FEAT_NMI and FEAT_GICv3 also implements FEAT_GICv3_NMI. A PE that does not implement FEAT_NMI, does not implement FEAT_GICv3_NMI So included support FEAT_GICv3_NMI feature as part of virt platform GIC initialization if FEAT_NMI and FEAT_GICv3 supported. Signed-off-by: Jinjie

[RFC PATCH v8 04/23] target/arm: Implement ALLINT MSR (immediate)

2024-03-18 Thread Jinjie Ruan via
Add ALLINT MSR (immediate) to decodetree, in which the CRm is 0b000x. The EL0 check is necessary to ALLINT, and the EL1 check is necessary when imm == 1. So implement it inline for EL2/3, or EL1 with imm==0. Avoid the unconditional write to pc and use raise_exception_ra to unwind. Signed-off-by:

[RFC PATCH v8 10/23] hw/arm/virt: Wire NMI and VNMI irq lines from GIC to CPU

2024-03-18 Thread Jinjie Ruan via
Wire the new NMI and VNMI interrupt line from the GIC to each CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Also add VNMI wire. --- hw/arm/virt.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c

[RFC PATCH v8 08/23] target/arm: Handle IS/FS in ISR_EL1 for NMI

2024-03-18 Thread Jinjie Ruan via
Add IS and FS bit in ISR_EL1 and handle the read. With CPU_INTERRUPT_NMI or CPU_INTERRUPT_VNMI, both CPSR_I and ISR_IS must be set. With CPU_INTERRUPT_VFIQ and HCRX_EL2.VFNMI set, both CPSR_F and ISR_FS must be set. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v7: -

[RFC PATCH v8 11/23] hw/intc/arm_gicv3: Add external IRQ lines for NMI

2024-03-18 Thread Jinjie Ruan via
Augment the GICv3's QOM device interface by adding one new set of sysbus IRQ line, to signal NMI to each CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Add support for VNMI. --- hw/intc/arm_gicv3_common.c | 6 ++

Re: [PATCH 05/22] plugins: Move function pointer in qemu_plugin_dyn_cb

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > The out-of-line function pointer is mutually exclusive > with inline expansion, so move it into the union. > Wrap the pointer in a structure named 'regular' to match > PLUGIN_CB_REGULAR. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v3 for 9.1 0/6] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-18 Thread Jiri Pirko
Mon, Mar 18, 2024 at 12:22:02PM CET, jonah.pal...@oracle.com wrote: > > >On 3/16/24 11:45 AM, Jiri Pirko wrote: >> Fri, Mar 15, 2024 at 05:55:51PM CET, jonah.pal...@oracle.com wrote: >> > The goal of these patches are to add support to a variety of virtio and >> > vhost devices for the

Re: [PATCH for 9.0 v15 05/10] target/riscv: always clear vstart for ldst_whole insns

2024-03-18 Thread Alistair Francis
On Fri, Mar 15, 2024 at 3:57 AM Daniel Henrique Barboza wrote: > > Commit 8ff8ac6329 added a conditional to guard the vext_ldst_whole() > helper if vstart >= evl. But by skipping the helper we're also not > setting vstart = 0 at the end of the insns, which is incorrect. > > We'll move the

Re: [PATCH v5 25/25] qapi: Dumb down QAPISchema.lookup_entity()

2024-03-18 Thread Markus Armbruster
Markus Armbruster writes: > QAPISchema.lookup_entity() takes an optional type argument, a subtype > of QAPISchemaDefinition, and returns that type or None. Callers can > use this to save themselves an isinstance() test. > > The only remaining user of this convenience feature is .lookup_type().

[PATCH-for-9.1 v2 0/3] ui/display: Introduce API to change console orientation

2024-03-18 Thread Philippe Mathieu-Daudé
Since v1: - Move rotate_arcdegree to QemuGraphicConsole (Akihiko) Hi, The idea behind this series is to reduce the use of the 'graphic_rotate' global. It is only used by the Spitz machine, so we could convert the '-rotate' argument to a sugar property on the PXA2XX_LCD_TYPE model, but since the

[PULL 14/15] tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Tests that use "--blockdev" with the "file" driver cannot work with other protocols, so we should mark them accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-10-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf ---

[PULL 02/15] nbd/server: Fix race in draining the export

2024-03-18 Thread Kevin Wolf
When draining an NBD export, nbd_drained_begin() first sets client->quiescing so that nbd_client_receive_next_request() won't start any new request coroutines. Then nbd_drained_poll() tries to makes sure that we wait for any existing request coroutines by checking that client->nb_requests has

[PULL 15/15] iotests: adapt to output change for recently introduced 'detached header' field

2024-03-18 Thread Kevin Wolf
From: Fiona Ebner Failure was noticed when running the tests for the qcow2 image format. Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS") Signed-off-by: Fiona Ebner Message-ID: <20240216101415.293769-1-f.eb...@proxmox.com> Reviewed-by: Daniel P. Berrangé

Re: [PATCH v1 3/6] intel_iommu: Add a framework to check and sync host IOMMU cap/ecap

2024-03-18 Thread Eric Auger
Hi Michael, On 3/13/24 12:17, Michael S. Tsirkin wrote: > On Wed, Mar 13, 2024 at 07:54:11AM +, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Michael S. Tsirkin >>> Subject: Re: [PATCH v1 3/6] intel_iommu: Add a framework to check and >>> sync host IOMMU cap/ecap >>> >>>

[RFC PATCH v8 01/23] target/arm: Handle HCR_EL2 accesses for bits introduced with FEAT_NMI

2024-03-18 Thread Jinjie Ruan via
FEAT_NMI defines another three new bits in HCRX_EL2: TALLINT, HCRX_VINMI and HCRX_VFNMI. When the feature is enabled, allow these bits to be written in HCRX_EL2. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Update the comment for FEAT_NMI in hcrx_write(). - Update the

[RFC PATCH v8 02/23] target/arm: Add PSTATE.ALLINT

2024-03-18 Thread Jinjie Ruan via
When PSTATE.ALLINT is set, an IRQ or FIQ interrupt that is targeted to ELx, with or without superpriority is masked. As Richard suggested, place ALLINT bit in PSTATE in env->pstate. With the change to pstate_read/write, exception entry and return are automatically handled. Signed-off-by: Jinjie

Re: [PATCH 04/22] plugins: Zero new qemu_plugin_dyn_cb entries

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 00/10] Reduce usage of QERR_ macros further

2024-03-18 Thread Markus Armbruster
Markus Armbruster writes: > Philippe posted "[PATCH v2 00/22] qapi: Kill 'qapi/qmp/qerror.h' for > good" a couple of months ago. I cherry-picked just its simplest parts > for now. > > Markus Armbruster (1): > error: Drop superfluous #include "qapi/qmp/qerror.h" Queued for 9.1 with PATCH 08's

Re: [PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-03-18 Thread Kevin Wolf
Am 16.02.2024 um 11:14 hat Fiona Ebner geschrieben: > Failure was noticed when running the tests for the qcow2 image format. > > Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in > QCryptoBlockInfoLUKS") > Signed-off-by: Fiona Ebner Thanks, applied to the block branch. Kevin

[PULL 05/15] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-03-18 Thread Kevin Wolf
From: Abhiram Tilak When running the command `qemu-img snapshot -l SNAPSHOT` the output of VM_CLOCK (measures the offset between host and VM clock) cannot to accommodate values in the order of thousands (4-digit). This line [1] hints on the problem. Additionally, the column width for the

[PULL 03/15] iotests: Add test for reset/AioContext switches with NBD exports

2024-03-18 Thread Kevin Wolf
This replicates the scenario in which the bug was reported. Unfortunately this relies on actually executing a guest (so that the firmware initialises the virtio-blk device and moves it to its configured iothread), so this can't make use of the qtest accelerator like most other test cases. I tried

Re: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-18 Thread David Hildenbrand
On 17.03.24 09:37, Keqian Zhu via wrote: Both main loop thread and vCPU thread are allowed to call pause_all_vcpus(), and in general resume_all_vcpus() is called after it. Two issues live in pause_all_vcpus(): In general, calling pause_all_vcpus() from VCPU threads is quite dangerous. Do we

Re: [PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-18 Thread Prasad Pandit
Hello, On Mon, 18 Mar 2024 at 13:23, Zhao Liu wrote: > Indeed, as you say, these items are initialized to 0 by default. > > I think, however, that the initialization is so far away from where the > smp is currently parsed that one can't easily confirm it (thanks for > your confirmation!). > >

Re: [PATCH 7/9] i386/sev: Refactor setting of reset vector and initial CPU state

2024-03-18 Thread Roy Hopkins
On Tue, 2024-03-12 at 16:12 +, Daniel P. Berrangé wrote: > On Tue, Mar 12, 2024 at 03:45:20PM +, Roy Hopkins wrote: > > On Fri, 2024-03-01 at 17:01 +, Daniel P. Berrangé wrote: > > > On Tue, Feb 27, 2024 at 02:50:13PM +, Roy Hopkins wrote: > > > > +    /* > > > > +  

[PULL 11/15] tests/qemu-iotests: Restrict test 156 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth The test fails completely when you try to use it with a different protocol, e.g. with "./check -ssh -qcow2 156". The test uses some hand-crafted JSON statements which cannot work with other protocols, thus let's change this test to only support the 'file' protocol.

Re: [PATCH for 9.0 v15 02/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-18 Thread Alistair Francis
On Fri, Mar 15, 2024 at 3:59 AM Daniel Henrique Barboza wrote: > > trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't > setting vstart = 0 after execution. This is usually done by a helper in > vector_helper.c but these functions don't use helpers. > > We'll set vstart after

Re: [PATCH v2 3/3] qom/object_interfaces: Remove local_err in user_creatable_add_type

2024-03-18 Thread Zhao Liu
On Mon, Mar 18, 2024 at 11:32:10AM +0800, Zhenzhong Duan wrote: > Date: Mon, 18 Mar 2024 11:32:10 +0800 > From: Zhenzhong Duan > Subject: [PATCH v2 3/3] qom/object_interfaces: Remove local_err in > user_creatable_add_type > X-Mailer: git-send-email 2.34.1 > > In user_creatable_add_type, there

[PATCH] ui/cocoa: Do not automatically zoom for HiDPI

2024-03-18 Thread Akihiko Odaki
fo.width = frameSize.width * [[self window] backingScaleFactor]; +info.height = frameSize.height * [[self window] backingScaleFactor]; dpy_set_ui_info(dcl.con, , TRUE); } --- base-commit: ba49d760eb04630e7b15f423ebecf6c871b8f77b change-id: 20240318-zoom-df4d6834e56b Best regards, --

[RFC PATCH v8 00/23] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-03-18 Thread Jinjie Ruan via
This patch set implements FEAT_NMI and FEAT_GICv3_NMI for armv8. These introduce support for a new category of interrupts in the architecture which we can use to provide NMI like functionality. There are two modes for using this FEAT_NMI. When PSTATE.ALLINT or PSTATE.SP &

[RFC PATCH v8 21/23] hw/intc/arm_gicv3: Report the VNMI interrupt

2024-03-18 Thread Jinjie Ruan via
In vCPU Interface, if the vIRQ has the superpriority property, report vNMI to the corresponding vPE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. --- hw/intc/arm_gicv3_cpuif.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

[RFC PATCH v8 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-18 Thread Jinjie Ruan via
This only implements the external delivery method via the GICv3. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v8: - Fix the rcu stall after sending a VNMI in qemu VM. v7: - Add Reviewed-by. v6: - env->cp15.hcr_el2 -> arm_hcr_el2_eff(). - env->cp15.hcrx_el2 ->

[RFC PATCH v8 07/23] target/arm: Add support for NMI in arm_phys_excp_target_el()

2024-03-18 Thread Jinjie Ruan via
According to Arm GIC section 4.6.3 Interrupt superpriority, the interrupt with superpriority is always IRQ, never FIQ, so handle NMI same as IRQ in arm_phys_excp_target_el(). Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Remove nmi_is_irq flag in

[RFC PATCH v8 13/23] hw/intc/arm_gicv3: Add irq superpriority information

2024-03-18 Thread Jinjie Ruan via
A SPI, PPI or SGI interrupt can have a superpriority property. So maintain superpriority information in PendingIrq and GICR/GICD. Signed-off-by: Jinjie Ruan Acked-by: Richard Henderson --- v3: - Place this ahead of implement GICR_INMIR. - Add Acked-by. --- include/hw/intc/arm_gicv3_common.h |

Re: [PATCH 03/22] tcg: Pass function pointer to tcg_gen_call*

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > For normal helpers, read the function pointer from the > structure earlier. For plugins, this will allow the > function pointer to come from elsewhere. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Move MAX_CALL_IARGS from tcg.h and include for > the define of TCG_TARGET_REG_BITS. > > Signed-off-by: Richard Henderson This may have broken TCI: ../tcg/tci.c: In function 'tcg_qemu_tb_exec': ../tcg/tci.c:391:34: error: 'MAX_CALL_IARGS' undeclared (first use in

Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Move MAX_CALL_IARGS from tcg.h and include for > the define of TCG_TARGET_REG_BITS. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] hw/virtio: Add support for VDPA network simulation devices

2024-03-18 Thread Michael S. Tsirkin
On Thu, Mar 14, 2024 at 11:24:33AM +0800, Jason Wang wrote: > On Thu, Mar 14, 2024 at 3:52 AM Michael S. Tsirkin wrote: > > > > On Wed, Mar 13, 2024 at 07:51:08PM +0100, Thomas Weißschuh wrote: > > > On 2024-02-21 15:38:02+0800, Hao Chen wrote: > > > > This patch adds support for VDPA network

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-18 Thread Stefan Hajnoczi
On Mon, Mar 18, 2024 at 12:37:19PM +0100, Kevin Wolf wrote: > Am 14.03.2024 um 15:29 hat Stefan Hajnoczi geschrieben: > > On Wed, Mar 13, 2024 at 04:30:00PM +0100, Kevin Wolf wrote: > > > Calling job_pause_point() while holding the graph reader lock > > > potentially results in a deadlock:

[PULL 09/15] tests/qemu-iotests: Restrict test 130 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Using "-drive ...,backing.file.filename=..." only works with the file protocol, but not with URIs, so mark this test accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-5-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf ---

Re: [PATCH for-9.0 0/2] nbd: Fix server crash on reset with iothreads

2024-03-18 Thread Stefan Hajnoczi
On Thu, Mar 14, 2024 at 05:58:23PM +0100, Kevin Wolf wrote: > Kevin Wolf (2): > nbd/server: Fix race in draining the export > iotests: Add test for reset/AioContext switches with NBD exports > > nbd/server.c | 15 ++--- >

Re: [PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new I386_CPU / X86_64_CPU types

2024-03-18 Thread Zhao Liu
Hi Philippe, On Fri, Mar 15, 2024 at 02:08:54PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 15 Mar 2024 14:08:54 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new > I386_CPU / X86_64_CPU types > X-Mailer: git-send-email 2.41.0 >

[RFC PATCH v8 17/23] hw/intc/arm_gicv3: Add NMI handling CPU interface registers

2024-03-18 Thread Jinjie Ruan via
Add the NMIAR CPU interface registers which deal with acknowledging NMI. When introduce NMI interrupt, there are some updates to the semantics for the register ICC_IAR1_EL1 and ICC_HPPIR1_EL1. For ICC_IAR1_EL1 register, it should return 1022 if the intid has super priority. And for ICC_NMIAR1_EL1

[RFC PATCH v8 19/23] hw/intc/arm_gicv3: Implement NMI interrupt prioirty

2024-03-18 Thread Jinjie Ruan via
If GICD_CTLR_DS bit is zero and the NMI is non-secure, the NMI prioirty is higher than 0x80, otherwise it is higher than 0x0. And save NMI super prioirty information in hppi.superprio to deliver NMI exception. Since both GICR and GICD can deliver NMI, it is both necessary to check whether the

[RFC PATCH v8 20/23] hw/intc/arm_gicv3: Report the NMI interrupt in gicv3_cpuif_update()

2024-03-18 Thread Jinjie Ruan via
In CPU Interface, if the IRQ has the superpriority property, report NMI to the corresponding PE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. v4: - Swap the ordering of the IFs. v3: - Remove handling nmi_is_irq flag. --- hw/intc/arm_gicv3_cpuif.c | 4

[RFC PATCH v8 09/23] target/arm: Handle PSTATE.ALLINT on taking an exception

2024-03-18 Thread Jinjie Ruan via
Set or clear PSTATE.ALLINT on taking an exception to ELx according to the SCTLR_ELx.SPINTMASK bit. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. --- target/arm/helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/arm/helper.c

[RFC PATCH v8 05/23] target/arm: Support MSR access to ALLINT

2024-03-18 Thread Jinjie Ruan via
Support ALLINT msr access as follow: mrs , ALLINT// read allint msr ALLINT, // write allint with imm Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v5: - Add Reviewed-by. v4: - Remove arm_is_el2_enabled() check in allint_check(). - Change to

[RFC PATCH v8 14/23] hw/intc/arm_gicv3_redist: Implement GICR_INMIR0

2024-03-18 Thread Jinjie Ruan via
Add GICR_INMIR0 register and support access GICR_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. v4: - Make the GICR_INMIR0 implementation more clearer. --- hw/intc/arm_gicv3_redist.c | 19 +++ hw/intc/gicv3_internal.h | 1 + 2

[RFC PATCH v8 16/23] hw/intc: Enable FEAT_GICv3_NMI Feature

2024-03-18 Thread Jinjie Ruan via
Added properties to enable FEAT_GICv3_NMI feature, setup distributor and redistributor registers to indicate NMI support. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. --- hw/intc/arm_gicv3_common.c | 1 + hw/intc/arm_gicv3_dist.c | 2 ++

[RFC PATCH v8 12/23] target/arm: Handle NMI in arm_cpu_do_interrupt_aarch64()

2024-03-18 Thread Jinjie Ruan via
According to Arm GIC section 4.6.3 Interrupt superpriority, the interrupt with superpriority is always IRQ, never FIQ, so the NMI exception trap entry behave like IRQ. And VNMI(vIRQ with Superpriority) can be raised from the GIC or come from the hcrx_el2.HCRX_VINMI bit. Signed-off-by: Jinjie Ruan

Re: [PATCH-for-9.1 0/3] ui/display: Introduce API to change console orientation

2024-03-18 Thread Philippe Mathieu-Daudé
(Forgot to Cc Akihiko) On 18/3/24 11:05, Philippe Mathieu-Daudé wrote: Hi, The idea behind this series is to reduce the use of the 'graphic_rotate' global. It is only used by the Spitz machine, so we could convert the '-rotate' argument to a sugar property on the PXA2XX_LCD_TYPE model, but

[PATCH-for-9.1 v2 1/3] ui/console: Introduce API to change console orientation

2024-03-18 Thread Philippe Mathieu-Daudé
Extract the following methods: - qemu_console_set_rotate() - qemu_console_is_rotated() - qemu_console_get_rotate_arcdegree() Signed-off-by: Philippe Mathieu-Daudé --- include/ui/console.h | 3 +++ ui/console.c | 16 ui/input.c | 9 - 3 files

[PATCH-for-9.1 v2 3/3] ui/console: Add 'rotate_arcdegree' field to allow per-console rotation

2024-03-18 Thread Philippe Mathieu-Daudé
Add the 'rotate_arcdegree' field to QemuGraphicConsole and remove the use of the 'graphic_rotate' global. Signed-off-by: Philippe Mathieu-Daudé --- ui/console.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index

  1   2   3   4   >