From 76d93e146768dde7e38b6e5e43c27e478ccb580e Mon Sep 17 00:00:00 2001 From: jianchunfu Date: Fri, 21 Jul 2023 15:37:34 +0800 Subject: target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's unnecessary for non-KVM accelerators(TCG, for example), to call this function, so change the order of kvm_enable() judgment. The static inline function that returns -1 directly does not work in TCG's situation. Signed-off-by: jianchunfu Tested-by: Gautam Menghani Signed-off-by: Cédric Le Goater --- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/ppc/kvm.c') diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 7698501..51112bd 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1320,7 +1320,7 @@ int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level) return 0; } - if (!kvm_enabled() || !cap_interrupt_unset) { + if (!cap_interrupt_unset) { return 0; } -- cgit v1.1