From 2f5d40aab98f5c4d6ca0ff71adb349610295256e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 7 Jan 2011 16:59:53 +0000 Subject: [PATCH] x86 asid: Do not check for per-cpu asid state being already initialised. It cannot be, since per-cpu data is re-allocated and zeroed across CPU hotplug. Th ecomment about resetting teh per-cpu generation counter is incorrect, since all vcpus must have been migrated to other cpus while this cpu was offline, and that resets the per-vcpu generation stamp. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/asid.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/xen/arch/x86/hvm/asid.c b/xen/arch/x86/hvm/asid.c index d6be9d1120..473b0216e4 100644 --- a/xen/arch/x86/hvm/asid.c +++ b/xen/arch/x86/hvm/asid.c @@ -52,7 +52,6 @@ struct hvm_asid_data { u32 next_asid; u32 max_asid; bool_t disabled; - bool_t initialised; }; static DEFINE_PER_CPU(struct hvm_asid_data, hvm_asid_data); @@ -62,14 +61,6 @@ void hvm_asid_init(int nasids) static s8 g_disabled = -1; struct hvm_asid_data *data = &this_cpu(hvm_asid_data); - /* - * If already initialised, we just bump the generation to force a TLB - * flush. Resetting the generation could be dangerous, if VCPUs still - * exist that reference earlier generations on this CPU. - */ - if ( test_and_set_bool(data->initialised) ) - return hvm_asid_flush_core(); - data->max_asid = nasids - 1; data->disabled = (nasids <= 1); -- 2.30.2