[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/18 V2]: PVH xen: Introduce PVH guest type
>>> On 16.03.13 at 01:32, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote: > @@ -277,8 +280,8 @@ struct domain > struct rangeset *iomem_caps; > struct rangeset *irq_caps; > > - /* Is this an HVM guest? */ > - bool_t is_hvm; > + /* !is_pvh && !is_hvm ==> PV, else PVH or HVM */ > + enum {hvm_guest=1, pvh_guest} guest_type; Even if not used explicitly anywhere right now, please make the PV guest case explicit here too (at once avoiding the =1). Quite likely we'll want to also have the enum have a tag, so we can eventually pass value from this enumeration to functions. I'm also mildly puzzled by you using "_guest" suffixes here rather than, as usual, a common prefix. And of course, please properly format this. > @@ -718,10 +725,14 @@ void watchdog_domain_destroy(struct domain *d); > > #define VM_ASSIST(_d,_t) (test_bit((_t), &(_d)->vm_assist)) > > -#define is_hvm_domain(d) ((d)->is_hvm) > +#define is_hvm_domain(d) ((d)->guest_type == hvm_guest) > #define is_hvm_vcpu(v) (is_hvm_domain(v->domain)) > +#define is_pvh_domain(d) ((d)->guest_type == pvh_guest) > +#define is_pvh_vcpu(v) (is_pvh_domain(v->domain)) > #define is_pinned_vcpu(v) ((v)->domain->is_pinned || \ > cpumask_weight((v)->cpu_affinity) == 1) > +#define is_hvm_or_pvh_domain(d) (is_hvm_domain(d) || is_pvh_domain(d)) > +#define is_hvm_or_pvh_vcpu(v) (is_hvm_or_pvh_domain(v->domain)) These surely can have better names, if they're needed at all: Wouldn't !is_pv_domain() do what you need? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |