[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d2c97f09-692a-25db-dd7c-1536325be1e5@microsoft.com>
Date: Thu, 14 Jun 2018 14:52:19 +0000
From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>
CC: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>
Subject: Re: [RFC Patch 3/3] KVM/x86: Add tlb_remote_flush callback support
for vmcs
On 6/14/2018 6:33 PM, Vitaly Kuznetsov wrote:
> Tianyu Lan <Tianyu.Lan@...rosoft.com> writes:
>
>> On 6/12/2018 11:12 PM, Vitaly Kuznetsov wrote:
>>> Tianyu Lan <Tianyu.Lan@...rosoft.com> writes:
>>>
>>>>
>>>> +static int vmx_remote_flush_tlb(struct kvm *kvm)
>>>> +{
>>>> + struct kvm_vcpu *vcpu = kvm_get_vcpu(kvm, 0);
>>>> +
>>>> + if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
>>>> + return -1;
>>>
>>> Why vcpu0? Can arch.mmu.root_hpa-s differ across vCPUs? What happens if
>>> they do?
>>
>> Yes, it may take place that arch.mmu.root_hpa is differ across vCPUs.
>> We may check all vcpu root_hpa and use the hypercall when there is only
>> one validated ept table. If not, go back to current way.
>>
>
> I'd suggest an optimization: keep track of wether root_hpas are equal
> across all vcpus (check this on change).
>
Good suggestion. I will try it. Thanks.
Powered by blists - more mailing lists