[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] x86/PV: remove unnecessary toggle_guest_pt() overhead



>>> On 03.04.19 at 20:32, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 13/03/2019 12:39, Jan Beulich wrote:
>> While the mere updating of ->pv_cr3 and ->root_pgt_changed aren't overly
>> expensive (but still needed only for the toggle_guest_mode() path), the
>> effect of the latter on the exit-to-guest path is not insignificant.
>> Move the logic into toggle_guest_mode().
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> What case does this make faster?  I'm really struggling to see how this
> is safe.

The two cases where toggle_guest_pt() gets called (and then
in pairs): Since we know we're going to switch back to the
original page tables (other than when coming through
toggle_guest_mode()), there's no need to request any special
exit-to-guest processing by setting root_pgt_changed. Imo it
was wrong in the first place to have this code added to
_toggle_guest_pt(). The separation of the two functions was
specifically done so that things only affecting a mode switch
would go into toggle_guest_mode(), not the common helper.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.