]> xenbits.xensource.com Git - people/vhanquez/xen-unstable.git/commitdiff
x86 asid: Do not check for per-cpu asid state being already initialised.
authorKeir Fraser <keir@xen.org>
Fri, 7 Jan 2011 16:59:53 +0000 (16:59 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 7 Jan 2011 16:59:53 +0000 (16:59 +0000)
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 <keir@xen.org>
xen/arch/x86/hvm/asid.c

index d6be9d11209bf294645f5554bb565cffb5c6e0ce..473b0216e4a695b194476f1f3e558ed5db2046a7 100644 (file)
@@ -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);