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

Re: [Xen-devel] [PATCH v2 09/10] x86/SVM: Hook up miscellaneous AVIC functions





On 01/10/2017 04:00 PM, Jan Beulich wrote:
On 10.01.17 at 09:35, <Suravee.Suthikulpanit@xxxxxxx> wrote:
On 01/05/2017 11:05 PM, Jan Beulich wrote:
On 31.12.16 at 06:46, <suravee.suthikulpanit@xxxxxxx> wrote:
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1438,6 +1438,11 @@ static int svm_cpu_up(void)
     return 0;
 }

+static inline int svm_avic_enabled(void)

bool?

Actually, I declared this as int because the
hvm_function_table.virtual_intr_delivery_enabled() is returning int.

Oh, that's used as a hook function. That's pretty un-obvious for a
function declared inline. Of course in that case you need to match
the hook function type, even if that ought to have return type bool.
Even farther - I question the need for a function here in the first
place, as both VMX and now SVM AVIC return a static value. This
could therefore be a bool flag alongside the various others we
already have near the beginning of the structure, if you're up to
such a change. If you'd rather stick with what's there now, we can
always put together a cleanup patch later on.

Jan


Sure, I can incorporate the changes to make this a bool flag in this patch.

S

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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