- virt-host-validate: Fix IOMMU output on aarch64 - cpu: revert: Modify virCPUarmCompare to perform compare actions - cpu: Modify virCPUarmCompare to perform compare actions - add phytium s5000c support on arm architecture for capability Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 44c38ffc1edcbe107228e1bfb254fbccee15d88c)
103 lines
5.0 KiB
Diff
103 lines
5.0 KiB
Diff
From b8f4d98289a0746675edb036978bd02ab5f59c21 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fabiano@fidencio.org>
|
|
Date: Tue, 8 Jun 2021 22:16:42 +0200
|
|
Subject: [PATCH] virt-host-validate: Fix IOMMU output on aarch64
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
virt-host-validate should print "Checking for device assignment IOMMU
|
|
support" for all architectures, not only for Intel / AMD.
|
|
|
|
This is the output without the patch:
|
|
```
|
|
[fidencio@dentola libvirt]$ virt-host-validate
|
|
QEMU: comprobando if device /dev/kvm exists : PASA
|
|
QEMU: comprobando if device /dev/kvm is accessible : PASA
|
|
QEMU: comprobando if device /dev/vhost-net exists : PASA
|
|
QEMU: comprobando if device /dev/net/tun exists : PASA
|
|
QEMU: comprobando for cgroup 'cpu' controller support : PASA
|
|
QEMU: comprobando for cgroup 'cpuacct' controller support : PASA
|
|
QEMU: comprobando for cgroup 'cpuset' controller support : PASA
|
|
QEMU: comprobando for cgroup 'memory' controller support : PASA
|
|
QEMU: comprobando for cgroup 'devices' controller support : ADVERTENCIA (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
|
|
QEMU: comprobando for cgroup 'blkio' controller support : PASA
|
|
ADVERTENCIA (Unknown if this platform has IOMMU support)
|
|
QEMU: comprobando for secure guest support : ADVERTENCIA (Unknown if this platform has Secure Guest support)
|
|
|
|
```
|
|
|
|
This is the output with the patch:
|
|
```
|
|
[fidencio@dentola libvirt]$ ./build/tools/virt-host-validate
|
|
QEMU: Checking if device /dev/kvm exists : PASS
|
|
QEMU: Checking if device /dev/kvm is accessible : PASS
|
|
QEMU: Checking if device /dev/vhost-net exists : PASS
|
|
QEMU: Checking if device /dev/net/tun exists : PASS
|
|
QEMU: Checking for cgroup 'cpu' controller support : PASS
|
|
QEMU: Checking for cgroup 'cpuacct' controller support : PASS
|
|
QEMU: Checking for cgroup 'cpuset' controller support : PASS
|
|
QEMU: Checking for cgroup 'memory' controller support : PASS
|
|
QEMU: Checking for cgroup 'devices' controller support : WARN (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)
|
|
QEMU: Checking for cgroup 'blkio' controller support : PASS
|
|
QEMU: Checking for device assignment IOMMU support : WARN (Unknown if this platform has IOMMU support)
|
|
QEMU: Checking for secure guest support : WARN (Unknown if this platform has Secure Guest support)
|
|
```
|
|
|
|
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
---
|
|
tools/virt-host-validate-common.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
|
|
index fbefbada96..a78903fb38 100644
|
|
--- a/tools/virt-host-validate-common.c
|
|
+++ b/tools/virt-host-validate-common.c
|
|
@@ -339,6 +339,8 @@ int virHostValidateIOMMU(const char *hvname,
|
|
DIR *dir;
|
|
int rc;
|
|
|
|
+ virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU support"));
|
|
+
|
|
flags = virHostValidateGetCPUFlags();
|
|
|
|
if (flags && virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX))
|
|
@@ -349,7 +351,6 @@ int virHostValidateIOMMU(const char *hvname,
|
|
virBitmapFree(flags);
|
|
|
|
if (isIntel) {
|
|
- virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU support"));
|
|
if (access("/sys/firmware/acpi/tables/DMAR", F_OK) == 0) {
|
|
virHostMsgPass();
|
|
bootarg = "intel_iommu=on";
|
|
@@ -361,7 +362,6 @@ int virHostValidateIOMMU(const char *hvname,
|
|
return -1;
|
|
}
|
|
} else if (isAMD) {
|
|
- virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU support"));
|
|
if (access("/sys/firmware/acpi/tables/IVRS", F_OK) == 0) {
|
|
virHostMsgPass();
|
|
bootarg = "iommu=pt iommu=1";
|
|
@@ -373,7 +373,7 @@ int virHostValidateIOMMU(const char *hvname,
|
|
return -1;
|
|
}
|
|
} else if (ARCH_IS_PPC64(arch)) {
|
|
- /* Empty Block */
|
|
+ virHostMsgPass();
|
|
} else if (ARCH_IS_S390(arch)) {
|
|
/* On s390x, we skip the IOMMU check if there are no PCI
|
|
* devices (which is quite usual on s390x). If there are
|
|
@@ -385,6 +385,7 @@ int virHostValidateIOMMU(const char *hvname,
|
|
VIR_DIR_CLOSE(dir);
|
|
if (rc <= 0)
|
|
return 0;
|
|
+ virHostMsgPass();
|
|
} else {
|
|
virHostMsgFail(level,
|
|
"Unknown if this platform has IOMMU support");
|
|
--
|
|
2.41.0.windows.1
|
|
|