[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <a95c89cdcdca4749a1ca4d779ebd4a0a@huawei.com>
Date: Fri, 7 Feb 2020 02:48:14 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH] KVM: x86: remove duplicated KVM_REQ_EVENT request
Hi:
Vitaly Kuznetsov <vkuznets@...hat.com> writes:
> linmiaohe <linmiaohe@...wei.com> writes:
>> From: Miaohe Lin <linmiaohe@...wei.com>
>>
>> The KVM_REQ_EVENT request is already made in kvm_set_rflags(). We
>> should not make it again.
>> kvm_rip_write(vcpu, ctxt->eip);
>> kvm_set_rflags(vcpu, ctxt->eflags);
>> - kvm_make_request(KVM_REQ_EVENT, vcpu);
>
> I would've actually done it the other way around and removed
> kvm_make_request() from kvm_set_rflags() as it is not an obvious behavior (e.g. why kvm_rip_write() doens't do that and kvm_set_rflags() does ?) adding kvm_make_request() to all call sites.
>
>In case this looks like too big of a change with no particular gain I'd suggest you at least leave a comment above kvm_set_rflags(), something like
>
>"kvm_make_request() also requests KVM_REQ_EVENT"
I think adding kvm_make_request() to all call sites is too big without particular gain. And also leave a comment above
kvm_set_rflags() maybe isn't needed as rflags updates is an site that can trigger event injection. Please see commit
(3842d135ff24 KVM: Check for pending events before attempting injection) for detail.
What do you think? Thanks for your review anyway. :)
Powered by blists - more mailing lists