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] Dump VMCS on Intel CPU

To: "mukesh.rathor@xxxxxxxxxx" <mukesh.rathor@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Dump VMCS on Intel CPU
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Sat, 06 Jun 2009 07:23:32 +0100
Cc:
Delivery-date: Fri, 05 Jun 2009 23:24:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A29DD42.5080200@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnmU+m6E+hazXqMTmGbKOK9xz4POQAG2aW3
Thread-topic: [Xen-devel] Dump VMCS on Intel CPU
User-agent: Microsoft-Entourage/12.17.0.090302
On 06/06/2009 04:06, "Mukesh Rathor" <mukesh.rathor@xxxxxxxxxx> wrote:

> On AMD, it was simple by calling svm_dump_vmcb() by passing vmcb from
> each vcpu struct. Looking at vmcs.c, I see quite a bit of mumbo-jumbo in
> terms of setting context, even IPI other CPUs, etc. That doesn't work
> for me. So the question is, is there any reason followig won't work?
> 
>    for each hvm vcpu {
>        __vmptrld(virt_to_maddr(vp->arch.hvm_vmx.vmcs));
>        vmcs_dump_vcpu();
>    }
>    if ( is_hvm_vcpu(current) )
>        __vmptrld(virt_to_maddr(current->arch.hvm_vmx.vmcs));
> 
> 
> Seems to work ok, but I want to make sure.

Intel say you should VMCLEAR on the last CPU to VMPTRLD the VMCS. For us
that means if v->arch.hvm_vmx.active_cpu != smp_processor_id() nor -1.
However VMPTRLD is not described as failing if this is not carried out. So,
I guess you may get away with it. If you want to be super safe you might
VMCLEAR on CPUs as they rendezvous with kdb.

 -- Keir



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

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