|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 2/3] x86/domain: add helpers to simplify emulation flags management
From: Denis Mukhin <dmukhin@xxxxxxxx>
Introduce XEN_X86_EMU_BASELINE and XEN_X86_EMU_OPTIONAL to simplify
d->arch.emulation_flags management in the code.
Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
tools/python/xen/lowlevel/xc/xc.c | 4 +---
xen/include/public/arch-x86/xen.h | 7 +++++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/python/xen/lowlevel/xc/xc.c
b/tools/python/xen/lowlevel/xc/xc.c
index 9feb12ae2b..2c01d47575 100644
--- a/tools/python/xen/lowlevel/xc/xc.c
+++ b/tools/python/xen/lowlevel/xc/xc.c
@@ -159,9 +159,7 @@ static PyObject *pyxc_domain_create(XcObject *self,
#if defined (__i386) || defined(__x86_64__)
if ( config.flags & XEN_DOMCTL_CDF_hvm )
- config.arch.emulation_flags = XEN_X86_EMU_ALL &
- ~(XEN_X86_EMU_VPCI |
- XEN_X86_EMU_USE_PIRQ);
+ config.arch.emulation_flags = XEN_X86_EMU_BASELINE;
#elif defined (__arm__) || defined(__aarch64__)
config.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
#else
diff --git a/xen/include/public/arch-x86/xen.h
b/xen/include/public/arch-x86/xen.h
index fc24879866..55802720f8 100644
--- a/xen/include/public/arch-x86/xen.h
+++ b/xen/include/public/arch-x86/xen.h
@@ -290,6 +290,13 @@ struct xen_arch_domainconfig {
XEN_X86_EMU_VGA | XEN_X86_EMU_IOMMU | \
XEN_X86_EMU_PIT | XEN_X86_EMU_USE_PIRQ |\
XEN_X86_EMU_VPCI)
+
+#define XEN_X86_EMU_OPTIONAL (XEN_X86_EMU_VPCI | \
+ XEN_X86_EMU_USE_PIRQ)
+
+#define XEN_X86_EMU_BASELINE (XEN_X86_EMU_ALL & ~XEN_X86_EMU_OPTIONAL)
+
+ /* Hardware emulation flags. */
uint32_t emulation_flags;
/*
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |