All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: keir@xen.org, suravee.suthikulpanit@amd.com,
	Aravind.Gopalakrishnan@amd.com, jbeulich@suse.com,
	xen-devel@lists.xenproject.org,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [V0 PATCH 1/6] AMD-PVH: construct vmcb changes
Date: Mon, 18 Aug 2014 18:10:05 -0700	[thread overview]
Message-ID: <20140818181005.5fca5363@mantra.us.oracle.com> (raw)
In-Reply-To: <53F2A154.7080806@oracle.com>

On Mon, 18 Aug 2014 20:59:00 -0400
Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:

> On 08/18/2014 07:46 PM, Mukesh Rathor wrote:
> > On Mon, 18 Aug 2014 11:10:54 +0200
> > Roger Pau Monné <roger.pau@citrix.com> wrote:
> >
> >> On 16/08/14 03:53, Mukesh Rathor wrote:
> >>> PVH guest starts in Long 64bit paging mode. This patch modifies
> >>> construct_vmcb for that.
> >>>
> >>> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
> >>> ---
> >>>   xen/arch/x86/hvm/svm/vmcb.c | 18 +++++++++++++++---
> >>>   1 file changed, 15 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/xen/arch/x86/hvm/svm/vmcb.c
> >>> b/xen/arch/x86/hvm/svm/vmcb.c index 21292bb..5df5f36 100644
> >>> --- a/xen/arch/x86/hvm/svm/vmcb.c
> >>> +++ b/xen/arch/x86/hvm/svm/vmcb.c
> >>> @@ -138,6 +138,8 @@ static int construct_vmcb(struct vcpu *v)
> >>>   
> >>>       /* Guest EFER. */
> >>>       v->arch.hvm_vcpu.guest_efer = 0;
> >>> +    if ( is_pvh_vcpu(v) )
> >>> +        v->arch.hvm_vcpu.guest_efer |= EFER_LMA;   /* PVH
> >>> 32bitfixme */ hvm_update_guest_efer(v);
> > ....
> >>
> >> I know this is already done on Intel in order to boot PVH guests,
> >> but now that we know what we need to modify in both Intel and AMD
> >> HVM code, do you think it would we suitable to add another
> >> parameter to vcpu_initialise in order to tell it to setup the vcpu
> >> to boot into long (or protected if we support 32bit PVH guests)
> >> mode (and prevent adding more is_pvh_vcpu)?
> > Well, we can defer adding parameter to vcpu_initialise to when 32bit
> > work gets done. For now, we could move common hvm fields
> > initialization to hvm_vcpu_initialise.. that way, we'd have fewer
> > is_pvh. I can submit a patch if Jan is ok with that.
> 
> Setting LMA bit for PVH guest is in fact already done by 
> hvm_vcpu_initialise()  so the change above is unnecessary.

yeah, that one we can leave out, but there still remains 

+    if ( is_pvh_vcpu(v) )
+        v->arch.hvm_vcpu.guest_cr[0] |= X86_CR0_PG;

and

+    v->arch.hvm_vcpu.guest_cr[4] = is_pvh_vcpu(v) ? X86_CR4_PAE : 0;

that could be moved to hvm_vcpu_initialise()

-Mukesh



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-08-19  1:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16  1:53 [V0 PATCH 0/6] AMD-PVH: xen domU support Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 1/6] AMD-PVH: construct vmcb changes Mukesh Rathor
2014-08-18  9:10   ` Roger Pau Monné
2014-08-18 23:46     ` Mukesh Rathor
2014-08-19  0:59       ` Boris Ostrovsky
2014-08-19  1:10         ` Mukesh Rathor [this message]
2014-08-22  9:39   ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 2/6] AMD-PVH: cpuid intercept Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 3/6] AMD-PVH: call hvm_emulate_one instead of handle_mmio Mukesh Rathor
2014-08-22  9:50   ` Jan Beulich
2014-08-22 18:52     ` Mukesh Rathor
2014-08-25  7:10       ` Jan Beulich
2014-08-26  1:53         ` Mukesh Rathor
2014-08-26  7:17           ` Jan Beulich
2014-08-28  1:07             ` Mukesh Rathor
2014-08-28  7:09               ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 4/6] AMD-PVH: Do not get/set vlapic TPR Mukesh Rathor
2014-08-19  1:16   ` Boris Ostrovsky
2014-08-20 12:11     ` Jan Beulich
2014-08-22  9:52   ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 5/6] AMD-PVH: Support TSC_MODE_NEVER_EMULATE for PVH Mukesh Rathor
2014-08-19  1:38   ` Boris Ostrovsky
2014-08-19  1:43     ` Boris Ostrovsky
2014-08-19  1:43     ` Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 6/6] AMD-PVH: enable pvh if requirements met Mukesh Rathor
2014-09-30 16:04 ` [V0 PATCH 0/6] AMD-PVH: xen domU support Roger Pau Monné
2014-09-30 21:38   ` Mukesh Rathor
2014-09-30 21:49     ` Mukesh Rathor
2014-12-13  2:58 [AMD PVH]: Partial/domU xen patches Mukesh Rathor
2014-12-13  2:58 ` [V0 PATCH 1/6] AMD-PVH: construct vmcb changes Mukesh Rathor

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=20140818181005.5fca5363@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.