From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: Re: [PATCH] x86: kvm: Avoid guest page table walk when gpa_available is set Date: Tue, 2 May 2017 16:44:19 -0500 Message-ID: <99ec8226-07c0-7d10-5659-52c647de0d19@amd.com> References: <1493049146-19261-1-git-send-email-brijesh.singh@amd.com> <20170424205236.GE5713@potion> <77f51978-5937-0c94-13b6-885345921b03@amd.com> <20170425140351.GF5713@potion> <6e453f35-cd26-1df8-5f8e-68fa09c6a1a3@amd.com> <20170426204427.GA7135@potion> <7e27af5e-5978-5b57-f008-58515b218cce@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , , To: Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Hi Paolo, >> >> I've tried the below patch and it seems to work fine. This does not >> consider >> PIO case and as you rightly pointed PIO should trigger #NPF relatively >> rarely. >> 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 >> gpa_val >> additional. > > 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). Brijesh