Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Michael S. Tsirkin
On Mon, May 27, 2024 at 06:44:58AM +, Duan, Zhenzhong wrote: > Hi Jason, > > >-Original Message- > >From: Duan, Zhenzhong > >Subject: RE: [PATCH] intel_iommu: Use the latest fault reasons defined by > >spec > > > > > > > >>-Original Message- > >>From: Jason Wang > >>Subject: R

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Michael S. Tsirkin
On Mon, May 27, 2024 at 02:32:46PM +0800, Yi Liu wrote: > Folks, looks like it's not necessary to be aligned with spec version. > e.g. I can see something like below. This is an old machine which is > not possible to be built according to vt-d spec 4.0. Let me check more > machines as well to confi

RE: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-26 Thread Jamin Lin
> Hello Jamin, > > > [ ... ] > > >> See my aspeed-9.1 branch, I did some changes, mostly in the last patch. > >> > >> * aspeed_smc_dma_len() > >> > >> - can use QEMU_ALIGN_UP(). simpler. > >> > >> * aspeed_smc_dma_rw(): > >> > >> - dram_addr -> dma_dram_offset > >> - There is no nee

[Stable-7.2.12 13/19] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-26 Thread Michael Tokarev
From: Paolo Bonzini According to the manual, 32-bit vs 64-bit is governed by REX.W and REX ignores the 0x66 prefix. This can be confirmed with this program: #include int main() { int x = 0x1234; int y; asm("popcntl %1, %0" : "=r" (y) : "r" (x)); printf("%x\

[Stable-7.2.12 17/19] target-i386: hyper-v: Correct kvm_hv_handle_exit return value

2024-05-26 Thread Michael Tokarev
From: donsheng This bug fix addresses the incorrect return value of kvm_hv_handle_exit for KVM_EXIT_HYPERV_SYNIC, which should be EXCP_INTERRUPT. Handling of KVM_EXIT_HYPERV_SYNIC in QEMU needs to be synchronous. This means that async_synic_update should run in the current QEMU vCPU thread befor

Re: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-26 Thread Cédric Le Goater
Hello Jamin, [ ... ] See my aspeed-9.1 branch, I did some changes, mostly in the last patch. * aspeed_smc_dma_len() - can use QEMU_ALIGN_UP(). simpler. * aspeed_smc_dma_rw(): - dram_addr -> dma_dram_offset - There is no need to protect updates of the R_DMA_DRAM_ADDR_HIGH

[Stable-7.2.12 16/19] ui/gtk: Check if fence_fd is equal to or greater than 0

2024-05-26 Thread Michael Tokarev
From: Dongwon Kim 'fence_fd' needs to be validated always before being referenced And the passing condition should include '== 0' as 0 is a valid value for the file descriptor. Suggested-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé C

[Stable-7.2.12 12/19] hw/remote/vfio-user: Fix config space access byte order

2024-05-26 Thread Michael Tokarev
From: Mattias Nissler PCI config space is little-endian, so on a big-endian host we need to perform byte swaps for values as they are passed to and received from the generic PCI config space access machinery. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Jaganna

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Duan, Zhenzhong
Hi Jason, >-Original Message- >From: Duan, Zhenzhong >Subject: RE: [PATCH] intel_iommu: Use the latest fault reasons defined by >spec > > > >>-Original Message- >>From: Jason Wang >>Subject: Re: [PATCH] intel_iommu: Use the latest fault reasons defined by >>spec >> >>On Fri, May 2

Re: [PATCH 0/7] s390x/ccw: Error reporting cleanups

2024-05-26 Thread Cédric Le Goater
On 5/27/24 08:23, Thomas Huth wrote: On 22/05/2024 19.01, Cédric Le Goater wrote: Hello, The first patches of this series simply apply the practices described in the Rules section of the qapi/error.h file for routines taking an 'Error **' argument. The remaining patches are a fixup in the error

[Stable-7.2.12 03/19] linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

2024-05-26 Thread Michael Tokarev
This setsockopt accepts zero-lengh optlen (current qemu implementation does not allow this). Also, there's no need to make a copy of the key, it is enough to use lock_user() (which accepts zero length already). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197 Fixes: f312fc "linux-

[Stable-7.2.12 05/19] nbd/server: Mark negotiation functions as coroutine_fn

2024-05-26 Thread Michael Tokarev
From: Eric Blake nbd_negotiate() is already marked coroutine_fn. And given the fix in the previous patch to have nbd_negotiate_handle_starttls not create and wait on a g_main_loop (as that would violate coroutine constraints), it is worth marking the rest of the related static functions reachabl

[Stable-7.2.12 14/19] target/i386: rdpkru/wrpkru are no-prefix instructions

2024-05-26 Thread Michael Tokarev
From: Paolo Bonzini Reject 0x66/0xf3/0xf2 in front of them. Cc: qemu-sta...@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini (cherry picked from commit 40a3ec7b5ffde500789d016660a171057d6b467c) Signed-off-by: Michael Tokarev diff --git a/target/i386/tcg/translate.c b/ta

[Stable-7.2.12 09/19] hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields

2024-05-26 Thread Michael Tokarev
From: Alexandra Diupina The DMA descriptor structures for this device have a set of "address extension" fields which extend the 32 bit source addresses with an extra 16 bits to give a 48 bit address: https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/ADDR_EXT-Field However, we misimplement

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Michael S. Tsirkin
On Mon, May 27, 2024 at 06:04:42AM +, Duan, Zhenzhong wrote: > But I'm not sure if there is a real scenario migrating to old qemu, > why not just update qemu on destination? Because you can not just update a huge cluster atomically. -- MST

[Stable-7.2.12 10/19] hw/arm/npcm7xx: Store derivative OTP fuse key in little endian

2024-05-26 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Use little endian for derivative OTP fuse key. Cc: qemu-sta...@nongnu.org Fixes: c752bb079b ("hw/nvram: NPCM7xx OTP device model") Suggested-by: Avi Fishman Signed-off-by: Philippe Mathieu-Daudé Message-id: 20240422125813.1403-1-phi...@linaro.org Reviewed-by: Peter

[Stable-7.2.12 06/19] backends/cryptodev-builtin: Fix local_error leaks

2024-05-26 Thread Michael Tokarev
From: Li Zhijian It seems that this error does not need to be propagated to the upper, directly output the error to avoid the leaks Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283 Fixes: 2fda101de07 ("virtio-crypto: Support asynchronous mode") Signed-off-by: Li Zhijian Reviewed-by: P

[Stable-7.2.12 18/19] target/i386: disable jmp_opt if EFLAGS.RF is 1

2024-05-26 Thread Michael Tokarev
From: Paolo Bonzini If EFLAGS.RF is 1, special processing in gen_eob_worker() is needed and therefore goto_tb cannot be used. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from commit 8225bff7c5db504f50e54

[Stable-7.2.12 07/19] tests/avocado: update sunxi kernel from armbian to 6.6.16

2024-05-26 Thread Michael Tokarev
From: Peter Maydell The Linux kernel 5.10.16 binary for sunxi has been removed from apt.armbian.com. This means that the avocado tests for these machines will be skipped (status CANCEL) if the old binary isn't present in the avocado cache. Update to 6.6.16, in the same way we did in commit e384d

[Stable-7.2.12 19/19] target/i386: no single-step exception after MOV or POP SS

2024-05-26 Thread Michael Tokarev
From: Paolo Bonzini Intel SDM 18.3.1.4 "If an occurrence of the MOV or POP instruction loads the SS register executes with EFLAGS.TF = 1, no single-step debug exception occurs following the MOV or POP instruction." Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from comm

[Stable-7.2.12 15/19] ui/gtk: Fix mouse/motion event scaling issue with GTK display backend

2024-05-26 Thread Michael Tokarev
From: hikalium Remove gtk_widget_get_scale_factor() usage from the calculation of the motion events in the GTK backend to make it work correctly on environments that have `gtk_widget_get_scale_factor() != 1`. This scale factor usage had been introduced in the commit f14aab420c and at that time t

[Stable-7.2.12 08/19] .gitlab-ci.d/cirrus.yml: Shorten the runtime of the macOS and FreeBSD jobs

2024-05-26 Thread Michael Tokarev
From: Thomas Huth Cirrus-CI introduced limitations to the free CI minutes. To avoid that we are consuming them too fast, let's drop the usual targets that are not that important since they are either a subset of another target (like i386 or ppc being a subset of x86_64 or ppc64 respectively), or

[Stable-7.2.12 00/19] Patch Round-up for stable 7.2.12, freeze on 2024-06-07

2024-05-26 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.12: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2024-06-07, and the release is planned for 2024-06-09: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any additional p

[Stable-7.2.12 04/19] nbd/server: do not poll within a coroutine context

2024-05-26 Thread Michael Tokarev
From: Zhu Yangyang Coroutines are not supposed to block. Instead, they should yield. The client performs TLS upgrade outside of an AIOContext, during synchronous handshake; this still requires g_main_loop. But the server responds to TLS upgrade inside a coroutine, so a nested g_main_loop is wro

[Stable-7.2.12 01/19] gitlab-ci: Remove job building EDK2 firmware binaries

2024-05-26 Thread Michael Tokarev
From: Philippe Mathieu-Daudé When we introduced this Gitlab-CI job in commit 71920809ce ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries"), the naive plan was to have reproducible binaries by downloading what this job would build, testing it and eventually committing it. With retrospecti

[Stable-7.2.12 02/19] gitlab/opensbi: Move to docker:stable

2024-05-26 Thread Michael Tokarev
From: Palmer Dabbelt The OpenSBI build has been using docker:19.03.1, which appears to be old enough that v2 of the manifest is no longer supported. Something has started serving us those manifests, resulting in errors along the lines of $ docker build --cache-from $IMAGE_TAG --tag $CI_REG

Re: [PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-05-26 Thread Shaoqin Huang
Hi Zhao, Thanks for your proposed idea. If you are willing to take the PMU Filter Enabling work, you can do it. I won't update this series anymore due to the QAPI restriction. I really appreciate if you can implement that. Thanks, Shaoqin On 5/13/24 14:52, Zhao Liu wrote: Hi Daniel, Pleas

[Stable-7.2.12 11/19] target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

2024-05-26 Thread Michael Tokarev
From: Ruihan Li When emulated with QEMU, interrupts will never come in the following loop. However, if the NOP instruction is uncommented, interrupts will fire as normal. loop: cli call do_sti jmp loop do_sti: sti

Re: [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory

2024-05-26 Thread Thomas Huth
On 27/05/2024 08.27, Thomas Weißschuh wrote: Add the missing "include/" path component, so the files ends up in the correct place like the other headers. Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to import list") Signed-off-by: Thomas Weißschuh --- scripts/update-l

[PATCH v8 2/8] linux-headers: update to 6.10-rc1

2024-05-26 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- include/standard-headers/linux/ethtool.h| 55 +++ include/standard-headers/linux/pci_regs.h | 6 ++ include/standard-headers/linux/pvpanic.h| 7 +- include/standard-headers/linux/virtio_bt.h | 1 - include/standard-headers/linux/virtio

[PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

2024-05-26 Thread Thomas Weißschuh
From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN) that also issue the guest-shutdown cause. A

[PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented"

2024-05-26 Thread Thomas Weißschuh
The missing functionality has been implemented now. This reverts commit e739d1935c461d0668057e9dbba9d06f728d29ec. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst index

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Yi Liu
On 2024/5/27 14:04, Duan, Zhenzhong wrote: -Original Message- From: Jason Wang Subject: Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec On Fri, May 24, 2024 at 4:41 PM Duan, Zhenzhong wrote: -Original Message- From: Jason Wang Subject: Re: [PATCH]

[PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event

2024-05-26 Thread Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Weißschuh Reviewed-by: Thomas Huth --- tests/qtest/pvpanic-pci-test.c | 39 +++ tests/qtest/pvpanic-test.c | 29 + 2 files chan

[PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory

2024-05-26 Thread Thomas Weißschuh
Add the missing "include/" path component, so the files ends up in the correct place like the other headers. Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to import list") Signed-off-by: Thomas Weißschuh --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insert

[PATCH v8 4/8] tests/qtest/pvpanic: use centralized definition of supported events

2024-05-26 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletion

[PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns

2024-05-26 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic.c | 5 + i

[PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic

2024-05-26 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. The background is the usage of minimal Linux kernels with different architectures for testing purpose

[PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events

2024-05-26 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc/pvpani

Re: [RFC PATCH 00/10] ppc/pnv: Better big-core model, lpar-per-core, PC unit

2024-05-26 Thread Cédric Le Goater
On 5/26/24 14:26, Nicholas Piggin wrote: Primary motivation for this series is to improve big-core support. Other things like SPR indirect, timebase state, PC xscom, are required for minimal big core support. I'm still not 100% happy with the big-core topology model after this. Maybe one day we

Re: [PATCH 0/7] s390x/ccw: Error reporting cleanups

2024-05-26 Thread Thomas Huth
On 22/05/2024 19.01, Cédric Le Goater wrote: Hello, The first patches of this series simply apply the practices described in the Rules section of the qapi/error.h file for routines taking an 'Error **' argument. The remaining patches are a fixup in the error path of vfio_ccw_realize() and some e

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH] intel_iommu: Use the latest fault reasons defined by >spec > >On Fri, May 24, 2024 at 4:41 PM Duan, Zhenzhong > wrote: >> >> >> >> >-Original Message- >> >From: Jason Wang >> >Subject: Re: [PATCH] intel_iommu: Use the l

[PATCH] scripts/update-linux-headers.sh: Remove temporary directory inbetween

2024-05-26 Thread Thomas Huth
We are reusing the same temporary directory for installing the headers of all targets, so there could be stale files here when switching from one target to another. Make sure to delete the folder before installing a new set of target headers into it. Signed-off-by: Thomas Huth --- scripts/update

[PATCH] scripts/update-linux-headers.sh: Fix the path of setup_data.h

2024-05-26 Thread Thomas Huth
When running the update-linx-headers.sh script, it currently fails with: scripts/update-linux-headers.sh: line 73: .../qemu/standard-headers/asm-x86/setup_data.h: No such file or directory The "include" folder is obviously missing here - no clue how this could have worked before? Fixes: 66210a1

Re: [RFC PATCH 1/3] hw/intc/s390_flic: Migrate pending state

2024-05-26 Thread Thomas Huth
On 26/05/2024 22.33, David Hildenbrand wrote: Am 26.05.24 um 21:44 schrieb Richard Henderson: On 5/26/24 08:53, David Hildenbrand wrote: Am 25.05.24 um 15:12 schrieb Nicholas Piggin: The flic pending state is not migrated, so if the machine is migrated while an interrupt is pending, it can be

Re: [RFC PATCH 2/3] tests/qtest/migration-test: enable on s390x

2024-05-26 Thread Prasad Pandit
Hi, On Sat, 25 May 2024 at 18:44, Nicholas Piggin wrote: > s390x is more stable now. Enable it. > > Signed-off-by: Nicholas Piggin > --- > tests/qtest/migration-test.c | 12 > 1 file changed, 12 deletions(-) > > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test

Re: [PATCH] fuzz: specify audiodev for usb-audio

2024-05-26 Thread Thomas Huth
On 27/05/2024 06.07, Alexander Bulekov wrote: Fixes test-failure on Fedora 40 CI. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs

Re: [PATCH] dias/riscv: Decode all of the pmpcfg and pmpaddr CSRs

2024-05-26 Thread Alistair Francis
On Tue, May 14, 2024 at 3:16 PM Alistair Francis wrote: > > Previously we only listed a single pmpcfg CSR and the first 16 pmpaddr > CSRs. This patch fixes this to list all 16 pmpcfg and all 64 pmpaddr > CSRs are part of the dissassembly. > > Reported-by: Eric DeVolder > Signed-off-by: Alistair F

Re: [PATCH V2 1/3] vl: Allow multiple -overcommit commands

2024-05-26 Thread Thomas Huth
On 24/05/2024 22.00, Zide Chen wrote: Both cpu-pm and mem-lock are related to system resource overcommit, but they are separate from each other, in terms of how they are realized, and of course, they are applied to different system resources. It's tempting to use separate command lines to specif

Re: [PATCH v2 0/1] riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature()

2024-05-26 Thread Alistair Francis
On Sat, May 18, 2024 at 6:32 AM Daniel Henrique Barboza wrote: > > Hi, > > In this v2 'reg_width' was renamed to 'bitsize' to provide a bit more > clarity about what's the value type of the variable. It is the same name > used by riscv_gen_dynamic_csr_feature() for a variable that has the same > p

Re: [PATCH v2 1/1] riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature()

2024-05-26 Thread Alistair Francis
On Sat, May 18, 2024 at 6:32 AM Daniel Henrique Barboza wrote: > > Commit 33a24910ae changed 'reg_width' to use 'vlenb', i.e. vector length > in bytes, when in this context we want 'reg_width' as the length in > bits. > > Fix 'reg_width' back to the value in bits like 7cb59921c05a > ("target/riscv

Re: [PATCH] target/riscv: zvbb implies zvkb

2024-05-26 Thread Alistair Francis
On Thu, May 16, 2024 at 10:35 PM Jerry Zhang Jian wrote: > > - According to RISC-V crypto spec, Zvkb extension is a proper subset of the > Zvbb extension. > > - Reference: > https://github.com/riscv/riscv-crypto/blob/1769c2609bf4535632e0c0fd715778f212bb272e/doc/vector/riscv-crypto-vector-zvkb.ad

Re: [PATCH rfcv2 15/17] intel_iommu: Set default aw_bits to 48 in scalable modren mode

2024-05-26 Thread CLEMENT MATHIEU--DRIF
On 27/05/2024 05:16, Duan, Zhenzhong wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > Hi Clement, > >> -Original Message- >> From: CLEMENT MATHIEU--DRIF >> Sent: Friday, May 24,

Re: [PATCH] target/riscv: zvbb implies zvkb

2024-05-26 Thread Alistair Francis
On Thu, May 16, 2024 at 10:35 PM Jerry Zhang Jian wrote: > > - According to RISC-V crypto spec, Zvkb extension is a proper subset of the > Zvbb extension. > > - Reference: > https://github.com/riscv/riscv-crypto/blob/1769c2609bf4535632e0c0fd715778f212bb272e/doc/vector/riscv-crypto-vector-zvkb.ad

Re: [PATCH v2 1/1] target/riscv/kvm.c: Fix the hart bit setting of AIA

2024-05-26 Thread Alistair Francis
On Wed, May 15, 2024 at 7:12 PM Yong-Xuan Wang wrote: > > In AIA spec, each hart (or each hart within a group) has a unique hart > number to locate the memory pages of interrupt files in the address > space. The number of bits required to represent any hart number is equal > to ceil(log2(hmax + 1)

[PATCH] fuzz: specify audiodev for usb-audio

2024-05-26 Thread Alexander Bulekov
Fixes test-failure on Fedora 40 CI. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h inde

Re: [PATCH] virtio-pci: Fix the use of an uninitialized irqfd.

2024-05-26 Thread Jason Wang
On Wed, May 22, 2024 at 1:10 PM Cindy Lu wrote: > > The crash was reported in MAC OS and NixOS, here is the link for this bug > https://gitlab.com/qemu-project/qemu/-/issues/2334 > https://gitlab.com/qemu-project/qemu/-/issues/2321 > > The root cause is that the function virtio_pci_set_guest_notif

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-26 Thread Jason Wang
On Fri, May 24, 2024 at 4:41 PM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Jason Wang > >Subject: Re: [PATCH] intel_iommu: Use the latest fault reasons defined by > >spec > > > >On Tue, May 21, 2024 at 6:25 PM Duan, Zhenzhong > > wrote: > >> > >> > >> > >> >-Original

RE: [PATCH 04/16] vfio/helpers: Make vfio_set_irq_signaling() return bool

2024-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: Anthony Krowiak >Subject: Re: [PATCH 04/16] vfio/helpers: Make vfio_set_irq_signaling() >return bool > > >On 5/15/24 4:20 AM, Zhenzhong Duan wrote: >> This is to follow the coding standand in qapi/error.h to return bool >> for bool-valued functions. >> >> Sugge

RE: [PATCH rfcv2 09/17] intel_iommu: Flush stage-1 cache in iotlb invalidation

2024-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH rfcv2 09/17] intel_iommu: Flush stage-1 cache in iotlb >invalidation > >Hi Zhenzhong > >On 22/05/2024 08:23, Zhenzhong Duan wrote: >> Caution: External email. Do not open attachments or click links, unless this >email

RE: [PATCH rfcv2 06/17] intel_iommu: Implement stage-1 translation

2024-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH rfcv2 06/17] intel_iommu: Implement stage-1 >translation > >Hi Zhenzhong, > >I already sent you my comments about this patch earlier (question about >checking pgtt) but here is a style review > >On 22/05/2024 08:23, Zh

RE: [PATCH rfcv2 15/17] intel_iommu: Set default aw_bits to 48 in scalable modren mode

2024-05-26 Thread Duan, Zhenzhong
Hi Clement, >-Original Message- >From: CLEMENT MATHIEU--DRIF >Sent: Friday, May 24, 2024 9:57 PM >To: Duan, Zhenzhong ; qemu- >de...@nongnu.org >Cc: alex.william...@redhat.com; c...@redhat.com; eric.au...@redhat.com; >m...@redhat.com; pet...@redhat.com; jasow...@redhat.com; >j...@nvidia.c

[PATCH] x86: cpu: fixup number of addressable IDs for processor cores in the physical package

2024-05-26 Thread Chuang Xu
When QEMU is started with: -cpu host,host-cache-info=on,l3-cache=off \ -smp 2,sockets=1,dies=1,cores=1,threads=2 Guest can't acquire maximum number of addressable IDs for processor cores in the physical package from CPUID[04H]. This bug was introduced in commit d7caf13b5fcf742e5680c1d3448ba070fc81

[PATCH v13 11/13] virtio-gpu: Handle resource blob commands

2024-05-26 Thread Dmitry Osipenko
From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano Signed-off-by: Xenia Ragiadakou Signed

[PATCH v13 02/13] virtio-gpu: Move print_stats timer to VirtIOGPUGL

2024-05-26 Thread Dmitry Osipenko
Move print_stats timer to VirtIOGPUGL for consistency with cmdq_resume_bh and fence_poll that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 10 ++ include/hw/virtio/virtio-gpu.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) d

[PATCH v13 07/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2024-05-26 Thread Dmitry Osipenko
The udmabuf usage is mandatory when virgl is disabled and blobs feature enabled in the Qemu machine configuration. If virgl and blobs are enabled, then udmabuf requirement is optional. Since udmabuf isn't widely supported by a popular Linux distros today, let's relax the udmabuf requirement for blo

[PATCH v13 12/13] virtio-gpu: Register capsets dynamically

2024-05-26 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer virtio_gpu_virgl_get_num_capsets will return "num_capsets", but we can't assume that capset_index 1 is always VIRGL2 once we'll support more capsets, like Venus and DRM capsets. Register capsets dynamically to avoid that problem. Reviewed-by: Manos Pitsidianakis

[PATCH v13 13/13] virtio-gpu: Support Venus context

2024-05-26 Thread Dmitry Osipenko
From: Antonio Caggiano Request Venus when initializing VirGL and if venus=true flag is set for virtio-gpu-gl device. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 2 ++ hw/display/virtio-gpu-virgl.c | 22 +++

[PATCH v13 10/13] virtio-gpu: Support suspension of commands processing

2024-05-26 Thread Dmitry Osipenko
Check whether command processing has been finished; otherwise, stop processing commands and retry the command again next time. This allows us to support asynchronous execution of non-fenced commands needed for unmapping host blobs safely. Suggested-by: Akihiko Odaki Signed-off-by: Dmitry Osipenko

[PATCH v13 06/13] virtio-gpu: Support context-init feature with virglrenderer

2024-05-26 Thread Dmitry Osipenko
From: Huang Rui Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. Expose this feature and support creating virglrenderer context with flags using context_id if libvirglrenderer is new enough. Originally-by: Antonio Caggiano Signed-off-by: Huang Rui Reviewed-by:

[PATCH v13 03/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-05-26 Thread Dmitry Osipenko
virtio_gpu_virgl_init() may fail, leading to a further Qemu crash because Qemu assumes it never fails. Check virtio_gpu_virgl_init() return code and don't execute virtio commands on error. Failed virtio_gpu_virgl_init() will result in a timed out virtio commands for a guest OS. Signed-off-by: Dmit

[PATCH v13 09/13] virtio-gpu: Support blob scanout using dmabuf fd

2024-05-26 Thread Dmitry Osipenko
From: Robert Beckett Support displaying blob resources by handling SET_SCANOUT_BLOB command. Signed-by: Antonio Caggiano Signed-off-by: Robert Beckett Signed-off-by: Huang Rui Reviewed-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 109

[PATCH v13 00/13] Support blob memory and venus on qemu

2024-05-26 Thread Dmitry Osipenko
Hello, This series enables Vulkan Venus context support on virtio-gpu. All virglrender and almost all Linux kernel prerequisite changes needed by Venus are already in upstream. For kernel there is a pending KVM patchset that fixes mapping of compound pages needed for DRM drivers using TTM [1], ot

[PATCH v13 05/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-05-26 Thread Dmitry Osipenko
New virglrerenderer features were stabilized with release of v1.0.0. Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility with pre-release development versions of libvirglerender. Use virglrenderer version to decide reliably which virgl features are available. Reviewed-by: Al

[PATCH v13 04/13] virtio-gpu: Unrealize GL device

2024-05-26 Thread Dmitry Osipenko
Even though GL GPU doesn't support hotplugging today, free virgl resources when GL device is unrealized. For consistency. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 13 + hw/display/virtio-gpu-virgl.c | 11 +++ include/hw/virtio/virtio-gpu.h | 1 +

[PATCH v13 08/13] virtio-gpu: Add virgl resource management

2024-05-26 Thread Dmitry Osipenko
From: Huang Rui In a preparation to adding host blobs support to virtio-gpu, add virgl resource management that allows to retrieve resource based on its ID and virgl resource wrapper on top of simple resource that will be contain fields specific to virgl. Signed-off-by: Huang Rui Reviewed-by: A

[PATCH v13 01/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-05-26 Thread Dmitry Osipenko
Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 8 +--- include/hw/virtio/virtio-gpu.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/disp

Re: [PULL 17/20] target/arm: Do memory type alignment check when translation disabled

2024-05-26 Thread Richard Henderson
On 5/25/24 13:50, Bernhard Beschow wrote: Am 25. Mai 2024 13:41:54 UTC schrieb Bernhard Beschow : Am 5. März 2024 13:52:34 UTC schrieb Peter Maydell : From: Richard Henderson If translation is disabled, the default memory type is Device, which requires alignment checking. This is more op

Re: [PULL 00/28] linux-user patch queue

2024-05-26 Thread Richard Henderson
gitlab.com/rth7680/qemu.git tags/pull-lu-20240526 for you to fetch changes up to 701890bdd09b289fd9cb852e714e91373088b0f3: target/i386: Pass host pointer and size to cpu_x86_{xsave,xrstor} (2024-05-26 15:49:58 -0700) target/i386:

[PATCH v1 0/4] target/riscv/kvm: QEMU support for KVM Guest Debug on RISC-V

2024-05-26 Thread Chao Du
This series implements QEMU KVM Guest Debug on RISC-V, with which we could debug RISC-V KVM guest from the host side, using software breakpoints. This series is based on riscv-to-apply.next branch (v9.0.0) and is also available at: https://github.com/Du-Chao/qemu-alistair23/tree/riscv-to-apply.nex

[PATCH v1 3/4] target/riscv/kvm: handle the exit with debug reason

2024-05-26 Thread Chao Du
If the breakpoint belongs to the userspace then set the ret value. Signed-off-by: Chao Du --- target/riscv/kvm/kvm-cpu.c | 20 1 file changed, 20 insertions(+) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 0bc3348b91..0c45e520b2 100644 --- a/tar

[PATCH v1 2/4] target/riscv/kvm: implement kvm_arch_update_guest_debug()

2024-05-26 Thread Chao Du
Set the control flag when there are active breakpoints. This will help KVM to know the status in the userspace. Signed-off-by: Chao Du --- target/riscv/kvm/kvm-cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c ind

[PATCH v1 4/4] target/riscv/kvm: define TARGET_KVM_HAVE_GUEST_DEBUG

2024-05-26 Thread Chao Du
To enable the KVM GUEST DEBUG for RISC-V at QEMU side. Signed-off-by: Chao Du --- configs/targets/riscv64-softmmu.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/riscv64-softmmu.mak b/configs/targets/riscv64-softmmu.mak index 7c0e7eeb42..f938cc1ee6 100644 --- a/configs/t

[PATCH v1 1/4] target/riscv/kvm: add software breakpoints support

2024-05-26 Thread Chao Du
This patch implements insert/remove software breakpoint process: Add an input parameter for kvm_arch_insert_sw_breakpoint() and kvm_arch_remove_sw_breakpoint() to pass the length information, which helps us to know whether it is a RVC instruction. For some remove cases, we do not have the length i

Re: [RFC PATCH 1/4] target/riscv/kvm: add software breakpoints support

2024-05-26 Thread Chao Du
On 2024-05-25 00:11, Paolo Bonzini wrote: > > On Tue, Apr 16, 2024 at 11:23 AM Daniel Henrique Barboza > wrote: > > > +int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint > > > *bp, > > > + vaddr len) > > > +{ > > > +if (len != 4 && len

Re: [PULL 01/10] target/loongarch/kvm: Fix VM recovery from disk failures

2024-05-26 Thread gaosong
在 2024/5/24 下午6:00, Michael Tokarev 写道: 23.05.2024 04:46, Song Gao wrote: vmstate does not save kvm_state_conter, which can cause VM recovery from disk to fail. Cc: qemu-sta...@nongnu.org Signed-off-by: Song Gao Acked-by: Peter Xu Message-Id: <20240508024732.3127792-1-gaos...@loongson.cn> ---

Re: [PATCH 0/6] target/riscv: Support Zabha extension

2024-05-26 Thread LIU Zhiwei
On 2024/5/27 1:16, Daniel Henrique Barboza wrote: On 5/25/24 21:37, LIU Zhiwei wrote: On 2024/5/24 19:44, Daniel Henrique Barboza wrote: Hi Zhiwei! On 5/23/24 09:40, LIU Zhiwei wrote: Zabha adds support AMO operations for byte and half word. If zacas has been implemented, zabha also a

Re: [PATCH] target/arm: Disable SVE extensions when SVE is disabled

2024-05-26 Thread Richard Henderson
On 5/26/24 14:06, Marcin Juszkiewicz wrote: W dniu 26.05.2024 o 22:45, Richard Henderson pisze: From: Marcin Juszkiewicz Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2304 Reported-by: Marcin Juszkiewicz Signed-off-by: Richard Henderson Signed-off-by: M

[PULL 15/28] linux-user/i386: Drop xfeatures_size from sigcontext arithmetic

2024-05-26 Thread Richard Henderson
This is subtracting sizeof(target_fpstate_fxsave) in TARGET_FXSAVE_SIZE, then adding it again via &fxsave->xfeatures. Perform the same computation using xstate_size alone. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 7 +++ 1 file changed, 3 ins

[PULL 10/28] target/i386: Convert do_xsave_* to X86Access

2024-05-26 Thread Richard Henderson
The body of do_xsave is now fully converted. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 47 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu

[PULL 26/28] target/i386: Pass host pointer and size to cpu_x86_{fsave, frstor}

2024-05-26 Thread Richard Henderson
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helper function. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/cpu.h| 10 ++ linux-user/i386/signal.c | 4 ++-- tar

[PULL 07/28] target/i386: Convert do_xsave_{fpu, mxcr, sse} to X86Access

2024-05-26 Thread Richard Henderson
Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 52 +--- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index df12eac71e..8fbe6e00ce 100644

[PULL 05/28] target/i386: Convert do_fstenv to X86Access

2024-05-26 Thread Richard Henderson
Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 45 +++- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 5ad6e04639..01e9a1fbbf 100644

[PULL 08/28] target/i386: Convert do_xrstor_{fpu, mxcr, sse} to X86Access

2024-05-26 Thread Richard Henderson
Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 46 ++-- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 8fbe6e00ce..f21cdb45ea 100644

Re: [PATCH v12 00/13] Support blob memory and venus on qemu

2024-05-26 Thread Dmitry Osipenko
On 5/27/24 02:46, Dmitry Osipenko wrote: > On 5/22/24 12:00, Alex Bennée wrote: >> Dmitry Osipenko writes: >> >>> On 5/21/24 17:57, Alex Bennée wrote: Alex Bennée writes: > Dmitry Osipenko writes: > >> Hello, >> >> This series enables Vulkan Venus context support on

[PULL 14/28] target/i386: Add {hw,sw}_reserved to X86LegacyXSaveArea

2024-05-26 Thread Richard Henderson
This completes the 512 byte structure, allowing the union to be removed. Assert that the structure layout is as expected. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/cpu.h | 39 +-- 1 file changed, 25 insertions(+), 14 deletio

[PULL 00/28] linux-user patch queue

2024-05-26 Thread Richard Henderson
The following changes since commit 70581940cabcc51b329652becddfbc6a261b1b83: Merge tag 'pull-tcg-20240523' of https://gitlab.com/rth7680/qemu into staging (2024-05-23 09:47:40 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-lu-2024052

[PULL 19/28] linux-user/i386: Fix -mregparm=3 for signal delivery

2024-05-26 Thread Richard Henderson
Since v2.6.19, the kernel has supported -mregparm=3. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index 3271ebd333..6763b4bda8 10064

[PULL 16/28] linux-user/i386: Remove xfeatures from target_fpstate_fxsave

2024-05-26 Thread Richard Henderson
This is easily computed by advancing past the structure. At the same time, replace the magic number "64". Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/i386/signal.c b/lin

[PULL 01/28] target/i386: Add tcg/access.[ch]

2024-05-26 Thread Richard Henderson
Provide a method to amortize page lookup across large blocks. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/tcg/access.h| 40 + target/i386/tcg/access.c| 169 target/i386/tcg/meson.build | 1 + 3 files changed

  1   2   3   >