>>> On 03.04.19 at 20:32, <andrew.coop...@citrix.com> 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 <jbeul...@suse.com>
> 
> 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to