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

Re: [Xen-devel] [PATCH 15 of 20] Switch shadow/virtual VMCS between n1/n2 guests



Hi,

> +asmlinkage void nvmx_switch_guest(void)
> +{
> +    struct vcpu *v = current;
> +    struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v);
> +    struct cpu_user_regs *regs = guest_cpu_user_regs();
> +
> +    /*
> +     * a softirq may interrupt us between a virtual vmentry is
> +     * just handled and the true vmentry. If during this window,
> +     * a L1 virtual interrupt causes another virtual vmexit, we
> +     * cannot let that happen or VM_ENTRY_INTR_INFO will be lost.
> +     */
> +    if ( unlikely(nvcpu->nv_vmswitch_in_progress) )
> +        return;
> +
> +    if ( nestedhvm_vcpu_in_guestmode(v) && nvcpu->nv_vmexit_pending )
> +    {
> +        local_irq_enable();

Why?  Is this function every called with interrupts disabled?  And if
so, will its caller deal with having them enabled when it exits?

> +        virtual_vmexit(regs);
> +    }
> +    else if ( !nestedhvm_vcpu_in_guestmode(v) && nvcpu->nv_vmentry_pending )
> +    {
> +        local_irq_enable();

ditto.

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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