Skip to contentSkip to conversation

Architecture independence layer - v1 - basic mechanism

PATCH In review Christian Ehrhardt 2 participants 3 messages Aug 24, 2007 2 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 Architecture independence layer - v1 - basic mechanism

from Christian Ehrhardt

This contains the basic mechanism introducing new files and Kconfig/Makefile changes

---
 Kconfig    |   20 ++++++++++++++++----
 Makefile   |   14 ++++++++++++--
 kvm_arch.h |   14 ++++++++++++++
 x86.c      |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 x86.h      |    9 +++++++++
 5 files changed, 102 insertions(+), 6 deletions(-)
drivers/kvm/Kconfig +16 -4
index 445c6e4..c971d81 100644
@@ -3,14 +3,14 @@
 #
 menuconfig VIRTUALIZATION
     bool "Virtualization"
-    depends on X86
+    depends on X86 || POWERPC
     default y
 
 if VIRTUALIZATION
 
 config KVM
     tristate "Kernel-based Virtual Machine (KVM) support"
-    depends on X86 && EXPERIMENTAL
+    depends on EXPERIMENTAL
     select PREEMPT_NOTIFIERS
     select ANON_INODES
     ---help---
@@ -29,16 +29,28 @@ config KVM
 
 config KVM_INTEL
     tristate "KVM for Intel processors support"
-    depends on KVM
+    depends on KVM && X86
     ---help---
       Provides support for KVM on Intel processors equipped with the VT
       extensions.
 
 config KVM_AMD
     tristate "KVM for AMD processors support"
-    depends on KVM
+    depends on KVM && X86
     ---help---
       Provides support for KVM on AMD processors equipped with the AMD-V
       (SVM) extensions.
 
+config KVM_POWERPC_440
+    tristate "KVM for embedded PowerPC 440 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC 440 cores
+
+config KVM_POWERPC_E500
+    tristate "KVM for embedded PowerPC e500 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC e500 cores
+
 endif # VIRTUALIZATION
drivers/kvm/Makefile +12 -2
index c0a789f..c18431b 100644
@@ -2,9 +2,19 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
-kvm-objs := kvm_main.o mmu.o x86_emulate.o
-obj-$(CONFIG_KVM) += kvm.o
+kvm-objs := kvm_main.o
+
+ifeq ($(CONFIG_X86),y)
+kvm-objs += x86.o mmu.o x86_emulate.o
+
 kvm-intel-objs = vmx.o
 obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
 kvm-amd-objs = svm.o
 obj-$(CONFIG_KVM_AMD) += kvm-amd.o
+endif
+
+ifeq ($(CONFIG_POWERPC),y)
+kvm-objs += powerpc.o
+endif
+
+obj-$(CONFIG_KVM) += kvm.o
drivers/kvm/kvm_arch.h new file +8 -0
new file mode 100644
index 0000000..6658948
@@ -0,0 +1,14 @@
+#ifndef __KVM_ARCH_H
+#define __KVM_ARCH_H
+
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * This is the interface an arch module has to implement because this 

is what
+ * kvm_main gets linked against depending on arch selection.
+ */
+
+#include <linux/module.h>
+
+#endif

drivers/kvm/x86.c new file +51 -0

51 lines not on this page · raw message

drivers/kvm/x86.h new file +9 -0
new file mode 100644
index 0000000..021385e
@@ -0,0 +1,9 @@
+#ifndef __KVM_X86_H
+#define __KVM_X86_H
+
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ */
+
+#endif
Signature · 20 lines
Grüsse / regards, 
Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
[email protected]
[email protected]

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen 
Geschäftsführung: Herbert Kircher 
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): 46CEC68C.2040901-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org

#2 lore raw

drivers/kvm/Kconfig config KVM · line 54

Quoted 11 lines · Christian Ehrhardt
drivers/kvm/Kconfig +11 -0
+config KVM_POWERPC_440
+    tristate "KVM for embedded PowerPC 440 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC 440 cores
+
+config KVM_POWERPC_E500
+    tristate "KVM for embedded PowerPC e500 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC e500 cores

An off-the-topic question: is your implementation will be compatible with the PowerPC 7447A I have in my iBook G4 ?

Laurent

Signature · 2 lines
------------- Laurent.Vivier-6ktuUTfB/[email protected]  --------------
          "Software is hard" - Donald Knuth

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 46CEE286.9030707-6ktuUTfB/[email protected]

#4 lore raw
Quoted 18 lines · Laurent Vivier

drivers/kvm/Kconfig config KVM · line 54

Quoted 12 lines · Christian Ehrhardt
drivers/kvm/Kconfig +11 -0
+config KVM_POWERPC_440
+    tristate "KVM for embedded PowerPC 440 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC 440 cores
+
+config KVM_POWERPC_E500
+    tristate "KVM for embedded PowerPC e500 cores"
+    depends on KVM && POWERPC
+    ---help---
+      Provides support for KVM on embedded PowerPC e500 cores

An off-the-topic question: is your implementation will be compatible with the PowerPC 7447A I have in my iBook G4 ?

Quoted 2 lines

Laurent

ATM no, this processor core is not in scope of our current work.

Signature · 20 lines
Grüsse / regards, 
Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
[email protected]
[email protected]

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen 
Geschäftsführung: Herbert Kircher 
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/