[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/30] target/ppc: Fix timer register accessors when !KVM
From: |
Cédric Le Goater |
Subject: |
[PULL 09/30] target/ppc: Fix timer register accessors when !KVM |
Date: |
Mon, 26 Jun 2023 07:56:26 +0200 |
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>
---
target/ppc/kvm.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index a7f2de9d1018..a8a935e26726 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -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, ®);
}
--
2.41.0
- [PULL 00/30] ppc queue, Cédric Le Goater, 2023/06/26
- [PULL 01/30] target/ppc: gdbstub init spr gdb_id for all CPUs, Cédric Le Goater, 2023/06/26
- [PULL 03/30] MAINTAINERS: Add reviewers for PowerNV baremetal emulation, Cédric Le Goater, 2023/06/26
- [PULL 02/30] ppc/pnv/pci: Clean up error messages, Cédric Le Goater, 2023/06/26
- [PULL 05/30] MAINTAINERS: Add reviewer for XIVE, Cédric Le Goater, 2023/06/26
- [PULL 04/30] MAINTAINERS: Add reviewer for PowerPC TCG CPUs, Cédric Le Goater, 2023/06/26
- [PULL 07/30] ppc/bamboo: Report an error when run with KVM, Cédric Le Goater, 2023/06/26
- [PULL 06/30] ppc/prep: Report an error when run with KVM, Cédric Le Goater, 2023/06/26
- [PULL 08/30] ppc/pnv: Rephrase error when run with KVM, Cédric Le Goater, 2023/06/26
- [PULL 11/30] ppc/spapr: Add a nested state struct, Cédric Le Goater, 2023/06/26
- [PULL 09/30] target/ppc: Fix timer register accessors when !KVM,
Cédric Le Goater <=
- [PULL 10/30] ppc/spapr: H_ENTER_NESTED should restore host XER ca field, Cédric Le Goater, 2023/06/26
- [PULL 13/30] ppc/spapr: Move spapr nested HV to a new file, Cédric Le Goater, 2023/06/26
- [PULL 17/30] target/ppc: Implement HEIR SPR, Cédric Le Goater, 2023/06/26
- [PULL 14/30] target/ppc: Fix instruction loading endianness in alignment interrupt, Cédric Le Goater, 2023/06/26
- [PULL 12/30] ppc/spapr: load and store l2 state with helper functions, Cédric Le Goater, 2023/06/26
- [PULL 15/30] target/ppc: Change partition-scope translate interface, Cédric Le Goater, 2023/06/26
- [PULL 16/30] target/ppc: Add SRR1 prefix indication to interrupt handlers, Cédric Le Goater, 2023/06/26