[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR21MB0773253EB4F0CED66A9A6F6BDC1C0@CY4PR21MB0773.namprd21.prod.outlook.com>
Date: Wed, 19 Sep 2018 16:07:18 +0000
From: "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>
To: Tianyu Lan <Tianyu.Lan@...rosoft.com>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.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>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
vkuznets <vkuznets@...hat.com>,
Jork Loeser <Jork.Loeser@...rosoft.com>
Subject: RE: [PATCH V2 2/13] KVM/MMU: Add tlb flush with range helper function
From: Tianyu Lan Sent: Monday, September 17, 2018 8:18 PM
>
> +static void kvm_flush_remote_tlbs_with_range(struct kvm *kvm,
> + struct kvm_tlb_range *range)
> +{
> + int ret = -ENOTSUPP;
> +
> + if (range && kvm_x86_ops->tlb_remote_flush_with_range) {
> + /*
> + * Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in
> + * kvm_make_all_cpus_request.
> + */
> + long dirty_count = smp_load_acquire(&kvm->tlbs_dirty);
> +
> + ret = kvm_x86_ops->tlb_remote_flush_with_range(kvm, range);
> + cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
> + }
The comment and the code that manipulates kvm->tlbs_dirty appears
to have been copied from kvm_flush_remote_tlbs(). But the above
code doesn't call kvm_make_all_cpus_request(). I haven't traced
all the details, but it seems like the comment should be updated,
or the code isn't needed.
Michael
Powered by blists - more mailing lists