Re: [PATCH 2/4] KVM: x86: separate pending and injected exception

2021-04-02 Thread Sean Christopherson
On Fri, Apr 02, 2021, Paolo Bonzini wrote: > On 02/04/21 01:05, Sean Christopherson wrote: > > > > > > +struct kvm_queued_exception { > > > + bool valid; > > > + u8 nr; > > > > If we're refactoring all this code anyways, maybe change "nr" to something a > > bit more descriptive? E.g. vector. >

Re: [PATCH 2/4] KVM: x86: separate pending and injected exception

2021-04-02 Thread Paolo Bonzini
On 02/04/21 01:05, Sean Christopherson wrote: +struct kvm_queued_exception { + bool valid; + u8 nr; If we're refactoring all this code anyways, maybe change "nr" to something a bit more descriptive? E.g. vector. "nr" is part of the userspace structure, so consistency is an

Re: [PATCH 2/4] KVM: x86: separate pending and injected exception

2021-04-01 Thread Sean Christopherson
On Thu, Apr 01, 2021, Maxim Levitsky wrote: > Use 'pending_exception' and 'injected_exception' fields > to store the pending and the injected exceptions. > > After this patch still only one is active, but > in the next patch both could co-exist in some cases. Please explain _why_. >

[PATCH 2/4] KVM: x86: separate pending and injected exception

2021-04-01 Thread Maxim Levitsky
Use 'pending_exception' and 'injected_exception' fields to store the pending and the injected exceptions. After this patch still only one is active, but in the next patch both could co-exist in some cases. Signed-off-by: Maxim Levitsky --- arch/x86/include/asm/kvm_host.h | 25 --