[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3774d86-5589-4b01-a633-ae28794a4cfd@zytor.com>
Date: Thu, 31 Jul 2025 18:35:46 -0700
From: Xin Li <xin@...or.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Chao Gao <chao.gao@...el.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, pbonzini@...hat.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com
Subject: Re: [PATCH v1 2/4] KVM: x86: Introduce MSR read/write emulation
helpers
>>>> +
>>>> handled = !handle_fastpath_set_x2apic_icr_irqoff(vcpu, data);
>>>> break;
>>>> case MSR_IA32_TSC_DEADLINE:
>>>> - data = kvm_read_edx_eax(vcpu);
>>>> + if (reg == VCPU_EXREG_EDX_EAX)
>>>> + data = kvm_read_edx_eax(vcpu);
>>>> + else
>>>> + data = kvm_register_read(vcpu, reg);
>>>> +
>>>
>>> Hoist this chunk out of the switch clause to avoid duplication.
>>
>> I thought about it, but didn't do so because the original code doesn't read
>> the MSR data from registers when a MSR is not being handled in the
>> fast path, which saves some cycles in most cases.
>
> Can you hold off on doing anything with this series? Mostly to save your time.
Sure.
>
> Long story short, I unexpectedly dove into the fastpath code this week while sorting
> out an issue with the mediated PMU series, and I ended up with a series of patches
> to clean things up for both the mediated PMU series and for this series.
>
> With luck, I'll get the cleanups, the mediated PMU series, and a v2 of this series
> posted tomorrow (I also have some feedback on VCPU_EXREG_EDX_EAX; we can avoid it
> entirely without much fuss).
>
Will wait and take a look when you post them.
Powered by blists - more mailing lists