2 * libkvm-ia64.c :Kernel-based Virtual Machine control library for ia64.
4 * This library provides an API to control the kvm hardware virtualization
7 * Copyright (C) 2006 Qumranet
11 * Avi Kivity <avi@qumranet.com>
12 * Yaniv Kamay <yaniv@qumranet.com>
14 * Copyright (C) 2007 Intel
15 * Added by : Zhang Xiantao <xiantao.zhang@intel.com>
17 * This work is licensed under the GNU LGPL license, version 2.
24 #include <sys/ioctl.h>
31 #include <sys/types.h>
36 int kvm_arch_create_default_phys_mem(kvm_context_t kvm
,
37 unsigned long phys_mem_bytes
,
42 zfd
= open("/dev/zero", O_RDONLY
);
44 perror("open /dev/zero");
47 mmap(*vm_mem
+ 0xa8000, 0x8000, PROT_READ
|PROT_WRITE
,
48 MAP_PRIVATE
|MAP_FIXED
, zfd
, 0);
55 int kvm_alloc_kernel_memory(kvm_context_t kvm
, unsigned long memory
,
61 void *kvm_create_kernel_phys_mem(kvm_context_t kvm
, unsigned long phys_start
,
62 unsigned long len
, int log
, int writable
)
67 int kvm_arch_create(kvm_context_t kvm
, unsigned long phys_mem_bytes
,
73 int kvm_arch_run(struct kvm_run
*run
,kvm_context_t kvm
, int vcpu
)
77 switch (run
->exit_reason
) {
86 void kvm_show_code(kvm_context_t kvm
, int vcpu
)
88 fprintf(stderr
, "kvm_show_code not supported yet!\n");
91 void kvm_show_regs(kvm_context_t kvm
, int vcpu
)
93 fprintf(stderr
,"kvm_show_regs not supportted today!\n");