From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: xen-devel@lists.xen.org
Cc: elena.ufimtseva@oracle.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, andrew.cooper3@citrix.com,
stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com,
jbeulich@suse.com, boris.ostrovsky@oracle.com,
roger.pau@citrix.com
Subject: [PATCH v5 2/5] x86/pvh: Do not allow 32-bit PVH guests to clear CR4's PAE bit
Date: Fri, 4 Sep 2015 13:05:11 -0400 [thread overview]
Message-ID: <1441386314-5694-3-git-send-email-boris.ostrovsky@oracle.com> (raw)
In-Reply-To: <1441386314-5694-1-git-send-email-boris.ostrovsky@oracle.com>
.. since we only support 32-bit PV(H) guests in PAE mode.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
xen/arch/x86/hvm/hvm.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 90ba676..6f6cadc 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3524,11 +3524,19 @@ int hvm_set_cr4(unsigned long value, bool_t may_defer)
goto gpf;
}
- if ( !(value & X86_CR4_PAE) && hvm_long_mode_enabled(v) )
+ if ( !(value & X86_CR4_PAE) )
{
- HVM_DBG_LOG(DBG_LEVEL_1, "Guest cleared CR4.PAE while "
- "EFER.LMA is set");
- goto gpf;
+ if ( hvm_long_mode_enabled(v) )
+ {
+ HVM_DBG_LOG(DBG_LEVEL_1, "Guest cleared CR4.PAE while "
+ "EFER.LMA is set");
+ goto gpf;
+ }
+ if ( is_pvh_vcpu(v) )
+ {
+ HVM_DBG_LOG(DBG_LEVEL_1, "32-bit PVH guest cleared CR4.PAE");
+ goto gpf;
+ }
}
old_cr = v->arch.hvm_vcpu.guest_cr[4];
--
1.8.1.4
next prev parent reply other threads:[~2015-09-04 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 17:05 [PATCH v5 0/5] 32-bit domU PVH support Boris Ostrovsky
2015-09-04 17:05 ` [PATCH v5 1/5] x86/pvh: Set 32b PVH guest mode in XEN_DOMCTL_set_address_size Boris Ostrovsky
2015-09-04 17:05 ` Boris Ostrovsky [this message]
2015-09-04 17:05 ` [PATCH v5 3/5] x86/compat: Test both PV and PVH guests for compat mode Boris Ostrovsky
2015-09-04 17:05 ` [PATCH v5 4/5] x86/pvh: Handle hypercalls for 32b PVH guests Boris Ostrovsky
2015-09-04 17:05 ` [PATCH v5 5/5] libxc/x86/pvh: Allow creation of " Boris Ostrovsky
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=1441386314-5694-3-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=elena.ufimtseva@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).