Re: [PATCH] x86: kvm: Avoid guest page table walk when gpa_available is set

From: Brijesh Singh
Date: Tue May 02 2017 - 17:44:36 EST

Hi Paolo,

I've tried the below patch and it seems to work fine. This does not
PIO case and as you rightly pointed PIO should trigger #NPF relatively
At least so far in my runs I have not seen PIO causing #NPF. If this sounds
acceptable approach then I can submit v2 with these changes and remove

PIO can certainly cause #NPF, albeit rarely, so this is not a viable one.

For SEV guest cases, we anyway want to avoid any guest page table walks
(even if it happens rarely). Sounds like we have to depend on gpa_val variable.
I will refresh the patch to address one of Ramdim's feedback
(move vcpu->arch.gpa_val assignment from handle_exit to pf_interception).