[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
Jan, 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. @@ -1472,16 +1477,27 @@ const struct hvm_function_table * __init start_svm(void) P(cpu_has_svm_decode, "DecodeAssists"); P(cpu_has_pause_filter, "Pause-Intercept Filter"); P(cpu_has_tsc_ratio, "TSC Rate MSR"); - P(cpu_has_svm_avic, "AVIC"); -#undef P - - if ( !printed ) - printk(" - none\n"); svm_function_table.hap_supported = !!cpu_has_svm_npt; svm_function_table.hap_capabilities = HVM_HAP_SUPERPAGE_2MB | ((cpuid_edx(0x80000001) & 0x04000000) ? HVM_HAP_SUPERPAGE_1GB : 0); + if ( !cpu_has_svm_avic ) + svm_avic = 0; + + if ( svm_avic ) + { + svm_function_table.deliver_posted_intr = svm_avic_deliver_posted_intr; + svm_function_table.virtual_intr_delivery_enabled = svm_avic_enabled; + P(cpu_has_svm_avic, "AVIC (enabled)"); + } + else + P(cpu_has_svm_avic, "AVIC (disabled)"); +#undef P + + if ( !printed ) + printk(" - none\n");Could I talk you into moving this up a few lines, so that effectively the last four lines here won't need to move at all? Jan Sure, good point. Thanks, Suravee _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |