Re: [PATCH 2/4] hw/misc/bcm2835_property: Avoid overflow in OTP access properties

2024-07-24 Thread Philippe Mathieu-Daudé
Hi Peter, On 23/7/24 15:10, Peter Maydell wrote: Coverity points out that in our handling of the property RPI_FWREQ_SET_CUSTOMER_OTP we have a potential overflow. This happens because we read start_num and number from the guest as unsigned 32 bit integers, but then the variable 'n' we use as a

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-24 Thread Aditya Gupta
Hi Nick, While doing the renaming, codes similar to this come up: > #define PPC_INSNS_FLAGS_POWER9  \ >     PPC_INSNS_BASE | PPC_ISEL | PPC_STRING | PPC_MFTB | \ > PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_FRES |   \ > PPC_FL

[PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread manish.mishra
From: Manish Mishra QEMU does not set 0x1f in case VM does not have extended CPU topology and expects guests to fallback to 0xb. Some versions of Windows does not like this behavior and expects this leaf to be populated. As a result Windows VM fails with blue screen. Leaf 0x1f is superset of 0xb

Re: [PATCH v3] target/s390x: filter deprecated properties based on model expansion type

2024-07-24 Thread Markus Armbruster
Collin Walling writes: > On 7/20/24 1:33 AM, Markus Armbruster wrote: >> Collin Walling writes: >> >>> Currently, there is no way to execute the query-cpu-model-expansion >>> command to retrieve a comprehenisve list of deprecated properties, as >>> the result is dependent per-model. To enable t

Re: [PATCH] target/i386: Always set leaf 0x1f

2024-07-24 Thread Manish Mishra
Thanks Zhao, Igor and Xiaoyao, I have sent v1 for this https://patchwork.ozlabs.org/project/qemu-devel/patch/20240724075226.212882-1-manish.mis...@nutanix.com/. On 23/07/24 8:33 pm, Igor Mammedov wrote: !---| CAUTION: External

Re: [PATCH] target/i386: Always set leaf 0x1f

2024-07-24 Thread Manish
Thanks Zhao for quick review. I have sent v1 for this. https://patchwork.ozlabs.org/project/qemu-devel/patch/20240724075226.212882-1-manish.mis...@nutanix.com/. On 23/07/24 7:56 pm, Zhao Liu wrote: !---| CAUTION: External Email

[PATCH] target/i386: Raise the highest index value used for any VMCS encoding

2024-07-24 Thread Lei Wang
Because the index value of the VMCS field encoding of Secondary VM-exit controls, 0x44, is larger than any existing index value, raise the highest index value used for any VMCS encoding to 0x44. Because the index value of the VMCS field encoding of FRED injected-event data (one of the newly added

Re: [PULL 00/28] Misc HW+ patches for 2024-07-23

2024-07-24 Thread Richard Henderson
On 7/24/24 06:38, Philippe Mathieu-Daudé wrote: The following changes since commit 3cce8bd4d737f2ca688bbdcb92cd5cc683245bbd: Merge tag 'ui-pull-request' ofhttps://gitlab.com/marcandre.lureau/qemu into staging (2024-07-23 15:23:05 +1000) are available in the Git repository at: https://gi

Re: [PATCH 1/5] qapi: allow for g_autoptr(Error) usage

2024-07-24 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 23, 2024 at 01:36:32PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > While common error propagation practice does not require manually >> > free'ing of local 'Error' objects, there are some cases where this >> > is needed. One exa

Re: [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks

2024-07-24 Thread Bernhard Beschow
Am 23. Juli 2024 00:21:32 UTC schrieb "Michael S. Tsirkin" : >On Mon, Jul 22, 2024 at 10:21:30PM +, Bernhard Beschow wrote: >> >> >> Am 20. Juli 2024 18:38:42 UTC schrieb "Michael S. Tsirkin" : >> >On Thu, Jul 04, 2024 at 10:58:51PM +0200, Bernhard Beschow wrote: >> >> This series first tu

[PATCH] target/riscv: Add asserts for out-of-bound access

2024-07-24 Thread Atish Patra
Coverity complained about the possible out-of-bounds access with counter_virt/counter_virt_prev because these two arrays are accessed with privilege mode. However, these two arrays are accessed only when virt is enabled. Thus, the privilege mode can't be M mode. Add the asserts anyways to detect a

Re: [PATCH v1 11/17] intel_iommu: Extract device IOTLB invalidation logic

2024-07-24 Thread CLEMENT MATHIEU--DRIF
Hi Zhenzhong, This patch has been merged into staging this morning, be careful when re-sending your series. Here is the link : https://github.com/qemu/qemu/commit/6410f877f5ed535acd01bbfaa4baec379e44d0ef#diff-c19adbf518f644e9b651b67266802e14787292ab9d6cd4210b4f974585be6009 >cmd On 18/07/2024

RE: [PATCH v1 11/17] intel_iommu: Extract device IOTLB invalidation logic

2024-07-24 Thread Duan, Zhenzhong
Sure, thanks for reminding. BRs. Zhenzhong >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 11/17] intel_iommu: Extract device IOTLB >invalidation logic > >Hi Zhenzhong, > >This patch has been merged into staging this morning, be careful when >re-sending your seri

Re: [PULL 00/14] Bsd user for 9.1 patches

2024-07-24 Thread Richard Henderson
On 7/24/24 04:07, Warner Losh wrote: The following changes since commit 3cce8bd4d737f2ca688bbdcb92cd5cc683245bbd: Merge tag 'ui-pull-request' ofhttps://gitlab.com/marcandre.lureau/qemu into staging (2024-07-23 15:23:05 +1000) are available in the Git repository at: g...@gitlab.com:bsdim

[PULL 0/1] LoongArch fix for 9.1

2024-07-24 Thread Song Gao
The following changes since commit 6410f877f5ed535acd01bbfaa4baec379e44d0ef: Merge tag 'hw-misc-20240723' of https://github.com/philmd/qemu into staging (2024-07-24 15:39:43 +1000) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-202

[PULL 1/1] target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue

2024-07-24 Thread Song Gao
When the lddir level is 4 and the base is a HugePage, we may try to put value 4 into a field in the TLBENTRY that is only 2 bits wide. Fixes: Coverity CID 1547717 Fixes: 9c70db9a43388 ("target/loongarch: Fix tlb huge page loading issue") Signed-off-by: Song Gao Reviewed-by: Richard Henderson Mes

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread Igor Mammedov
On Wed, 24 Jul 2024 07:52:26 + "manish.mishra" wrote: > From: Manish Mishra > > QEMU does not set 0x1f in case VM does not have extended CPU topology > and expects guests to fallback to 0xb. Some versions of Windows does not > like this behavior and expects this leaf to be populated. As a r

Re: More than 255 vcpus Windows VM setup without viommu ?

2024-07-24 Thread David Woodhouse
On Tue, 2024-07-16 at 05:13 +, Sandesh Patel wrote: > > > > On 11 Jul 2024, at 5:22 PM, Sandesh Patel wrote: > > > > Thanks David for all the analysis. > > > > > > Looking at the Linux guest support, it seems to look just at the HyperV > > > CPUID leaves 0x4081 and 0x4082. QEMU kno

Re: [RFC PATCH v2 7/9] migration/multifd: Isolate ram pages packet data

2024-07-24 Thread Maciej S. Szmigiero
On 22.07.2024 23:06, Peter Xu wrote: On Mon, Jul 22, 2024 at 05:34:44PM -0300, Fabiano Rosas wrote: Peter Xu writes: On Mon, Jul 22, 2024 at 02:59:12PM -0300, Fabiano Rosas wrote: While we cannot yet disentangle the multifd packet from page data, we can make the code a bit cleaner by setting

Questions about pci p2p

2024-07-24 Thread Hanjey Jack
Hello, I have 2 qemu questions: 1. Does qemu guest support pcie p2p through pice-switch if I passthrough 2 device which under the same physical pice-switch ? 2. If qemu can support, how can I config qemu cmdline ? Thanks.

[PULL 00/11] Crypto patches

2024-07-24 Thread Daniel P . Berrangé
The following changes since commit 6410f877f5ed535acd01bbfaa4baec379e44d0ef: Merge tag 'hw-misc-20240723' of https://github.com/philmd/qemu into staging (2024-07-24 15:39:43 +1000) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request for you

[PULL 02/11] crypto: Restrict pkix_asn1_tab[] to crypto-tls-x509-helpers.c

2024-07-24 Thread Daniel P . Berrangé
From: Philippe Mathieu-Daudé pkix_asn1_tab[] is only accessed by crypto-tls-x509-helpers.c, rename pkix_asn1_tab.c as pkix_asn1_tab.c.inc and include it once. Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé [berrange: updated MAINTAINERS for changed filename] Signed-off-b

[PULL 04/11] docs/devel: Add introduction to LUKS volume with detached header

2024-07-24 Thread Daniel P . Berrangé
From: Hyman Huang Signed-off-by: Hyman Huang Signed-off-by: Daniel P. Berrangé --- MAINTAINERS | 1 + docs/devel/crypto.rst | 10 ++ docs/devel/index-internals.rst | 1 + docs/devel/luks-detached-header.rst | 182 4 f

[PULL 03/11] crypto: Allow building with GnuTLS but without Libtasn1

2024-07-24 Thread Daniel P . Berrangé
From: Philippe Mathieu-Daudé We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add migration tests of TLS with x509 credentials"), having GnuTLS without Libtasn1 is a valid configuration, so do not require Libtasn1, to avoid: Dependency gnutls found: YES 3.7.1 (cached)

[PULL 01/11] crypto: Remove 'crypto-tls-x509-helpers.h' from crypto-tls-psk-helpers.c

2024-07-24 Thread Daniel P . Berrangé
From: Philippe Mathieu-Daudé crypto-tls-psk-helpers.c doesn't access the declarations of "crypto-tls-x509-helpers.h", remove the include line to avoid when building with GNUTLS but without Libtasn1: In file included from tests/unit/crypto-tls-psk-helpers.c:23: tests/unit/crypto-tls-x509-help

[PULL 07/11] meson: build chardev trace files when have_block

2024-07-24 Thread Daniel P . Berrangé
The QSD depends on chardev code, and is built when have_tools is true. This means conditionalizing chardev trace on have_system is wrong, we need have_block which is set have_system || have_tools. This latent bug was historically harmless because only the spice chardev included tracing, which wasn

[PULL 06/11] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header

2024-07-24 Thread Daniel P . Berrangé
The 'detached-header' field in QCryptoBlockCreateOptionsLUKS was left over from earlier patch iterations. Acked-by: Markus Armbruster Signed-off-by: Daniel P. Berrangé --- qapi/crypto.json | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/qapi/crypto.json b/qapi/crypto.jso

[PULL 09/11] crypto: drop gnutls debug logging support

2024-07-24 Thread Daniel P . Berrangé
GNUTLS already supports dynamically enabling its logging at runtime by setting the env var 'GNUTLS_DEBUG_LEVEL=10', so there is no need to re-invent this logic in QEMU in a way that requires a re-compile. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- crypto/init.c |

[PULL 11/11] crypto: propagate errors from TLS session I/O callbacks

2024-07-24 Thread Daniel P . Berrangé
GNUTLS doesn't know how to perform I/O on anything other than plain FDs, so the TLS session provides it with some I/O callbacks. The GNUTLS API design requires these callbacks to return a unix errno value, which means we're currently loosing the useful QEMU "Error" object. This changes the I/O cal

[PULL 05/11] meson.build: fix libgcrypt detection on system without libgcrypt-config

2024-07-24 Thread Daniel P . Berrangé
From: Yao Zi libgcrypt starts providing correct pkg-config configuration since 1.9, in parallel with libgcrypt-config. Since 1.11 it may also stop installing libgcrypt-config in some scenarios. Use the auto method for detection of libgcrypt, in which meson will try both pkg-config and libgcrypt-c

[PULL 08/11] chardev: add tracing of socket error conditions

2024-07-24 Thread Daniel P . Berrangé
This adds trace points to every error scenario in the chardev socket backend that can lead to termination of the connection. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c | 37 ++--- chardev/trace-events | 10 +++

Re: [PATCH 0/2] tests/tcg: Fix new cross-compiler warnings

2024-07-24 Thread Alex Bennée
Richard Henderson writes: > Recent updates to debian cross-compilers have enabled some > new warnings by default, which encourage good behaviour for > userland binaries. > > Neither are applicable for our system mode kernel images, > but we do have a few userland tests that are affected. > > The

[PATCH 2/2] gitlab: display /packages.txt in build jobs

2024-07-24 Thread Daniel P . Berrangé
The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, because when it comes to debug failures, the original container is of

[PATCH 1/2] gitlab: record installed packages in /packages.txt in containers

2024-07-24 Thread Daniel P . Berrangé
The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, because when it comes to debug failures, the original container is of

Re: [RFC PATCH v5 0/8] Add Rust support, implement ARM PL011

2024-07-24 Thread Manos Pitsidianakis
Hello Paolo, thank you for the thorough response, On Tue, 23 Jul 2024 18:07, Paolo Bonzini wrote: On 7/22/24 13:43, Manos Pitsidianakis wrote: Changes from v4->v5: - Added CI patch from Alex Benee - Removed all cargo use, use meson rust support - Added Kconfig logic The following requests fr

[PULL 10/11] crypto: push error reporting into TLS session I/O APIs

2024-07-24 Thread Daniel P . Berrangé
The current TLS session I/O APIs just return a synthetic errno value on error, which has been translated from a gnutls error value. This looses a large amount of valuable information that distinguishes different scenarios. Pushing population of the "Error *errp" object into the TLS session I/O API

[PATCH 0/2] gitlab: expose installed package info in build logs

2024-07-24 Thread Daniel P . Berrangé
Many times we see a build job start failing, we wonder if the installed packages have changed since the last passing build. We can rarely diagnose this, however, since we only have the new container image, not the old one. The lcitool generated containers create a /packages.txt file whose content

Re: [PATCH 1/4] gdbstub: Use specific MMU index when probing MTE addresses

2024-07-24 Thread Richard Henderson
On 7/23/24 02:07, Gustavo Romero wrote: +/* Find out the current translation regime for probe. */ +mmu_index = arm_mmu_idx(env) & ARM_MMU_IDX_COREIDX_MASK; The official interface is cpu_mmu_index(). Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 2/4] gdbstub: Add support for MTE in system mode

2024-07-24 Thread Richard Henderson
On 7/23/24 02:07, Gustavo Romero wrote: This commit makes handle_q_memtag, handle_q_isaddresstagged, and handle_Q_memtag stubs build for system mode, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system mode. Signed-off-by: Gustavo Romero --- target/arm/gdbstub

Re: [PATCH v2] chardev/char-win-stdio.c: restore old console mode

2024-07-24 Thread Marc-André Lureau
Hi On Wed, Jul 24, 2024 at 8:48 AM Michael Tokarev wrote: > 22.07.2024 12:52, songziming wrote: > > If I use `-serial stdio` on Windows, after QEMU exits, the terminal > > could not handle arrow keys and tab any more. Because stdio backend > > on Windows sets console mode to virtual terminal inp

Re: [RFC PATCH v5 0/8] Add Rust support, implement ARM PL011

2024-07-24 Thread Paolo Bonzini
On Wed, Jul 24, 2024 at 11:58 AM Manos Pitsidianakis wrote: > > Hello Paolo, thank you for the thorough response, > > On Tue, 23 Jul 2024 18:07, Paolo Bonzini wrote: > >On 7/22/24 13:43, Manos Pitsidianakis wrote: > >> Changes from v4->v5: > >> - Added CI patch from Alex Benee > >> - Removed all

Re: [PATCH v3 0/2] Consolidate create-sync and create-fence

2024-07-24 Thread Marc-André Lureau
Hi On Wed, Jul 24, 2024 at 2:05 AM wrote: > From: Dongwon Kim > > Sync object itself is never used as is so can be removed > from QemuDmaBuf struct. So now sync is only temporarily needed > when creating fence for the object which means what was done in > egl_dmabuf_create_sync can now be a par

Re: [PATCH 0/2] tests/tcg: Fix new cross-compiler warnings

2024-07-24 Thread Alex Bennée
Richard Henderson writes: > Recent updates to debian cross-compilers have enabled some > new warnings by default, which encourage good behaviour for > userland binaries. > > Neither are applicable for our system mode kernel images, > but we do have a few userland tests that are affected. > > The

[PATCH] virtio-rng: block max-bytes=0

2024-07-24 Thread Michael S. Tsirkin
with max-bytes set to 0, quota is 0 and so device does not work. block this to avoid user confusion Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index f74efffe

Re: [PATCH] gitlab-ci: Use -fno-sanitize=function in the clang-user job

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2024 at 09:25:42AM +1000, Richard Henderson wrote: > With -fsanitize=undefined, which implies -fsanitize=function, > clang will add a "type signature" before functions. > It accesses funcptr-8 and funcptr-4 to do so. > > The generated TCG prologue is directly on a page boundary, >

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-24 Thread Laurent Vivier
On 24/07/2024 12:51, Michael S. Tsirkin wrote: with max-bytes set to 0, quota is 0 and so device does not work. block this to avoid user confusion Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/v

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread John Levon
On Wed, Jul 24, 2024 at 03:59:29PM +0530, Manish wrote: > > > Leaf 0x1f is superset of 0xb, so it makes sense to set 0x1f equivalent > > > to 0xb by default and workaround windows issue.> > > > This change adds a > > > new property 'cpuid-0x1f-enforce' to set leaf 0x1f equivalent to 0xb in > > > c

Re: [PATCH 0/2] gitlab: expose installed package info in build logs

2024-07-24 Thread Alex Bennée
Daniel P. Berrangé writes: > Many times we see a build job start failing, we wonder if the installed > packages have changed since the last passing build. We can rarely > diagnose this, however, since we only have the new container image, not > the old one. > > The lcitool generated containers cr

Re: [PULL 0/1] LoongArch fix for 9.1

2024-07-24 Thread Richard Henderson
om/gaosong/qemu.git tags/pull-loongarch-20240724 for you to fetch changes up to a18ffbcf8b9fabfc6c850ebb1d3e40a21b885c67: target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue (2024-07-24 16:52:18 +0800) Fix for 9.1

Re: [PATCH] hw/intc/ioapic: Delete a wrong IRQ redirection on I/O APIC

2024-07-24 Thread 伊藤 太清
I tried to enable the legacy replacement routing without the patch. It works correctly. Thanks. Taisei 差出人: Paolo Bonzini 送信日時: 2024年7月23日 23:15 宛先: TaiseiIto CC: qemu-devel@nongnu.org ; m...@redhat.com 件名: Re: [PATCH] hw/intc/ioapic: Delete a wrong IRQ redire

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-24 Thread Markus Armbruster
Zhao Liu writes: > Hi Markus, > > On Mon, Jul 22, 2024 at 03:33:13PM +0200, Markus Armbruster wrote: >> Date: Mon, 22 Jul 2024 15:33:13 +0200 >> From: Markus Armbruster >> Subject: Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object >> >> Zhao Liu writes: >> >> > Introduce smp-cache object s

[PATCH] migration: Refine the convergence detection

2024-07-24 Thread Hyman Huang
Currently, the convergence algorithm determines that the migration cannot converge according to the following principle: The dirty pages generated in current iteration exceed a specific percentage (throttle-trigger-threshold, 50 by default) of the number of transmissions. Let's refer to this criter

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-24 Thread Thomas Huth
On 16/07/2024 19.57, Paolo Bonzini wrote: Il mar 16 lug 2024, 13:26 Thomas Huth > ha scritto: The Avocado v88 that we use in QEMU is already on a life support system: It is not supported by upstream anymore, and with the latest versions of Python, it won't

Re: [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks

2024-07-24 Thread BALATON Zoltan
On Wed, 24 Jul 2024, Bernhard Beschow wrote: Am 23. Juli 2024 00:21:32 UTC schrieb "Michael S. Tsirkin" : On Mon, Jul 22, 2024 at 10:21:30PM +, Bernhard Beschow wrote: Am 20. Juli 2024 18:38:42 UTC schrieb "Michael S. Tsirkin" : On Thu, Jul 04, 2024 at 10:58:51PM +0200, Bernhard Beschow

Re: [PATCH] net: Reinstate '-net nic, model=help' output as documented in man page

2024-07-24 Thread David Woodhouse
On Tue, 2024-07-09 at 15:46 +0300, Michael Tokarev wrote: > 09.07.2024 15:34, David Woodhouse wrote: > > From: David Woodhouse > > > > While refactoring the NIC initialization code, I broke '-net nic,model=help' > > which no longer outputs a list of available NIC models. > > > > Fixes: 2cdeca04a

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-24 Thread BALATON Zoltan
On Wed, 24 Jul 2024, Aditya Gupta wrote: Hi Nick, While doing the renaming, codes similar to this come up: #define PPC_INSNS_FLAGS_POWER9  \      PPC_INSNS_BASE | PPC_ISEL | PPC_STRING | PPC_MFTB | \ PPC_FLOAT | PPC_FLOAT_FSEL | PPC_FLOAT_

Re: [PATCH] hw/intc/ioapic: Delete a wrong IRQ redirection on I/O APIC

2024-07-24 Thread David Woodhouse
On Tue, 2024-07-23 at 16:15 +0200, Paolo Bonzini wrote: > On Tue, Jun 25, 2024 at 2:03 PM TaiseiIto wrote: > > Before this commit, interruptions from i8254 which should be sent to IRQ0 > > were sent to IRQ2. After this commit, these are correctly sent to IRQ0. When > > I had an HPET timer generate

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-24 Thread Amit Shah
On Wed, 2024-07-24 at 06:51 -0400, Michael S. Tsirkin wrote: > with max-bytes set to 0, quota is 0 and so device does not work. > block this to avoid user confusion > > Signed-off-by: Michael S. Tsirkin > --- >  hw/virtio/virtio-rng.c | 5 +++-- >  1 file changed, 3 insertions(+), 2 deletions(-) >

Re: [PATCH 2/4] hw/misc/bcm2835_property: Avoid overflow in OTP access properties

2024-07-24 Thread Peter Maydell
On Wed, 24 Jul 2024 at 08:06, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 23/7/24 15:10, Peter Maydell wrote: > > Coverity points out that in our handling of the property > > RPI_FWREQ_SET_CUSTOMER_OTP we have a potential overflow. This > > happens because we read start_num and number from

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread Manish
On 24/07/24 4:43 pm, John Levon wrote: On Wed, Jul 24, 2024 at 03:59:29PM +0530, Manish wrote: Leaf 0x1f is superset of 0xb, so it makes sense to set 0x1f equivalent to 0xb by default and workaround windows issue.> This change adds a new property 'cpuid-0x1f-enforce' to set leaf 0x1f equivale

Re: [PATCH 8/8] qemu-options: Add the description of smp-cache object

2024-07-24 Thread Markus Armbruster
Zhao Liu writes: > Hi Markus, > > On Mon, Jul 22, 2024 at 03:37:43PM +0200, Markus Armbruster wrote: >> Date: Mon, 22 Jul 2024 15:37:43 +0200 >> From: Markus Armbruster >> Subject: Re: [PATCH 8/8] qemu-options: Add the description of smp-cache >> object >> >> Zhao Liu writes: >> >> > Signed-

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2024 at 01:35:17PM +0200, Markus Armbruster wrote: > Zhao Liu writes: > > > Hi Markus, > >> SmpCachesProperties and SmpCacheProperties would put the singular > >> vs. plural where it belongs. Sounds a bit awkward to me, though. > >> Naming is hard. > > > > For SmpCachesProperties

[PATCH v7] docs: add test for firmware.json QAPI

2024-07-24 Thread Thomas Weißschuh
To make sure that the QAPI description stays valid, add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b8...@linaro.org/ Reviewed-by: Daniel P. Berrangé Acked-by: Markus Armbruster Signed-off-by: Thomas Weißschuh --- do

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread Igor Mammedov
On Wed, 24 Jul 2024 12:13:28 +0100 John Levon wrote: > On Wed, Jul 24, 2024 at 03:59:29PM +0530, Manish wrote: > > > > > Leaf 0x1f is superset of 0xb, so it makes sense to set 0x1f equivalent > > > > to 0xb by default and workaround windows issue.> > > > > This change adds a > > > > new property

Re: [PATCH v5 13/13] docs/specs: add riscv-iommu

2024-07-24 Thread Daniel Henrique Barboza
On 7/19/24 6:34 AM, Alistair Francis wrote: On Tue, Jul 9, 2024 at 3:37 AM Daniel Henrique Barboza wrote: Add a simple guideline to use the existing RISC-V IOMMU support we just added. This doc will be updated once we add the riscv-iommu-sys device. Signed-off-by: Daniel Henrique Barboza

[PATCH-for-9.1] target/riscv: Remove the deprecated 'any' CPU type

2024-07-24 Thread Philippe Mathieu-Daudé
The 'any' CPU is deprecated since commit f57d5f8004b ("target/riscv: deprecate the 'any' CPU type"). Users are better off using the default CPUs or the 'max' CPU. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 13 - docs/about/removed-features.rst | 8 ++

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-24 Thread Zhao Liu
On Wed, Jul 24, 2024 at 01:47:16PM +0100, Daniel P. Berrangé wrote: > Date: Wed, 24 Jul 2024 13:47:16 +0100 > From: "Daniel P. Berrangé" > Subject: Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object > > On Wed, Jul 24, 2024 at 01:35:17PM +0200, Markus Armbruster wrote: > > Zhao Liu writes: > >

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread Manish
On 24/07/24 6:24 pm, Igor Mammedov wrote: !---| CAUTION: External Email |---! On Wed, 24 Jul 2024 12:13:28 +0100 John Levon wrote: On Wed, Jul 24, 2024 at 03:5

Re: [PATCH 8/8] qemu-options: Add the description of smp-cache object

2024-07-24 Thread Zhao Liu
Hi Markus and Daniel, I have the questions about the -object per cache implementation: On Wed, Jul 24, 2024 at 02:39:29PM +0200, Markus Armbruster wrote: > Date: Wed, 24 Jul 2024 14:39:29 +0200 > From: Markus Armbruster > Subject: Re: [PATCH 8/8] qemu-options: Add the description of smp-cache >

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-24 Thread Zhao Liu
Hi Markus, I realized I should reply this mail first... On Wed, Jul 24, 2024 at 01:35:17PM +0200, Markus Armbruster wrote: > Date: Wed, 24 Jul 2024 13:35:17 +0200 > From: Markus Armbruster > Subject: Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object > > Zhao Liu writes: > > > Hi Markus, >

Re: [PATCH v1] target/i386: Always set leaf 0x1f

2024-07-24 Thread Zhao Liu
Hi Igor, On Wed, Jul 24, 2024 at 02:54:32PM +0200, Igor Mammedov wrote: > Date: Wed, 24 Jul 2024 14:54:32 +0200 > From: Igor Mammedov > Subject: Re: [PATCH v1] target/i386: Always set leaf 0x1f > X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-redhat-linux-gnu) > > On Wed, 24 Jul 2024 12:13:28 +

Re: [PATCH v5 08/13] migration/multifd: Add new migration option for multifd DSA offloading.

2024-07-24 Thread Markus Armbruster
Fabiano Rosas writes: > Yichen Wang writes: > >> On Thu, Jul 11, 2024 at 2:53 PM Yichen Wang >> wrote: >> >>> diff --git a/migration/options.c b/migration/options.c >>> index 645f55003d..f839493016 100644 >>> --- a/migration/options.c >>> +++ b/migration/options.c >>> @@ -29,6 +29,7 @@ >>> #i

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-24 Thread Zhao Liu
Hi Daniel, On Wed, Jul 24, 2024 at 10:03:02PM +0800, Zhao Liu wrote: > Date: Wed, 24 Jul 2024 22:03:02 +0800 > From: Zhao Liu > Subject: Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object > > On Wed, Jul 24, 2024 at 01:47:16PM +0100, Daniel P. Berrang? wrote: > > Date: Wed, 24 Jul 2024 13:47:1

Re: [PATCH v6 7/8] target/riscv: Add any32 and max32 CPU for RV64 QEMU

2024-07-24 Thread Andrew Jones
On Sat, Jul 20, 2024 at 07:11:48AM GMT, LIU Zhiwei wrote: > We may need 32-bit max or 32-bit any CPU for RV64 QEMU. Thus we add > these two CPUs for RV64 QEMU. > > The reason we don't expose them to RV32 QEMU is that we already have > max or any cpu with the same configuration. Another reason is t

Re: [PATCH] target/i386: Raise the highest index value used for any VMCS encoding

2024-07-24 Thread Paolo Bonzini
On Wed, Jul 24, 2024 at 10:09 AM Lei Wang wrote: > Because the index value of the VMCS field encoding of Secondary VM-exit > controls, 0x44, is larger than any existing index value, raise the highest > index value used for any VMCS encoding to 0x44. > > Because the index value of the VMCS field en

Re: [PATCH v2] chardev/char-win-stdio.c: restore old console mode

2024-07-24 Thread Michael Tokarev
24.07.2024 13:25, Marc-André Lureau wrote: Hi On Wed, Jul 24, 2024 at 8:48 AM Michael Tokarev mailto:m...@tls.msk.ru>> wrote: 22.07.2024 12:52, songziming wrote: > If I use `-serial stdio` on Windows, after QEMU exits, the terminal > could not handle arrow keys and tab any more. B

Re: [PATCH v4 01/17] meson: Add optional dependency on IGVM library

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:39PM +0100, Roy Hopkins wrote: > The IGVM library allows Independent Guest Virtual Machine files to be > parsed and processed. IGVM files are used to configure guest memory > layout, initial processor state and other configuration pertaining to > secure virtual machine

Re: [PATCH v4 00/17] Introduce support for IGVM files

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:38PM +0100, Roy Hopkins wrote: > Here is v4 of the set of patches to add support for IGVM files to QEMU. This > is > based on commit 1a2d52c7fc of qemu. > > This version addresses all of the review comments from v3 along with a couple > of > small bug fixes. This is

Re: [PATCH v4 02/17] backends/confidential-guest-support: Add functions to support IGVM

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:40PM +0100, Roy Hopkins wrote: > In preparation for supporting the processing of IGVM files to configure > guests, this adds a set of functions to ConfidentialGuestSupport > allowing configuration of secure virtual machines that can be > implemented for each supported

Re: [PATCH v4 03/17] backends/igvm: Add IGVM loader and configuration

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:41PM +0100, Roy Hopkins wrote: > Adds an IGVM loader to QEMU which processes a given IGVM file and > applies the directives within the file to the current guest > configuration. > > The IGVM loader can be used to configure both confidential and > non-confidential gues

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-24 Thread Jonah Palmer
On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM Eugenio Perez Martin wrote: On Sat, May 11, 2024 at 6:07 AM Jason Wang wrote: On Fri, May 10, 2024 a

Re: [PATCH v4 04/17] hw/i386: Add igvm-cfg object and processing for IGVM files

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:42PM +0100, Roy Hopkins wrote: > An IGVM file contains configuration of guest state that should be > applied during configuration of the guest, before the guest is started. > > This patch allows the user to add an igvm-cfg object to an X86 machine > configuration that

Re: [PATCH v4 05/17] i386/pc_sysfw: Ensure sysfw flash configuration does not conflict with IGVM

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:43PM +0100, Roy Hopkins wrote: > When using an IGVM file the configuration of the system firmware is > defined by IGVM directives contained in the file. In this case the user > should not configure any pflash devices. > > This commit skips initialization of the ROM mo

[PATCH] ptp: Add vDSO-style vmclock support

2024-07-24 Thread David Woodhouse
From: David Woodhouse The vmclock "device" provides a shared memory region with precision clock information. By using shared memory, it is safe across Live Migration. Like the KVM PTP clock, this can convert TSC-based cross timestamps into KVM clock values. Unlike the KVM PTP clock, it does so o

Re: [PATCH v4 06/17] sev: Fix error handling in sev_encrypt_flash()

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:44PM +0100, Roy Hopkins wrote: > The function sev_encrypt_flash() checks to see if the return value of > launch_update_data() < 0, but the function returns a non-zero (and not > necessarily negative) result on error. This means that some errors in > updating launch dat

Re: [PATCH v4 07/17] sev: Update launch_update_data functions to use Error handling

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:45PM +0100, Roy Hopkins wrote: > The class function and implementations for updating launch data return > a code in case of error. In some cases an error message is generated and > in other cases, just the error return value is used. > > This small refactor adds an 'E

[PATCH] hw/acpi: Add vmclock device

2024-07-24 Thread David Woodhouse
From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that counter against an external source of 'real' time, and track the pre

Re: [PATCH v4 11/17] docs/system: Add documentation on support for IGVM

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:49PM +0100, Roy Hopkins wrote: > IGVM support has been implemented for Confidential Guests that support > AMD SEV and AMD SEV-ES. Add some documentation that gives some > background on the IGVM format and how to use it to configure a > confidential guest. > > Signed-o

Re: [PATCH v4 12/17] docs/interop/firmware.json: Add igvm to FirmwareDevice

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:50PM +0100, Roy Hopkins wrote: > Create an enum entry within FirmwareDevice for 'igvm' to describe that > an IGVM file can be used to map firmware into memory as an alternative > to pre-existing firmware devices. > > Signed-off-by: Roy Hopkins > --- > docs/interop/f

Re: [PATCH] hw/acpi: Add vmclock device

2024-07-24 Thread Michael S. Tsirkin
On Wed, Jul 24, 2024 at 06:22:42PM +0100, David Woodhouse wrote: > From: David Woodhouse > > The vmclock device addresses the problem of live migration with > precision clocks. The tolerances of a hardware counter (e.g. TSC) are > typically around ±50PPM. A guest will use NTP/PTP/PPS to disciplin

Re: [PATCH v4 13/17] backends/confidential-guest-support: Add set_guest_policy() function

2024-07-24 Thread Daniel P . Berrangé
On Wed, Jul 03, 2024 at 12:05:51PM +0100, Roy Hopkins wrote: > For confidential guests a policy can be provided that defines the > security level, debug status, expected launch measurement and other > parameters that define the configuration of the confidential platform. > > This commit adds a new

[PATCH v2 00/23] Convert avocado tests to normal Python unittests

2024-07-24 Thread Thomas Huth
The Avocado v88 that we use in QEMU is already on a life support system: It is not supported by upstream anymore, and with the latest versions of Python, it won't work anymore since it depends on the "imp" module that has been removed in Python 3.12. There have been several attempts to update the

[PATCH v2 04/23] tests/functional: Prepare the meson build system for the functional tests

2024-07-24 Thread Thomas Huth
Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "make check"), while the "thoro

[PATCH v2 01/23] python: Install pycotap in our venv if necessary

2024-07-24 Thread Thomas Huth
The upcoming functional tests will require pycotap for providing TAP output from the python-based tests. Since we want to be able to run some of the tests offline by default, too, let's install it along with meson in our venv if necessary (it's size is only 5 kB, so adding the wheel here should not

[PATCH v2 02/23] tests/functional: Add base classes for the upcoming pytest-based tests

2024-07-24 Thread Thomas Huth
The file is mostly a copy of the tests/avocado/avocado_qemu/__init__.py file with some adjustments to get rid of the Avocado dependencies (i.e. we also have to drop the LinuxSSHMixIn and LinuxTest for now). The emulator binary and build directory are now passed via environment variables that will

[PATCH v2 06/23] tests/functional: Convert avocado tests that just need a small adjustment

2024-07-24 Thread Thomas Huth
These simple tests can be converted to stand-alone tests quite easily, e.g. by just setting the machine to 'none' now manually or by adding "-cpu" command line parameters, since we don't support the corresponding avocado tags in the new python test framework. Reviewed-by: Daniel P. Berrangé Signe

[PATCH v2 05/23] tests/functional: Convert simple avocado tests into standalone python tests

2024-07-24 Thread Thomas Huth
These test are rather simple and don't need any modifications apart from adjusting the "from avocado_qemu" line. To ease debugging, make the files executable and add a shebang line and Python '__main__' handling, too, so that these tests can now be run by executing them directly. Reviewed-by: Dani

[PATCH v2 08/23] tests/functional: Convert some tests that download files via fetch_asset()

2024-07-24 Thread Thomas Huth
Now that we've got a working fetch_asset() function, we can convert some Avocado tests that use this function for downloading their required files. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- MAINTAINERS | 12 +++ tests/functional/meson.b

[PATCH v2 11/23] tests/functional: Set up logging

2024-07-24 Thread Thomas Huth
Create log files for each test separately, one file that contains the basic logging and one that contains the console output. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 26 +- 1 file changed, 25 insertions(+),

[PATCH v2 14/23] tests/functional: Convert the microblaze avocado tests into standalone tests

2024-07-24 Thread Thomas Huth
The machine_microblaze.py file contained two tests, one for each endianess. Since we only support one QEMU target binary per file in the new functional test environment, we have to split this file up into two files now. Signed-off-by: Thomas Huth --- MAINTAINERS

  1   2   >