2 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
4 * Author: Yu Liu, <yu.liu@freescale.com>
7 * This file is derived from arch/powerpc/include/asm/kvm_44x.h,
8 * by Hollis Blanchard <hollisb@us.ibm.com>.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License, version 2, as
12 * published by the Free Software Foundation.
15 #ifndef __ASM_KVM_E500_H__
16 #define __ASM_KVM_E500_H__
18 #include <linux/kvm_host.h>
20 #define BOOKE_INTERRUPT_SIZE 36
22 #define E500_PID_NUM 3
23 #define E500_TLB_NUM 2
32 #define E500_TLB_VALID 1
33 #define E500_TLB_DIRTY 2
37 unsigned int flags
; /* E500_TLB_* */
42 struct kvmppc_vcpu_e500
{
43 /* Unmodified copy of the guest's TLB. */
44 struct tlbe
*gtlb_arch
[E500_TLB_NUM
];
46 /* KVM internal information associated with each guest TLB entry */
47 struct tlbe_priv
*gtlb_priv
[E500_TLB_NUM
];
49 unsigned int gtlb_size
[E500_TLB_NUM
];
50 unsigned int gtlb_nv
[E500_TLB_NUM
];
52 u32 host_pid
[E500_PID_NUM
];
53 u32 pid
[E500_PID_NUM
];
66 struct vcpu_id_table
*idt
;
79 static inline struct kvmppc_vcpu_e500
*to_e500(struct kvm_vcpu
*vcpu
)
81 return container_of(vcpu
, struct kvmppc_vcpu_e500
, vcpu
);
84 #endif /* __ASM_KVM_E500_H__ */