]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Move arch dependent files to new directory arch/x86/kvm/
authorAvi Kivity <avi@qumranet.com>
Sun, 16 Dec 2007 09:02:48 +0000 (11:02 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 16:01:18 +0000 (18:01 +0200)
This paves the way for multiple architecture support.  Note that while
ioapic.c could potentially be shared with ia64, it is also moved.

Signed-off-by: Avi Kivity <avi@qumranet.com>
28 files changed:
arch/x86/Kconfig
arch/x86/Makefile
arch/x86/kvm/Kconfig [moved from drivers/kvm/Kconfig with 100% similarity]
arch/x86/kvm/Makefile [moved from drivers/kvm/Makefile with 52% similarity]
arch/x86/kvm/i8259.c [moved from drivers/kvm/i8259.c with 99% similarity]
arch/x86/kvm/ioapic.c [moved from drivers/kvm/ioapic.c with 99% similarity]
arch/x86/kvm/irq.c [moved from drivers/kvm/irq.c with 98% similarity]
arch/x86/kvm/irq.h [moved from drivers/kvm/irq.h with 99% similarity]
arch/x86/kvm/kvm_svm.h [moved from drivers/kvm/kvm_svm.h with 96% similarity]
arch/x86/kvm/lapic.c [moved from drivers/kvm/lapic.c with 99% similarity]
arch/x86/kvm/mmu.c [moved from drivers/kvm/mmu.c with 99% similarity]
arch/x86/kvm/mmu.h [moved from drivers/kvm/mmu.h with 96% similarity]
arch/x86/kvm/paging_tmpl.h [moved from drivers/kvm/paging_tmpl.h with 100% similarity]
arch/x86/kvm/segment_descriptor.h [moved from drivers/kvm/segment_descriptor.h with 100% similarity]
arch/x86/kvm/svm.c [moved from drivers/kvm/svm.c with 99% similarity]
arch/x86/kvm/svm.h [moved from drivers/kvm/svm.h with 100% similarity]
arch/x86/kvm/vmx.c [moved from drivers/kvm/vmx.c with 99% similarity]
arch/x86/kvm/vmx.h [moved from drivers/kvm/vmx.h with 100% similarity]
arch/x86/kvm/x86.c [moved from drivers/kvm/x86.c with 99% similarity]
arch/x86/kvm/x86_emulate.c [moved from drivers/kvm/x86_emulate.c with 99% similarity]
drivers/Kconfig
drivers/Makefile
drivers/kvm/iodev.h
drivers/kvm/kvm_main.c
include/asm-x86/kvm_host.h [moved from drivers/kvm/x86.h with 99% similarity]
include/asm-x86/kvm_x86_emulate.h [moved from drivers/kvm/x86_emulate.h with 100% similarity]
include/linux/kvm_host.h [moved from drivers/kvm/kvm.h with 98% similarity]
include/linux/kvm_types.h [moved from drivers/kvm/types.h with 100% similarity]

index d289cfcf92c402bf33c46a155b942a47842387d1..65b449134cf7b15cbc2bdf66993b813fa6f409f0 100644 (file)
@@ -1599,4 +1599,6 @@ source "security/Kconfig"
 
 source "crypto/Kconfig"
 
+source "arch/x86/kvm/Kconfig"
+
 source "lib/Kconfig"
index b08f18261df662a4525ac7af2c73fec5b3e776ee..da8f4129780bd8d25801eeee7742986ec92dddbc 100644 (file)
@@ -7,6 +7,8 @@ else
         KBUILD_DEFCONFIG := $(ARCH)_defconfig
 endif
 
+core-$(CONFIG_KVM) += arch/x86/kvm/
+
 # BITS is used as extension for files which are available in a 32 bit
 # and a 64 bit version to simplify shared Makefiles.
 # e.g.: obj-y += foo_$(BITS).o
similarity index 100%
rename from drivers/kvm/Kconfig
rename to arch/x86/kvm/Kconfig
similarity index 52%
rename from drivers/kvm/Makefile
rename to arch/x86/kvm/Makefile
index cf18ad46e987ab7c19a75eef2ab485460568ef10..880ffe403b35de32db381330f9bb7cac982149f1 100644 (file)
@@ -2,7 +2,12 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
-kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o i8259.o irq.o lapic.o ioapic.o
+common-objs = $(addprefix ../../../drivers/kvm/, kvm_main.o)
+
+EXTRA_CFLAGS += -I drivers/kvm
+
+kvm-objs := $(common-objs) x86.o mmu.o x86_emulate.o i8259.o irq.o lapic.o \
+       ioapic.o
 obj-$(CONFIG_KVM) += kvm.o
 kvm-intel-objs = vmx.o
 obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
similarity index 99%
rename from drivers/kvm/i8259.c
rename to arch/x86/kvm/i8259.c
index b3cad632f3d54f742cc2061b51d3622808696e96..ab29cf2def47cc0180c903491ef71ea52684934f 100644 (file)
@@ -27,7 +27,8 @@
  */
 #include <linux/mm.h>
 #include "irq.h"
-#include "kvm.h"
+
+#include <linux/kvm_host.h>
 
 /*
  * set irq level. If an edge is detected, then the IRR is set to 1
similarity index 99%
rename from drivers/kvm/ioapic.c
rename to arch/x86/kvm/ioapic.c
index f8236774c1b44353661e027a4c09bc41e9bf19fe..72f12f75495d6f2c78601b4724536facb2e4bfa1 100644 (file)
@@ -26,9 +26,7 @@
  *  Based on Xen 3.1 code.
  */
 
-#include "kvm.h"
-#include "x86.h"
-
+#include <linux/kvm_host.h>
 #include <linux/kvm.h>
 #include <linux/mm.h>
 #include <linux/highmem.h>
similarity index 98%
rename from drivers/kvm/irq.c
rename to arch/x86/kvm/irq.c
index 59b47c55fc76b50f861d82b77df850dd22972b52..07a09aad4fd61d7f3ab167142aadcdb7803fd93c 100644 (file)
@@ -20,9 +20,8 @@
  */
 
 #include <linux/module.h>
+#include <linux/kvm_host.h>
 
-#include "kvm.h"
-#include "x86.h"
 #include "irq.h"
 
 /*
similarity index 99%
rename from drivers/kvm/irq.h
rename to arch/x86/kvm/irq.h
index 6e023dc3f848273495e02cca4f5ae6fa82d94fdd..6316638eec9fc6f94fe6b702db3ce290947b1084 100644 (file)
@@ -24,9 +24,8 @@
 
 #include <linux/mm_types.h>
 #include <linux/hrtimer.h>
-#include <asm/kvm.h>
+#include <linux/kvm_host.h>
 #include "iodev.h"
-#include "kvm.h"
 
 struct kvm;
 struct kvm_vcpu;
similarity index 96%
rename from drivers/kvm/kvm_svm.h
rename to arch/x86/kvm/kvm_svm.h
index a0e415daef5b0142ba00cf2b5cec9b9e12b53d5b..ecdfe97e4635393eb0df2ba755ffd0150443e7dd 100644 (file)
@@ -4,10 +4,10 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/list.h>
+#include <linux/kvm_host.h>
 #include <asm/msr.h>
 
 #include "svm.h"
-#include "kvm.h"
 
 static const u32 host_save_user_msrs[] = {
 #ifdef CONFIG_X86_64
similarity index 99%
rename from drivers/kvm/lapic.c
rename to arch/x86/kvm/lapic.c
index 8c74bf184a07821355dde3744c1ed1d123399742..4076331b01eef7d696cd8e2bd16daf0985f5cf22 100644 (file)
@@ -17,9 +17,7 @@
  * the COPYING file in the top-level directory.
  */
 
-#include "kvm.h"
-#include "x86.h"
-
+#include <linux/kvm_host.h>
 #include <linux/kvm.h>
 #include <linux/mm.h>
 #include <linux/highmem.h>
similarity index 99%
rename from drivers/kvm/mmu.c
rename to arch/x86/kvm/mmu.c
index c26d83f86a3a2d391f4eb38e11dda91313ab5444..401eb7ce32077130a81b89122c53d22da18a9aa6 100644 (file)
  */
 
 #include "vmx.h"
-#include "kvm.h"
-#include "x86.h"
 #include "mmu.h"
 
+#include <linux/kvm_host.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
similarity index 96%
rename from drivers/kvm/mmu.h
rename to arch/x86/kvm/mmu.h
index cbfc272262df3beb9b014d4179e2206ebe2d31f5..1fce19ec7a2380c61c79ef0f50e71e4c39d2af66 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __KVM_X86_MMU_H
 #define __KVM_X86_MMU_H
 
-#include "kvm.h"
+#include <linux/kvm_host.h>
 
 static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
 {
similarity index 99%
rename from drivers/kvm/svm.c
rename to arch/x86/kvm/svm.c
index e606f6d186693aff263503dbc08dcc53f6c5f502..3d4b71a94440eae2b426d7cc8f0ec86bafa95a9e 100644 (file)
@@ -13,9 +13,9 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "x86.h"
+#include <linux/kvm_host.h>
+
 #include "kvm_svm.h"
-#include "x86_emulate.h"
 #include "irq.h"
 #include "mmu.h"
 
similarity index 100%
rename from drivers/kvm/svm.h
rename to arch/x86/kvm/svm.h
similarity index 99%
rename from drivers/kvm/vmx.c
rename to arch/x86/kvm/vmx.c
index 11ca2340d38fb77890052f07f48be5716c5c96d4..fc494aff5d8b92a15a88a77f0c506cbb34363283 100644 (file)
  *
  */
 
-#include "kvm.h"
-#include "x86.h"
-#include "x86_emulate.h"
 #include "irq.h"
 #include "vmx.h"
 #include "segment_descriptor.h"
 #include "mmu.h"
 
+#include <linux/kvm_host.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
similarity index 100%
rename from drivers/kvm/vmx.h
rename to arch/x86/kvm/vmx.h
similarity index 99%
rename from drivers/kvm/x86.c
rename to arch/x86/kvm/x86.c
index b37c0093d728996efd694c766febb60938b554e4..5902c5cbc1bbd721fdfa805ff27341e62c4e271f 100644 (file)
@@ -14,9 +14,7 @@
  *
  */
 
-#include "kvm.h"
-#include "x86.h"
-#include "x86_emulate.h"
+#include <linux/kvm_host.h>
 #include "segment_descriptor.h"
 #include "irq.h"
 #include "mmu.h"
similarity index 99%
rename from drivers/kvm/x86_emulate.c
rename to arch/x86/kvm/x86_emulate.c
index 50b133f68743c4c0945e3c50be0304a7a6927050..79586003397aa7c90bc171f020710ce1fa2054e0 100644 (file)
 #include <public/xen.h>
 #define DPRINTF(_f, _a ...) printf(_f , ## _a)
 #else
-#include "kvm.h"
-#include "x86.h"
+#include <linux/kvm_host.h>
 #define DPRINTF(x...) do {} while (0)
 #endif
-#include "x86_emulate.h"
 #include <linux/module.h>
+#include <asm/kvm_x86_emulate.h>
 
 /*
  * Opcode effective-address decode tables.
index f4076d9e9902b88981c840097a9f283526c1e522..08d4ae201597cde366f07efc2a4a8f4f8e08d83e 100644 (file)
@@ -90,8 +90,6 @@ source "drivers/dca/Kconfig"
 
 source "drivers/auxdisplay/Kconfig"
 
-source "drivers/kvm/Kconfig"
-
 source "drivers/uio/Kconfig"
 
 source "drivers/virtio/Kconfig"
index d92d4d82d001d92b41f1facfe5ee70961e881c70..9e1f808e43cfe9fb793d284e10788ca76e458702 100644 (file)
@@ -47,7 +47,6 @@ obj-$(CONFIG_SPI)             += spi/
 obj-$(CONFIG_PCCARD)           += pcmcia/
 obj-$(CONFIG_DIO)              += dio/
 obj-$(CONFIG_SBUS)             += sbus/
-obj-$(CONFIG_KVM)              += kvm/
 obj-$(CONFIG_ZORRO)            += zorro/
 obj-$(CONFIG_MAC)              += macintosh/
 obj-$(CONFIG_ATA_OVER_ETH)     += block/aoe/
index eb9e8a71843a7417474008c23bb8edb0c797b651..c14e642027b27b9bab271356d53c5e7ed3b27d4c 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __KVM_IODEV_H__
 #define __KVM_IODEV_H__
 
-#include "types.h"
+#include <linux/kvm_types.h>
 
 struct kvm_io_device {
        void (*read)(struct kvm_io_device *this,
index ae2a1bf640bc9e453c98ffdf979846b05129e6f6..4026d7d64296c77967486eb77d2fafcf12656c64 100644 (file)
@@ -15,9 +15,9 @@
  *
  */
 
-#include "kvm.h"
 #include "iodev.h"
 
+#include <linux/kvm_host.h>
 #include <linux/kvm.h>
 #include <linux/module.h>
 #include <linux/errno.h>
similarity index 99%
rename from drivers/kvm/x86.h
rename to include/asm-x86/kvm_host.h
index dfb8091971a9151d2e940f6c1bcc86049d153c81..28940e1a97138df7cfa9939488125cd576c7fb77 100644 (file)
@@ -8,19 +8,18 @@
  *
  */
 
-#ifndef KVM_X86_H
-#define KVM_X86_H
+#ifndef ASM_KVM_HOST_H
+#define ASM_KVM_HOST_H
 
 #include <linux/types.h>
 #include <linux/mm.h>
 
 #include <linux/kvm.h>
 #include <linux/kvm_para.h>
+#include <linux/kvm_types.h>
 
 #include <asm/desc.h>
 
-#include "types.h"
-
 #define CR3_PAE_RESERVED_BITS ((X86_CR3_PWT | X86_CR3_PCD) - 1)
 #define CR3_NONPAE_RESERVED_BITS ((PAGE_SIZE-1) & ~(X86_CR3_PWT | X86_CR3_PCD))
 #define CR3_L_MODE_RESERVED_BITS (CR3_NONPAE_RESERVED_BITS|0xFFFFFF0000000000ULL)
@@ -102,7 +101,7 @@ enum {
        VCPU_SREG_LDTR,
 };
 
-#include "x86_emulate.h"
+#include <asm/kvm_x86_emulate.h>
 
 #define KVM_NR_MEM_OBJS 40
 
similarity index 98%
rename from drivers/kvm/kvm.h
rename to include/linux/kvm_host.h
index bf6a3b330a3d2ee5919a101e74185a88a6cb56a1..a85d5b6943de936b534c2639f43b1e1c4a71a389 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __KVM_H
-#define __KVM_H
+#ifndef __KVM_HOST_H
+#define __KVM_HOST_H
 
 /*
  * This work is licensed under the terms of the GNU GPL, version 2.  See
@@ -20,9 +20,9 @@
 #include <linux/kvm.h>
 #include <linux/kvm_para.h>
 
-#include "types.h"
+#include <linux/kvm_types.h>
 
-#include "x86.h"
+#include <asm/kvm_host.h>
 
 #define KVM_MAX_VCPUS 4
 #define KVM_MEMORY_SLOTS 8