kvm: ppc: booke206: use MMU API
PATCH v3 2/4 kvm: ppc: booke206: use MMU API
Share the TLB array with KVM. This allows us to set the initial TLB both on initial boot and reset, is useful for debugging, and could eventually be used to support migration.
Signed-off-by Scott Wood <[email protected]>
---
v3: use glib malloc/free, and fix GCC 4.6 unused variable warning
Other patches in set unchanged from:
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02271.html
hw/ppce500_mpc8544ds.c | 2 + target-ppc/cpu.h | 2 + target-ppc/kvm.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 0 deletions(-)
hw/ppce500_mpc8544ds.c +2 -0
@@ -202,6 +202,8 @@ static void mmubooke_create_initial_mapping(CPUState *env, tlb->mas2 = va &TARGET_PAGE_MASK ; tlb->mas7_3 = pa &TARGET_PAGE_MASK ; tlb->mas7_3 |=MAS3_UR |MAS3_UW |MAS3_UX |MAS3_SR |MAS3_SW |MAS3_SX ; + + env->tlb_dirty = true; }static void mpc8544ds_cpu_reset (void *opaque)
target-ppc/cpu.h +2 -0
@@ -934,6 +934,8 @@ struct CPUPPCState {ppc_tlb_t tlb;/* TLB is optional. Allocate them only if needed */ /* 403 dedicated access protection registers */ target_ulong pb[4 ]; +bool tlb_dirty;/* Set to non-zero when modifying TLB */ +bool kvm_sw_tlb;/* non-zero if KVM SW TLB API is active */ #endif /* Other registers */
target-ppc/kvm.c +85 -0
109 lines not on this page · raw message
Signature · 1 line
1.7.6