Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-20 Thread Jan Beulich
On 19.11.2019 15:58, Andrew Cooper wrote: > On 19/11/2019 11:13, Jan Beulich wrote: >> On 18.11.2019 19:15, Andrew Cooper wrote: >>> @@ -181,6 +180,18 @@ nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t >>> L1_gpa, paddr_t *L0_gpa, >>> *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa &

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-20 Thread Jan Beulich
On 19.11.2019 21:45, Andrew Cooper wrote: > On 19/11/2019 15:23, Jan Beulich wrote: >> On 19.11.2019 15:58, Andrew Cooper wrote: >>> On 19/11/2019 11:13, Jan Beulich wrote: On 18.11.2019 19:15, Andrew Cooper wrote: I take it you imply that L0_ERROR would need raising (as per the

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-19 Thread Andrew Cooper
On 19/11/2019 15:23, Jan Beulich wrote: > On 19.11.2019 15:58, Andrew Cooper wrote: >> On 19/11/2019 11:13, Jan Beulich wrote: >>> On 18.11.2019 19:15, Andrew Cooper wrote: >>> I take it you imply that L0_ERROR would need raising (as per the >>> auxiliary code fragment adding the "(access_x &&

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-19 Thread Jan Beulich
On 19.11.2019 15:58, Andrew Cooper wrote: > On 19/11/2019 11:13, Jan Beulich wrote: >> On 18.11.2019 19:15, Andrew Cooper wrote: >> I take it you imply that L0_ERROR would need raising (as per the >> auxiliary code fragment adding the "(access_x && *page_order)" >> check), but I wonder whether

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-19 Thread Andrew Cooper
On 19/11/2019 11:13, Jan Beulich wrote: > On 18.11.2019 19:15, Andrew Cooper wrote: >> When nestedhvm_hap_nested_page_fault() returns L0_ERROR, >> hvm_hap_nested_page_fault() operates on the adjusted gpa. However, it >> operates with the original npfec, which is no longer be correct. > Nit:

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-19 Thread Jan Beulich
On 18.11.2019 19:15, Andrew Cooper wrote: > When nestedhvm_hap_nested_page_fault() returns L0_ERROR, > hvm_hap_nested_page_fault() operates on the adjusted gpa. However, it > operates with the original npfec, which is no longer be correct. Nit: Perhaps "may" instead of "is"? > In particular, it

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-18 Thread Jürgen Groß
On 18.11.19 19:15, Andrew Cooper wrote: When nestedhvm_hap_nested_page_fault() returns L0_ERROR, hvm_hap_nested_page_fault() operates on the adjusted gpa. However, it operates with the original npfec, which is no longer be correct. In particular, it is possible to get a nested fault where the

[Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-18 Thread Andrew Cooper
When nestedhvm_hap_nested_page_fault() returns L0_ERROR, hvm_hap_nested_page_fault() operates on the adjusted gpa. However, it operates with the original npfec, which is no longer be correct. In particular, it is possible to get a nested fault where the translation is not present in L12 (and