[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 01/64] xics_kvm: drop extra checking of kernel_xics_fd
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 01/64] xics_kvm: drop extra checking of kernel_xics_fd |
Date: |
Wed, 7 Sep 2016 20:28:40 +1000 |
From: Greg Kurz <address@hidden>
We abort a few lines above if kernel_xics_fd == -1.
This is only code cleanup.
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/intc/xics_kvm.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index edbd62f..c9caefc 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -329,6 +329,7 @@ static void xics_kvm_cpu_setup(XICSState *xics, PowerPCCPU
*cpu)
CPUState *cs;
ICPState *ss;
KVMXICSState *xicskvm = XICS_SPAPR_KVM(xics);
+ int ret;
cs = CPU(cpu);
ss = &xics->ss[cs->cpu_index];
@@ -347,19 +348,14 @@ static void xics_kvm_cpu_setup(XICSState *xics,
PowerPCCPU *cpu)
return;
}
- if (xicskvm->kernel_xics_fd != -1) {
- int ret;
-
- ret = kvm_vcpu_enable_cap(cs, KVM_CAP_IRQ_XICS, 0,
- xicskvm->kernel_xics_fd,
- kvm_arch_vcpu_id(cs));
- if (ret < 0) {
- error_report("Unable to connect CPU%ld to kernel XICS: %s",
- kvm_arch_vcpu_id(cs), strerror(errno));
- exit(1);
- }
- ss->cap_irq_xics_enabled = true;
+ ret = kvm_vcpu_enable_cap(cs, KVM_CAP_IRQ_XICS, 0, xicskvm->kernel_xics_fd,
+ kvm_arch_vcpu_id(cs));
+ if (ret < 0) {
+ error_report("Unable to connect CPU%ld to kernel XICS: %s",
+ kvm_arch_vcpu_id(cs), strerror(errno));
+ exit(1);
}
+ ss->cap_irq_xics_enabled = true;
}
static void xics_kvm_set_nr_irqs(XICSState *xics, uint32_t nr_irqs,
--
2.7.4
- [Qemu-ppc] [PULL 00/64] ppc-for-2.8 queue 20160907, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 01/64] xics_kvm: drop extra checking of kernel_xics_fd,
David Gibson <=
- [Qemu-ppc] [PULL 05/64] target-ppc: adding addpcis instruction, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 03/64] target-ppc: Introduce Power9 family, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 04/64] target-ppc: Introduce POWER ISA 3.0 flag, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 07/64] target-ppc: add modulo word operations, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 11/64] target-ppc: add cmpeqb instruction, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 10/64] target-ppc: add cnttzw[.] instruction, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 02/64] hw/ppc: include fdt helper routine in a common file, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 15/64] target-ppc: introduce opc4 for Expanded Opcode, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 12/64] target-ppc: add setb instruction, David Gibson, 2016/09/07
- [Qemu-ppc] [PULL 16/64] ppc: Provide basic raise_exception_* functions, David Gibson, 2016/09/07