Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-13 Thread Paolo Bonzini
On 13/04/2017 07:02, Bandan Das wrote: >> For EPT it is, you're right it's fishy. The "nested_access" should be >> computed in translate_nested_gpa, which is where kvm->arch.nested_mmu >> (non-EPT) requests to access kvm->arch.mmu (EPT). > > Thanks for the clarification. Is it the case when L1

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-13 Thread Paolo Bonzini
On 13/04/2017 07:02, Bandan Das wrote: >> For EPT it is, you're right it's fishy. The "nested_access" should be >> computed in translate_nested_gpa, which is where kvm->arch.nested_mmu >> (non-EPT) requests to access kvm->arch.mmu (EPT). > > Thanks for the clarification. Is it the case when L1

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-12 Thread Bandan Das
gt;> Sent: Wednesday, April 12, 2017 7:35:16 AM >> Subject: Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits >> >> Paolo Bonzini <pbonz...@redhat.com> writes: >> ... >> >accessed_dirty = have_ad ? PT_GUEST_ACCESSED_MASK : 0; &

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-12 Thread Bandan Das
Paolo Bonzini writes: > - Original Message - >> From: "Bandan Das" >> To: "Paolo Bonzini" >> Cc: linux-kernel@vger.kernel.org, k...@vger.kernel.org, da...@redhat.com >> Sent: Wednesday, April 12, 2017 7:35:16 AM >> Subject: Re: [

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-11 Thread Paolo Bonzini
- Original Message - > From: "Bandan Das" <b...@redhat.com> > To: "Paolo Bonzini" <pbonz...@redhat.com> > Cc: linux-kernel@vger.kernel.org, k...@vger.kernel.org, da...@redhat.com > Sent: Wednesday, April 12, 2017 7:35:16 AM > Subject: Re: [P

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-11 Thread Paolo Bonzini
- Original Message - > From: "Bandan Das" > To: "Paolo Bonzini" > Cc: linux-kernel@vger.kernel.org, k...@vger.kernel.org, da...@redhat.com > Sent: Wednesday, April 12, 2017 7:35:16 AM > Subject: Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/di

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-11 Thread Bandan Das
Paolo Bonzini writes: ... > accessed_dirty = have_ad ? PT_GUEST_ACCESSED_MASK : 0; > + > + /* > + * FIXME: on Intel processors, loads of the PDPTE registers for PAE > paging > + * by the MOV to CR instruction are treated as reads and do not cause > the >

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-04-11 Thread Bandan Das
Paolo Bonzini writes: ... > accessed_dirty = have_ad ? PT_GUEST_ACCESSED_MASK : 0; > + > + /* > + * FIXME: on Intel processors, loads of the PDPTE registers for PAE > paging > + * by the MOV to CR instruction are treated as reads and do not cause > the > + * processor

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 18:24, Radim Krčmář wrote: >> +if (is_guest_mode(vcpu) >> +&& !(exit_qualification & EPT_VIOLATION_GVA_TRANSLATED)) { >> +/* >> + * Fix up exit_qualification according to whether guest >> + * page table accesses are reads or writes.

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-31 Thread Paolo Bonzini
On 31/03/2017 18:24, Radim Krčmář wrote: >> +if (is_guest_mode(vcpu) >> +&& !(exit_qualification & EPT_VIOLATION_GVA_TRANSLATED)) { >> +/* >> + * Fix up exit_qualification according to whether guest >> + * page table accesses are reads or writes.

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-31 Thread Radim Krčmář
2017-03-30 11:55+0200, Paolo Bonzini: > Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another > thing to change is that, when EPT accessed and dirty bits are not in use, > VMX treats accesses to guest paging structures as data reads. When they > are in use (bit 6 of EPTP is set),

Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-31 Thread Radim Krčmář
2017-03-30 11:55+0200, Paolo Bonzini: > Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another > thing to change is that, when EPT accessed and dirty bits are not in use, > VMX treats accesses to guest paging structures as data reads. When they > are in use (bit 6 of EPTP is set),

[PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-30 Thread Paolo Bonzini
Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another thing to change is that, when EPT accessed and dirty bits are not in use, VMX treats accesses to guest paging structures as data reads. When they are in use (bit 6 of EPTP is set), they are treated as writes and the

[PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-30 Thread Paolo Bonzini
Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another thing to change is that, when EPT accessed and dirty bits are not in use, VMX treats accesses to guest paging structures as data reads. When they are in use (bit 6 of EPTP is set), they are treated as writes and the

[PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-08 Thread Paolo Bonzini
Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another thing to change is that, when EPT accessed and dirty bits are not in use, VMX treats accesses to guest paging structures as data reads. When they are in use (bit 6 of EPTP is set), they are treated as writes and the

[PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

2017-03-08 Thread Paolo Bonzini
Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another thing to change is that, when EPT accessed and dirty bits are not in use, VMX treats accesses to guest paging structures as data reads. When they are in use (bit 6 of EPTP is set), they are treated as writes and the