qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 11/11] exec: Restrict confidential-guest-support.h to sysemu/


From: Philippe Mathieu-Daudé
Subject: [PATCH 11/11] exec: Restrict confidential-guest-support.h to sysemu/
Date: Mon, 17 May 2021 13:11:11 +0200

To make it clearer the confidential-guest-support.h header is
sysemu specific, move it to the sysemu/ directory.

Patch created mechanically using:

  $ sed -i 
s,exec/confidential-guest-support.h,sysemu/confidential-guest-support.h, \
    $(git grep -l exec/confidential-guest-support.h)

Then the #ifdef'ry conditional on CONFIG_USER_ONLY has
been replaced by an #error.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/{exec => sysemu}/confidential-guest-support.h | 6 +++---
 backends/confidential-guest-support.c                 | 2 +-
 hw/core/machine.c                                     | 2 +-
 hw/ppc/pef.c                                          | 2 +-
 hw/s390x/pv.c                                         | 2 +-
 softmmu/vl.c                                          | 2 +-
 target/i386/sev.c                                     | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)
 rename include/{exec => sysemu}/confidential-guest-support.h (95%)

diff --git a/include/exec/confidential-guest-support.h 
b/include/sysemu/confidential-guest-support.h
similarity index 95%
rename from include/exec/confidential-guest-support.h
rename to include/sysemu/confidential-guest-support.h
index ba2dd4b5dfc..3b52d086642 100644
--- a/include/exec/confidential-guest-support.h
+++ b/include/sysemu/confidential-guest-support.h
@@ -18,7 +18,9 @@
 #ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H
 #define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H
 
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
 
 #include "qom/object.h"
 
@@ -57,6 +59,4 @@ typedef struct ConfidentialGuestSupportClass {
     ObjectClass parent;
 } ConfidentialGuestSupportClass;
 
-#endif /* !CONFIG_USER_ONLY */
-
 #endif /* QEMU_CONFIDENTIAL_GUEST_SUPPORT_H */
diff --git a/backends/confidential-guest-support.c 
b/backends/confidential-guest-support.c
index 052fde8db04..bc141504451 100644
--- a/backends/confidential-guest-support.c
+++ b/backends/confidential-guest-support.c
@@ -13,7 +13,7 @@
 
 #include "qemu/osdep.h"
 
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 
 OBJECT_DEFINE_ABSTRACT_TYPE(ConfidentialGuestSupport,
                             confidential_guest_support,
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 1bf0e687b94..6ab11140ef0 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -32,7 +32,7 @@
 #include "hw/mem/nvdimm.h"
 #include "migration/global_state.h"
 #include "migration/vmstate.h"
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-pci.h"
 
diff --git a/hw/ppc/pef.c b/hw/ppc/pef.c
index 573be3ed79b..d469326a480 100644
--- a/hw/ppc/pef.c
+++ b/hw/ppc/pef.c
@@ -14,7 +14,7 @@
 #include "qom/object_interfaces.h"
 #include "sysemu/kvm.h"
 #include "migration/blocker.h"
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 #include "hw/ppc/pef.h"
 
 #define TYPE_PEF_GUEST "pef-guest"
diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
index 401b63d6cb6..799d8b047b2 100644
--- a/hw/s390x/pv.c
+++ b/hw/s390x/pv.c
@@ -17,7 +17,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
 #include "qom/object_interfaces.h"
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 #include "hw/s390x/ipl.h"
 #include "hw/s390x/pv.h"
 
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 93e78469bce..d79c15cd4dc 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -102,7 +102,7 @@
 #include "qemu/plugin.h"
 #include "qemu/queue.h"
 #include "sysemu/arch_init.h"
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 
 #include "ui/qemu-spice.h"
 #include "qapi/string-input-visitor.h"
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 41f7800b5f7..f2a92cf9126 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -31,7 +31,7 @@
 #include "migration/blocker.h"
 #include "qom/object.h"
 #include "monitor/monitor.h"
-#include "exec/confidential-guest-support.h"
+#include "sysemu/confidential-guest-support.h"
 #include "hw/i386/pc.h"
 
 #define TYPE_SEV_GUEST "sev-guest"
-- 
2.26.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]