@@ -15,7 +15,6 @@
#include <sys/io.h>
#include "qemu-kvm.h"
-#include "libkvm.h"
#include <pthread.h>
#include <sys/utsname.h>
#include <linux/kvm_para.h>
@@ -28,7 +27,7 @@
extern unsigned int kvm_shadow_memory;
-int kvm_set_tss_addr(kvm_context_t kvm, unsigned long addr)
+static int kvm_set_tss_addr(kvm_context_t kvm, unsigned long addr)
{
int r;
@@ -22,7 +22,6 @@
#include "qemu-thread.h"
#include "qemu-kvm.h"
-#include "libkvm.h"
#include <pthread.h>
#include <sys/utsname.h>
@@ -84,9 +83,6 @@ static QLIST_HEAD(, ioperm_data) ioperm_head;
#define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
-int kvm_abi = EXPECTED_KVM_API_VERSION;
-int kvm_page_size;
-
static int handle_unhandled(uint64_t reason)
{
fprintf(stderr, "kvm: unhandled exit %" PRIx64 "\n", reason);
@@ -162,8 +158,6 @@ int kvm_init(void)
fprintf(stderr, "kvm userspace version too old\n");
goto out_close;
}
- kvm_abi = r;
- kvm_page_size = getpagesize();
kvm_state = qemu_mallocz(sizeof(*kvm_state));
kvm_context = &kvm_state->kvm_context;
@@ -43,9 +43,6 @@
#define MAX_VCPUS 16
#endif
-/* kvm abi verison variable */
-extern int kvm_abi;
-
/**
* \brief The KVM context
*
@@ -457,14 +454,6 @@ int kvm_enable_vapic(CPUState *env, uint64_t vapic);
#endif
-#if defined(__s390__)
-int kvm_s390_initial_reset(kvm_context_t kvm, int slot);
-int kvm_s390_interrupt(kvm_context_t kvm, int slot,
- struct kvm_s390_interrupt *kvmint);
-int kvm_s390_set_initial_psw(kvm_context_t kvm, int slot, psw_t psw);
-int kvm_s390_store_status(kvm_context_t kvm, int slot, unsigned long addr);
-#endif
-
#ifdef KVM_CAP_DEVICE_ASSIGNMENT
/*!
* \brief Notifies host kernel about a PCI device to be assigned to a guest
deleted file mode 100644
@@ -1,28 +0,0 @@
-/*
- * This header is for functions & variables that will ONLY be
- * used inside libkvm for x86.
- * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
- * WITHIN LIBKVM.
- *
- * derived from libkvm.c
- *
- * Copyright (C) 2006 Qumranet, Inc.
- *
- * Authors:
- * Avi Kivity <avi@qumranet.com>
- * Yaniv Kamay <yaniv@qumranet.com>
- *
- * This work is licensed under the GNU LGPL license, version 2.
- */
-
-#ifndef KVM_X86_H
-#define KVM_X86_H
-
-#define PAGE_SIZE 4096ul
-#define PAGE_MASK (~(PAGE_SIZE - 1))
-
-int kvm_set_tss_addr(kvm_context_t kvm, unsigned long addr);
-
-#define smp_wmb() asm volatile("" ::: "memory")
-
-#endif
deleted file mode 100644
@@ -1,102 +0,0 @@
-/*
- * This file contains the powerpc specific implementation for the
- * architecture dependent functions defined in kvm-common.h and
- * libkvm.h
- *
- * Copyright (C) 2006 Qumranet, Inc.
- *
- * Authors:
- * Avi Kivity <avi@qumranet.com>
- * Yaniv Kamay <yaniv@qumranet.com>
- *
- * Copyright IBM Corp. 2007,2008
- * Authors:
- * Jerone Young <jyoung5@us.ibm.com>
- * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
- *
- * This work is licensed under the GNU LGPL license, version 2.
- */
-
-#include "libkvm-all.h"
-#include "libkvm.h"
-#include <errno.h>
-#include <stdio.h>
-#include <inttypes.h>
-
-int handle_dcr(kvm_vcpu_context_t vcpu)
-{
- int ret = 0;
- struct kvm_run *run = vcpu->run;
- kvm_context_t kvm = vcpu->kvm;
-
- if (run->dcr.is_write)
- ret = kvm->callbacks->powerpc_dcr_write(vcpu,
- run->dcr.dcrn,
- run->dcr.data);
- else
- ret = kvm->callbacks->powerpc_dcr_read(vcpu,
- run->dcr.dcrn,
- &(run->dcr.data));
-
- return ret;
-}
-
-void kvm_show_code(kvm_vcpu_context_t vcpu)
-{
- fprintf(stderr, "%s: Operation not supported\n", __FUNCTION__);
-}
-
-void kvm_show_regs(kvm_vcpu_context_t vcpu)
-{
- struct kvm_regs regs;
- int i;
-
- if (kvm_get_regs(vcpu, ®s))
- return;
-
- fprintf(stderr,"guest vcpu #%d\n", vcpu);
- fprintf(stderr,"pc: %016"PRIx64" msr: %016"PRIx64"\n",
- regs.pc, regs.msr);
- fprintf(stderr,"lr: %016"PRIx64" ctr: %016"PRIx64"\n",
- regs.lr, regs.ctr);
- fprintf(stderr,"srr0: %016"PRIx64" srr1: %016"PRIx64"\n",
- regs.srr0, regs.srr1);
- for (i=0; i<32; i+=4)
- {
- fprintf(stderr, "gpr%02d: %016"PRIx64" %016"PRIx64" %016"PRIx64
- " %016"PRIx64"\n", i,
- regs.gpr[i],
- regs.gpr[i+1],
- regs.gpr[i+2],
- regs.gpr[i+3]);
- }
-
- fflush(stdout);
-}
-
-int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,
- void **vm_mem)
-{
- int r;
-
- r = kvm_init_coalesced_mmio(kvm);
- if (r < 0)
- return r;
-
- return 0;
-}
-
-int kvm_arch_run(kvm_vcpu_context_t vcpu)
-{
- int ret = 0;
-
- switch (vcpu->run->exit_reason){
- case KVM_EXIT_DCR:
- ret = handle_dcr(vcpu);
- break;
- default:
- ret = 1;
- break;
- }
- return ret;
-}
deleted file mode 100644
@@ -1,36 +0,0 @@
-/*
- * 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) 2006 Qumranet, Inc.
- *
- * Authors:
- * Avi Kivity <avi@qumranet.com>
- * Yaniv Kamay <yaniv@qumranet.com>
- *
- * Copyright 2007 IBM Corporation.
- * Added by: Jerone Young <jyoung5@us.ibm.com>
- *
- * This work is licensed under the GNU LGPL license, version 2.
- */
-
-#ifndef KVM_POWERPC_H
-#define KVM_POWERPC_H
-
-#include "libkvm-all.h"
-
-extern int kvm_page_size;
-
-#define PAGE_SIZE kvm_page_size
-#define PAGE_MASK (~(PAGE_SIZE - 1))
-
-static inline void eieio(void)
-{
- asm volatile("eieio" : : : "memory");
-}
-
-#define smp_wmb() eieio()
-
-#endif