Re: [v2][PATCH] kvm: x86: mmio: fix setting the present bit of mmio spte

2014-11-18 Thread Paolo Bonzini
On 18/11/2014 10:23, Chen, Tiejun wrote: >> On 32-bit PAE hosts, PTEs have bit 62 reserved, as in your patch: > > Do you mean just one reserved bit is fine enough in this case? Yes. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vg

Re: [v2][PATCH] kvm: x86: mmio: fix setting the present bit of mmio spte

2014-11-18 Thread Chen, Tiejun
On 2014/11/17 19:40, Paolo Bonzini wrote: On 17/11/2014 12:31, Tiejun Chen wrote: In non-ept 64-bit of PAE case maxphyaddr may be 52bit as well, There is no such thing as 64-bit PAE. Definitely. On 32-bit PAE hosts, PTEs have bit 62 reserved, as in your patch: Do you mean just one re

Re: [v2][PATCH] kvm: x86: mmio: fix setting the present bit of mmio spte

2014-11-17 Thread Paolo Bonzini
On 17/11/2014 12:31, Tiejun Chen wrote: > In non-ept 64-bit of PAE case maxphyaddr may be 52bit as well, There is no such thing as 64-bit PAE. On 32-bit PAE hosts, PTEs have bit 62 reserved, as in your patch: > + /* Magic bits are always reserved for 32bit host. */ > + mask |= 0x3ull <

[v2][PATCH] kvm: x86: mmio: fix setting the present bit of mmio spte

2014-11-17 Thread Tiejun Chen
In non-ept 64-bit of PAE case maxphyaddr may be 52bit as well, so we also need to disable mmio page fault. Here we can check MMIO_SPTE_GEN_HIGH_SHIFT directly to determine if we should set the present bit, and bring a little cleanup. Signed-off-by: Tiejun Chen --- v2: * Correct codes comments *