target/ppc: Fix timer register accessors when !KVM
When the Timer Control and Timer Status registers are modified, avoid calling the KVM backend when not available Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
518f72ec4b
commit
c4550e6e98
@ -1728,6 +1728,10 @@ int kvmppc_or_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits)
|
||||
.addr = (uintptr_t) &bits,
|
||||
};
|
||||
|
||||
if (!kvm_enabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®);
|
||||
}
|
||||
|
||||
@ -1741,6 +1745,10 @@ int kvmppc_clear_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits)
|
||||
.addr = (uintptr_t) &bits,
|
||||
};
|
||||
|
||||
if (!kvm_enabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®);
|
||||
}
|
||||
|
||||
@ -1755,6 +1763,10 @@ int kvmppc_set_tcr(PowerPCCPU *cpu)
|
||||
.addr = (uintptr_t) &tcr,
|
||||
};
|
||||
|
||||
if (!kvm_enabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user