[PATCH] [3/13] Make kvm bad_page symbol static

From: Andi Kleen
Date: Fri Mar 07 2008 - 04:09:07 EST



Avoids global namespace clash with later patch that exports page_alloc's
bad_page. bad_page is not used outside kvm_main.c, so making it static is fine.

Cc: avi@xxxxxxxxxxxx

Signed-off-by: Andi Kleen <ak@xxxxxxx>

---
include/linux/kvm_host.h | 2 --
virt/kvm/kvm_main.c | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)

Index: linux/include/linux/kvm_host.h
===================================================================
--- linux.orig/include/linux/kvm_host.h
+++ linux/include/linux/kvm_host.h
@@ -150,8 +150,6 @@ void kvm_exit(void);
static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva);

-extern struct page *bad_page;
-
int is_error_page(struct page *page);
int kvm_is_error_hva(unsigned long addr);
int kvm_set_memory_region(struct kvm *kvm,
Index: linux/virt/kvm/kvm_main.c
===================================================================
--- linux.orig/virt/kvm/kvm_main.c
+++ linux/virt/kvm/kvm_main.c
@@ -52,6 +52,8 @@ MODULE_LICENSE("GPL");
DEFINE_SPINLOCK(kvm_lock);
LIST_HEAD(vm_list);

+static struct page *bad_page;
+
static cpumask_t cpus_hardware_enabled;

struct kmem_cache *kvm_vcpu_cache;
@@ -1271,8 +1273,6 @@ static struct sys_device kvm_sysdev = {
.cls = &kvm_sysdev_class,
};

-struct page *bad_page;
-
static inline
struct kvm_vcpu *preempt_notifier_to_vcpu(struct preempt_notifier *pn)
{
--
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/