From: Keir Fraser Date: Fri, 7 Jan 2011 16:59:53 +0000 (+0000) Subject: x86 asid: Do not check for per-cpu asid state being already initialised. X-Git-Tag: 4.1.0-rc1~60 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fb8b727a9c76311d5f876eeffd5a62e2900e7e82;p=people%2Fvhanquez%2Fxen-unstable.git 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 --- 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);