mirror of https://gitee.com/openkylin/qemu.git
qemu-2.7: ppc patch queue 2016-08-03
Here's the current set of patches (only 2) for spapr, ppc and related things. These are important bugfixes for the stabilizing 2.7 tree. One is for a regression where confusion between x86 only and generic KVM irq handling resulted in breakage on KVM/Power. The other is fixing (yet another) problem in the vcpu hotplug code: older pseries machine types which don't support vcpu hotplug weren't correctly advertising that, potentially leading to crashes or other problems. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXoX/cAAoJEGw4ysog2bOSRgIP/2PEJGrSpBfLIlDwoRcqs+yK R8XiBBFqjqyR0CKH9KYURDUQeFZltkM3O2lu7KeX8qiOGZWew5p9XoDbmR7hTMR3 463Cj7rArIB/m8K8vFQy7+V8X4AdZMj06ZSDrIZDjri4QuP5Prw4xjxciaZclGpY guaBZdt1wRJtm+qHQyF+ekKHBuTYv8BpkYkl34zVQ/E869ldIYKnngXzMhhIyNCa qTUs0lFzPRdHCryRXkRCHXNoVCI+1OexMwmIXyuXxizy0pZ7SVPBu76SjT4lOpGP 0khf843ZRoUrdRWURGXvlHnWFEXaanpvwIZ86CNzRUluMtgUU7NQNdHpFjNHYjHW gfQWnBnscyig2hwf0QOXtA8LhCqyF5i8jWAzp61/oj63co8ZKywHKsc2Uah/YGUM 9NXN66uNafGTbjPZI2SViqPWBfepwxWnqauJkWCa2ntQJnA/jP4UE9njxNxqfvPl KZI64RWN+A45tt7IkMpdBvquOHJS/c9nk3m9+jM0luC1AAKVtGIqG3+7nBZICa6S B7pzLn7AghwYryGqMiI5YgTwdPPXxKsiWEVhNZgURUR75kJXgNskfXKUkHNDMrul dMpzqf0lV+4ds22b+8u/zDYu3P6PgSSvsOTmnAwN2tjHZ+/7rIQ33xiQ4OL/z5CL D9GMn7yx761822YzTLX4 =2vM7 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160803' into staging qemu-2.7: ppc patch queue 2016-08-03 Here's the current set of patches (only 2) for spapr, ppc and related things. These are important bugfixes for the stabilizing 2.7 tree. One is for a regression where confusion between x86 only and generic KVM irq handling resulted in breakage on KVM/Power. The other is fixing (yet another) problem in the vcpu hotplug code: older pseries machine types which don't support vcpu hotplug weren't correctly advertising that, potentially leading to crashes or other problems. # gpg: Signature made Wed 03 Aug 2016 06:23:40 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.7-20160803: kvm-irqchip: only commit route when irqchip is used spapr: Error out when CPU hotplug is attempted on older pseries machines Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
90f54472f4
|
@ -2376,8 +2376,11 @@ static HotpluggableCPUList *spapr_query_hotpluggable_cpus(MachineState *machine)
|
|||
int i;
|
||||
HotpluggableCPUList *head = NULL;
|
||||
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
|
||||
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
|
||||
int spapr_max_cores = max_cpus / smp_threads;
|
||||
|
||||
g_assert(smc->dr_cpu_enabled);
|
||||
|
||||
for (i = 0; i < spapr_max_cores; i++) {
|
||||
HotpluggableCPUList *list_item = g_new0(typeof(*list_item), 1);
|
||||
HotpluggableCPU *cpu_item = g_new0(typeof(*cpu_item), 1);
|
||||
|
@ -2432,7 +2435,9 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
|
|||
hc->plug = spapr_machine_device_plug;
|
||||
hc->unplug = spapr_machine_device_unplug;
|
||||
mc->cpu_index_to_socket_id = spapr_cpu_index_to_socket_id;
|
||||
mc->query_hotpluggable_cpus = spapr_query_hotpluggable_cpus;
|
||||
if (smc->dr_cpu_enabled) {
|
||||
mc->query_hotpluggable_cpus = spapr_query_hotpluggable_cpus;
|
||||
}
|
||||
|
||||
smc->dr_lmb_enabled = true;
|
||||
smc->dr_cpu_enabled = true;
|
||||
|
|
|
@ -166,18 +166,11 @@ void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
|||
int index = cc->core_id / smp_threads;
|
||||
int smt = kvmppc_smt_threads();
|
||||
|
||||
g_assert(smc->dr_cpu_enabled);
|
||||
|
||||
drc = spapr_dr_connector_by_id(SPAPR_DR_CONNECTOR_TYPE_CPU, index * smt);
|
||||
spapr->cores[index] = OBJECT(dev);
|
||||
|
||||
if (!smc->dr_cpu_enabled) {
|
||||
/*
|
||||
* This is a cold plugged CPU core but the machine doesn't support
|
||||
* DR. So skip the hotplug path ensuring that the core is brought
|
||||
* up online with out an associated DR connector.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert(drc);
|
||||
|
||||
/*
|
||||
|
@ -225,13 +218,13 @@ void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
|||
char *base_core_type = spapr_get_cpu_core_type(machine->cpu_model);
|
||||
const char *type = object_get_typename(OBJECT(dev));
|
||||
|
||||
if (strcmp(base_core_type, type)) {
|
||||
error_setg(&local_err, "CPU core type should be %s", base_core_type);
|
||||
if (!smc->dr_cpu_enabled) {
|
||||
error_setg(&local_err, "CPU hotplug not supported for this machine");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!smc->dr_cpu_enabled && dev->hotplugged) {
|
||||
error_setg(&local_err, "CPU hotplug not supported for this machine");
|
||||
if (strcmp(base_core_type, type)) {
|
||||
error_setg(&local_err, "CPU core type should be %s", base_core_type);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1047,6 +1047,14 @@ void kvm_irqchip_commit_routes(KVMState *s)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (kvm_gsi_direct_mapping()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!kvm_gsi_routing_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
s->irq_routes->flags = 0;
|
||||
trace_kvm_irqchip_commit_routes();
|
||||
ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
|
||||
|
|
Loading…
Reference in New Issue