aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2022-12-12 22:32:54 +0000
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-03-01 08:22:49 +0000
commitfaa4e80071f5114f8113263b5303ac18e7df0a9d (patch)
tree5e0c73fa00384c4f51410f9f1c665fc8ddfcb8ec
parent820c1aba519bd072ac71c754733f6c86d8b4309f (diff)
downloadqemu-faa4e80071f5114f8113263b5303ac18e7df0a9d.zip
qemu-faa4e80071f5114f8113263b5303ac18e7df0a9d.tar.gz
qemu-faa4e80071f5114f8113263b5303ac18e7df0a9d.tar.bz2
xen: Add XEN_DISABLED mode and make it default
Also set XEN_ATTACH mode in xen_init() to reflect the truth; not that anyone ever cared before. It was *only* ever checked in xen_init_pv() before. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
-rw-r--r--accel/xen/xen-all.c2
-rw-r--r--include/hw/xen/xen.h5
-rw-r--r--softmmu/globals.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index c1b697a..e85e4ae 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -171,6 +171,8 @@ static int xen_init(MachineState *ms)
* opt out of system RAM being allocated by generic code
*/
mc->default_ram_id = NULL;
+
+ xen_mode = XEN_ATTACH;
return 0;
}
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 4d412fd..0398393 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -22,8 +22,9 @@
/* xen-machine.c */
enum xen_mode {
- XEN_EMULATE = 0, // xen emulation, using xenner (default)
- XEN_ATTACH // attach to xen domain created by libxl
+ XEN_DISABLED = 0, /* xen support disabled (default) */
+ XEN_ATTACH, /* attach to xen domain created by libxl */
+ XEN_EMULATE, /* emulate Xen within QEMU */
};
extern uint32_t xen_domid;
diff --git a/softmmu/globals.c b/softmmu/globals.c
index 527edbe..0a44056 100644
--- a/softmmu/globals.c
+++ b/softmmu/globals.c
@@ -63,5 +63,5 @@ QemuUUID qemu_uuid;
bool qemu_uuid_set;
uint32_t xen_domid;
-enum xen_mode xen_mode = XEN_EMULATE;
+enum xen_mode xen_mode = XEN_DISABLED;
bool xen_domid_restrict;