public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] KVM: VMX: Fix base_ptes for EPT
@ 2008-11-19  8:31 Sheng Yang
  2008-11-19 10:25 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Sheng Yang @ 2008-11-19  8:31 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, Sheng Yang

After support MTRR for EPT, memory type WB shouldn't take as default in
base_ptes. (Something wrong during the merging...)

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
 arch/x86/kvm/vmx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6619242..ebf5406 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3693,7 +3693,6 @@ static int __init vmx_init(void)
 		bypass_guest_pf = 0;
 		kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |
 			VMX_EPT_WRITABLE_MASK |
-			VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT |
 			VMX_EPT_IGMT_BIT);
 		kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
 				VMX_EPT_EXECUTABLE_MASK,
-- 
1.5.4.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] KVM: VMX: Fix base_ptes for EPT
  2008-11-19  8:31 [PATCH 1/1] KVM: VMX: Fix base_ptes for EPT Sheng Yang
@ 2008-11-19 10:25 ` Avi Kivity
  2008-11-19 10:32   ` Sheng Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2008-11-19 10:25 UTC (permalink / raw)
  To: Sheng Yang; +Cc: kvm

Sheng Yang wrote:
> After support MTRR for EPT, memory type WB shouldn't take as default in
> base_ptes. (Something wrong during the merging...)
>
>   

Yes, my fault.

But don't we still have a big hole here?  The guest can set RAM to 
various attributes, even without device assignment, and create 
inconsistencies with the qemu and host kernel mapping.



-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] KVM: VMX: Fix base_ptes for EPT
  2008-11-19 10:25 ` Avi Kivity
@ 2008-11-19 10:32   ` Sheng Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Sheng Yang @ 2008-11-19 10:32 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

On Wednesday 19 November 2008 18:25:32 Avi Kivity wrote:
> Sheng Yang wrote:
> > After support MTRR for EPT, memory type WB shouldn't take as default in
> > base_ptes. (Something wrong during the merging...)
>
> Yes, my fault.
>
> But don't we still have a big hole here?  The guest can set RAM to
> various attributes, even without device assignment, and create
> inconsistencies with the qemu and host kernel mapping.

The current reply from hardware guys is: the only situation that cause MCE is  
to access MMIO with cacheable memory type, and at least for EPT, they say 
using different memory type for same memory region don't have problem as far as 
we know... But for now, the hardware guys suggest to use host MTRR as the base 
for EPT memory type rather than using guest MTRR, at least it would protect us 
from MCE. And guest can operate it's PAT then promote UC to WC for performance 
and use UC for DMA. We are still in discussion to get more details now.

For now, I may try to using host MTRR for EPT as suggested.

-- 
regards
Yang, Sheng

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-19 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19  8:31 [PATCH 1/1] KVM: VMX: Fix base_ptes for EPT Sheng Yang
2008-11-19 10:25 ` Avi Kivity
2008-11-19 10:32   ` Sheng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox