if ( !may_switch_mode(d) )
return -EACCES;
- if ( !is_pv_32bit_domain(d) )
+ if ( !is_pv_32bit_domain(d) && !is_pvh_32bit_domain(d) )
return 0;
d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0;
if ( !may_switch_mode(d) )
return -EACCES;
- if ( is_pv_32bit_domain(d) )
+ if ( is_pv_32bit_domain(d) || is_pvh_32bit_domain(d) )
return 0;
d->arch.has_32bit_shinfo = 1;
/* The context is a compat-mode one if the target domain is compat-mode;
* we expect the tools to DTRT even in compat-mode callers. */
- compat = is_pv_32bit_domain(d);
+ compat = is_pv_32bit_domain(d) || is_pvh_32bit_domain(d);
#define c(fld) (compat ? (c.cmp->fld) : (c.nat->fld))
flags = c(flags);
case XEN_DOMCTL_get_address_size:
domctl->u.address_size.size =
- is_pv_32bit_domain(d) ? 32 : BITS_PER_LONG;
+ (is_pv_32bit_domain(d) || is_pvh_32bit_domain(d)) ?
+ 32 : BITS_PER_LONG;
copyback = 1;
break;
{
unsigned int i;
const struct domain *d = v->domain;
- bool_t compat = is_pv_32bit_domain(d);
+ bool_t compat = is_pv_32bit_domain(d) || is_pvh_32bit_domain(d);
#define c(fld) (!compat ? (c.nat->fld) : (c.cmp->fld))
if ( !is_pv_domain(d) )
#define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo)
#define is_pv_32bit_domain(d) ((d)->arch.is_32bit_pv)
#define is_pv_32bit_vcpu(v) (is_pv_32bit_domain((v)->domain))
+#define is_pvh_32bit_domain(d) (is_pvh_domain(d) && has_32bit_shinfo(d))
#define is_hvm_pv_evtchn_domain(d) (has_hvm_container_domain(d) && \
d->arch.hvm_domain.irq.callback_via_type == HVMIRQ_callback_vector)