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

Re: [Xen-devel] [PATCH 12/34] x86/pt: only call some functions for HVM guests



>>> On 17.08.18 at 17:12, <wei.liu2@xxxxxxxxxx> 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@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®.