[PATCH 4/5] qemu: Taint guests emulating a deprecated architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having this in the log will make it easier for developer to
downgrade the priority of bugs that only affect deprecated
architectures and focus their efforts where it matters.
---
 src/conf/domain_conf.c | 3 ++-
 src/conf/domain_conf.h | 1 +
 src/qemu/qemu_domain.c | 3 +++
 src/util/virarch.h     | 3 +++
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1b0a55b..b290dcd 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -93,7 +93,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
               "host-cpu",
               "hook-script",
               "cdrom-passthrough",
-              "custom-dtb");
+              "custom-dtb",
+              "deprecated-architecture");
 
 VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
               "none",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 47eaace..f2c54fe 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2374,6 +2374,7 @@ typedef enum {
     VIR_DOMAIN_TAINT_HOOK,             /* Domain (possibly) changed via hook script */
     VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
     VIR_DOMAIN_TAINT_CUSTOM_DTB,       /* Custom device tree blob was specified */
+    VIR_DOMAIN_TAINT_DEPRECATED_ARCH,  /* Deprecated architecture */
 
     VIR_DOMAIN_TAINT_LAST
 } virDomainTaintFlags;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 589eb18..0e9b8db 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4222,6 +4222,9 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
     if (obj->def->os.dtb)
         qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_DTB, logCtxt);
 
+    if (ARCH_IS_DEPRECATED(obj->def->os.arch))
+        qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_DEPRECATED_ARCH, logCtxt);
+
     virObjectUnref(cfg);
 }
 
diff --git a/src/util/virarch.h b/src/util/virarch.h
index af5ff83..80b3534 100644
--- a/src/util/virarch.h
+++ b/src/util/virarch.h
@@ -90,6 +90,9 @@ typedef enum {
 # define ARCH_IS_S390(arch) ((arch) == VIR_ARCH_S390 ||\
                              (arch) == VIR_ARCH_S390X)
 
+# define ARCH_IS_DEPRECATED(arch) ((arch) == VIR_ARCH_X86_64 || \
+                                   (arch) == VIR_ARCH_I686)
+
 typedef enum {
     VIR_ARCH_LITTLE_ENDIAN,
     VIR_ARCH_BIG_ENDIAN,
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux