lkml.org 
[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 7/8] KVM: x86: Add helpers to test/mark reg availability and dirtiness
From
Date
On 30/09/19 11:32, Vitaly Kuznetsov wrote:
>> +static inline void kvm_register_mark_dirty(struct kvm_vcpu *vcpu,
>> + enum kvm_reg reg)
>> +{
>> + __set_bit(reg, (unsigned long *)&vcpu->arch.regs_avail);
>> + __set_bit(reg, (unsigned long *)&vcpu->arch.regs_dirty);
>> +}
>> +
> Personal preference again, but I would've named this
> "kvm_register_mark_avail_dirty" to indicate what we're actually doing
> (and maybe even shortened 'kvm_register_' to 'kvm_reg_' everywhere as I
> can't see how 'reg' could be misread).
>

I think this is okay, a register can be either not cached, available or
dirty. But dirty means we have to write it back, so it implies
availability.

Paolo

\
 
 \ /
  Last update: 2019-10-09 13:00    [W:0.048 / U:33.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site