[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM



>>> On 28.08.18 at 12:41, <wei.liu2@xxxxxxxxxx> wrote:
> On Mon, Aug 27, 2018 at 10:03:11AM +0100, Wei Liu wrote:
>> > +#ifdef CONFIG_HVM
>> >  #define hap_enabled(d)  ((d)->arch.hvm_domain.hap_enabled)
>> > +#else
>> > +#define hap_enabled(d)  false
>> > +#endif
>> 
>> Hmm... I thought I had rewritten this to be a static inline function.
>> 
>> I will try to make it a static inline function.
>> 
> 
> It all came back: The reason I didn't turn it into a static inline
> function was because asm/hvm/domain.h didn't have struct domain
> available. To fix that it would seem to require more code churn to me.
> 
> I will keep hap_enabled a macro.

But then please at least evaluate its argument, to avoid any
need to add __maybe_unused to local variables.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.