* [Qemu-devel] [PATCH] target-i386: Don't forbid NX bit on PAE PDEs and PTEs
@ 2014-08-24 5:13 William Grant
2014-08-25 16:40 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: William Grant @ 2014-08-24 5:13 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
Commit e8f6d00c30ed88910d0d985f4b2bf41654172ceb ("target-i386: raise
page fault for reserved physical address bits") added a check that the
NX bit is not set on PAE PDPEs, but it also added it to rsvd_mask for
the rest of the function. This caused any PDEs or PTEs with NX set to be
erroneously rejected, making PAE guests with NX support unusable.
Signed-off-by: William Grant <wgrant@ubuntu.com>
---
target-i386/helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 47b982b..30cb0d0 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -615,8 +615,8 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
if (!(pdpe & PG_PRESENT_MASK)) {
goto do_fault;
}
- rsvd_mask |= PG_HI_USER_MASK | PG_NX_MASK;
- if (pdpe & rsvd_mask) {
+ rsvd_mask |= PG_HI_USER_MASK;
+ if (pdpe & (rsvd_mask | PG_NX_MASK)) {
goto do_fault_rsvd;
}
ptep = PG_NX_MASK | PG_USER_MASK | PG_RW_MASK;
--
2.1.0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target-i386: Don't forbid NX bit on PAE PDEs and PTEs
2014-08-24 5:13 [Qemu-devel] [PATCH] target-i386: Don't forbid NX bit on PAE PDEs and PTEs William Grant
@ 2014-08-25 16:40 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-08-25 16:40 UTC (permalink / raw)
To: William Grant, qemu-devel
Il 24/08/2014 07:13, William Grant ha scritto:
> Commit e8f6d00c30ed88910d0d985f4b2bf41654172ceb ("target-i386: raise
> page fault for reserved physical address bits") added a check that the
> NX bit is not set on PAE PDPEs, but it also added it to rsvd_mask for
> the rest of the function. This caused any PDEs or PTEs with NX set to be
> erroneously rejected, making PAE guests with NX support unusable.
>
> Signed-off-by: William Grant <wgrant@ubuntu.com>
> ---
> target-i386/helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target-i386/helper.c b/target-i386/helper.c
> index 47b982b..30cb0d0 100644
> --- a/target-i386/helper.c
> +++ b/target-i386/helper.c
> @@ -615,8 +615,8 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
> if (!(pdpe & PG_PRESENT_MASK)) {
> goto do_fault;
> }
> - rsvd_mask |= PG_HI_USER_MASK | PG_NX_MASK;
> - if (pdpe & rsvd_mask) {
> + rsvd_mask |= PG_HI_USER_MASK;
> + if (pdpe & (rsvd_mask | PG_NX_MASK)) {
> goto do_fault_rsvd;
> }
> ptep = PG_NX_MASK | PG_USER_MASK | PG_RW_MASK;
>
Thanks, applied to uq/master.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-25 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24 5:13 [Qemu-devel] [PATCH] target-i386: Don't forbid NX bit on PAE PDEs and PTEs William Grant
2014-08-25 16:40 ` Paolo Bonzini
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).