From: Jerone Young <[EMAIL PROTECTED]> This patch is to add initial skelton code for powerpc. No big implimentations as kernel code is still being worked out. But it can be a good template for other architectures. Once kernel code makes it upstream (and is for the most part finalized) then implimentaions will follow.
Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/libkvm/config-powerpc.mak b/libkvm/config-powerpc.mak new file mode 100644 index 0000000..07e5959 --- /dev/null +++ b/libkvm/config-powerpc.mak @@ -0,0 +1,6 @@ + +LIBDIR := /lib +CFLAGS += -m32 +CFLAGS += -D__powerpc__ + +libkvm-$(ARCH)-objs := libkvm-powerpc.o diff --git a/libkvm/kvm-powerpc.h b/libkvm/kvm-powerpc.h new file mode 100644 index 0000000..6b00b9c --- /dev/null +++ b/libkvm/kvm-powerpc.h @@ -0,0 +1,23 @@ +/* + * This header is for functions & variables that will ONLY be + * used inside libkvm for powerpc. + * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE + * WITHIN LIBKVM. + * + * Copyright (C) 2007 IBM + * + * Authors: + * Jerone Young <[EMAIL PROTECTED]> + * + * This work is licensed under the GNU LGPL license, version 2. + */ + +#ifndef KVM_POWERPC_H +#define KVM_POWERPC_H + +#include "kvm-common.h" + +#define PAGE_SIZE 4096ul +#define PAGE_MASK (~(PAGE_SIZE - 1)) + +#endif diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c new file mode 100644 index 0000000..5a8c556 --- /dev/null +++ b/libkvm/libkvm-powerpc.c @@ -0,0 +1,34 @@ +#include "libkvm.h" +#include "kvm-powerpc.h" +#include <errno.h> + +int kvm_run_abi10(kvm_context_t kvm, int vcpu) +{ + return -ENOSYS; +} + +void kvm_show_code(kvm_context_t kvm, int vcpu) +{ +} + +void kvm_show_regs(kvm_context_t kvm, int vcpu) +{ +} + +int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes, + void **vm_mem) +{ + return 0; +} + +int kvm_arch_create_default_phys_mem(kvm_context_t kvm, + unsigned long phys_mem_bytes, + void **vm_mem) +{ + return 0; +} + +int kvm_arch_run(struct kvm_run *run, kvm_context_t kvm, int vcpu) +{ + return 0; +} diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 96793b6..2bab780 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -44,6 +44,10 @@ #include "kvm-ia64.h" #endif +#if defined(__powerpc__) +#include "kvm-powerpc.h" +#endif + int kvm_abi = EXPECTED_KVM_API_VERSION; int kvm_page_size; ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits