[Stable-7.2.10 30/33] ui/clipboard: mark type as not available when there is no data

2024-02-21 Thread Michael Tokarev
From: Fiona Ebner With VNC, a client can send a non-extended VNC_MSG_CLIENT_CUT_TEXT message with len=0. In qemu_clipboard_set_data(), the clipboard info will be updated setting data to NULL (because g_memdup(data, size) returns NULL when size is 0). If the client does not set the VNC_ENCODING_CL

[Stable-7.2.10 24/33] i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available

2024-02-21 Thread Michael Tokarev
From: Xiaoyao Li Leaf FEAT_XSAVE_XSS_LO and FEAT_XSAVE_XSS_HI also need to be cleared when CPUID_EXT_XSAVE is not set. Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features") Signed-off-by: Xiaoyao Li Reviewed-by: Yang Weijiang Message-ID: <20240115091325.1904229-2-xiaoya

[Stable-7.2.10 31/33] ui/clipboard: add asserts for update and request

2024-02-21 Thread Michael Tokarev
From: Fiona Ebner Should an issue like CVE-2023-6683 ever appear again in the future, it will be more obvious which assumption was violated. Suggested-by: Marc-André Lureau Signed-off-by: Fiona Ebner Reviewed-by: Marc-André Lureau Message-ID: <20240124105749.204610-2-f.eb...@proxmox.com> (che

[Stable-7.2.10 11/33] cxl/cdat: Handle cdat table build errors

2024-02-21 Thread Michael Tokarev
From: Ira Weiny The callback for building CDAT tables may return negative error codes. This was previously unhandled and will result in potentially huge allocations later on in ct3_build_cdat() Detect the negative error code and defer cdat building. Fixes: f5ee7413d592 ("hw/mem/cxl-type3: Add C

[Stable-7.2.10 29/33] ui: reject extended clipboard message if not activated

2024-02-21 Thread Michael Tokarev
From: Daniel P. Berrangé The extended clipboard message protocol requires that the client activate the extension by requesting a psuedo encoding. If this is not done, then any extended clipboard messages from the client should be considered invalid and the client dropped. Signed-off-by: Daniel P

[Stable-7.2.10 22/33] target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU

2024-02-21 Thread Michael Tokarev
From: Peter Maydell It doesn't make sense to read the value of MDCR_EL2 on a non-A-profile CPU, and in fact if you try to do it we will assert: #6 0x74b95e96 in __GI___assert_fail (assertion=0x565a8c70 "!arm_feature(env, ARM_FEATURE_M)", file=0x565a6e5c "../../target/arm/he

[Stable-7.2.10 26/33] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F

2024-02-21 Thread Michael Tokarev
From: Xiaoyao Li Existing code misses a decrement of cpuid_i when skip leaf 0x1F. There's a blank CPUID entry(with leaf, subleaf as 0, and all fields stuffed 0s) left in the CPUID array. It conflicts with correct CPUID leaf 0. Signed-off-by: Xiaoyao Li Reviewed-by:Yang Weijiang Message-ID: <2

[Stable-7.2.10 28/33] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-21 Thread Michael Tokarev
From: Ziqiao Kong target/i386: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong Message-ID: <20240215095015.570748-

[Stable-7.2.10 14/33] virtio_iommu: Clear IOMMUPciBus pointer cache when system reset

2024-02-21 Thread Michael Tokarev
From: Zhenzhong Duan s->iommu_pcibus_by_bus_num is a IOMMUPciBus pointer cache indexed by bus number, bus number may not always be a fixed value, i.e., guest reboot to different kernel which set bus number with different algorithm. This could lead to endpoint binding to wrong iommu MR in virtio_

Re: [PATCH v3 1/3] qdev: Add a granule_mode property

2024-02-21 Thread Richard Henderson
On 2/21/24 10:58, Eric Auger wrote: Introduce a new enum type property allowing to set an IOMMU granule. Values are 4K, 16K, 64K and host. This latter indicates the vIOMMU granule will matches the host page size. A subsequent patch will add such a property to the virtio-iommu device. Signed-off

Re: [PATCH v6 5/9] target/riscv: remove 'cpu_vl' global

2024-02-21 Thread Richard Henderson
On 2/21/24 11:31, Daniel Henrique Barboza wrote: At this moment the global is used only in do_vsetvl(). Do a direct env load in do_vsetvl() to read 'vl' and remove the global. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 2

Re: [PATCH v6 9/9] target/riscv/vector_helper.c: optimize loops in ldst helpers

2024-02-21 Thread Richard Henderson
On 2/21/24 11:31, Daniel Henrique Barboza wrote: Change the for loops in ldst helpers to do a single increment in the counter, and assign it env->vstart, to avoid re-reading from vstart every time. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza --- target/riscv/vector_h

[PATCH v2] hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing

2024-02-21 Thread nifan . cxl
From: Fan Ni The whole mailbox output payload space is already zeroed after copying out the input payload, which happens before processing the specific mailbox command: https://elixir.bootlin.com/qemu/v8.2.1/source/hw/cxl/cxl-device-utils.c#L204 Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-uti

Re: [PATCH] hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing

2024-02-21 Thread fan
On Wed, Feb 21, 2024 at 09:59:49PM +0100, Philippe Mathieu-Daudé wrote: > Hi, > > On 21/2/24 19:53, nifan@gmail.com wrote: > > From: Fan Ni > > > > The whole mailbox output payload space is already zeroed after copying > > out the input payload, which happens before processing the specific m

[PATCH] pl031: Update last RTCLR value on write in case it's read back

2024-02-21 Thread Jessica Clarke
The PL031 allows you to read RTCLR, which is meant to give you the last value written. PL031State has an lr field which is used when reading from RTCLR, and is present in the VM migration state, but we never actually update it, so it always reads as its initial 0 value. Signed-off-by: Jessica Clar

Re: [PULL 05/13] linux-user: Use walk_memory_regions for open_self_maps

2024-02-21 Thread Richard Henderson
On 2/12/24 10:43, Ilya Leoshkevich wrote: int main(void) { shmat(shmget(IPC_PRIVATE, 1836016, IPC_CREAT | 0600), (void *)0x2804000, 0); open("/proc/self/maps", O_RDONLY); } Apparently an mmap() is missing for shmat() when g>h and shmaddr is specified. The mismatch between

RE: [PATCH 2/4] target/riscv: Apply modularized matching conditions for breakpoint

2024-02-21 Thread 張哲嘉
Hi Daniel, > -Original Message- > From: Daniel Henrique Barboza > Sent: Thursday, February 22, 2024 1:26 AM > To: Alvin Che-Chia Chang(張哲嘉) ; > qemu-ri...@nongnu.org; qemu-devel@nongnu.org > Cc: alistair.fran...@wdc.com; bin.m...@windriver.com; > liwei1...@gmail.com; zhiwei_...@linux.alib

Re: [RFC PATCH v2 03/22] target/arm: Add PSTATE.ALLINT

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 2:50, Richard Henderson wrote: > On 2/21/24 03:08, Jinjie Ruan via wrote: >> The ALLINT bit in PSTATE is used to mask all IRQ or FIQ interrupts. >> >> Place this in its own field within ENV, as that will >> make it easier to reset from within TCG generated code. >> >> With the chang

Re: [RFC PATCH v2 01/22] target/arm: Add FEAT_NMI to max

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 5:22, Richard Henderson wrote: > On 2/21/24 03:08, Jinjie Ruan via wrote: >> Enable FEAT_NMI on the 'max' CPU. >> >> Signed-off-by: Jinjie Ruan >> --- >>   docs/system/arm/emulation.rst | 1 + >>   target/arm/tcg/cpu64.c    | 1 + >>   2 files changed, 2 insertions(+) > > Review

Re: [PATCH 5/5] tests: Add migration test for loongarch64

2024-02-21 Thread maobibo
On 2024/2/22 上午5:24, Fabiano Rosas wrote: Bibo Mao writes: This patch adds migration test support for loongarch64. The test code comes from aarch64 mostly, only that it it booted as bios in qemu since kernel requires elf format and bios uses binary format. In addition to providing the bina

RE: [PATCH 4/4] target/riscv: Apply modularized matching conditions for icount trigger

2024-02-21 Thread 張哲嘉
Hi Daniel, > -Original Message- > From: Daniel Henrique Barboza > Sent: Thursday, February 22, 2024 2:06 AM > To: Alvin Che-Chia Chang(張哲嘉) ; > qemu-ri...@nongnu.org; qemu-devel@nongnu.org > Cc: alistair.fran...@wdc.com; bin.m...@windriver.com; > liwei1...@gmail.com; zhiwei_...@linux.alib

Re: [PATCH v4 0/2] Add support for LAM in QEMU

2024-02-21 Thread Binbin Wu
Ping... Hi Paolo, do you have time to have a look at this patchset? On 1/22/2024 4:55 PM, Binbin Wu wrote: Gentle ping... Please help to review and consider applying the patch series. (The KVM part has been merged). On 1/12/2024 2:00 PM, Binbin Wu wrote: Linear-address masking (LAM) [1], mod

Re: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks

2024-02-21 Thread Dan Williams
[ add Ira and Davidlohr ] Shiyang Ruan wrote: > > > 在 2024/2/10 14:34, Dan Williams 写道: > > Shiyang Ruan wrote: > >> The length of Physical Address in General Media Event Record/DRAM Event > >> Record is 64-bit, so the field mask should be defined as such length. > > > > Can you include this us

Re: [RFC PATCH v2 04/22] target/arm: Implement ALLINT MSR (immediate)

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 3:09, Richard Henderson wrote: > On 2/21/24 03:08, Jinjie Ruan via wrote: >> Add ALLINT MSR (immediate) to decodetree. And the EL0 check is necessary >> to ALLINT. Avoid the unconditional write to pc and use raise_exception_ra >> to unwind. >> >> Signed-off-by: Jinjie Ruan >> --- >

Re: [RFC PATCH v2 04/22] target/arm: Implement ALLINT MSR (immediate)

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 4:41, Richard Henderson wrote: > On 2/21/24 09:09, Richard Henderson wrote: >> On 2/21/24 03:08, Jinjie Ruan via wrote: >>> Add ALLINT MSR (immediate) to decodetree. And the EL0 check is necessary >>> to ALLINT. Avoid the unconditional write to pc and use >>> raise_exception_ra >>>

Re: [RFC PATCH v2 06/22] target/arm: Add support for Non-maskable Interrupt

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 4:06, Richard Henderson wrote: > On 2/21/24 03:08, Jinjie Ruan via wrote: >> This only implements the external delivery method via the GICv3. >> >> Signed-off-by: Jinjie Ruan >> --- >>   target/arm/cpu-qom.h |  3 ++- >>   target/arm/cpu.c | 39 ++

[PATCH v2 0/1] update the array size

2024-02-21 Thread Dehan Meng
v1 -> v2 update the array size "WIN_10_0_SERVER_VERSION_MATRIX" in case array out of range elements. Dehan Meng (1): qga-win: Add support of Windows Server 2025 in get-osinfo command qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.35.1

[PATCH v2 1/1] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng --- qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c65507c..b37fa7b5ba 100644 --- a/qga/commands-win32.c +++ b/qga/c

[PATCH v2 1/1] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng --- qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c65507c..b37fa7b5ba 100644 --- a/qga/commands-win32.c +++ b/qga/c

[PATCH v2 0/1] update the array size

2024-02-21 Thread Dehan Meng
v1 -> v2 update the array size "WIN_10_0_SERVER_VERSION_MATRIX" in case array out of range elements. Dehan Meng (1): qga-win: Add support of Windows Server 2025 in get-osinfo command qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.35.1

Re: [PATCH] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Done. thanks. On Wed, Feb 21, 2024 at 6:00 PM Konstantin Kostiuk wrote: > > > On Wed, Feb 21, 2024 at 11:51 AM Dehan Meng wrote: > >> Add support of Windows Server 2025 in get-osinfo command >> >> Signed-off-by: Dehan Meng >> --- >> qga/commands-win32.c | 1 + >> 1 file changed, 1 insertion(+

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

2024-02-21 Thread Jiqian Chen
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 resuming. Implement No_Soft_Reset bit of PCI_PM_CTRL register, then

[QEMU PATCH v6 0/1] S3 support

2024-02-21 Thread Jiqian Chen
Hi all, This is the v6 patch to support S3. In current code, when guest does S3, virtio devices are reset during that process, that causes the display resources of virtio-gpu are destroyed, then the display can't come back after resuming. This v6 patch implement the No_Soft_Reset bit of PCI_PM_CTRL

Re: [RFC PATCH v2 05/22] target/arm: Support MSR access to ALLINT

2024-02-21 Thread Jinjie Ruan via
On 2024/2/22 3:28, Richard Henderson wrote: > On 2/21/24 03:08, Jinjie Ruan via wrote: >> Support ALLINT msr access as follow: >> mrs , ALLINT    // read allint >> msr ALLINT,     // write allint with imm >> >> Signed-off-by: Jinjie Ruan >> --- >>   target/arm/helper.c | 32

Re: [PATCH v2 2/2] system/vl: Update description for input grab key

2024-02-21 Thread Thomas Huth
On 21/02/2024 20.52, Tianlan Zhou wrote: Input grab key should be Ctrl-Alt-g, not just Ctrl-Alt. Signed-off-by: Tianlan Zhou --- system/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/vl.c b/system/vl.c index a82555ae15..b8469d9965 100644 --- a/system/vl.c +++

Re: [PATCH v2 1/2] docs/system: Update description for input grab key

2024-02-21 Thread Thomas Huth
On 21/02/2024 20.52, Tianlan Zhou wrote: Input grab key should be Ctrl-Alt-g, not just Ctrl-Alt. Signed-off-by: Tianlan Zhou --- docs/system/keys.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc index 2e2c97aa23..

Support Android hypervisors

2024-02-21 Thread RR NN
Android Virtualization Framework (AVF) supports "KVM(pKVM)" also Qualcomm's "Gunyah" and MediaTek's "GenieZone" as the hypervisor. Please Add these hypervisors to QEMU.

Re: [PATCH v2 0/2] Update description for input grab key

2024-02-21 Thread Michael Tokarev
21.02.2024 22:52, Tianlan Zhou : Input grab key should be Ctrl-Alt-g, not just Ctrl-Alt. v2: - Update help message in system/vl.c v1: - Initial patch Tianlan Zhou (2): docs/system: Update description for input grab key system/vl: Update description for input grab key docs/system/keys.

Re: Support Android hypervisors

2024-02-21 Thread Trilok Soni
On 2/21/2024 9:37 PM, RR NN wrote: > Android Virtualization Framework (AVF) supports "KVM(pKVM)" also Qualcomm's > "Gunyah" and MediaTek's "GenieZone" as the hypervisor. Please Add these > hypervisors to QEMU. I don't understand this comment. Do you want QEMU to work as VMM as well for these Hyper

Re: [PATCH 0/6] [PATCH 0/6] Fix missing ERRP_GUARD() when dereference @errp

2024-02-21 Thread Michael Tokarev
21.02.2024 12:43, Zhao Liu wrote: From: Zhao Liu Hi all, Thanks to Markus's explanation about ERRP_GUARD() on my previsou patch [1], I realize that perhaps more @errp dereference cases need to be double-checked to ensure that ERRP_GUARD() is being used correctly. Therefore, there're the patc

Re: [PATCH] ui/cocoa: Fix incorrect window clipping on macOS Sonoma

2024-02-21 Thread Michael Tokarev
[Adding a few more Ccs] 17.02.2024 18:58, David Parsons : macOS Sonoma changes the NSView.clipsToBounds to false by default where it was true in earlier version of macOS. This causes the window contents to be obscured by the window frame. This fixes the issue by conditionally setting the clipp

Re: [PATCH 18/23] plugins: add an API to read registers

2024-02-21 Thread Akihiko Odaki
On 2024/02/21 23:14, Alex Bennée wrote: Akihiko Odaki writes: On 2024/02/21 19:02, Alex Bennée wrote: Akihiko Odaki writes: On 2024/02/20 23:14, Alex Bennée wrote: Akihiko Odaki writes: On 2024/02/17 1:30, Alex Bennée wrote: We can only request a list of registers once the vCPU has be

Re: [PATCH v6 12/15] hw/pci: Use -1 as a default value for rombar

2024-02-21 Thread Akihiko Odaki
On 2024/02/21 16:59, Markus Armbruster wrote: Akihiko Odaki writes: Currently there is no way to distinguish the case that rombar is explicitly specified as 1 and the case that rombar is not specified. Set rombar -1 by default to distinguish these cases just as it is done for addr and romsize

Re: [PATCH v6 13/15] hw/pci: Determine if rombar is explicitly enabled

2024-02-21 Thread Akihiko Odaki
On 2024/02/21 17:15, Markus Armbruster wrote: Akihiko Odaki writes: vfio determines if rombar is explicitly enabled by inspecting QDict. Inspecting QDict is not nice because QDict is untyped and depends on the details on the external interface. Add an infrastructure to determine if rombar is e

Re: [PATCH v4 32/34] monitor: fdset: Match against O_DIRECT

2024-02-21 Thread Markus Armbruster
Fabiano Rosas writes: > Markus Armbruster writes: > >> Fabiano Rosas writes: >> >>> We're about to enable the use of O_DIRECT in the migration code and >>> due to the alignment restrictions imposed by filesystems we need to >>> make sure the flag is only used when doing aligned IO. >>> >>> The

Re: [PATCH v2 0/2] Field 'reason' for MIGRATION event

2024-02-21 Thread Markus Armbruster
Fabiano Rosas writes: > Roman Khapov writes: > > Hi Roman, > >> This is resending of series 20240215082659.1378342-1-rkha...@yandex-team.ru, >> where patch subjects numbers were broken in patch 2/2. >> >> Sometimes, when migration fails, it is hard to find out >> the cause of the problems: you h

Re: [PATCH 0/6] [PATCH 0/6] Fix missing ERRP_GUARD() when dereference @errp

2024-02-21 Thread Zhao Liu
On Thu, Feb 22, 2024 at 09:04:14AM +0300, Michael Tokarev wrote: > Date: Thu, 22 Feb 2024 09:04:14 +0300 > From: Michael Tokarev > Subject: Re: [PATCH 0/6] [PATCH 0/6] Fix missing ERRP_GUARD() when > dereference @errp > > 21.02.2024 12:43, Zhao Liu wrote: > > From: Zhao Liu > > > > Hi all, > >

RE: [EXT] Re: [PATCH] vhost_net: add NOTIFICATION_DATA and IN_ORDER feature bits to vdpa_feature_bits

2024-02-21 Thread Srujana Challa
Ping. > Subject: RE: [EXT] Re: [PATCH] vhost_net: add NOTIFICATION_DATA and > IN_ORDER feature bits to vdpa_feature_bits > > > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Monday, February 19, 2024 3:15 PM > > To: Srujana Challa > > Cc: qemu-devel@nongnu.org; Vamsi Kr

Re: [PATCH] hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro

2024-02-21 Thread Philippe Mathieu-Daudé
On 21/2/24 19:49, Philippe Mathieu-Daudé wrote: On 21/2/24 19:47, Philippe Mathieu-Daudé wrote: On 21/2/24 19:07, Thomas Huth wrote: leon3.c currently fails to compile with some compilers when the -Wvla option has been enabled:   ../hw/sparc/leon3.c: In function ‘leon3_cpu_reset’:   ../hw/spar

Re: [PATCH] hw/intc/Kconfig: Fix GIC settings when using "--without-default-devices"

2024-02-21 Thread Philippe Mathieu-Daudé
On 21/2/24 12:00, Thomas Huth wrote: When using "--without-default-devices", the ARM_GICV3_TCG and ARM_GIC_KVM settings currently get disabled, though the arm virt machine is only of very limited use in that case. This also causes the migration-test to fail in such builds. Let's make sure that we

Re: [PATCH v3 1/3] qdev: Add a granule_mode property

2024-02-21 Thread Eric Auger
Hi Richard, On 2/21/24 22:58, Richard Henderson wrote: > On 2/21/24 10:58, Eric Auger wrote: >> Introduce a new enum type property allowing to set an >> IOMMU granule. Values are 4K, 16K, 64K and host. This >> latter indicates the vIOMMU granule will matches the >> host page size. >> >> A subseque

Re: [PATCH v4 2/3] virtio: Declare the decoding functions to static

2024-02-21 Thread Markus Armbruster
Hyman Huang writes: > qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() > are now only used in virtio-hmp-cmds.c. So move them into there, > redeclare them to static, and replace the qmp_ prefix with hmp_. > > Signed-off-by: Hyman Huang Reviewed-by: Markus Armbruster

Re: [PATCH v6 5/9] target/riscv: remove 'cpu_vl' global

2024-02-21 Thread Philippe Mathieu-Daudé
On 21/2/24 22:31, Daniel Henrique Barboza wrote: At this moment the global is used only in do_vsetvl(). Do a direct env load in do_vsetvl() to read 'vl' and remove the global. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc |

<    1   2   3   4   5