2 * This header is for functions & variables that will ONLY be
3 * used inside libkvm for x86.
4 * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
7 * derived from libkvm.c
9 * Copyright (C) 2006 Qumranet, Inc.
12 * Avi Kivity <avi@qumranet.com>
13 * Yaniv Kamay <yaniv@qumranet.com>
15 * Copyright 2007 IBM Corporation.
17 * Jerone Young <jyoung5@us.ibm.com>
18 * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
21 * This work is licensed under the GNU LGPL license, version 2.
25 #include "kvm-powerpc.h"
29 int handle_dcr(struct kvm_run
*run
, kvm_context_t kvm
, int vcpu
)
33 if (run
->dcr
.is_write
)
34 ret
= kvm
->callbacks
->powerpc_dcr_write(vcpu
,
38 ret
= kvm
->callbacks
->powerpc_dcr_read(vcpu
,
45 int kvm_alloc_kernel_memory(kvm_context_t kvm
, unsigned long memory
,
48 fprintf(stderr
, "%s: Operation not supported\n", __FUNCTION__
);
52 void *kvm_create_kernel_phys_mem(kvm_context_t kvm
, unsigned long phys_start
,
53 unsigned long len
, int log
, int writable
)
55 fprintf(stderr
, "%s: Operation not supported\n", __FUNCTION__
);
59 void kvm_show_code(kvm_context_t kvm
, int vcpu
)
61 fprintf(stderr
, "%s: Operation not supported\n", __FUNCTION__
);
64 void kvm_show_regs(kvm_context_t kvm
, int vcpu
)
69 if (kvm_get_regs(kvm
, vcpu
, ®s
))
72 fprintf(stderr
,"guest vcpu #%d\n", vcpu
);
73 fprintf(stderr
,"pc: %08x msr: %08x\n", regs
.pc
, regs
.msr
);
74 fprintf(stderr
,"lr: %08x ctr: %08x\n", regs
.lr
, regs
.ctr
);
75 fprintf(stderr
,"srr0: %08x srr1: %08x\n", regs
.srr0
, regs
.srr1
);
78 fprintf(stderr
, "gpr%02d: %08x %08x %08x %08x\n", i
,
88 int kvm_arch_create(kvm_context_t kvm
, unsigned long phys_mem_bytes
,
94 int kvm_arch_create_default_phys_mem(kvm_context_t kvm
,
95 unsigned long phys_mem_bytes
,
101 int kvm_arch_run(struct kvm_run
*run
, kvm_context_t kvm
, int vcpu
)
105 switch (run
->exit_reason
){
107 ret
= handle_dcr(run
, kvm
, vcpu
);