>>> On 17.08.18 at 17:12, <wei.l...@citrix.com> wrote:

For the subject, do you perhaps mean "call some functions for HVM guests
only"? Otherwise, putting emphasis on "some", the sense gets sort of
inverted from what I think you mean.

> --- a/xen/arch/x86/hvm/vmsi.c
> +++ b/xen/arch/x86/hvm/vmsi.c
> @@ -561,7 +561,9 @@ void msixtbl_init(struct domain *d)
>  {
>      struct hvm_io_handler *handler;
>  
> -    if ( !is_hvm_domain(d) || !has_vlapic(d) || msixtbl_initialised(d) )
> +    ASSERT(is_hvm_domain(d));
> +
> +    if ( !has_vlapic(d) || msixtbl_initialised(d) )
>          return;

According to your earlier patch, has_vlapic() implies is_hvm_domain(),
so if anything is to be moved to the caller, then has_vlapic() (and
is_hvm_domain() would then to be dropped altogether). However,
this is again a case where I'm not sure whether adding / extending
if()-s around calls is indeed preferable over adding static inline stubs.
Perhaps for the specific one here either variant is about as much (or
as little) code churn, but for the PI hooks functions I think the stub
approach might be slightly better.

Jan



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

Reply via email to