RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Introduce host_iommu_device_create callback and a wrapper for it. >> >> This callback is used to allocate a host

[PATCH] target/tricore/helper: Use correct string format in cpu_tlb_fill()

2024-03-18 Thread Philippe Mathieu-Daudé
'address' got converted from target_ulong to vaddr in commit 68d6eee73c ("target/tricore: Convert to CPUClass::tlb_fill"). Use the corresponding format string to avoid casting. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2

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

2024-03-18 Thread zhukeqian via
Hi David, 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

[PATCH] target/ppc/mmu-radix64: Use correct string format in walk_tree()

2024-03-18 Thread Philippe Mathieu-Daudé
'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format. Fixes: d2066bc50d ("target/ppc: Check page dir/table base alignment") Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/mmu-radix64.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

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

2024-03-18 Thread zhukeqian via
Hi David, Thanks for reviewing. 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()

Re: [PATCH] target/i386: Export RFDS bit to guests

2024-03-18 Thread Xiaoyao Li
On 3/13/2024 10:53 PM, Pawan Gupta wrote: Register File Data Sampling (RFDS) is a CPU side-channel vulnerability that may expose stale register value. CPUs that set RFDS_NO bit in MSR IA32_ARCH_CAPABILITIES indicate that they are not vulnerable to RFDS. Similarly, RFDS_CLEAR indicates that CPU

RE: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 01/11] Introduce a common abstract struct >HostIOMMUDevice > >Hi Zhenzhong, >On 2/28/24 04:58, Zhenzhong Duan wrote: >> HostIOMMUDevice will be inherited by two sub classes, >> legacy and iommufd currently. >As this patch

RE: [PATCH v1 08/11] vfio/pci: Allocate and initialize HostIOMMUDevice after attachment

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 08/11] vfio/pci: Allocate and initialize >HostIOMMUDevice after attachment > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Signed-off-by: Zhenzhong Duan >> --- >> hw/vfio/pci.c | 4 >> 1 file changed, 4 insertions(+)

RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > > > >On 3/18/24 14:52, Eric Auger wrote: >> Hi ZHenzhong, >> >> On 2/28/24 04:58, Zhenzhong Duan wrote: >>> Introduce host_iommu_device_create callback and a wrapper

RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > >Hi ZHenzhong, > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Introduce host_iommu_device_create callback and a wrapper for it. >> >> This callback is used to

[PATCH v2 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 v2 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 v2 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 v2 0/4] ui/console: Remove console_select()

2024-03-18 Thread Akihiko Odaki
eliminates the need to replace NULL with the active console and save code. Signed-off-by: Akihiko Odaki --- Changes in v2: - Changed to fall back to a text console if there is no graphical console as previously done. - Link to v1: https://lore.kernel.org/r/20240318-console-v1-0-f4efbfa71...@day

[PATCH v2 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,

RE: [PATCH v1 04/11] vfio: Add HostIOMMUDevice handle into VFIODevice

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 04/11] vfio: Add HostIOMMUDevice handle into >VFIODevice > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> This handle points to either IOMMULegacyDevice or IOMMUFDDevice >variant, >> neither both. >I would reword into:

Re: [PATCH-for-9.1 v2 2/3] hw/display/pxa2xx_lcd: Set rotation angle using qemu_console_set_rotate

2024-03-18 Thread Akihiko Odaki
On 2024/03/18 20:31, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- hw/display/pxa2xx_lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index a9d0d981a0..7d03fa57d0 100644 ---

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

2024-03-18 Thread Akihiko Odaki
On 2024/03/18 20:31, Philippe Mathieu-Daudé wrote: Add the 'rotate_arcdegree' field to QemuGraphicConsole and remove the use of the 'graphic_rotate' global. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- ui/console.c | 15 +++ 1 file changed, 11

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

2024-03-18 Thread Akihiko Odaki
On 2024/03/18 20:31, Philippe Mathieu-Daudé wrote: Extract the following methods: - qemu_console_set_rotate() - qemu_console_is_rotated() - qemu_console_get_rotate_arcdegree() Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- include/ui/console.h | 3 +++

Re: [PATCH v5 15/65] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2024-03-18 Thread Wang, Lei
On 2/29/2024 14:36, Xiaoyao Li wrote:> KVM provides TDX capabilities via sub command KVM_TDX_CAPABILITIES of > IOCTL(KVM_MEMORY_ENCRYPT_OP). Get the capabilities when initializing > TDX context. It will be used to validate user's setting later. > > Since there is no interface reporting how many

[PATCH] hw/loongarch: Refine default numa id calculation

2024-03-18 Thread Bibo Mao
With numa_test test case, there is subcase named test_def_cpu_split(), there are 8 sockets and 2 numa nodes. Here is command line: "-machine smp.cpus=8,smp.sockets=8 -numa node,memdev=ram -numa node" The required result is: node 0 cpus: 0 2 4 6 node 1 cpus: 1 3 5 7 Test case numa_test fails

[PATCH] monitor/hmp-cmds-target.c: append a space in error message in gpa2hva()

2024-03-18 Thread Shiyang Ruan via
From: Yao Xingtao In qemu monitor mode, when we use gpa2hva command to print the host virtual address corresponding to a guest physical address, if the gpa is not in RAM, the error message is below: (qemu) gpa2hva 0x75000 Memory at address 0x75000is not RAM a space is missed between

Re: [PATCH v5 08/65] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-03-18 Thread Wang, Lei
On 2/29/2024 14:36, Xiaoyao Li wrote: > From: Chao Peng > > When geeting KVM_EXIT_MEMORY_FAULT exit, it indicates userspace needs to > do the memory conversion on the RAMBlock to turn the memory into desired > attribute, i.e., private/shared. > > Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in

Re: [PATCH 2/4] i386/sev: Switch to use confidential_guest_kvm_init()

2024-03-18 Thread Xiaoyao Li
On 3/19/2024 5:51 AM, Paolo Bonzini wrote: On Thu, Feb 29, 2024 at 7:01 AM Xiaoyao Li wrote: Use confidential_guest_kvm_init() instead of calling SEV specific sev_kvm_init(). As a bouns, it fits to future TDX when TDX implements its own confidential_guest_support and .kvm_init(). Move the

Re: [PATCH v5 06/65] kvm: Introduce support for memory_attributes

2024-03-18 Thread Wang, Lei
On 2/29/2024 14:36, Xiaoyao Li wrote:> Introduce the helper functions to set the attributes of a range of > memory to private or shared. > > This is necessary to notify KVM the private/shared attribute of each gpa > range. KVM needs the information to decide the GPA needs to be mapped at >

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

2024-03-18 Thread LIU Zhiwei
On 2024/3/15 1:56, 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 any potential 'over'

Re: [PATCH for 9.0 v15 01/10] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-03-18 Thread LIU Zhiwei
On 2024/3/15 1:56, Daniel Henrique Barboza wrote: The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread Dan Williams
Jonathan Cameron wrote: > On Mon, 18 Mar 2024 10:29:28 +0800 > Yuquan Wang wrote: > > > The dev_dbg info for Clear Event Records mailbox command would report > > the handle of the next record to clear not the current one. > > > > This was because the index 'i' had incremented before printing

Re: [PULL 0/4] machine development tool

2024-03-18 Thread Peter Xu
On Mon, Mar 18, 2024 at 08:08:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 08.03.24 06:47, Peter Xu wrote: > > On Thu, Mar 07, 2024 at 12:06:59PM +0300, Maksim Davydov wrote: > > > > > > On 3/6/24 04:57, Peter Xu wrote: > > > > On Tue, Mar 05, 2024 at 03:43:41PM +0100, Markus Armbruster

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-18 Thread Si-Wei Liu
On 3/17/2024 8:22 PM, Jason Wang wrote: On Sat, Mar 16, 2024 at 2:45 AM Si-Wei Liu wrote: On 3/14/2024 9:03 PM, Jason Wang wrote: On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: On setups with one or more virtio-net devices with vhost on, dirty tracking iteration increases cost the

Re: [PATCH v4 1/2] vhost: dirty log should be per backend type

2024-03-18 Thread Si-Wei Liu
On 3/17/2024 8:20 PM, Jason Wang wrote: On Sat, Mar 16, 2024 at 2:33 AM Si-Wei Liu wrote: On 3/14/2024 8:50 PM, Jason Wang wrote: On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: There could be a mix of both vhost-user and vhost-kernel clients in the same QEMU process, where separate

Re: [PATCH v2 1/2] target/s390x: Use mutable temporary value for op_ts

2024-03-18 Thread David Hildenbrand
On 18.03.24 21:27, Ilya Leoshkevich wrote: From: Ido Plat Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Cc: qemu-sta...@nongnu.org Fixes: f1ea739bd598 ("target/s390x: Use tcg_constant_* in local contexts") Reviewed-by:

[PATCH 2/2] vl: do not assert if sev-guest is used together with TCG

2024-03-18 Thread Paolo Bonzini
cgs->ready can be false if the accelerator does not look at current_machine->cgs altogether. Assume that the lack of initialization is due to this, and report a nicer error instead of an assertion failure: $ qemu-system-x86_64 -object

[PATCH 0/2] avoid assertion failure when trying confidential guests without KVM

2024-03-18 Thread Paolo Bonzini
When using confidential guests and forgetting the accelerator, the result is not very nice: $ qemu-system-x86_64 -object sev-guest,id=sev0,policy=0x5,id=sev0,cbitpos=51,reduced-phys-bits=1 -M confidential-guest-support=sev0 qemu-system-x86_64: ../softmmu/vl.c:2619:

[PATCH 1/2] vl: convert qemu_machine_creation_done() to Error **

2024-03-18 Thread Paolo Bonzini
Allow using Error ** to pass an error string up to qmp_x_exit_preconfig() and possibly main(). Signed-off-by: Paolo Bonzini --- system/vl.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/system/vl.c b/system/vl.c index 70f4cece7f9..0c970cf0203 100644 ---

Re: [PATCH v2 2/2] tests/tcg/s390x: Test TEST AND SET

2024-03-18 Thread Richard Henderson
On 3/18/24 10:27, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/ts.c| 35 + 2 files changed, 36 insertions(+) create mode 100644

Re: [PATCH 2/4] i386/sev: Switch to use confidential_guest_kvm_init()

2024-03-18 Thread Paolo Bonzini
On Thu, Feb 29, 2024 at 7:01 AM Xiaoyao Li wrote: > > Use confidential_guest_kvm_init() instead of calling SEV specific > sev_kvm_init(). As a bouns, it fits to future TDX when TDX implements > its own confidential_guest_support and .kvm_init(). > > Move the "TypeInfo sev_guest_info" definition

Re: [PATCH 7/7] target/hppa: fix do_stdby_e()

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: stdby,e,m was writing data from the wrong half of the register into memory for cases 0-3. Signed-off-by: Sven Schnelle --- target/hppa/op_helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Fixes: 25460fc5a71 ("target/hppa:

[PULL v2 0/4] machine development tool

2024-03-18 Thread Maksim Davydov
The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) are available in the Git repository at: https://gitlab.com/davydov-max/qemu.git

[PULL v2 3/4] python/qemu/machine: add method to retrieve QEMUMachine::binary field

2024-03-18 Thread Maksim Davydov
Add a supportive property to access the path to the QEMU binary Signed-off-by: Maksim Davydov Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/machine/machine.py | 5 + 1 file changed, 5 insertions(+) diff --git a/python/qemu/machine/machine.py

[PULL v2 4/4] scripts: add script to compare compatibility properties

2024-03-18 Thread Maksim Davydov
This script runs QEMU to obtain compat_props of machines and default values of different types of drivers to produce comparison table. This table can be used to compare machine types to choose the most suitable machine or compare binaries to be sure that migration to the newer version will save

[PULL v2 2/4] qmp: add dump machine type compatibility properties

2024-03-18 Thread Maksim Davydov
To control that creating new machine type doesn't affect the previous types (their compat_props) and to check complex compat_props inheritance we need qmp command to print machine type compatibility properties. This patch adds the ability to get list of all the compat_props of the corresponding

[PULL v2 1/4] qom: add default value

2024-03-18 Thread Maksim Davydov
qmp_qom_list_properties can print default values if they are available as qmp_device_list_properties does, because both of them use the ObjectPropertyInfo structure with default_value field. This can be useful when working with "not device" types (e.g. memory-backend). Signed-off-by: Maksim

Re: [PATCH 6/7] target/hppa: mask privilege bits in mfia

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: mfia should return only the iaoq bits without privilege bits. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management

Re: [PATCH 5/7] target/hppa: copy new_spc to iasq_f on be,n instruction

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: Otherwise the first instruction at the new location gets executed from the old space. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c

Re: [PATCH 4/7] target/hppa: exit tb on flush cache instructions

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: When the guest modifies the tb it is currently executing from, it executes a fic instruction. Exit the tb on such instruction, otherwise we might execute stale code. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 2 ++ 1 file changed, 2

Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: +static bool match_prot_id(CPUHPPAState *env, uint32_t access_id, uint32_t *_pid) +{ +for (int i = 0; i < 8; i++) { +uint32_t pid = get_pid(env, i); There are only 4 pid's for pa1.x. +static uint32_t get_pid(CPUHPPAState *env, int num) +{ +

Re: [PULL 0/4] machine development tool

2024-03-18 Thread Maksim Davydov
On 3/8/24 06:47, Peter Xu wrote: On Thu, Mar 07, 2024 at 12:06:59PM +0300, Maksim Davydov wrote: On 3/6/24 04:57, Peter Xu wrote: On Tue, Mar 05, 2024 at 03:43:41PM +0100, Markus Armbruster wrote: Peter Maydell writes: On Mon, 4 Mar 2024 at 13:52, Maksim Davydov wrote: The following

Re: [PATCH 6/7] target/hppa: mask privilege bits in mfia

2024-03-18 Thread Helge Deller
On 3/17/24 23:14, Sven Schnelle wrote: mfia should return only the iaoq bits without privilege bits. Signed-off-by: Sven Schnelle Reviewed-by: Helge Deller Helge --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c

Re: [PATCH 4/7] target/hppa: exit tb on flush cache instructions

2024-03-18 Thread Helge Deller
On 3/17/24 23:14, Sven Schnelle wrote: When the guest modifies the tb it is currently executing from, it executes a fic instruction. Exit the tb on such instruction, otherwise we might execute stale code. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 2 ++ 1 file changed, 2

Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-18 Thread Helge Deller
On 3/17/24 23:14, Sven Schnelle wrote: PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle Reviewed-by: Helge Deller with a few comments below... Helge --- roms/SLOF| 2 +- target/hppa/mem_helper.c | 67 +++-

Re: [PATCH 2/7] target/hppa: fix shrp for wide mode

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Fixes: f7b775a9c075 ("target/hppa: Implement SHRPD") Reviewed-by: Richard Henderson r~

Re: [PATCH 1/7] target/hppa: ldcw,s uses static shift of 3

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index eb2046c5ad..6a513d7d5c 100644 --- a/target/hppa/translate.c +++

Re: [PATCH 2/7] target/hppa: fix shrp for wide mode

2024-03-18 Thread Helge Deller
On 3/17/24 23:14, Sven Schnelle wrote: Signed-off-by: Sven Schnelle Reviewed-by: Helge Deller Helge --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 6a513d7d5c..8ba31567e8 100644

[PATCH v2 1/2] target/s390x: Use mutable temporary value for op_ts

2024-03-18 Thread Ilya Leoshkevich
From: Ido Plat Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Cc: qemu-sta...@nongnu.org Fixes: f1ea739bd598 ("target/s390x: Use tcg_constant_* in local contexts") Reviewed-by: Ilya Leoshkevich Reviewed-by: Richard

[PATCH v2 2/2] tests/tcg/s390x: Test TEST AND SET

2024-03-18 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/ts.c| 35 + 2 files changed, 36 insertions(+) create mode 100644 tests/tcg/s390x/ts.c diff --git

Re: [PATCH 3/3 for 9.0] Revert "chardev: use a child source for qio input source"

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 10:25 PM Daniel P. Berrangé wrote: > > This reverts commit a7077b8e354d90fec26c2921aa2dea85b90dff90, > and add comments to explain why child sources cannot be used. > > When a GSource is added as a child of another GSource, if its > 'prepare' function indicates

Re: [External] Re: [PATCH v2 1/1] memory tier: acpi/hmat: create CPUless memory tiers after obtaining HMAT info

2024-03-18 Thread Ho-Ren (Jack) Chuang
I'm working on V3. Thanks for Ying's feedback. cc: sthanne...@micron.com On Thu, Mar 14, 2024 at 12:54 AM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > On Tue, Mar 12, 2024 at 2:21 AM Huang, Ying wrote: > >> > >> "Ho-Ren (Jack) Chuang" writes: > >> > >> > The current

Re: Intention to work on GSoC project

2024-03-18 Thread Sahil
Hi, I was reading the "Virtqueues and virtio ring: How the data travels" article [1]. There are a few things that I have not understood in the "avail rings" section. Q1. Step 2 in the "Process to make a buffer available" diagram depicts how the virtio driver writes the descriptor index in the

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

2024-03-18 Thread Eugenio Perez Martin
On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > 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

Re: [PATCH 1/3 for 9.0] chardev: lower priority of the HUP GSource in socket chardev

2024-03-18 Thread Marc-André Lureau
On Mon, Mar 18, 2024 at 10:25 PM Daniel P. Berrangé wrote: > > The socket chardev often has 2 GSource object registered against the > same FD. One is registered all the time and is just intended to handle > POLLHUP events, while the other gets registered & unregistered on the > fly as the

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

2024-03-18 Thread Eugenio Perez Martin
On Mon, Mar 18, 2024 at 5:35 AM 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()

Re: [PATCH 21/22] plugins: Inline plugin_gen_empty_callback

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Each caller can use tcg_gen_plugin_cb directly. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 2/3 for 9.0] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 10:23 PM Daniel P. Berrangé wrote: > > This commit results in unexpected termination of the TLS connection. > When 'fd_can_read' returns 0, the code goes on to pass a zero length > buffer to qio_channel_read. The TLS impl calls into gnutls_recv() > with this zero

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

2024-03-18 Thread Eugenio Perez Martin
On Wed, Feb 7, 2024 at 10:27 AM Stefano Garzarella wrote: > > vhost_vdpa_set_vring_ready() could already fail, but if Linux's > patch [1] will be merged, it may fail with more chance if > userspace does not activate virtqueues before DRIVER_OK when > VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not

Re: [PATCH v2] virtio-blk: iothread-vq-mapping coroutine pool sizing

2024-03-18 Thread Stefan Hajnoczi
On Tue, Mar 12, 2024 at 11:12:04AM -0400, Stefan Hajnoczi wrote: > It is possible to hit the sysctl vm.max_map_count limit when the > coroutine pool size becomes large. Each coroutine requires two mappings > (one for the stack and one for the guard page). QEMU can crash with > "failed to set up

[PATCH] coroutine: cap per-thread local pool size

2024-03-18 Thread Stefan Hajnoczi
The coroutine pool implementation can hit the Linux vm.max_map_count limit, causing QEMU to abort with "failed to allocate memory for stack" or "failed to set up stack guard page" during coroutine creation. This happens because per-thread pools can grow to tens of thousands of coroutines. Each

[PATCH 3/3 for 9.0] Revert "chardev: use a child source for qio input source"

2024-03-18 Thread Daniel P . Berrangé
This reverts commit a7077b8e354d90fec26c2921aa2dea85b90dff90, and add comments to explain why child sources cannot be used. When a GSource is added as a child of another GSource, if its 'prepare' function indicates readiness, then the parent's 'prepare' function will never be run. The

[PATCH 1/3 for 9.0] chardev: lower priority of the HUP GSource in socket chardev

2024-03-18 Thread Daniel P . Berrangé
The socket chardev often has 2 GSource object registered against the same FD. One is registered all the time and is just intended to handle POLLHUP events, while the other gets registered & unregistered on the fly as the frontend is ready to receive more data or not. It is very common for poll()

[PATCH 0/3 for 9.0] Fix TLS support for chardevs and incoming data loss on EOF

2024-03-18 Thread Daniel P . Berrangé
This fixes a problem with TLS support on chardevs that Thomas has previously attempted to deal with: https://lists.nongnu.org/archive/html/qemu-devel/2024-02/msg06915.html Unfortunately that fix caused unexpected side effects that resulted in premature termination of the TLS connection. See

[PATCH 2/3 for 9.0] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-18 Thread Daniel P . Berrangé
This commit results in unexpected termination of the TLS connection. When 'fd_can_read' returns 0, the code goes on to pass a zero length buffer to qio_channel_read. The TLS impl calls into gnutls_recv() with this zero length buffer, at which point GNUTLS returns an error GNUTLS_E_INVALID_REQUEST.

Re: [PATCH v2] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Miles Glenn
On Mon, 2024-03-18 at 16:58 +0100, Cédric Le Goater wrote: Thanks for fixing that! -Glenn Reviewed-by: Glenn Miles > The I2C controller is a subunit of the processor. Make it so and > avoid > QEMU crashes. > > $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c >

[PULL 0/4] s390x and misc patches for 9.0-rc0

2024-03-18 Thread Thomas Huth
Hi Peter! The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

[PULL 1/4] docs/s390: clarify even more that cpu-topology is KVM-only

2024-03-18 Thread Thomas Huth
From: Claudio Fontana At least for now cpu-topology is implemented only for KVM. We already say this, but this tries to be more explicit, and also show it in the examples. This adds a new reference in the introduction that we can point to, whenever we need to reference accelerators and how to

[PULL 2/4] target/s390x: improve cpu compatibility check error message

2024-03-18 Thread Thomas Huth
From: Claudio Fontana some users were confused by this message showing under TCG: Selected CPU generation is too new. Maximum supported model in the configuration: 'xyz' Clarify that the maximum can depend on the accel, and add a hint to try a different one. Also add a hint for features

[PULL 3/4] target/sparc/cpu: Improve the CPU help text

2024-03-18 Thread Thomas Huth
Remove the unnecessary "Sparc" at the beginning of the line and put the chip information into parentheses so that it is clearer which part of the line have to be passed to "-cpu" to specify a different CPU. Message-ID: <20240307174334.130407-4-th...@redhat.com> Reviewed-by: Richard Henderson

[PULL 4/4] travis-ci: Rename SOFTMMU -> SYSTEM

2024-03-18 Thread Thomas Huth
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, rename MAIN_SOFTMMU_TARGETS as MAIN_SYSTEM_TARGETS to express 'system emulation targets'. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240313213339.82071-3-phi...@linaro.org> Reviewed-by: Thomas Huth

Re: [PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > This is only used in one place, and usage requires an > out-of-line function. > > Signed-off-by: Richard Henderson > --- > include/qemu/plugin.h | 12 > tcg/tcg.c | 12 > 2 files changed, 12 insertions(+), 12 deletions(-) > >

RE: [EXTERNAL] [PATCH v3 for 9.1 5/6] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-18 Thread Srujana Challa
> Subject: [EXTERNAL] [PATCH v3 for 9.1 5/6] vhost/vhost-user: Add > VIRTIO_F_NOTIFICATION_DATA to vhost feature bits > > Prioritize security for external emails: Confirm sender and content safety > before clicking links or opening attachments > >

Re: [PATCH 1/2] target/s390x: Use mutable temporary value for op_ts

2024-03-18 Thread Richard Henderson
On 3/18/24 06:26, Ilya Leoshkevich wrote: From: Ido Plat Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Reviewed-by: Ilya Leoshkevich [iii: Adjust a newline and capitalization] Signed-off-by: Ido Plat ---

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

2024-03-18 Thread Sven Schnelle
Richard Henderson writes: > On 3/17/24 20:32, Sven Schnelle wrote: >> 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

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

2024-03-18 Thread Richard Henderson
On 3/17/24 20:32, Sven Schnelle wrote: 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

Re: [PULL 0/4] machine development tool

2024-03-18 Thread Vladimir Sementsov-Ogievskiy
On 08.03.24 06:47, Peter Xu wrote: On Thu, Mar 07, 2024 at 12:06:59PM +0300, Maksim Davydov wrote: On 3/6/24 04:57, Peter Xu wrote: On Tue, Mar 05, 2024 at 03:43:41PM +0100, Markus Armbruster wrote: Peter Maydell writes: On Mon, 4 Mar 2024 at 13:52, Maksim Davydov wrote: The following

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

2024-03-18 Thread Richard Henderson
On 3/17/24 21:03, Xianglai Li wrote: 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

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread fan
On Mon, Mar 18, 2024 at 10:29:28AM +0800, Yuquan Wang wrote: > The dev_dbg info for Clear Event Records mailbox command would report > the handle of the next record to clear not the current one. > > This was because the index 'i' had incremented before printing the > current handle value. > >

Re: [PATCH v2] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 16:58, Cédric Le Goater wrote: The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed.

Re: [PATCH 12/22] plugins: Remove plugin helpers

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > These placeholder helpers are no longer required. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 17:30, Philippe Mathieu-Daudé wrote: Hi Marcin, On 18/3/24 15:08, Marcin Juszkiewicz wrote: Updating sbsa-ref firmware for QEMU CI was manual task. Now it is replaced by CI job run on CodeLinaro Gitlab instance. This patchset updates to current state: - Trusted Firmware v2.10.2

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

2024-03-18 Thread Peter Xu
On Mon, Mar 18, 2024 at 05:08:13PM +0100, Cédric Le Goater wrote: > > > --- 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) > > > { > > > +

Re: [PATCH v3 3/4] tests/avocado: sbsa-ref: add Alpine tests for misc 'max' setup

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 15:08, Marcin Juszkiewicz wrote: PAuth makes run timeout on CI so add tests using 'max' without it and with impdef one. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 18 ++ 1 file changed, 18 insertions(+) diff --git

Re: [PATCH v3 4/4] tests/avocado: sbsa-ref: add OpenBSD tests for misc 'max' setup

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 15:08, Marcin Juszkiewicz wrote: PAuth makes run timeout on CI so add tests using 'max' without it and with impdef one. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff

Re: [PATCH 1/2] target/s390x: Use mutable temporary value for op_ts

2024-03-18 Thread Thomas Huth
On 18/03/2024 17.26, Ilya Leoshkevich wrote: From: Ido Plat Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Reviewed-by: Ilya Leoshkevich [iii: Adjust a newline and capitalization] Signed-off-by: Ido Plat Hi Ilya,

Re: [PATCH v3 1/4] tests/avocado: update sbsa-ref firmware

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 15:08, Marcin Juszkiewicz wrote: We now have CI job to build those and publish in space with readable urls. Firmware is built using Debian 'bookworm' cross toolchain (gcc 12.2.0). Used versions: - Trusted Firmware v2.10.2 - Tianocore EDK2 stable202402 - Tianocore EDK2 Platforms

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-18 Thread Philippe Mathieu-Daudé
Hi Marcin, On 18/3/24 15:08, Marcin Juszkiewicz wrote: Updating sbsa-ref firmware for QEMU CI was manual task. Now it is replaced by CI job run on CodeLinaro Gitlab instance. This patchset updates to current state: - Trusted Firmware v2.10.2 (latest LTS) - Tianocore EDK2 stable202402 (latest

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Peter Xu
On Mon, Mar 18, 2024 at 03:54:28PM +0100, Cédric Le Goater wrote: > On 3/15/24 12:18, Peter Xu wrote: > > > @@ -3009,13 +3045,16 @@ static void > > > listener_add_address_space(MemoryListener *listener, > > > { > > > FlatView *view; > > > FlatRange *fr; > > > +Error *local_err =

[PATCH 2/2] tests/tcg/s390x: Test TEST AND SET

2024-03-18 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/ts.c| 35 + 2 files changed, 36 insertions(+) create mode 100644 tests/tcg/s390x/ts.c diff --git

[PATCH 1/2] target/s390x: Use mutable temporary value for op_ts

2024-03-18 Thread Ilya Leoshkevich
From: Ido Plat Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Reviewed-by: Ilya Leoshkevich [iii: Adjust a newline and capitalization] Signed-off-by: Ido Plat --- target/s390x/tcg/translate.c | 3 ++- 1 file changed, 2

Re: [PATCH 9/9] docs/system: Add documentation on support for IGVM

2024-03-18 Thread Daniel P . Berrangé
On Mon, Mar 18, 2024 at 03:59:31PM +, Roy Hopkins wrote: > On Fri, 2024-03-01 at 17:10 +, Daniel P. Berrangé wrote: > > On Tue, Feb 27, 2024 at 02:50:15PM +, Roy Hopkins wrote: > > > IGVM support has been implemented for Confidential Guests that support > > > AMD SEV and AMD SEV-ES.

[PULL 21/24] tests: acpi/smbios: whitelist expected blobs

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Acked-by: Ani Sinha Message-Id: <20240314152302.2324164-19-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff

[PULL 19/24] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov QEMU for some time now uses SMBIOS 3.0 for PC/Q35 machines by default, however Windows has a bug in locating SMBIOS 3.0 entrypoint and fails to find tables when booted on SeaBIOS (on UEFI SMBIOS 3.0 tables work fine since firmware hands over tables in another way) Missing

  1   2   3   4   >