2008-04-17 12:28:09 +08:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License, version 2, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Copyright IBM Corp. 2007
|
|
|
|
*
|
|
|
|
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
*/
|
|
|
|
|
2008-04-03 04:04:40 +08:00
|
|
|
#ifndef __LINUX_KVM_POWERPC_H
|
|
|
|
#define __LINUX_KVM_POWERPC_H
|
|
|
|
|
2009-01-31 14:14:45 +08:00
|
|
|
#include <linux/types.h>
|
2008-04-17 12:28:09 +08:00
|
|
|
|
|
|
|
struct kvm_regs {
|
|
|
|
__u64 pc;
|
|
|
|
__u64 cr;
|
|
|
|
__u64 ctr;
|
|
|
|
__u64 lr;
|
|
|
|
__u64 xer;
|
|
|
|
__u64 msr;
|
|
|
|
__u64 srr0;
|
|
|
|
__u64 srr1;
|
|
|
|
__u64 pid;
|
|
|
|
|
|
|
|
__u64 sprg0;
|
|
|
|
__u64 sprg1;
|
|
|
|
__u64 sprg2;
|
|
|
|
__u64 sprg3;
|
|
|
|
__u64 sprg4;
|
|
|
|
__u64 sprg5;
|
|
|
|
__u64 sprg6;
|
|
|
|
__u64 sprg7;
|
|
|
|
|
|
|
|
__u64 gpr[32];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kvm_sregs {
|
2009-10-30 13:47:02 +08:00
|
|
|
__u32 pvr;
|
2009-11-30 11:02:02 +08:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
__u64 sdr1;
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
__u64 slbe;
|
|
|
|
__u64 slbv;
|
|
|
|
} slb[64];
|
|
|
|
} ppc64;
|
|
|
|
struct {
|
|
|
|
__u32 sr[16];
|
|
|
|
__u64 ibat[8];
|
|
|
|
__u64 dbat[8];
|
|
|
|
} ppc32;
|
|
|
|
} s;
|
|
|
|
__u8 pad[1020];
|
|
|
|
} u;
|
2008-04-17 12:28:09 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct kvm_fpu {
|
|
|
|
__u64 fpr[32];
|
|
|
|
};
|
2008-04-03 04:04:40 +08:00
|
|
|
|
2008-12-15 20:52:10 +08:00
|
|
|
struct kvm_debug_exit_arch {
|
|
|
|
};
|
|
|
|
|
|
|
|
/* for KVM_SET_GUEST_DEBUG */
|
|
|
|
struct kvm_guest_debug_arch {
|
|
|
|
};
|
|
|
|
|
2010-02-19 18:00:29 +08:00
|
|
|
#define KVM_REG_MASK 0x001f
|
|
|
|
#define KVM_REG_EXT_MASK 0xffe0
|
|
|
|
#define KVM_REG_GPR 0x0000
|
|
|
|
#define KVM_REG_FPR 0x0020
|
|
|
|
#define KVM_REG_QPR 0x0040
|
|
|
|
#define KVM_REG_FQPR 0x0060
|
|
|
|
|
2010-03-25 04:48:18 +08:00
|
|
|
#define KVM_INTERRUPT_SET -1U
|
|
|
|
#define KVM_INTERRUPT_UNSET -2U
|
2010-08-30 16:44:15 +08:00
|
|
|
#define KVM_INTERRUPT_SET_LEVEL -3U
|
2010-03-25 04:48:18 +08:00
|
|
|
|
2008-04-17 12:28:09 +08:00
|
|
|
#endif /* __LINUX_KVM_POWERPC_H */
|