Re: [PATCH v2 7/8] KVM: x86: Add helpers to test/mark reg availability and dirtiness

2019-10-09 Thread Paolo Bonzini
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.re

Re: [PATCH v2 7/8] KVM: x86: Add helpers to test/mark reg availability and dirtiness

2019-09-30 Thread Vitaly Kuznetsov
Sean Christopherson writes: > Add helpers to prettify code that tests and/or marks whether or not a > register is available and/or dirty. > > Suggested-by: Vitaly Kuznetsov > Signed-off-by: Sean Christopherson > --- > arch/x86/kvm/kvm_cache_regs.h | 45 +-- > ar

[PATCH v2 7/8] KVM: x86: Add helpers to test/mark reg availability and dirtiness

2019-09-27 Thread Sean Christopherson
Add helpers to prettify code that tests and/or marks whether or not a register is available and/or dirty. Suggested-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson --- arch/x86/kvm/kvm_cache_regs.h | 45 +-- arch/x86/kvm/vmx/nested.c | 4 ++-- arch/x