lkml.org 
[lkml]   [2017]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] KVM: x86: Avoid guest page table walk when gpa_available is set
On Fri, May 19, 2017 at 11:12:29AM -0400, Brijesh Singh wrote:
> From: Brijesh Singh <brijesh.singh@amd.com>
>
> On AMD hardware when a guest causes a NPF which requires emulation,
> the vcpu->arch.gpa_available flag is set to indicate that cr2 contains
> a valid GPA.
>
> Currently, emulator_read_write_onepage() makes use of gpa_available flag
> to avoid a guest page walk for a known MMIO regions. Lets not limit
> the gpa_available optimization to just MMIO region. The patch extends
> the check to avoid page walk whenever gpa_available flag is set.
>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
> v1: http://marc.info/?l=kvm&m=149304930814202&w=2
>
> Changes in v2:
> - move gpa_val setting in pf_interception
>
> arch/x86/include/asm/kvm_host.h | 1 +
> arch/x86/kvm/svm.c | 4 ++++
> arch/x86/kvm/x86.c | 14 +++++++-------
> 3 files changed, 12 insertions(+), 7 deletions(-)

I havn't checked in detail, but maybe you have: Does that take nesting
into account, where we might run on a shadow nested page-table and we
actually get a nested gpa (which still needs translation) instead of a
normal gpa?


Joerg

\
 
 \ /
  Last update: 2017-05-30 11:07    [W:0.128 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site