Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-08-19 Thread Andrew Cooper
On 19/08/2019 11:08, Julien Grall wrote: > Hi Andrew, > > On 8/13/19 7:04 PM, Andrew Cooper wrote: >> On 24/01/2019 22:10, Andrew Cooper wrote: >>> On 24/01/2019 21:42, Julien Grall wrote: Hi Andrew, On 12/21/18 1:46 PM, Andrew Cooper wrote: > All of this code lives inside CONFIG

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-08-19 Thread Julien Grall
Hi Andrew, On 8/13/19 7:04 PM, Andrew Cooper wrote: On 24/01/2019 22:10, Andrew Cooper wrote: On 24/01/2019 21:42, Julien Grall wrote: Hi Andrew, On 12/21/18 1:46 PM, Andrew Cooper wrote: All of this code lives inside CONFIG_PV which means gfn == mfn, and the fill_ro_mpt() calls clearly show

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-08-13 Thread Andrew Cooper
On 24/01/2019 22:10, Andrew Cooper wrote: > On 24/01/2019 21:42, Julien Grall wrote: >> Hi Andrew, >> >> On 12/21/18 1:46 PM, Andrew Cooper wrote: >>> All of this code lives inside CONFIG_PV which means gfn == mfn, and the >>> fill_ro_mpt() calls clearly show that the value is used untranslated. >>

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-01-24 Thread Andrew Cooper
On 24/01/2019 21:42, Julien Grall wrote: > Hi Andrew, > > On 12/21/18 1:46 PM, Andrew Cooper wrote: >> All of this code lives inside CONFIG_PV which means gfn == mfn, and the >> fill_ro_mpt() calls clearly show that the value is used untranslated. >> >> Change cr3_gfn to a suitably typed cr3_mfn, a

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-01-24 Thread Julien Grall
Hi Andrew, On 12/21/18 1:46 PM, Andrew Cooper wrote: All of this code lives inside CONFIG_PV which means gfn == mfn, and the fill_ro_mpt() calls clearly show that the value is used untranslated. Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() with a straight mfn_to_p

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-01-04 Thread Jan Beulich
>>> On 21.12.18 at 14:46, wrote: > All of this code lives inside CONFIG_PV which means gfn == mfn, and the > fill_ro_mpt() calls clearly show that the value is used untranslated. > > Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() > with a straight mfn_to_page/get_page

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2019-01-02 Thread Wei Liu
On Fri, Dec 21, 2018 at 01:46:05PM +, Andrew Cooper wrote: > All of this code lives inside CONFIG_PV which means gfn == mfn, and the > fill_ro_mpt() calls clearly show that the value is used untranslated. > > Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() > with a

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2018-12-21 Thread Andrew Cooper
On 21/12/2018 17:01, Roger Pau Monné wrote: > On Fri, Dec 21, 2018 at 01:46:05PM +, Andrew Cooper wrote: >> @@ -1091,12 +1091,12 @@ int arch_set_info_guest( >> set_bit(_VPF_in_reset, &v->pause_flags); >> >> if ( !compat ) >> -cr3_gfn = xen_cr3_to_pfn(c.nat->ctrlreg[3]); >> +

Re: [Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2018-12-21 Thread Roger Pau Monné
On Fri, Dec 21, 2018 at 01:46:05PM +, Andrew Cooper wrote: > All of this code lives inside CONFIG_PV which means gfn == mfn, and the > fill_ro_mpt() calls clearly show that the value is used untranslated. > > Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() > with a

[Xen-devel] [PATCH] x86/pv: Clean up cr3 handling in arch_set_info_guest()

2018-12-21 Thread Andrew Cooper
All of this code lives inside CONFIG_PV which means gfn == mfn, and the fill_ro_mpt() calls clearly show that the value is used untranslated. Change cr3_gfn to a suitably typed cr3_mfn, and replace get_page_from_gfn() with a straight mfn_to_page/get_page sequence, to avoid the implication that tra