xen/domctl: Drop guest suffix from XEN_DOMCTL_CDF_hvm

The suffix is redundant, and dropping it helps to simplify the Ocaml/C
ABI checking.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Andrew Cooper authored and Ian Jackson committed 2019-09-10 14:44:33 +01:00
1 parent 006a69d25c
commit 4a12cba289
10 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -557,7 +557,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config *d_config,
};
if (info->type != LIBXL_DOMAIN_TYPE_PV) {
create.flags |= XEN_DOMCTL_CDF_hvm_guest;
create.flags |= XEN_DOMCTL_CDF_hvm;
create.flags |=
libxl_defbool_val(info->hap) ? XEN_DOMCTL_CDF_hap : 0;
create.flags |=
+1 -1
View File
@@ -155,7 +155,7 @@ static PyObject *pyxc_domain_create(XcObject *self,
}
#if defined (__i386) || defined(__x86_64__)
if ( config.flags & XEN_DOMCTL_CDF_hvm_guest )
if ( config.flags & XEN_DOMCTL_CDF_hvm )
config.arch.emulation_flags = (XEN_X86_EMU_ALL & ~XEN_X86_EMU_VPCI);
#elif defined (__arm__) || defined(__aarch64__)
config.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
+1 -1
View File
@@ -608,7 +608,7 @@ int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
{
unsigned int max_vcpus;
if ( config->flags != (XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap) )
if ( config->flags != (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap) )
{
dprintk(XENLOG_INFO, "Unsupported configuration %#x\n", config->flags);
return -EINVAL;
+1 -1
View File
@@ -2070,7 +2070,7 @@ void __init create_domUs(void)
struct xen_domctl_createdomain d_cfg = {
.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE,
.arch.nr_spis = 0,
.flags = XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap,
.flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap,
.max_evtchn_port = -1,
.max_grant_frames = 64,
.max_maptrack_frames = 1024,
+1 -1
View File
@@ -797,7 +797,7 @@ void __init start_xen(unsigned long boot_phys_offset,
struct bootmodule *xen_bootmodule;
struct domain *dom0;
struct xen_domctl_createdomain dom0_cfg = {
.flags = XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap,
.flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap,
.max_evtchn_port = -1,
.max_grant_frames = gnttab_dom0_frames(),
.max_maptrack_frames = opt_max_maptrack_frames,
+2 -2
View File
@@ -442,7 +442,7 @@ void arch_vcpu_destroy(struct vcpu *v)
int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
{
bool hvm = config->flags & XEN_DOMCTL_CDF_hvm_guest;
bool hvm = config->flags & XEN_DOMCTL_CDF_hvm;
unsigned int max_vcpus;
if ( hvm ? !hvm_enabled : !IS_ENABLED(CONFIG_PV) )
@@ -473,7 +473,7 @@ int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
return -EINVAL;
}
if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) )
if ( !(config->flags & XEN_DOMCTL_CDF_hvm) )
/*
* It is only meaningful for XEN_DOMCTL_CDF_oos_off to be clear
* for HVM guests.
+1 -1
View File
@@ -1723,7 +1723,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
if ( opt_dom0_pvh )
{
dom0_cfg.flags |= (XEN_DOMCTL_CDF_hvm_guest |
dom0_cfg.flags |= (XEN_DOMCTL_CDF_hvm |
((hvm_hap_supported() && !opt_dom0_shadow) ?
XEN_DOMCTL_CDF_hap : 0));
+2 -2
View File
@@ -297,7 +297,7 @@ static void _domain_destroy(struct domain *d)
static int sanitise_domain_config(struct xen_domctl_createdomain *config)
{
if ( config->flags & ~(XEN_DOMCTL_CDF_hvm_guest |
if ( config->flags & ~(XEN_DOMCTL_CDF_hvm |
XEN_DOMCTL_CDF_hap |
XEN_DOMCTL_CDF_s3_integrity |
XEN_DOMCTL_CDF_oos_off |
@@ -313,7 +313,7 @@ static int sanitise_domain_config(struct xen_domctl_createdomain *config)
return -EINVAL;
}
if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) &&
if ( !(config->flags & XEN_DOMCTL_CDF_hvm) &&
(config->flags & XEN_DOMCTL_CDF_hap) )
{
dprintk(XENLOG_INFO, "HAP requested for non-HVM guest\n");
+2 -2
View File
@@ -50,8 +50,8 @@ struct xen_domctl_createdomain {
uint32_t ssidref;
xen_domain_handle_t handle;
/* Is this an HVM guest (as opposed to a PV guest)? */
#define _XEN_DOMCTL_CDF_hvm_guest 0
#define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest)
#define _XEN_DOMCTL_CDF_hvm 0
#define XEN_DOMCTL_CDF_hvm (1U<<_XEN_DOMCTL_CDF_hvm)
/* Use hardware-assisted paging if available? */
#define _XEN_DOMCTL_CDF_hap 1
#define XEN_DOMCTL_CDF_hap (1U<<_XEN_DOMCTL_CDF_hap)
+2 -2
View File
@@ -912,7 +912,7 @@ void watchdog_domain_destroy(struct domain *d);
static inline bool is_pv_domain(const struct domain *d)
{
return IS_ENABLED(CONFIG_PV) &&
evaluate_nospec(!(d->options & XEN_DOMCTL_CDF_hvm_guest));
evaluate_nospec(!(d->options & XEN_DOMCTL_CDF_hvm));
}
static inline bool is_pv_vcpu(const struct vcpu *v)
@@ -944,7 +944,7 @@ static inline bool is_pv_64bit_vcpu(const struct vcpu *v)
static inline bool is_hvm_domain(const struct domain *d)
{
return IS_ENABLED(CONFIG_HVM) &&
evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm_guest);
evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm);
}
static inline bool is_hvm_vcpu(const struct vcpu *v)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.