All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] nestedsvm: fix HSAVE_PA MSR
Date: Tue, 11 Oct 2011 15:57:33 +0200	[thread overview]
Message-ID: <4E944B4D.3060704@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]


Accessing HSAVE_PA MSR does not require SVM to be enabled nor any
special guest paging mode.
But accessing HSAVE_PA MSR requires the address to be 4k aligned.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_hsavepa.diff --]
[-- Type: text/plain, Size: 523 bytes --]

diff -r a1fcb77b2ccb xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c	Fri Sep 09 10:22:40 2011 +0200
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c	Tue Oct 11 15:56:44 2011 +0200
@@ -51,7 +51,8 @@ nestedsvm_vcpu_stgi(struct vcpu *v)
 static int
 nestedsvm_vmcb_isvalid(struct vcpu *v, uint64_t vmcxaddr)
 {
-    if ( !hvm_svm_enabled(v) || hvm_guest_x86_mode(v) < 2 )
+    /* Address must be 4k aligned */
+    if ( (vmcxaddr & ~PAGE_MASK) != 0 )
         return 0;
 
     /* Maximum valid physical address.

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

             reply	other threads:[~2011-10-11 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 13:57 Christoph Egger [this message]
2011-10-13 11:22 ` [PATCH] nestedsvm: fix HSAVE_PA MSR Tim Deegan

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=4E944B4D.3060704@amd.com \
    --to=christoph.egger@amd.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.