xics_kvm: drop extra checking of kernel_xics_fd
We abort a few lines above if kernel_xics_fd == -1. This is only code cleanup. Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
2926375cff
commit
1b1746a436
@ -329,6 +329,7 @@ static void xics_kvm_cpu_setup(XICSState *xics, PowerPCCPU *cpu)
|
|||||||
CPUState *cs;
|
CPUState *cs;
|
||||||
ICPState *ss;
|
ICPState *ss;
|
||||||
KVMXICSState *xicskvm = XICS_SPAPR_KVM(xics);
|
KVMXICSState *xicskvm = XICS_SPAPR_KVM(xics);
|
||||||
|
int ret;
|
||||||
|
|
||||||
cs = CPU(cpu);
|
cs = CPU(cpu);
|
||||||
ss = &xics->ss[cs->cpu_index];
|
ss = &xics->ss[cs->cpu_index];
|
||||||
@ -347,19 +348,14 @@ static void xics_kvm_cpu_setup(XICSState *xics, PowerPCCPU *cpu)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xicskvm->kernel_xics_fd != -1) {
|
ret = kvm_vcpu_enable_cap(cs, KVM_CAP_IRQ_XICS, 0, xicskvm->kernel_xics_fd,
|
||||||
int ret;
|
kvm_arch_vcpu_id(cs));
|
||||||
|
if (ret < 0) {
|
||||||
ret = kvm_vcpu_enable_cap(cs, KVM_CAP_IRQ_XICS, 0,
|
error_report("Unable to connect CPU%ld to kernel XICS: %s",
|
||||||
xicskvm->kernel_xics_fd,
|
kvm_arch_vcpu_id(cs), strerror(errno));
|
||||||
kvm_arch_vcpu_id(cs));
|
exit(1);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
ss->cap_irq_xics_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xics_kvm_set_nr_irqs(XICSState *xics, uint32_t nr_irqs,
|
static void xics_kvm_set_nr_irqs(XICSState *xics, uint32_t nr_irqs,
|
||||||
|
Loading…
Reference in New Issue
Block a user