Re: [PATCH v1 2/3] target/i386: Add VMX control bits for nested FRED support

2024-08-08 Thread Xin Li
On 8/7/2024 8:58 AM, Zhao Liu wrote: On Wed, Aug 07, 2024 at 01:18:11AM -0700, Xin Li (Intel) wrote: @@ -1435,7 +1435,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { "vmx-exit-save-efer", "vmx-exit-load-efer", "vmx-exit-save-preemption-timer", "vmx-exit-

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-08 Thread Markus Armbruster
Eric Blake writes: > My next patch needs to convert text from an untrusted input into an > output representation that is suitable for display on a terminal is > useful to more than just the json-writer; the text should normally be > UTF-8, but blindly allowing all Unicode code points (including A

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Aug 02, 2024 at 02:26:05PM -0500, Eric Blake wrote: >> My next patch needs to convert text from an untrusted input into an >> output representation that is suitable for display on a terminal is >> useful to more than just the json-writer; the text should norma

Re: [RFC PATCH v6 0/5] rust-pl011-rfc-v6

2024-08-08 Thread Manos Pitsidianakis
On Thu, 08 Aug 2024 09:10, Paolo Bonzini wrote: On 8/4/24 23:04, Manos Pitsidianakis wrote: Changes === - Setting MSRV to 1.77.0: * cstr crate MSRV is 1.64, which is more recent than Debian bookworm (1.63.0) * pl011's dep

[PATCH] block/blkio: use FUA flag on write zeroes only if supported

2024-08-08 Thread Stefano Garzarella
libblkio supports BLKIO_REQ_FUA with write zeros requests only since version 1.4.0, so let's inform the block layer that the blkio driver supports it only in this case. Otherwise we can have runtime errors as reported in https://issues.redhat.com/browse/RHEL-32878 Fixes: fd66dbd424 ("blkio: add li

Re: [RFC PATCH v6 1/5] build-sys: Add rust feature option

2024-08-08 Thread Paolo Bonzini
On 8/4/24 23:04, Manos Pitsidianakis wrote: diff --git a/configure b/configure index 019fcbd0ef..aac7f29f25 100755 --- a/configure +++ b/configure @@ -874,6 +874,8 @@ Advanced options (experts only): start the emulator (only use if you are including

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Igor Mammedov
On Wed, 7 Aug 2024 15:25:47 +0100 Jonathan Cameron wrote: > On Tue, 6 Aug 2024 16:31:13 +0200 > Igor Mammedov wrote: > > > On Fri, 2 Aug 2024 23:44:01 +0200 > > Mauro Carvalho Chehab wrote: > > > > > Provide a generic interface for error injection via GHESv2. > > > > > > This patch is co-

Re: [PATCH v2 13/13] target/riscv: Enable PMU related extensions to preferred rule

2024-08-08 Thread Atish Kumar Patra
On Wed, Aug 7, 2024 at 5:27 PM Alistair Francis wrote: > > On Wed, Aug 7, 2024 at 5:44 PM Atish Kumar Patra wrote: > > > > On Tue, Aug 6, 2024 at 7:01 PM Alistair Francis > > wrote: > > > > > > On Wed, Aug 7, 2024 at 2:06 AM Daniel Henrique Barboza > > > wrote: > > > > > > > > > > > > > > > >

Re: [RFC PATCH v6 4/5] rust: add crate to expose bindings and interfaces

2024-08-08 Thread Paolo Bonzini
On 8/4/24 23:04, Manos Pitsidianakis wrote: diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build new file mode 100644 index 00..7992dc64ce --- /dev/null +++ b/rust/qemu-api/meson.build @@ -0,0 +1,19 @@ +add_languages('rust', required: true) Not needed. Paolo

[PATCH 1/1] hw/intc/riscv_aplic: Check and update pending when write sourcecfg

2024-08-08 Thread Yong-Xuan Wang
The section 4.5.2 of the RISC-V AIA specification says that any write to a sourcecfg register of an APLIC might (or might not) cause the corresponding interrupt-pending bit to be set to one if the rectified input value is high (= 1) under the new source mode. If an interrupt is asserted before the

[PATCH 1/1] hw/intc/riscv_aplic: Fix APLIC in clrip and clripnum write emulation

2024-08-08 Thread Yong-Xuan Wang
In the section "4.7 Precise effects on interrupt-pending bits" of the RISC-V AIA specification defines that: If the source mode is Level1 or Level0 and the interrupt domain is configured in MSI delivery mode (domaincfg.DM = 1): The pending bit is cleared whenever the rectified input value is low,

Re: [PATCH v2 13/13] target/riscv: Enable PMU related extensions to preferred rule

2024-08-08 Thread Alistair Francis
On Thu, Aug 8, 2024 at 6:12 PM Atish Kumar Patra wrote: > > On Wed, Aug 7, 2024 at 5:27 PM Alistair Francis wrote: > > > > On Wed, Aug 7, 2024 at 5:44 PM Atish Kumar Patra > > wrote: > > > > > > On Tue, Aug 6, 2024 at 7:01 PM Alistair Francis > > > wrote: > > > > > > > > On Wed, Aug 7, 2024 a

Re: [RFC PATCH v6 5/5] rust: add PL011 device model

2024-08-08 Thread Paolo Bonzini
On 8/4/24 23:04, Manos Pitsidianakis wrote: diff --git a/rust/hw/char/pl011/meson.build b/rust/hw/char/pl011/meson.build new file mode 100644 index 00..a17a823cf5 --- /dev/null +++ b/rust/hw/char/pl011/meson.build @@ -0,0 +1,28 @@ +if not config_host_data.get('CONFIG_HAVE_RUST') + subdir

RE: [PATCH RFC V3 00/29] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-08-08 Thread Salil Mehta via
Hi Gavin, > From: Gavin Shan > Sent: Thursday, August 8, 2024 1:29 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/8/24 9:48 AM, Salil Mehta wrote: > >> On 8/7/24 11:27 PM, Salil Mehta wrote: > >> > > >> > Let me figur

RE: [PATCH RFC V3 00/29] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-08-08 Thread Salil Mehta via
Hi Gavin, > From: Gavin Shan > Sent: Thursday, August 8, 2024 5:15 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/8/24 10:29 AM, Gavin Shan wrote: > > On 8/8/24 9:48 AM, Salil Mehta wrote: > > > > However, I'm unable to hot

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Peter Maydell
On Thu, 8 Aug 2024 at 05:32, Markus Armbruster wrote: > > Peter Maydell writes: > > [...] > > > The QAPI command which this code is implementing is > > also (a) target-specific and (b) unfortunately > > designed so that it doesn't get passed a particular > > CPU or particular device to query, it'

Re: [PATCH v4 00/15] hw/misc/aspeed_hace: Fix SG Accumulative Hash Calculations

2024-08-08 Thread Daniel P . Berrangé
On Wed, Aug 07, 2024 at 10:01:40PM +0200, Philippe Mathieu-Daudé wrote: > Hi Alejandro, > > On 7/8/24 21:51, Alejandro Zeise wrote: > > The goal of this patch series is to fix accumulative hashing support in the > > Aspeed HACE module. The issue that stemmed this patch was a failure to boot > > a

Re: [RFC PATCH-for-9.1? 2/2] hw/intc/arm_gic: Only provide query-gic-capabilities when GIC built-in

2024-08-08 Thread Peter Maydell
On Thu, 8 Aug 2024 at 06:35, Markus Armbruster wrote: > Options: > > 1. Approximate symbols from CONFIG_DEVICES with symbols from >CONFIG_TARGET. This is what we do now. > > 2. Use symbols from CONFIG_DEVICES. Generated headers are no longer >self-contained. Strong dislike. > > 3. Defin

Re: [PATCH] qio: fix qemu crash when live migration

2024-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2024 at 11:04:11AM +0800, yaozhenguo wrote: > qemu will crash in live migration cleanup process at source host. > BT is as below: > > 0 0x7f740fc9e165 in g_source_destroy () at /usr/lib64/libglib-2.0.so.0 > 1 0x55a2982a0f6e in qio_net_listener_set_client_func_full > 2 0x

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Markus Armbruster
Mauro Carvalho Chehab writes: > Creates a QMP command to be used for generic ACPI APEI hardware error > injection (HEST) via GHESv2. > > The actual GHES code will be added at the followup patch. > > Signed-off-by: Mauro Carvalho Chehab > --- > MAINTAINERS | 7 + > hw/acpi/Kcon

Re: [RFC PATCH] qapi: Generate QAPI files using qapi/ for generated header paths

2024-08-08 Thread Markus Armbruster
Markus Armbruster writes: > Daniel P. Berrangé writes: > >> On Wed, Aug 07, 2024 at 11:34:06AM +0200, Philippe Mathieu-Daudé wrote: >>> QAPI script generates headers under the qapi/ directory, >>> so use this prefix in generated header paths, keeping >>> all QAPI under the qapi/ namespace. >> >>

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 8 Aug 2024 at 05:32, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> [...] >> >> > The QAPI command which this code is implementing is >> > also (a) target-specific and (b) unfortunately >> > designed so that it doesn't get passed a particular >> > CPU

Re: [PATCH v2 0/4] Add support for Zhaoxin Yongfeng CPU model and other improvements

2024-08-08 Thread Ewan Hai
Dear Maintainers,     Could you please review the current patchset and let me know if you have any concerns? On 7/4/24 07:25, EwanHai wrote: ### Summary of changes EwanHai (4): target/i386: Add support for Zhaoxin CPU vendor identification target/i386: Add CPUID leaf 0xC000_0001 EDX d

Re: [PATCH v1 2/3] target/i386: Add VMX control bits for nested FRED support

2024-08-08 Thread Zhao Liu
Hi Xin, On Thu, Aug 08, 2024 at 12:04:42AM -0700, Xin Li wrote: > Date: Thu, 8 Aug 2024 00:04:42 -0700 > From: Xin Li > Subject: Re: [PATCH v1 2/3] target/i386: Add VMX control bits for nested > FRED support > > On 8/7/2024 8:58 AM, Zhao Liu wrote: > > On Wed, Aug 07, 2024 at 01:18:11AM -0700,

Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f

2024-08-08 Thread Igor Mammedov
On Fri, 2 Aug 2024 03:24:26 -0400 Xiaoyao Li wrote: > Currently, QEMU exposes CPUID 0x1f to guest only when necessary, i.e., > when topology level that cannot be enumerated by leaf 0xB, e.g., die or > module level, are configured for the guest. above implies that there could be a workaround to

[RFC-PATCH v1 1/2] vhost: fail device start if iotlb update fails

2024-08-08 Thread Prasad Pandit
From: Prasad Pandit While starting a vhost device, updating iotlb entries via 'vhost_device_iotlb_miss' may return an error. qemu-kvm: vhost_device_iotlb_miss: 700871,700871: Fail to update device iotlb Fail device start when such an error occurs. Signed-off-by: Prasad Pandit --- hw/vi

[RFC-PATCH v1 2/2] vhost-user: add a request-reply lock

2024-08-08 Thread Prasad Pandit
From: Prasad Pandit QEMU threads use vhost_user_write/read calls to send and receive request/reply messages from a vhost-user device. When multiple threads communicate with the same vhost-user device, they can receive each other's messages, resulting in an erroneous state. When fault_thread exit

[RFC-PATCH v1 0/2] Postcopy migration and vhost-user errors

2024-08-08 Thread Prasad Pandit
From: Prasad Pandit Hello, * virsh(1) offers multiple options to initiate Postcopy migration: 1) virsh migrate --postcopy --postcopy-after-precopy 2) virsh migrate --postcopy + virsh migrate-postcopy 3) virsh migrate --postcopy --timeout --timeout-postcopy When Postcopy migration

Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f

2024-08-08 Thread Zhao Liu
Hi Xiaoyao, Patch is generally fine for me. Just a few nits: On Fri, Aug 02, 2024 at 03:24:26AM -0400, Xiaoyao Li wrote: > diff --git a/include/hw/i386/topology.h b/include/hw/i386/topology.h > index dff49fce1154..b63bce2f4c82 100644 > --- a/include/hw/i386/topology.h > +++ b/include/hw/i386/topo

Re: [RFC PATCH v6 0/5] rust-pl011-rfc-v6

2024-08-08 Thread Paolo Bonzini
On Thu, Aug 8, 2024 at 9:58 AM Manos Pitsidianakis wrote: > > On Thu, 08 Aug 2024 09:10, Paolo Bonzini wrote: > >On 8/4/24 23:04, Manos Pitsidianakis wrote: > >> Changes > >> === > >> > >> - Setting MSRV to 1.77.0: > >>* cstr crate MSRV is 1.64, which is more recent than Debian bookworm >

Re: [PATCH v2 4/4] target/i386: Update CMPLegacy handling for Zhaoxin CPUs

2024-08-08 Thread Zhao Liu
Hi EwanHai, On Thu, Jul 04, 2024 at 07:25:11AM -0400, EwanHai wrote: > Date: Thu, 4 Jul 2024 07:25:11 -0400 > From: EwanHai > Subject: [PATCH v2 4/4] target/i386: Update CMPLegacy handling for Zhaoxin > CPUs > X-Mailer: git-send-email 2.34.1 > > Zhaoxin CPUs handle the CMPLegacy bit in the same

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Peter Maydell
On Thu, 8 Aug 2024 at 10:02, Markus Armbruster wrote: > > Peter Maydell writes: > > > On Thu, 8 Aug 2024 at 05:32, Markus Armbruster wrote: > >> > >> Peter Maydell writes: > >> > >> [...] > >> > >> > The QAPI command which this code is implementing is > >> > also (a) target-specific and (b) unf

Re: [PATCH v2 1/4] target/i386: Add support for Zhaoxin CPU vendor identification

2024-08-08 Thread Zhao Liu
On Thu, Jul 04, 2024 at 07:25:08AM -0400, EwanHai wrote: > Date: Thu, 4 Jul 2024 07:25:08 -0400 > From: EwanHai > Subject: [PATCH v2 1/4] target/i386: Add support for Zhaoxin CPU vendor > identification > X-Mailer: git-send-email 2.34.1 > > Zhaoxin currently uses two vendors: "Shanghai" and "Cen

Re: [PATCH v2 2/4] target/i386: Add CPUID leaf 0xC000_0001 EDX definitions

2024-08-08 Thread Zhao Liu
On Thu, Jul 04, 2024 at 07:25:09AM -0400, EwanHai wrote: > Date: Thu, 4 Jul 2024 07:25:09 -0400 > From: EwanHai > Subject: [PATCH v2 2/4] target/i386: Add CPUID leaf 0xC000_0001 EDX > definitions > X-Mailer: git-send-email 2.34.1 > > Add new CPUID feature flags for various Zhaoxin PadLock extens

[PATCH] kvm: refactor core virtual machine creation into its own function

2024-08-08 Thread Ani Sinha
Refactoring the core logic around KVM_CREATE_VM into its own separate function so that it can be called from other functions in subsequent patches. There is no functional change in this patch. CC: pbonz...@redhat.com Signed-off-by: Ani Sinha --- accel/kvm/kvm-all.c | 97 +

Re: [PATCH v2 3/4] target/i386: Introduce Zhaoxin Yongfeng CPU model

2024-08-08 Thread Zhao Liu
On Thu, Jul 04, 2024 at 07:25:10AM -0400, EwanHai wrote: > Date: Thu, 4 Jul 2024 07:25:10 -0400 > From: EwanHai > Subject: [PATCH v2 3/4] target/i386: Introduce Zhaoxin Yongfeng CPU model > X-Mailer: git-send-email 2.34.1 > > Introduce support for the Zhaoxin Yongfeng CPU model. > The Zhaoxin Yon

Re: [PATCH] kvm: refactor core virtual machine creation into its own function

2024-08-08 Thread Zhao Liu
Hi Ani, On Thu, Aug 08, 2024 at 04:03:36PM +0530, Ani Sinha wrote: > Date: Thu, 8 Aug 2024 16:03:36 +0530 > From: Ani Sinha > Subject: [PATCH] kvm: refactor core virtual machine creation into its own > function > X-Mailer: git-send-email 2.45.2 > > Refactoring the core logic around KVM_CREATE_

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Akihiko Odaki
On 2024/08/06 22:29, Michael S. Tsirkin wrote: On Tue, Aug 06, 2024 at 04:35:44PM +0900, Akihiko Odaki wrote: On 2024/08/05 19:08, Michael S. Tsirkin wrote: On Mon, Aug 05, 2024 at 06:37:58PM +0900, Akihiko Odaki wrote: If cross-migrate=off, QEMU can still migrate on the same host (checkpoint

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 07:52:37PM +0900, Akihiko Odaki wrote: > On 2024/08/06 22:29, Michael S. Tsirkin wrote: > > On Tue, Aug 06, 2024 at 04:35:44PM +0900, Akihiko Odaki wrote: > > > On 2024/08/05 19:08, Michael S. Tsirkin wrote: > > > > On Mon, Aug 05, 2024 at 06:37:58PM +0900, Akihiko Odaki wro

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Akihiko Odaki
On 2024/08/08 19:54, Michael S. Tsirkin wrote: On Thu, Aug 08, 2024 at 07:52:37PM +0900, Akihiko Odaki wrote: On 2024/08/06 22:29, Michael S. Tsirkin wrote: On Tue, Aug 06, 2024 at 04:35:44PM +0900, Akihiko Odaki wrote: On 2024/08/05 19:08, Michael S. Tsirkin wrote: On Mon, Aug 05, 2024 at 06

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 8 Aug 2024 at 10:02, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> > On Thu, 8 Aug 2024 at 05:32, Markus Armbruster wrote: >> >> >> >> Peter Maydell writes: >> >> >> >> [...] >> >> >> >> > The QAPI command which this code is implementing is >> >> >

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 08:03:25PM +0900, Akihiko Odaki wrote: > On 2024/08/08 19:54, Michael S. Tsirkin wrote: > > On Thu, Aug 08, 2024 at 07:52:37PM +0900, Akihiko Odaki wrote: > > > On 2024/08/06 22:29, Michael S. Tsirkin wrote: > > > > On Tue, Aug 06, 2024 at 04:35:44PM +0900, Akihiko Odaki wro

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2024 at 11:15:17AM +0100, Peter Maydell wrote: > On Thu, 8 Aug 2024 at 10:02, Markus Armbruster wrote: > > > > Peter Maydell writes: > > > > > On Thu, 8 Aug 2024 at 05:32, Markus Armbruster wrote: > > >> > > >> Peter Maydell writes: > > >> > > >> [...] > > >> > > >> > The QAPI c

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Peter Maydell
On Thu, 8 Aug 2024 at 12:23, Daniel P. Berrangé wrote: > On Thu, Aug 08, 2024 at 11:15:17AM +0100, Peter Maydell wrote: > > It's not possible to use KVM with that machine type, so the > > question is a bit moot. (This also indicates that the > > interface is not very helpful -- it purports to tell

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Akihiko Odaki
On 2024/08/08 20:12, Michael S. Tsirkin wrote: On Thu, Aug 08, 2024 at 08:03:25PM +0900, Akihiko Odaki wrote: On 2024/08/08 19:54, Michael S. Tsirkin wrote: On Thu, Aug 08, 2024 at 07:52:37PM +0900, Akihiko Odaki wrote: On 2024/08/06 22:29, Michael S. Tsirkin wrote: On Tue, Aug 06, 2024 at 04

Re: [PATCH v2] target/arm: Fix BTI versus CF_PCREL

2024-08-08 Thread Peter Maydell
On Fri, 2 Aug 2024 at 01:30, Richard Henderson wrote: > > With pcrel, we cannot check the guarded page bit at translation > time, as different mappings of the same physical page may or may > not have the GP bit set. > > Instead, add a couple of helpers to check the page at runtime, > after all oth

[PATCH v2] kvm: refactor core virtual machine creation into its own function

2024-08-08 Thread Ani Sinha
Refactoring the core logic around KVM_CREATE_VM into its own separate function so that it can be called from other functions in subsequent patches. There is no functional change in this patch. CC: pbonz...@redhat.com CC: zhao1@intel.com Signed-off-by: Ani Sinha --- accel/kvm/kvm-all.c | 93 +

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Akihiko Odaki
On 2024/08/07 5:41, Peter Xu wrote: On Mon, Aug 05, 2024 at 04:27:43PM +0900, Akihiko Odaki wrote: On 2024/08/04 22:08, Peter Xu wrote: On Sun, Aug 04, 2024 at 03:49:45PM +0900, Akihiko Odaki wrote: On 2024/08/03 1:26, Peter Xu wrote: On Sat, Aug 03, 2024 at 12:54:51AM +0900, Akihiko Odaki wr

Re: [PATCH 5/6] qapi: apply schema prefix to QAPI feature enum constants

2024-08-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > This allows us to include multiple QAPI schemas in the same file. > > Signed-off-by: Daniel P. Berrangé This commit prepends an optional prefix to generated uses of QAPI_FEATURE_{DEPRECATED,UNSTABLE}. It touches neither the handwritten definition in include/qapi/ut

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2024 at 12:32:35PM +0100, Peter Maydell wrote: > On Thu, 8 Aug 2024 at 12:23, Daniel P. Berrangé wrote: > > On Thu, Aug 08, 2024 at 11:15:17AM +0100, Peter Maydell wrote: > > > It's not possible to use KVM with that machine type, so the > > > question is a bit moot. (This also indi

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Daniel P . Berrangé
On Thu, Aug 08, 2024 at 12:48:39PM +0100, Daniel P. Berrangé wrote: > On Thu, Aug 08, 2024 at 12:32:35PM +0100, Peter Maydell wrote: > > On Thu, 8 Aug 2024 at 12:23, Daniel P. Berrangé wrote: > > > On Thu, Aug 08, 2024 at 11:15:17AM +0100, Peter Maydell wrote: > > > > It's not possible to use KVM

Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/

2024-08-08 Thread Peter Maydell
On Thu, 8 Aug 2024 at 12:54, Daniel P. Berrangé wrote: > > On Thu, Aug 08, 2024 at 12:32:35PM +0100, Peter Maydell wrote: > > On Thu, 8 Aug 2024 at 12:23, Daniel P. Berrangé wrote: > > > On Thu, Aug 08, 2024 at 11:15:17AM +0100, Peter Maydell wrote: > > > > It's not possible to use KVM with that

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Mauro Carvalho Chehab
Em Tue, 6 Aug 2024 16:31:13 +0200 Igor Mammedov escreveu: > > +/* Could also be read back from the error_block_address register */ > > +*error_block_addr = base + > > +ACPI_GHES_ERROR_SOURCE_COUNT * sizeof(uint64_t) + > > +ACPI_GHES_ERROR_SOURCE_COUNT * sizeof(uint64_t) +

Re: [PATCH 6/6] qapi: expose all schema features to code

2024-08-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > This removed the QapiFeatures enum and auto-generates an enum which > exposes all features defined by the schema to code. > > The 'deprecated' and 'unstable' features still have a little bit of > special handling, being force defined to be the 1st + 2nd features > in

Re: [PATCH 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-08 Thread Peter Maydell
On Tue, 6 Aug 2024 at 17:08, Juraj Marcin wrote: > > Some devices need to distinguish cold start reset from waking up from a > suspended state. This patch adds new value to the enum, and updates the > i386 wakeup method to use this new reset type. > > Signed-off-by: Juraj Marcin > --- > docs/dev

Re: [PATCH 3/4] virtio-mem: Implement Resettable interface instead of using LegacyReset

2024-08-08 Thread Peter Maydell
On Tue, 6 Aug 2024 at 17:08, Juraj Marcin wrote: > > LegacyReset does not pass ResetType to the reset callback method, which > the new Resettable interface uses. Due to this, virtio-mem cannot use > the new RESET_TYPE_WAKEUP to skip reset during wake-up from a suspended > state. > > This patch add

[PATCH v6 06/10] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Mauro Carvalho Chehab
Provide a generic interface for error injection via GHESv2. This patch is co-authored: - original ghes logic to inject a simple ARM record by Shiju Jose; - generic logic to handle block addresses by Jonathan Cameron; - generic GHESv2 error inject by Mauro Carvalho Chehab; Co-authored-

[PATCH v6 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-08 Thread Mauro Carvalho Chehab
Testing OS kernel ACPI APEI CPER support is tricky, as one depends on having hardware with special-purpose BIOS and/or hardware. With QEMU, it becomes a lot easier, as it can be done via QMP. This series add support for injecting CPER records on ARM emulation. The QEMU side changes add a QAPI ab

[PATCH v6 10/10] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-08-08 Thread Mauro Carvalho Chehab
Add support to retrieve mpidr value via qom-get. Signed-off-by: Mauro Carvalho Chehab --- scripts/arm_processor_error.py | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py index b4642

[PATCH v6 05/10] acpi/ghes: rework the logic to handle HEST source ID

2024-08-08 Thread Mauro Carvalho Chehab
The current logic is based on a lot of duct tape, with offsets calculated based on one define with the number of source IDs and an enum. Rewrite the logic in a way that it would be more resilient of code changes, by moving the source ID count to an enum and make the offset calculus more explicit.

[PATCH v6 03/10] acpi/ghes: Add support for GED error device

2024-08-08 Thread Mauro Carvalho Chehab
From: Jonathan Cameron As a GED error device is now defined, add another type of notification. Add error notification to GHES v2 using a GED error device GED triggered via interrupt. [mchehab: do some cleanups at ACPI_HEST_SRC_ID_* checks and rename HEST event to better identify GED interrupt

[PATCH v6 07/10] docs: acpi_hest_ghes: fix documentation for CPER size

2024-08-08 Thread Mauro Carvalho Chehab
While the spec defines a CPER size of 4KiB for each record, currently it is set to 1KiB. Fix the documentation and add a pointer to the macro name there, as this may help to keep it updated. Signed-off-by: Mauro Carvalho Chehab --- docs/specs/acpi_hest_ghes.rst | 6 -- 1 file changed, 4 inse

[PATCH v6 09/10] target/arm: add an experimental mpidr arm cpu property object

2024-08-08 Thread Mauro Carvalho Chehab
Accurately injecting an ARM Processor error ACPI/APEI GHES error record requires the value of the ARM Multiprocessor Affinity Register (mpidr). While ARM implements it, this is currently not visible. Add a field at CPU storing it, and place it at arm_cpu_properties as experimental, thus allowing

[PATCH v6 02/10] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-08 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan

[PATCH v6 08/10] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Mauro Carvalho Chehab
Using the QMP GHESv2 API requires preparing a raw data array containing a CPER record. Add a helper script with subcommands to prepare such data. Currently, only ARM Processor error CPER record is supported. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3 + qapi/

[PATCH v6 04/10] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Mauro Carvalho Chehab
Creates a QMP command to be used for generic ACPI APEI hardware error injection (HEST) via GHESv2. The actual GHES code will be added at the followup patch. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Shiju Jose Reviewed-by: Jonathan Cameron --- MAINTAINERS | 7 + hw

[PATCH v6 01/10] acpi/generic_event_device: add an APEI error device

2024-08-08 Thread Mauro Carvalho Chehab
Adds a generic error device to handle generic hardware error events as specified at ACPI 6.5 specification at 18.3.2.7.2: https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html#event-notification-for-generic-error-sources using HID PNP0C33. The PNP0C33 device is used to report hardware

Re: [PATCH v2 15/17] intel_iommu: Modify x-scalable-mode to be string option to expose scalable modern mode

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:34 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan 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. From: Yi Liu Intel VT-d 3.0 introduces scalable mode

Re: [PATCH 1/4] reset: Use ResetType for qemu_devices_reset() and MachineClass->reset()

2024-08-08 Thread Peter Maydell
On Tue, 6 Aug 2024 at 17:08, Juraj Marcin wrote: > > Currently, both qemu_devices_reset() and MachineClass->reset() use > ShutdownCause for the reason of the reset. However, the Resettable > interface uses ResetState, so ShutdownCause needs to be translated to > ResetType somewhere. Translating it

Re: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan 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. Add an new element scalable_mode in IntelIOMMUState to

Re: [PATCH 3/4] virtio-mem: Implement Resettable interface instead of using LegacyReset

2024-08-08 Thread David Hildenbrand
On 08.08.24 14:25, Peter Maydell wrote: On Tue, 6 Aug 2024 at 17:08, Juraj Marcin wrote: LegacyReset does not pass ResetType to the reset callback method, which the new Resettable interface uses. Due to this, virtio-mem cannot use the new RESET_TYPE_WAKEUP to skip reset during wake-up from a s

Re: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-08-08 Thread Duan, Zhenzhong
On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: On 05/08/2024 08:27, Zhenzhong Duan 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. Per spec 6.5.2.4, PADID-selective PASID-based iotlb in

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Igor Mammedov
On Thu, 8 Aug 2024 14:11:14 +0200 Mauro Carvalho Chehab wrote: > Em Tue, 6 Aug 2024 16:31:13 +0200 > Igor Mammedov escreveu: > > > > +/* Could also be read back from the error_block_address register */ > > > +*error_block_addr = base + > > > +ACPI_GHES_ERROR_SOURCE_COUNT * sizeo

Re: [PATCH 0/5] docs: more conversions from txt to rst

2024-08-08 Thread Peter Maydell
On Fri, 2 Aug 2024 at 00:25, Richard Henderson wrote: > > On 8/2/24 03:01, Peter Maydell wrote: > > Peter Maydell (5): > >docs/specs/rocker.txt: Convert to rST > >docs/interop/nbd.txt: Convert to rST > >docs/interop/parallels.txt: Convert to rST > >docs/interop/prl-xml.txt: Convert

Re: [PATCH 6/5] docs: Typo fix in live disk backup

2024-08-08 Thread Peter Maydell
On Fri, 2 Aug 2024 at 14:31, Eric Blake wrote: > > Add in the missing space in the section header. > > Fixes: 1084159b31 ("qapi: deprecate drive-backup", v6.2.0) > Signed-off-by: Eric Blake > > --- > > Noticed while figuring out where nbd docs would appear in [1] once [2] > goes live: > [1] https

[PATCH] arm/virt: place power button pin number on a define

2024-08-08 Thread Mauro Carvalho Chehab
Having magic numbers inside the code is not a good idea, as it is error-prone. So, instead, create a macro with the number definition. Link: https://lore.kernel.org/qemu-devel/CAFEAcA-PYnZ-32MRX+PgvzhnoAV80zBKMYg61j2f=ohagfw...@mail.gmail.com/ Signed-off-by: Mauro Carvalho Chehab Suggested-by:

Re: [PATCH v6 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 14:26:26 +0200 Mauro Carvalho Chehab escreveu: > v6: > - PNP0C33 device creation moved to aml-build.c; > - acpi_ghes record functions now use ACPI notify parameter, > instead of source ID; > - the number of source IDs is now automatically calculated; > - some code cleanups a

Re: [PATCH] target/arm: add support for 64-bit PMCCNTR in AArch32 mode

2024-08-08 Thread Peter Maydell
On Fri, 2 Aug 2024 at 02:00, Alex Richardson wrote: > > See > https://developer.arm.com/documentation/ddi0601/2024-06/AArch32-Registers/PMCCNTR--Performance-Monitors-Cycle-Count-Register?lang=en > > Signed-off-by: Alex Richardson > --- > target/arm/helper.c | 6 ++ > 1 file changed, 6 inser

Re: [PATCH v6 08/10] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Markus Armbruster
Mauro Carvalho Chehab writes: > Using the QMP GHESv2 API requires preparing a raw data array > containing a CPER record. > > Add a helper script with subcommands to prepare such data. > > Currently, only ARM Processor error CPER record is supported. > > Signed-off-by: Mauro Carvalho Chehab [...

Re: [PATCH v2 1/3] hw/dma: xilinx_axidma: Correct the txlen value in the descriptor

2024-08-08 Thread Peter Maydell
On Thu, 1 Aug 2024 at 15:07, Jim Shu wrote: > > Currently, txlen is always decremented to 0 before filling to the > descriptor. Keep the origin txlen value to have the correct value of > descriptor status field. > > It will fix the 'tx_bytes' statistic value in linux axi-ethernet driver. > > Signe

Re: [PATCH v6 04/10] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Markus Armbruster
Mauro Carvalho Chehab writes: > Creates a QMP command to be used for generic ACPI APEI hardware error > injection (HEST) via GHESv2. > > The actual GHES code will be added at the followup patch. > > Signed-off-by: Mauro Carvalho Chehab > Signed-off-by: Shiju Jose > Reviewed-by: Jonathan Cameron

Re: [PATCH v2 2/3] hw/dma: xilinx_axidma: Send DMA error IRQ if any memory access is failed

2024-08-08 Thread Peter Maydell
On Thu, 1 Aug 2024 at 15:08, Jim Shu wrote: > > The memory transactions from DMA could have bus-error in some cases. If > it is failed, DMA device should send error IRQs. > > Signed-off-by: Jim Shu > --- > hw/dma/trace-events| 1 + > hw/dma/xilinx_axidma.c | 69 +

Re: [PATCH v2 3/3] hw/net: xilinx_axienet: Fix DMA RX IRQ if ethernet disable RX

2024-08-08 Thread Peter Maydell
On Thu, 1 Aug 2024 at 15:08, Jim Shu wrote: > > When AXI ethernet RX is disabled, it shouldn't send packets to AXI DMA, > which may let AXI DMA to send RX full IRQs. It is aligned with real AXI > DMA/ethernet IP behavior in the FPGA. > > Also, now ethernet RX blocks the RX packets when it is disab

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Peter Xu
On Thu, Aug 08, 2024 at 08:43:22PM +0900, Akihiko Odaki wrote: > On 2024/08/07 5:41, Peter Xu wrote: > > On Mon, Aug 05, 2024 at 04:27:43PM +0900, Akihiko Odaki wrote: > > > On 2024/08/04 22:08, Peter Xu wrote: > > > > On Sun, Aug 04, 2024 at 03:49:45PM +0900, Akihiko Odaki wrote: > > > > > On 2024

Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f

2024-08-08 Thread Xiaoyao Li
On 8/8/2024 6:09 PM, Zhao Liu wrote: Hi Xiaoyao, Patch is generally fine for me. Just a few nits: On Fri, Aug 02, 2024 at 03:24:26AM -0400, Xiaoyao Li wrote: diff --git a/include/hw/i386/topology.h b/include/hw/i386/topology.h index dff49fce1154..b63bce2f4c82 100644 --- a/include/hw/i386/topol

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-08 Thread Eric Blake
On Thu, Aug 08, 2024 at 09:54:26AM GMT, Markus Armbruster wrote: > Eric Blake writes: > > > My next patch needs to convert text from an untrusted input into an > > output representation that is suitable for display on a terminal is > > useful to more than just the json-writer; the text should nor

Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f

2024-08-08 Thread Xiaoyao Li
On 8/8/2024 5:29 PM, Igor Mammedov wrote: On Fri, 2 Aug 2024 03:24:26 -0400 Xiaoyao Li wrote: Currently, QEMU exposes CPUID 0x1f to guest only when necessary, i.e., when topology level that cannot be enumerated by leaf 0xB, e.g., die or module level, are configured for the guest. above impl

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 08 Aug 2024 10:50:33 +0200 Markus Armbruster escreveu: > Mauro Carvalho Chehab writes: > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 98eddf7ae155..655edcb6688c 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -2075,6 +2075,13 @@ F: hw/acpi/ghes.c > > F: include/hw/acpi/

Re: [PATCH v1 1/2] Fixes: Coverity CID 1558827

2024-08-08 Thread Peter Maydell
On Tue, 6 Aug 2024 at 14:50, Chalapathi V wrote: The Subject email for a patch should say what it does in terms of code changes, not just list the bug number or coverity issue number, and it should start with the prefix showing what part of the codebase it is changing. You can look through other

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Peter Xu
On Thu, Aug 08, 2024 at 07:12:14AM -0400, Michael S. Tsirkin wrote: > This is too big of a hammer. People already use what you call "cross > migrate" and have for years. We are not going to stop developing > features just because someone suddenly became aware of some such bit. > If you care, you wi

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Peter Xu
On Thu, Aug 08, 2024 at 08:32:58PM +0900, Akihiko Odaki wrote: > On 2024/08/08 20:12, Michael S. Tsirkin wrote: > > On Thu, Aug 08, 2024 at 08:03:25PM +0900, Akihiko Odaki wrote: > > > On 2024/08/08 19:54, Michael S. Tsirkin wrote: > > > > On Thu, Aug 08, 2024 at 07:52:37PM +0900, Akihiko Odaki wro

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Igor Mammedov
On Thu, 8 Aug 2024 16:11:41 +0200 Mauro Carvalho Chehab wrote: > Em Thu, 08 Aug 2024 10:50:33 +0200 > Markus Armbruster escreveu: > > > Mauro Carvalho Chehab writes: > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index 98eddf7ae155..655edcb6688c 100644 > > > --- a/MAINTAINERS > > > ++

Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force exposing CPUID 0x1f

2024-08-08 Thread Zhao Liu
On Thu, Aug 08, 2024 at 09:59:07PM +0800, Xiaoyao Li wrote: > Date: Thu, 8 Aug 2024 21:59:07 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH] i386/cpu: Introduce enable_cpuid_0x1f to force > exposing CPUID 0x1f > > On 8/8/2024 6:09 PM, Zhao Liu wrote: > > Hi Xiaoyao, > > > > Patch is generally f

Re: [PATCH v1 2/2] Fixes: Coverity CID 1558831

2024-08-08 Thread Peter Maydell
On Wed, 7 Aug 2024 at 21:13, Philippe Mathieu-Daudé wrote: > > Back at this patch since Cédric asked me to look at it. > > On 6/8/24 15:48, Chalapathi V wrote: > > In this commit the following coverity scan defect has been fixed > > CID 1558831: Resource leaks (RESOURCE_LEAK) > >Variable "rs

Re: [PATCH] arm/virt: place power button pin number on a define

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 02:54:52PM +0200, Mauro Carvalho Chehab wrote: > Having magic numbers inside the code is not a good idea, as it > is error-prone. So, instead, create a macro with the number > definition. > > Link: > https://lore.kernel.org/qemu-devel/CAFEAcA-PYnZ-32MRX+PgvzhnoAV80zBKMYg61

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 09:55:49AM -0400, Peter Xu wrote: > On Thu, Aug 08, 2024 at 08:43:22PM +0900, Akihiko Odaki wrote: > > On 2024/08/07 5:41, Peter Xu wrote: > > > On Mon, Aug 05, 2024 at 04:27:43PM +0900, Akihiko Odaki wrote: > > > > On 2024/08/04 22:08, Peter Xu wrote: > > > > > On Sun, Aug

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Markus Armbruster
Igor Mammedov writes: > On Thu, 8 Aug 2024 16:11:41 +0200 > Mauro Carvalho Chehab wrote: > >> Em Thu, 08 Aug 2024 10:50:33 +0200 >> Markus Armbruster escreveu: >> >> > Mauro Carvalho Chehab writes: >> >> > > diff --git a/MAINTAINERS b/MAINTAINERS >> > > index 98eddf7ae155..655edcb6688c 100

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 10:15:36AM -0400, Peter Xu wrote: > On Thu, Aug 08, 2024 at 07:12:14AM -0400, Michael S. Tsirkin wrote: > > This is too big of a hammer. People already use what you call "cross > > migrate" and have for years. We are not going to stop developing > > features just because som

Re: [PATCH v2 04/17] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation

2024-08-08 Thread CLEMENT MATHIEU--DRIF
On 08/08/2024 14:40, 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. > > > On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: >> >> On 05/08/2024 08:27, Zhenzhong Duan wrot

Re: [PATCH v2 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-08-08 Thread CLEMENT MATHIEU--DRIF
On 08/08/2024 14:31, 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. > > > On 8/6/2024 2:35 PM, CLEMENT MATHIEU--DRIF wrote: >> >> On 05/08/2024 08:27, Zhenzhong Duan wrot

  1   2   3   >