lkml.org 
[lkml]   [2020]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 03/11] KVM: SVM: Change intercept_dr to generic intercepts
From
Date
On 29/07/20 01:59, Jim Mattson wrote:
>> case SVM_EXIT_READ_DR0 ... SVM_EXIT_WRITE_DR7: {
>> - u32 bit = 1U << (exit_code - SVM_EXIT_READ_DR0);
>> - if (svm->nested.ctl.intercept_dr & bit)
>> + if (__is_intercept(&svm->nested.ctl.intercepts, exit_code))
> Can I assume that all of these __<function> calls will become
> <function> calls when the grand unification is done? (Maybe I should
> just look ahead.)
>

The <function> calls are reserved for the active VMCB while these take a
vector. Probably it would be nicer to call them
vmcb_{set,clr,is}_intercept and make them take a struct
vmcb_control_area*, but apart from that the concept is fine

Once we do the vmcb01/vmcb02/vmcb12 work, there will not be anymore
&svm->nested.ctl (replaced by &svm->nested.vmcb12->ctl) and we will be
able to change them to take a struct vmcb*. Then is_intercept would for
example be simply:

return vmcb_is_intercept(svm->vmcb, nr);

as expected.

Paolo

\
 
 \ /
  Last update: 2020-07-30 01:13    [W:0.107 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site