[PATCH v5 0/2] hw/i386/amd_iommu: Add migration support

2025-05-04 Thread Suravee Suthikulpanit
://lore.kernel.org/all/20250206051856.323651-1-suravee.suthikulpa...@amd.com) * Add patch 1/2 Suravee Suthikulpanit (2): hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI

[PATCH v5 2/2] hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device

2025-05-04 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Also change devtab_len type from size_t to uint64_t to avoid 32-bit build issue. Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c

[PATCH v5 1/2] hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation

2025-05-04 Thread Suravee Suthikulpanit
n,xtsup=on,pci-id=iommupci0 \ For backward-compatibility, internally create the AMDVI-PCI device if not specified on the CLI. Co-developed-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé Signed-off-by: Suravee Suthikulpanit --- hw/i386/acpi-build.c | 8 +++ hw/i386/amd_iommu.c |

[PATCH v2] hw/i386/amd_iommu: Assign pci-id 0x1419 for the AMD IOMMU device

2025-03-24 Thread Suravee Suthikulpanit
the issue. This advertise the IOMMU as the AMD IOMMU device for Family 15h (Models 10h-1fh). Signed-off-by: Suravee Suthikulpanit --- Changes from v1 (https://lore.kernel.org/all/20250304183747.639382-1-suravee.suthikulpa...@amd.com/) * Use the existing device id 0x1419 instead of the proposed new

[PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-04 Thread Suravee Suthikulpanit
vendor id to Red Hat and request a new QEMU-specific device id. [1] https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/specifications/48882_IOMMU.pdf Cc: Gerd Hoffmann Signed-off-by: Suravee Suthikulpanit --- docs/specs/pci-ids.rst | 2 ++ hw/i386/amd_iommu.c| 3 ++- include

[PATCH v4 0/2] hw/i386/amd_iommu: Add migration support

2025-03-04 Thread Suravee Suthikulpanit
-suravee.suthikulpa...@amd.com) * Patch 1: Fix build error * Patch 2: Fix 32-bit build issue. Changes from v2: (https://lore.kernel.org/all/20250206051856.323651-1-suravee.suthikulpa...@amd.com) * Add patch 1/2 Suravee Suthikulpanit (2): hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu

[PATCH v4 2/2] hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device

2025-03-04 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Also change devtab_len type from size_t to uint64_t to avoid 32-bit build issue. Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c

[PATCH v4 1/2] hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation

2025-03-04 Thread Suravee Suthikulpanit
nternally create the AMDVI-PCI device if not specified on the CLI. Co-developed-by: Daniel P. Berrangé Signed-off-by: Suravee Suthikulpanit --- hw/i386/acpi-build.c | 8 +++ hw/i386/amd_iommu.c | 52 +++- hw/i386/amd_iommu.h | 3 ++- 3 files changed, 38

[PATCH v3 2/2] hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device

2025-02-11 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 58 - 1 file changed, 52 insertions

[PATCH v3 0/2] hw/i386/amd_iommu: Add migration support

2025-02-11 Thread Suravee Suthikulpanit
-suravee.suthikulpa...@amd.com) * Add patch 1/2 Suravee Suthikulpanit (2): hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device hw/i386/acpi-build.c

[PATCH v3 1/2] hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation

2025-02-11 Thread Suravee Suthikulpanit
ate the AMDVI-PCI device if not specified on the CLI. Co-developed-by: Daniel P. Berrangé Signed-off-by: Suravee Suthikulpanit --- hw/i386/acpi-build.c | 8 +++ hw/i386/amd_iommu.c | 53 +++- hw/i386/amd_iommu.h | 3 ++- 3 files changed, 39 insertions

[PATCH v2] hw/i386/amd_iommu: Allow migration

2025-02-05 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by: Suravee Suthikulpanit --- Changes from v1: (https://lore.kernel.org/all/9ecffa7a-f4c6-45a5-a066-84826ccb5...@amd.com/T

[PATCH] hw/i386/amd_iommu: Allow migration

2024-11-19 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 36 +++- 1 file changed, 35 insertions(+), 1

[PATCH] hw/i386/pc: Clean up pc_machine_initfn

2023-06-09 Thread Suravee Suthikulpanit
To use the newly introduced PC machine class local variable. Suggedted-by: Igor Mammedov Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 33ffb03a32..f8d105e829 100644 --- a/hw/i386/pc.c

[PATCH v6 1/2] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models

2023-06-07 Thread Suravee Suthikulpanit
with large number of vcpus. "SMBIOS 2.1 table length 66822 exceeds 65535" Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 4 +++- hw/i386/pc_piix.c| 5 + hw/i386/pc_q35.c | 5 + include/hw/i386/pc.h | 1 + 4 files changed, 14 insertions(+), 1 deletio

[PATCH v6 0/2] hw/i386/pc: Update max_cpus and default to SMBIOS

2023-06-07 Thread Suravee Suthikulpanit
: (https://lore.kernel.org/qemu-devel/20230607024939.703991-1-suravee.suthikulpa...@amd.com/T/#m5a9f0d0e2355aebf81501355a1bf349a9929f4bb) * Patch 1: Get rid of pc_machine_init_smbios() and simplify the logic per Igor's suggestion. * Patch 2: Added reviewed-by tag. Thank you, Suravee Su

[PATCH v6 2/2] pc: q35: Bump max_cpus to 1024

2023-06-07 Thread Suravee Suthikulpanit
: kvm_get_vcpu failed (xxx): Invalid argument Also, keep max_cpus at 288 for machine version 8.0 and older. Cc: Igor Mammedov Cc: Daniel P. Berrangé Cc: Michael S. Tsirkin Cc: Julia Suvorova Reviewed-by: Igor Mammedov Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 3 ++- 1 file changed, 2

[PATCH v5 2/3] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models

2023-06-06 Thread Suravee Suthikulpanit
with large number of vcpus. "SMBIOS 2.1 table length 66822 exceeds 65535" Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 6 +- hw/i386/pc_piix.c| 5 + hw/i386/pc_q35.c | 5 + include/hw/i386/pc.h | 1 + 4 files changed, 16 insertions(+), 1 deletio

[PATCH v5 1/3] hw/i386/pc: Refactor logic to set SMBIOS defaults

2023-06-06 Thread Suravee Suthikulpanit
here is no functional change. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 24 +++- hw/i386/pc_piix.c | 9 - hw/i386/pc_q35.c | 8 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index bb62c994fa..

[PATCH v5 3/3] pc: q35: Bump max_cpus to 1024

2023-06-06 Thread Suravee Suthikulpanit
: kvm_get_vcpu failed (xxx): Invalid argument Also, keep max_cpus at 288 for machine version 8.0 and older. Cc: Igor Mammedov Cc: Daniel P. Berrangé Cc: Michael S. Tsirkin Cc: Julia Suvorova Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v5 0/3] hw/i386/pc: Update max_cpus and default to SMBIOS

2023-06-06 Thread Suravee Suthikulpanit
comment. Changes from V2: (https://lore.kernel.org/qemu-devel/20230531225127.331998-1-suravee.suthikulpa...@amd.com/) * Add patch 1. Changes from V1: (https://lore.kernel.org/all/ynkdgsii1vfvx...@redhat.com/T/) * Bump from 512 to KVM_MAX_VCPUS (per Igor's suggestion) Thank you, Suravee Su

[PATCH v4 1/3] hw/i386/pc: Refactor logic to set SMBIOS set defaults

2023-06-05 Thread Suravee Suthikulpanit
In preparation for subsequent code to upgrade default SMBIOS entry point type. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 12 hw/i386/pc_piix.c | 9 - hw/i386/pc_q35.c | 8 3 files changed, 12 insertions(+), 17

[PATCH v4 0/3] hw/i386/pc: Update max_cpus and default to SMBIOS

2023-06-05 Thread Suravee Suthikulpanit
-suravee.suthikulpa...@amd.com/) * Add patch 1. Changes from V1: (https://lore.kernel.org/all/ynkdgsii1vfvx...@redhat.com/T/) * Bump from 512 to KVM_MAX_VCPUS (per Igor's suggestion) Thank you, Suravee Suravee Suthikulpanit (3): hw/i386/pc: Refactor logic to set SMBIOS set defaults hw/i3

[PATCH v4 2/3] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models

2023-06-05 Thread Suravee Suthikulpanit
with large number of vcpus. "SMBIOS 2.1 table length 66822 exceeds 65535" Note that user can still override the entry point tyme w/ QEMU option "-M ..., smbios-entry-point-type=[32|64]. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 14 +- hw/i386/pc

[PATCH v4 3/3] pc: q35: Bump max_cpus to 1024

2023-06-05 Thread Suravee Suthikulpanit
: kvm_get_vcpu failed (xxx): Invalid argument Cc: Igor Mammedov Cc: Daniel P. Berrangé Cc: Michael S. Tsirkin Cc: Julia Suvorova Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index

[PATCH v3 0/2] hw/i386/pc: Update max_cpus and default to SMBIOS

2023-06-02 Thread Suravee Suthikulpanit
: (https://lore.kernel.org/qemu-devel/20230531225127.331998-1-suravee.suthikulpa...@amd.com/) * Add patch 1. Changes from V1: (https://lore.kernel.org/all/ynkdgsii1vfvx...@redhat.com/T/) * Bump from 512 to KVM_MAX_VCPUS (per Igor's suggestion) Thank you, Suravee Suravee Suthikulpanit (2):

[PATCH v3 2/2] pc: q35: Bump max_cpus to 1024

2023-06-02 Thread Suravee Suthikulpanit
: kvm_get_vcpu failed (xxx): Invalid argument Cc: Igor Mammedov Cc: Daniel P. Berrangé Cc: Michael S. Tsirkin Cc: Julia Suvorova Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index

[PATCH v3 1/2] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models

2023-06-02 Thread Suravee Suthikulpanit
with large number of vcpus. "SMBIOS 2.1 table length 66822 exceeds 65535" Note that user can still override the entry point tyme w/ QEMU option "-M ..., smbios-entry-point-type=[32|64]. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc.c | 5 - hw/i386/pc

[PATCH v2] pc: q35: Bump max_cpus to 1024

2023-05-31 Thread Suravee Suthikulpanit
: kvm_get_vcpu failed (xxx): Invalid argument Signed-off-by: Suravee Suthikulpanit --- Changes from V1: (https://lore.kernel.org/all/ynkdgsii1vfvx...@redhat.com/T/) * Bump from 512 to KVM_MAX_VCPUS (per Igor's suggestion) Note: From the last discussion, Daniel mentioned that SMBIO 2.1 tables might

Re: [RFC] KVM / QEMU: Introduce Interface for Querying APICv Info

2022-05-19 Thread Suravee Suthikulpanit
On 5/20/22 12:26 PM, Chao Gao wrote: On Fri, May 20, 2022 at 10:30:40AM +0700, Suthikulpanit, Suravee wrote: Hi All, Currently, we don't have a good way to check whether APICV is active on a VM. Normally, For AMD SVM AVIC, users either have to check for trace point, or using "perf kvm stat live

Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-19 Thread Suravee Suthikulpanit
On 5/19/22 7:37 PM, Igor Mammedov wrote: On Thu, 19 May 2022 13:53:49 +0700 Suravee Suthikulpanit wrote: On 5/13/22 6:23 PM, Michael S. Tsirkin wrote: On Mon, May 09, 2022 at 09:12:49AM +0200, Igor Mammedov wrote: On Wed, 4 May 2022 08:16:39 -0500 Suravee Suthikulpanit wrote: This

Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-18 Thread Suravee Suthikulpanit
On 5/13/22 6:23 PM, Michael S. Tsirkin wrote: On Mon, May 09, 2022 at 09:12:49AM +0200, Igor Mammedov wrote: On Wed, 4 May 2022 08:16:39 -0500 Suravee Suthikulpanit wrote: This is the maximum number of vCPU supported by the AMD x2APIC virtualization. Signed-off-by: Suravee Suthikulpanit

[PATCH] pc: q35: Bump max_cpus to 512

2022-05-04 Thread Suravee Suthikulpanit
This is the maximum number of vCPU supported by the AMD x2APIC virtualization. Signed-off-by: Suravee Suthikulpanit --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 302288342a..e82b1c690d 100644 --- a/hw/i386

Re: [Qemu-devel] [PATCH 6/6] x86_iommu/amd: Enable Guest virtual APIC support

2018-09-13 Thread Suravee Suthikulpanit
Brijesh/Peter, On 9/13/18 4:14 AM, Brijesh Singh wrote: On 09/11/2018 11:52 PM, Peter Xu wrote: ... diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5c2c638..1cbc8ba 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2565,7 +2565,8 @@ build_amd_iommu(GArray *tabl

Re: [Qemu-devel] [PATCH 2/6] x86_iommu/amd: Prepare for interrupt remap support

2018-09-13 Thread Suravee Suthikulpanit
Brijesh / Peter, On 9/13/18 10:15 AM, Peter Xu wrote: On Wed, Sep 12, 2018 at 01:59:06PM -0500, Brijesh Singh wrote: [...] } return &iommu_as[devfn]->as; } @@ -1172,6 +1274,10 @@ static void amdvi_realize(DeviceState *dev, Error **err) return; } +/* Pseu

Re: [Qemu-devel] [PATCH 5/6] x86_iommu/amd: Add interrupt remap support when VAPIC is enabled

2018-09-13 Thread Suravee Suthikulpanit
defined in Table 22 and Figure 17 from IOMMU spec. Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Tom Lendacky Cc: Suravee Suthikulpanit Signed-off-by: Brijesh Singh --- hw/i386/amd_iom

Re: [Qemu-devel] [PATCH 6/6] x86_iommu/amd: Enable Guest virtual APIC support

2018-09-13 Thread Suravee Suthikulpanit
: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Tom Lendacky Cc: Suravee Suthikulpanit Signed-off-by: Brijesh Singh --- hw/i386/acpi-build.c | 3 ++- hw/i386/amd_iommu.h | 2 +- 2 files changed, 3 insertions(+), 2