|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 02/23] xen: is_hvm_{domain, vcpu} should evaluate to false when !CONFIG_HVM
>>> On 26.08.18 at 14:19, <wei.liu2@xxxxxxxxxx> wrote:
> Turn them into static inline functions which evaluate to false when
> CONFIG_HVM is not set. ARM won't be broken because ARM guests are set
> to PV type in the hypervisor.
>
> But ARM has plan to switch to HVM guest type inside the hypervisor, so
> preemptively introduce CONFIG_HVM for ARM here.
But is setting this to Y then correct at this point?
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -879,8 +879,17 @@ void watchdog_domain_destroy(struct domain *d);
>
> #define is_pv_domain(d) ((d)->guest_type == guest_type_pv)
> #define is_pv_vcpu(v) (is_pv_domain((v)->domain))
> -#define is_hvm_domain(d) ((d)->guest_type == guest_type_hvm)
> -#define is_hvm_vcpu(v) (is_hvm_domain(v->domain))
> +
> +static inline bool is_hvm_domain(const struct domain *d)
> +{
> + return IS_ENABLED(CONFIG_HVM) ? d->guest_type == guest_type_hvm : false;
Ultimately I think the guest_type_{hvm,pv} enumerators should only
be enabled when CONFIG_{HVM,PV}, so I think #ifdef CONFIG_HVM
would be the better choice here. But of course we can do this further
conversion at a later point, so
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |