[PATCH 3/9] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Some TYPE_SYS_BUS_DEVICEs can be optionally dynamically plugged on the TYPE_PLATFORM_BUS_DEVICE. Rather than sometimes noting that with comment around the 'user_creatable = true' line in each DeviceRealize handler, introduce an abstract TYPE_DYNAMIC_SYS_BUS_DEVICE class. Signed-off-by: Philippe Ma

[PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Do not explain why _X86_IOMMU devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/amd_iommu.c | 2 -- hw/i386/intel_iommu.c | 2 -- hw/i386/x86-iommu

[PATCH 2/9] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro

2025-01-25 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/sysbus.c | 39 +-- 1 f

[PATCH 1/9] hw/sysbus: Use sizeof(BusState) in main_system_bus_create()

2025-01-25 Thread Philippe Mathieu-Daudé
Rather than using the obscure system_bus_info.instance_size, directly use sizeof(BusState). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/sysbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 9355849ff0a..f713bbfe04f 100644

[PATCH 4/9] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Do not explain why VFIO_PLATFORM devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/amd-xgbe.c | 2 -- hw/vfio/calxeda-xgmac.c | 2 -- hw/vfio/pl

[PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Some SysBus devices can optionally be dynamically plugged onto the sysbus-platform-bus (then virtual guests are aware of mmio mapping and IRQs via device tree / ACPI rules). This series makes these devices explicit by having them implement the DYNAMIC_SYS_BUS_DEVICE class, which only sets 'user_cr

[PATCH 7/9] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the network eTSEC device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/fsl_etsec/etsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/fsl_etsec/etse

[PATCH 5/9] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the RAM FB device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/ramfb-standalone.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/display/ramfb-standal

[PATCH 8/9] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the TPM TIS sysbus device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis_sysbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/tpm/tpm_tis_sysbus.

[RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the legacy Xen backend devices can optionally be plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Remove the implicit TYPE_XENSYSDEV instance_size. Untested, but I'm surprised the legacy devices work because they had a broken instance size (QDev instead

Re: Serious AMD-Vi issue

2025-01-25 Thread Teddy Astie
Hello Elliott, Le 24/01/2025 à 22:31, Elliott Mitchell a écrit : > On Fri, Jan 24, 2025 at 03:31:30PM +0100, Roger Pau Monné wrote: >> On Thu, Jan 25, 2024 at 12:24:53PM -0800, Elliott Mitchell wrote: >>> Apparently this was first noticed with 4.14, but more recently I've been >>> able to reproduc

Re: [PATCH v6 04/15] x86/pvh: Use fixed_percpu_data for early boot GSBASE

2025-01-25 Thread Brian Gerst
On Sat, Jan 25, 2025 at 10:07 AM Borislav Petkov wrote: > > > On Thu, Jan 23, 2025 at 02:07:36PM -0500, Brian Gerst wrote: > > Instead of having a private area for the stack canary, use > > fixed_percpu_data for GSBASE like the native kernel. > > > > Signed-off-by: Brian Gerst > > Reviewed-by: Ar

Re: [PATCH v6 04/15] x86/pvh: Use fixed_percpu_data for early boot GSBASE

2025-01-25 Thread Borislav Petkov
On Thu, Jan 23, 2025 at 02:07:36PM -0500, Brian Gerst wrote: > Instead of having a private area for the stack canary, use > fixed_percpu_data for GSBASE like the native kernel. > > Signed-off-by: Brian Gerst > Reviewed-by: Ard Biesheuvel > --- > arch/x86/platform/pvh/head.S | 15 +

Re: [PATCH v6 04/15] x86/pvh: Use fixed_percpu_data for early boot GSBASE

2025-01-25 Thread Borislav Petkov
On January 25, 2025 5:51:29 PM GMT+01:00, Brian Gerst wrote: >To be fair, this was a copy of an existing comment. Is there a style >guide where all these grammar rules are documented, so I don't have to >keep resending these patches for trivial typos? You don't have to keep resending them for tr

RE: [PATCH v1 08/11] x86/cpufreq: add "cpufreq=amd-pstate,active" para

2025-01-25 Thread Penny, Zheng
[AMD Official Use Only - AMD Internal Distribution Only] Hi, > -Original Message- > From: Jan Beulich > Sent: Thursday, January 9, 2025 7:24 PM > To: Penny, Zheng > Cc: Stabellini, Stefano ; Huang, Ray > ; Ragiadakou, Xenia ; > Andryuk, Jason ; Andrew Cooper > ; Julien Grall ; Stefano S

RE: [PATCH v1 09/11] xen/x86: implement EPP support for the AMD processors

2025-01-25 Thread Penny, Zheng
[AMD Official Use Only - AMD Internal Distribution Only] Hi, > -Original Message- > From: Jan Beulich > Sent: Thursday, January 9, 2025 7:38 PM > To: Penny, Zheng > Cc: Stabellini, Stefano ; Huang, Ray > ; Ragiadakou, Xenia ; > Andryuk, Jason ; Andrew Cooper > ; Roger Pau Monné ; Julien