Re: [PATCH v2 1/3] target/hppa: Fix assemble_16 insns for wide mode

2024-03-18 Thread Helge Deller
On 3/13/24 23:51, Richard Henderson wrote: Reported-by: Sven Schnelle Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/insns.decode | 15 +-- target/hppa/translate.c | 22 ++ 2 files changed, 31 insertions(+), 6 deletions(-)

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

2024-03-18 Thread Marcin Juszkiewicz
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 --git a/tests/avocado/machine_aarch64_sbsaref.py

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

2024-03-18 Thread Marcin Juszkiewicz
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 a/tests/avocado/machine_aarch64_sbsaref.py

[PATCH v3 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-18 Thread Marcin Juszkiewicz
sbsa-ref is supposed to emulate real hardware so virtio-rng-pci does not fit here Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 8 1 file changed, 8 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py

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

2024-03-18 Thread Marcin Juszkiewicz
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 release) And Tianocore EDK2-platforms commit 085c2fb

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

2024-03-18 Thread Marcin Juszkiewicz
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 code commit 085c2fb Signed-off-by: Marcin

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

2024-03-18 Thread Eric Auger
On 2/28/24 04:58, Zhenzhong Duan wrote: > Signed-off-by: Zhenzhong Duan > --- > hw/vfio/pci.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > index 4fa387f043..6cc7de5d10 100644 > --- a/hw/vfio/pci.c > +++ b/hw/vfio/pci.c > @@ -3006,6 +3006,9 @@

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

2024-03-18 Thread Thomas Huth
On 18/03/2024 16.44, 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.

[PATCH v4 1/2] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
Query kvm for supported guest physical address bits, in cpuid function 8008, eax[23:16]. Usually this is identical to host physical address bits. With NPT or EPT being used this might be restricted to 48 (max 4-level paging address space size) even if the host cpu supports more physical

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

2024-03-18 Thread Cédric Le Goater
On 3/18/24 16:44, 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.

[PATCH v4 2/2] target/i386: add guest-phys-bits cpu property

2024-03-18 Thread Gerd Hoffmann
Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann --- target/i386/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c88c895a5b3e..e0d73b6ec654

[PATCH v4 0/2] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
The matching kernel bits are here: https://lore.kernel.org/kvm/20240313125844.912415-1-kra...@redhat.com/T/ ovmf test patches are here: https://github.com/kraxel/edk2/commits/devel/guest-phys-bits/ Gerd Hoffmann (2): kvm: add support for guest physical bits target/i386: add guest-phys-bits

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 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 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 v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Cédric Le Goater
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 = NULL; if (listener->begin) { listener->begin(listener); } if

Re: [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info()

2024-03-18 Thread Eric Auger
Hi Zhenzhong, On 2/28/24 04:59, Zhenzhong Duan wrote: > Introduce a helper function iommufd_device_get_info() to get > host IOMMU related information through iommufd uAPI. Looks strange to have this patch in this series. I Would rather put it in your second series alongs with its user. Eric > >

[PATCH v4 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-03-18 Thread Anthony Harivel
Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL interface (Running Average Power Limit) for advertising the accumulated energy consumption of various power domains (e.g. CPU packages, DRAM, etc.). The consumption is reported via MSRs (model specific registers) like

[PATCH v4 2/3] tools: build qemu-vmsr-helper

2024-03-18 Thread Anthony Harivel
Introduce a privileged helper to access RAPL MSR. The privileged helper tool, qemu-vmsr-helper, is designed to provide virtual machines with the ability to read specific RAPL (Running Average Power Limit) MSRs without requiring CAP_SYS_RAWIO privileges or relying on external, out-of-tree patches.

[PATCH v4 0/3] Add support for the RAPL MSRs series

2024-03-18 Thread Anthony Harivel
Dear maintainers, First of all, thank you very much for your review of my patch [1]. In this version (v4), I have attempted to address all the problems addressed during the last review. I hope I did not forget anything. I added more than 400 lines of code, I guess it's time we review that.

[PATCH v4 1/3] qio: add support for SO_PEERCRED for socket channel

2024-03-18 Thread Anthony Harivel
The function qio_channel_get_peercred() returns a pointer to the credentials of the peer process connected to this socket. This credentials structure is defined in as follows: struct ucred { pid_t pid;/* Process ID of the sending process */ uid_t uid;/* User ID of the

[PATCH v5 05/24] Revert "replay: stop us hanging in rr_wait_io_event"

2024-03-18 Thread Nicholas Piggin
This reverts commit 1f881ea4a444ef36a8b6907b0b82be4b3af253a2. That commit causes reverse_debugging.py test failures, and does not seem to solve the root cause of the problem x86-64 still hangs in record/replay tests. The problem with short-cutting the iowait that was taken during record phase is

[PATCH v5 17/24] tests/avocado: reverse_debugging.py stop VM before sampling icount

2024-03-18 Thread Nicholas Piggin
Rather than sampling icount while the vm is running, stop it before sampling icount. This allows the actual last recorded icount in the trace to be found. Signed-off-by: Nicholas Piggin --- tests/avocado/reverse_debugging.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff

[PATCH v5 12/24] savevm: Fix load_snapshot error path crash

2024-03-18 Thread Nicholas Piggin
An error path missed setting *errp, which can cause a NULL deref. Signed-off-by: Nicholas Piggin --- migration/savevm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/savevm.c b/migration/savevm.c index 388d7af7cd..10c187dd10 100644 --- a/migration/savevm.c +++

[PATCH v5 09/24] replay: Fix migration replay_mutex locking

2024-03-18 Thread Nicholas Piggin
Migration causes a number of events that need to go in the replay trace, such as vm state transitions. The replay_mutex lock needs to be held for these. The simplest approach seems to be just take it up-front when taking the bql. Signed-off-by: Nicholas Piggin --- migration/migration.c | 9

[PATCH v5 18/24] tests/avocado: reverse_debugging reverse-step at the end of the trace

2024-03-18 Thread Nicholas Piggin
The longer a trace is played for, the more chance there is for bugs to cause it to go out of synch with the initial recording. Stepping backward from the end of a trace can be a good way to find problems. This extends the runtime of the record phase to 1 second, to build a bigger trace, and it

[PATCH v5 10/24] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-03-18 Thread Nicholas Piggin
The regular qemu_bh_schedule() calls result in non-deterministic execution of the bh in record-replay mode, which causes replay failure. Signed-off-by: Nicholas Piggin --- hw/net/virtio-net.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c

[PATCH v5 11/24] virtio-net: Use virtual time for RSC timers

2024-03-18 Thread Nicholas Piggin
Receive coalescing is visible to the target machine, so its timers should use virtual time like other timers in virtio-net, to be compatible with record-replay. Signed-off-by: Nicholas Piggin --- hw/net/virtio-net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v5 23/24] spapr: Fix vpa dispatch count for record-replay

2024-03-18 Thread Nicholas Piggin
The dispatch count is a field in guest memory that the hypervisor increments when preempting and dispatching the guest. This was not being done deterministically with respect to icount, because tcg exec exit is not deterministic (e.g., an async event could cause it). Change vpa dispatch count

[PATCH v5 19/24] tests/avocado: reverse_debugging.py add snapshot testing

2024-03-18 Thread Nicholas Piggin
Make a manual snapshot halfway though initial building of the address map in record mode. This will cause the reverse-step and reverse-continue tests to load that snapshot when beginning from later points in the trace, exercising the post-initial snapshot saving and loading. Signed-off-by:

Re: [PATCH v3 2/3] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
Hi, > > diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c > > index 9c791b7b0520..a2b7bfaeadf8 100644 > > --- a/target/i386/kvm/kvm-cpu.c > > +++ b/target/i386/kvm/kvm-cpu.c > > @@ -18,10 +18,36 @@ > > #include "kvm_i386.h" > > #include "hw/core/accel-cpu.h" > > +static

[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

[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

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 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 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: [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 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 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: [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

[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 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 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 >

[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 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: [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 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

[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

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:

[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 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.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-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 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: [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 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 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

[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

[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 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 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 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

[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

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 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 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

[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 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] 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: [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: [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

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 >

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 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: [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: [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 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:

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 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: [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 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 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

[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 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 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 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

[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

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

[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 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 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()

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

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

[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 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~

<    1   2   3   4   >