lkml.org 
[lkml]   [2016]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk
From
Date


On 15/12/2016 14:09, David Hildenbrand wrote:
>>>
>>> bool exception_gpa_valid(struct kvm_vcpu)
>>> {
>>> // check if svm
>>> // check if exit code is NPF
>>> // check ctxt
>>> }
>>
>> No, this would be a layering violation. The emulator ops don't know
>> about svm and exit codes (and in fact it's trivial to implement this
>> optimization for vmx, with a slightly different logic), so we need to
>> have gpa_available.
>
> I was rather thinking about adding an vmx/svm independent callback,
> which would return false for vmx for now. I just saw the variable
> and was wondering if it is really necessary.

The variable would probably just move into struct {vmx,svm}_vcpu. Maybe
you could access the VMX/SVM exitcode directly, but doing that worries
me a bit...

Paolo

\
 
 \ /
  Last update: 2016-12-15 14:31    [W:0.339 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site