* Dump VMCS on Intel CPU
@ 2009-06-06 3:06 Mukesh Rathor
2009-06-06 6:23 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Mukesh Rathor @ 2009-06-06 3:06 UTC (permalink / raw)
To: xen-devel
Hi,
I'd like to dump VMCS for all HVM VCPUs from a cpu that is running kdb. While
this CPU is doing kdb commands, all other CPUs are spinning disabled in kdb
function.
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.
thanks,
Mukesh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dump VMCS on Intel CPU
2009-06-06 3:06 Dump VMCS on Intel CPU Mukesh Rathor
@ 2009-06-06 6:23 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2009-06-06 6:23 UTC (permalink / raw)
To: mukesh.rathor, xen-devel
On 06/06/2009 04:06, "Mukesh Rathor" <mukesh.rathor@oracle.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-06 6:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 3:06 Dump VMCS on Intel CPU Mukesh Rathor
2009-06-06 6:23 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.