[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09c74206-ded2-900f-ef28-a2c5065a6626@redhat.com>
Date: Fri, 2 Apr 2021 09:14:54 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>,
Maxim Levitsky <mlevitsk@...hat.com>
Cc: kvm@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Wanpeng Li <wanpengli@...cent.com>,
Borislav Petkov <bp@...en8.de>,
Jim Mattson <jmattson@...gle.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Joerg Roedel <joro@...tes.org>,
Ingo Molnar <mingo@...hat.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>
Subject: Re: [PATCH 2/4] KVM: x86: separate pending and injected exception
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 advantage too.
>> + struct kvm_exception_payload {
>> + bool valid;
>> + unsigned long value;
>> u8 nested_apf;
>> - } exception;
>> + } exception_payload;
>
> Hmm, even if it's dead code at this time, I think the exception payload should
> be part of 'struct kvm_queued_exception'. The payload is very much tied to a
> single exception.
Agreed, when handling injected exceptions you can WARN that there is no
payload.
Paolo
Powered by blists - more mailing lists