lkml.org 
[lkml]   [2017]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set
2017-08-18 14:37+0200, Paolo Bonzini:
> On 18/08/2017 14:36, Radim Krčmář wrote:
> >>> + gpa = vcpu->arch.gpa_val;
> >>> + ret = vcpu_is_mmio_gpa(vcpu, addr, gpa, write);
> >>> + } else {
> >>> + ret = vcpu_mmio_gva_to_gpa(vcpu, addr, &gpa, exception, write);
> >>> }
> >>>
> >>> - ret = vcpu_mmio_gva_to_gpa(vcpu, addr, &gpa, exception, write);
> >>> -
> >>> if (ret < 0)
> >>> return X86EMUL_PROPAGATE_FAULT;
> >> just wondering if it makes sense to move this into the else branch (as
> >> it logically only belongs to vcpu_mmio_gva_to_gpa)
> >
> > It does, I took the liberty to change that.
>
> It was on purpose, but it's okay either way. :)

Oh, sorry, I was thinking that vcpu_is_mmio_gpa() should return bool. :)

\
 
 \ /
  Last update: 2017-08-18 14:41    [W:0.037 / U:2.816 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site