Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-04 Thread Brijesh Singh
Hi Paolo, On 08/04/2017 09:05 AM, Paolo Bonzini wrote: On 04/08/2017 02:30, Brijesh Singh wrote: On 8/2/17 5:42 AM, Paolo Bonzini wrote: On 01/08/2017 15:36, Brijesh Singh wrote: The flow is: hardware walks page table; L2 page table points to read only memory -> pf_interception

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-04 Thread Brijesh Singh
Hi Paolo, On 08/04/2017 09:05 AM, Paolo Bonzini wrote: On 04/08/2017 02:30, Brijesh Singh wrote: On 8/2/17 5:42 AM, Paolo Bonzini wrote: On 01/08/2017 15:36, Brijesh Singh wrote: The flow is: hardware walks page table; L2 page table points to read only memory -> pf_interception

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 02:30, Brijesh Singh wrote: > > > On 8/2/17 5:42 AM, Paolo Bonzini wrote: >> On 01/08/2017 15:36, Brijesh Singh wrote: The flow is: hardware walks page table; L2 page table points to read only memory -> pf_interception (code = ->

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-04 Thread Paolo Bonzini
On 04/08/2017 02:30, Brijesh Singh wrote: > > > On 8/2/17 5:42 AM, Paolo Bonzini wrote: >> On 01/08/2017 15:36, Brijesh Singh wrote: The flow is: hardware walks page table; L2 page table points to read only memory -> pf_interception (code = ->

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-03 Thread Brijesh Singh
On 8/2/17 5:42 AM, Paolo Bonzini wrote: > On 01/08/2017 15:36, Brijesh Singh wrote: >>> The flow is: >>> >>>hardware walks page table; L2 page table points to read only memory >>>-> pf_interception (code = >>>-> kvm_handle_page_fault (need_unprotect = false) >>>->

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-03 Thread Brijesh Singh
On 8/2/17 5:42 AM, Paolo Bonzini wrote: > On 01/08/2017 15:36, Brijesh Singh wrote: >>> The flow is: >>> >>>hardware walks page table; L2 page table points to read only memory >>>-> pf_interception (code = >>>-> kvm_handle_page_fault (need_unprotect = false) >>>->

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-02 Thread Paolo Bonzini
On 01/08/2017 15:36, Brijesh Singh wrote: >> >> The flow is: >> >>hardware walks page table; L2 page table points to read only memory >>-> pf_interception (code = >>-> kvm_handle_page_fault (need_unprotect = false) >>-> kvm_mmu_page_fault >>-> paging64_page_fault (for example)

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-02 Thread Paolo Bonzini
On 01/08/2017 15:36, Brijesh Singh wrote: >> >> The flow is: >> >>hardware walks page table; L2 page table points to read only memory >>-> pf_interception (code = >>-> kvm_handle_page_fault (need_unprotect = false) >>-> kvm_mmu_page_fault >>-> paging64_page_fault (for example)

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-01 Thread Brijesh Singh
On 07/31/2017 03:05 PM, Paolo Bonzini wrote: There can be different cases where an L0->L2 shadow nested page table is marked read only, in particular when a page is read only in L1's nested page tables. If such a page is accessed by L2 while walking page tables it will cause a nested page

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-08-01 Thread Brijesh Singh
On 07/31/2017 03:05 PM, Paolo Bonzini wrote: There can be different cases where an L0->L2 shadow nested page table is marked read only, in particular when a page is read only in L1's nested page tables. If such a page is accessed by L2 while walking page tables it will cause a nested page

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Paolo Bonzini
> > There can be different cases where an L0->L2 shadow nested page table is > > marked read only, in particular when a page is read only in L1's nested > > page tables. If such a page is accessed by L2 while walking page tables > > it will cause a nested page fault (page table walks are write

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Paolo Bonzini
> > There can be different cases where an L0->L2 shadow nested page table is > > marked read only, in particular when a page is read only in L1's nested > > page tables. If such a page is accessed by L2 while walking page tables > > it will cause a nested page fault (page table walks are write

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Brijesh Singh
On 07/31/2017 10:44 AM, Paolo Bonzini wrote: On 31/07/2017 15:30, Brijesh Singh wrote: Hi Paolo, On 07/27/2017 11:27 AM, Paolo Bonzini wrote: On 23/11/2016 18:01, Brijesh Singh wrote: +/* + * Before emulating the instruction, check if the error code + * was due to a RO

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Brijesh Singh
On 07/31/2017 10:44 AM, Paolo Bonzini wrote: On 31/07/2017 15:30, Brijesh Singh wrote: Hi Paolo, On 07/27/2017 11:27 AM, Paolo Bonzini wrote: On 23/11/2016 18:01, Brijesh Singh wrote: +/* + * Before emulating the instruction, check if the error code + * was due to a RO

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Paolo Bonzini
On 31/07/2017 15:30, Brijesh Singh wrote: > Hi Paolo, > > On 07/27/2017 11:27 AM, Paolo Bonzini wrote: >> On 23/11/2016 18:01, Brijesh Singh wrote: >>> +/* >>> + * Before emulating the instruction, check if the error code >>> + * was due to a RO violation while translating the guest

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Paolo Bonzini
On 31/07/2017 15:30, Brijesh Singh wrote: > Hi Paolo, > > On 07/27/2017 11:27 AM, Paolo Bonzini wrote: >> On 23/11/2016 18:01, Brijesh Singh wrote: >>> +/* >>> + * Before emulating the instruction, check if the error code >>> + * was due to a RO violation while translating the guest

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Brijesh Singh
Hi Paolo, On 07/27/2017 11:27 AM, Paolo Bonzini wrote: On 23/11/2016 18:01, Brijesh Singh wrote: + /* +* Before emulating the instruction, check if the error code +* was due to a RO violation while translating the guest page. +* This can occur when using nested

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-31 Thread Brijesh Singh
Hi Paolo, On 07/27/2017 11:27 AM, Paolo Bonzini wrote: On 23/11/2016 18:01, Brijesh Singh wrote: + /* +* Before emulating the instruction, check if the error code +* was due to a RO violation while translating the guest page. +* This can occur when using nested

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-27 Thread Paolo Bonzini
On 23/11/2016 18:01, Brijesh Singh wrote: > > + /* > + * Before emulating the instruction, check if the error code > + * was due to a RO violation while translating the guest page. > + * This can occur when using nested virtualization with nested > + * paging in both

Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2017-07-27 Thread Paolo Bonzini
On 23/11/2016 18:01, Brijesh Singh wrote: > > + /* > + * Before emulating the instruction, check if the error code > + * was due to a RO violation while translating the guest page. > + * This can occur when using nested virtualization with nested > + * paging in both

[PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2016-11-23 Thread Brijesh Singh
From: Tom Lendacky AMD hardware adds two additional bits to aid in nested page fault handling. Bit 32 - NPF occurred while translating the guest's final physical address Bit 33 - NPF occurred while translating the guest page tables The guest page tables fault indicator

[PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes

2016-11-23 Thread Brijesh Singh
From: Tom Lendacky AMD hardware adds two additional bits to aid in nested page fault handling. Bit 32 - NPF occurred while translating the guest's final physical address Bit 33 - NPF occurred while translating the guest page tables The guest page tables fault indicator can be used as an aid