All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "mukesh.rathor@oracle.com" <mukesh.rathor@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Dump VMCS on Intel CPU
Date: Sat, 06 Jun 2009 07:23:32 +0100	[thread overview]
Message-ID: <C64FC9F4.CF97%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <4A29DD42.5080200@oracle.com>

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

      reply	other threads:[~2009-06-06  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-06  3:06 Dump VMCS on Intel CPU Mukesh Rathor
2009-06-06  6:23 ` Keir Fraser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C64FC9F4.CF97%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=mukesh.rathor@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.