[PATCH 32/38] KVM: Move vmcs static variables to vmx.c

From: Avi Kivity
Date: Mon Nov 27 2006 - 07:43:00 EST


Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>

Index: linux-2.6/drivers/kvm/kvm_main.c
===================================================================
--- linux-2.6.orig/drivers/kvm/kvm_main.c
+++ linux-2.6/drivers/kvm/kvm_main.c
@@ -138,18 +138,6 @@ unsigned long segment_base(u16 selector)
}
EXPORT_SYMBOL_GPL(segment_base);

-DEFINE_PER_CPU(struct vmcs *, vmxarea);
-EXPORT_SYMBOL_GPL(per_cpu__vmxarea); /* temporary hack */
-DEFINE_PER_CPU(struct vmcs *, current_vmcs);
-EXPORT_SYMBOL_GPL(per_cpu__current_vmcs); /* temporary hack */
-
-struct vmcs_descriptor {
- int size;
- int order;
- u32 revision_id;
-} vmcs_descriptor;
-EXPORT_SYMBOL_GPL(vmcs_descriptor);
-
int kvm_read_guest(struct kvm_vcpu *vcpu,
gva_t addr,
unsigned long size,
Index: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -28,8 +28,8 @@
MODULE_AUTHOR("Qumranet");
MODULE_LICENSE("GPL");

-DECLARE_PER_CPU(struct vmcs *, vmxarea);
-DECLARE_PER_CPU(struct vmcs *, current_vmcs);
+static DEFINE_PER_CPU(struct vmcs *, vmxarea);
+static DEFINE_PER_CPU(struct vmcs *, current_vmcs);

#ifdef __x86_64__
#define HOST_IS_64 1
@@ -37,7 +37,7 @@ DECLARE_PER_CPU(struct vmcs *, current_v
#define HOST_IS_64 0
#endif

-extern struct vmcs_descriptor {
+static struct vmcs_descriptor {
int size;
int order;
u32 revision_id;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/