mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target/ppc: Restrict KVM-specific fields from ArchCPU
The 'kvm_sw_tlb' and 'tlb_dirty' fields introduced in commit
93dd5e852c
("kvm: ppc: booke206: use MMU API") are specific
to KVM and shouldn't be accessed when it is not available.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20230624192645.13680-1-philmd@linaro.org>
This commit is contained in:
parent
cf43b5b69c
commit
0573997713
4 changed files with 10 additions and 0 deletions
|
@ -930,10 +930,12 @@ static void mmubooke_dump_mmu(CPUPPCState *env)
|
|||
ppcemb_tlb_t *entry;
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
if (kvm_enabled() && !env->kvm_sw_tlb) {
|
||||
qemu_printf("Cannot access KVM TLB\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
qemu_printf("\nTLB:\n");
|
||||
qemu_printf("Effective Physical Size PID Prot "
|
||||
|
@ -1021,10 +1023,12 @@ static void mmubooke206_dump_mmu(CPUPPCState *env)
|
|||
int offset = 0;
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
if (kvm_enabled() && !env->kvm_sw_tlb) {
|
||||
qemu_printf("Cannot access KVM TLB\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < BOOKE206_MAX_TLBN; i++) {
|
||||
int size = booke206_tlb_size(env, i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue