From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Dump VMCS on Intel CPU Date: Sat, 06 Jun 2009 07:23:32 +0100 Message-ID: References: <4A29DD42.5080200@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A29DD42.5080200@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "mukesh.rathor@oracle.com" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 06/06/2009 04:06, "Mukesh Rathor" 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