|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 9/9] x86/SVM: Hook up miscellaneous AVIC functions
>>> On 19.09.16 at 07:52, <suravee.suthikulpanit@xxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1495,6 +1495,16 @@ const struct hvm_function_table * __init
> start_svm(void)
> 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,
> + printk("SVM: AVIC enabled\n");
> + }
> +
> return &svm_function_table;
> }
>
> --- a/xen/include/asm-x86/hvm/svm/avic.h
> +++ b/xen/include/asm-x86/hvm/svm/avic.h
> @@ -41,4 +41,9 @@ void svm_avic_vmexit_do_incomp_ipi(struct cpu_user_regs
> *regs);
> void svm_avic_vmexit_do_noaccel(struct cpu_user_regs *regs);
>
> void svm_avic_deliver_posted_intr(struct vcpu *v, u8 vector);
> +
> +static inline int svm_avic_enabled(void)
> +{
> + return svm_avic;
> +}
Why is this an inline function (and in a header) when its only use is
for setting a function pointer?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |