79b470
From f1de31795f1010016beab3b669db821799e5a6d3 Mon Sep 17 00:00:00 2001
79b470
Message-Id: <f1de31795f1010016beab3b669db821799e5a6d3@dist-git>
79b470
From: Michal Privoznik <mprivozn@redhat.com>
79b470
Date: Wed, 7 Oct 2020 18:45:42 +0200
79b470
Subject: [PATCH] qemu: Introduce QEMU_CAPS_NUMA_HMAT capability
79b470
MIME-Version: 1.0
79b470
Content-Type: text/plain; charset=UTF-8
79b470
Content-Transfer-Encoding: 8bit
79b470
79b470
This capability tracks whether QEMU is capable of defining HMAT
79b470
ACPI table for the guest.
79b470
79b470
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
79b470
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
79b470
(cherry picked from commit c2f15f1b1869c1732e529967d1851582409290fb)
79b470
79b470
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518
79b470
79b470
Conflicts:
79b470
- src/qemu/qemu_capabilities.c: The set of capabilities diverged.
79b470
- src/qemu/qemu_capabilities.h: Ditto.
79b470
- tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml: Ditto.
79b470
- tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml: Ditto.
79b470
- tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml: Doesn't exist
79b470
  downstream.
79b470
- tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml: Ditto.
79b470
- tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml: Ditto.
79b470
79b470
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
79b470
Message-Id: <bf15c10c27c81f8f2d5a23568e4aebd216756642.1602087923.git.mprivozn@redhat.com>
79b470
Reviewed-by: Ján Tomko <jtomko@redhat.com>
79b470
---
79b470
 src/qemu/qemu_capabilities.c                      | 2 ++
79b470
 src/qemu/qemu_capabilities.h                      | 1 +
79b470
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
79b470
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 +
79b470
 4 files changed, 5 insertions(+)
79b470
79b470
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
79b470
index 278eaa0009..ce52c51199 100644
79b470
--- a/src/qemu/qemu_capabilities.c
79b470
+++ b/src/qemu/qemu_capabilities.c
79b470
@@ -568,6 +568,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
79b470
               "storage.werror",
79b470
               "pcie-root-port.hotplug",
79b470
               "i8042",
79b470
+              "numa.hmat",
79b470
     );
79b470
 
79b470
 
79b470
@@ -1451,6 +1452,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
79b470
     { "human-monitor-command/$savevm-monitor-nodes", QEMU_CAPS_SAVEVM_MONITOR_NODES },
79b470
     { "blockdev-add/arg-type/+nvme", QEMU_CAPS_DRIVE_NVME },
79b470
     { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
79b470
+    { "set-numa-node/arg-type/+hmat-lb", QEMU_CAPS_NUMA_HMAT },
79b470
 };
79b470
 
79b470
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
79b470
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
79b470
index 15ebcb5077..98cac5b9dc 100644
79b470
--- a/src/qemu/qemu_capabilities.h
79b470
+++ b/src/qemu/qemu_capabilities.h
79b470
@@ -548,6 +548,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
79b470
     QEMU_CAPS_STORAGE_WERROR, /* virtio-blk,scsi-hd.werror */
79b470
     QEMU_CAPS_PCIE_ROOT_PORT_HOTPLUG, /* pcie-root-port.hotplug */
79b470
     QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */
79b470
+    QEMU_CAPS_NUMA_HMAT, /* -numa hmat */
79b470
 
79b470
     QEMU_CAPS_LAST /* this must always be the last item */
79b470
 } virQEMUCapsFlags;
79b470
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
79b470
index 140a466910..92da5cbd94 100644
79b470
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
79b470
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
79b470
@@ -181,6 +181,7 @@
79b470
   <flag name='cpu.kvm-no-adjvtime'/>
79b470
   <flag name='vhost-user-fs'/>
79b470
   <flag name='storage.werror'/>
79b470
+  <flag name='numa.hmat'/>
79b470
   <version>4002050</version>
79b470
   <kvmVersion>0</kvmVersion>
79b470
   <microcodeVersion>61700241</microcodeVersion>
79b470
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
79b470
index 733e6b1eb4..0b841a49ac 100644
79b470
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
79b470
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
79b470
@@ -226,6 +226,7 @@
79b470
   <flag name='storage.werror'/>
79b470
   <flag name='pcie-root-port.hotplug'/>
79b470
   <flag name='i8042'/>
79b470
+  <flag name='numa.hmat'/>
79b470
   <version>4002091</version>
79b470
   <kvmVersion>0</kvmVersion>
79b470
   <microcodeVersion>43100241</microcodeVersion>
79b470
-- 
79b470
2.29.2
79b470