|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 08/10] x86/SVM: Add interrupt management code via AVIC
>>> On 31.12.16 at 06:45, <suravee.suthikulpanit@xxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/svm/avic.c
> +++ b/xen/arch/x86/hvm/svm/avic.c
> @@ -636,6 +636,34 @@ void svm_avic_vmexit_do_noaccel(struct cpu_user_regs
> *regs)
> return;
> }
>
> +void svm_avic_deliver_posted_intr(struct vcpu *v, u8 vec)
> +{
> + struct vlapic *vlapic = vcpu_vlapic(v);
> +
> + /* Fallback to use non-AVIC if vcpu is not enabled with AVIC. */
> + if ( !svm_avic_vcpu_enabled(v) )
> + {
> + if ( !vlapic_test_and_set_vector(vec, &vlapic->regs->data[APIC_IRR])
> )
> + vcpu_kick(v);
> + return;
> + }
> +
> + if ( !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) )
> + return;
On top of Andrew's comment, this assumes v == current, which you
neither assert, nor allow the reviewers to verify (as the function has
no caller).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |