WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Eddie Dong <eddie.dong@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 15 of 20] Switch shadow/virtual VMCS between n1/n2 guests
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 2 Jun 2011 15:58:07 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 02 Jun 2011 07:59:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bd15acfc9b822ccf27b5.1307005048@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1307005033@xxxxxxxxxxxxxxxxxxxx> <bd15acfc9b822ccf27b5.1307005048@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
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

<Prev in Thread] Current Thread [Next in Thread>