spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · Bharata B Rao
Quoted 10 lines · David Gibson
On Power, support for vCPU hotplug is new in qemu 2.7. However, we currently implement the
query_hotpluggable_cpushook the same for all pseries machine type versions.However, the old-style CPU initialization doesn't work with the new query code, meaning that attempting to use query-hotpluggable-cpus on a pseries-2.6 or earlier VM will cause qemu to SEGV.
This fixes the problem by simply disabling the hook for earlier machine types.
Quoted 6 lines
I had sent a patch to fix this and a couple of other related issues some time back and it indeed was accepted into your ppc-for-2.7 branch.
https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
Only now I am realizing that somehow that patch didn't make it to mainline.
Oh.. good point. Sorry, that one somehow slipped through the cracks.
So, the remaining question is, what's the preferred behaviour for older machine types:
1) should query-hotpluggable-cpus give an error, the same as it does on machine types which have never supported it (this is what my patch does)
or
2) Should query-hotpluggable-cpus succeed, but return an empty list? (this is what Bharata's patch does)
Igor and / or Peter, do you have an opinion on which behaviour is preferable?
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 29 lines · David Gibson
Quoted 12 lines · Bharata B Rao
Quoted 10 lines · David Gibson
On Power, support for vCPU hotplug is new in qemu 2.7. However, we currently implement the
query_hotpluggable_cpushook the same for all pseries machine type versions.However, the old-style CPU initialization doesn't work with the new query code, meaning that attempting to use query-hotpluggable-cpus on a pseries-2.6 or earlier VM will cause qemu to SEGV.
This fixes the problem by simply disabling the hook for earlier machine types.
Quoted 6 lines
I had sent a patch to fix this and a couple of other related issues some time back and it indeed was accepted into your ppc-for-2.7 branch.
https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
Only now I am realizing that somehow that patch didn't make it to mainline.
Oh.. good point. Sorry, that one somehow slipped through the cracks.
So, the remaining question is, what's the preferred behaviour for older machine types:
1) should query-hotpluggable-cpus give an error, the same as it does on machine types which have never supported it (this is what my patch does)
Quoted 6 lines
or
2) Should query-hotpluggable-cpus succeed, but return an empty list? (this is what Bharata's patch does)
Igor and / or Peter, do you have an opinion on which behaviour is preferable?
I don't really care which option you select as long as the 'hotpluggable-cpus' field which is repored in 'query-machines' is set to false for machine types which don't support it. Libvirt then won't even call query-hotpluggable-cpus.
Peter
Quoted 35 lines · Peter Krempa
Quoted 34 lines · David Gibson
Quoted 12 lines · Bharata B Rao
Quoted 10 lines · David Gibson
On Power, support for vCPU hotplug is new in qemu 2.7. However, we currently implement the
query_hotpluggable_cpushook the same for all pseries machine type versions.However, the old-style CPU initialization doesn't work with the new query code, meaning that attempting to use query-hotpluggable-cpus on a pseries-2.6 or earlier VM will cause qemu to SEGV.
This fixes the problem by simply disabling the hook for earlier machine types.
Quoted 6 lines
I had sent a patch to fix this and a couple of other related issues some time back and it indeed was accepted into your ppc-for-2.7 branch.
https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
Only now I am realizing that somehow that patch didn't make it to mainline.
Oh.. good point. Sorry, that one somehow slipped through the cracks.
So, the remaining question is, what's the preferred behaviour for older machine types:
1) should query-hotpluggable-cpus give an error, the same as it does on machine types which have never supported it (this is what my patch does)
or
2) Should query-hotpluggable-cpus succeed, but return an empty list? (this is what Bharata's patch does)
Quoted 6 lines
Quoted 1 line
Igor and / or Peter, do you have an opinion on which behaviour is preferable?
I don't really care which option you select as long as the 'hotpluggable-cpus' field which is repored in 'query-machines' is set to false for machine types which don't support it. Libvirt then won't even call query-hotpluggable-cpus.
Ah.. and looking at it more closely, Bharata's older patch will also get that wrong. However, it does some other checks which might make sense. I'll try to merge his approach and mine.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 29 lines · On Tue, 2 Aug 2016 16:20:50 +1000 David Gibson <[email protected]>…
Quoted 12 lines · Bharata B Rao
Quoted 10 lines · David Gibson
On Power, support for vCPU hotplug is new in qemu 2.7. However, we currently implement the
query_hotpluggable_cpushook the same for all pseries machine type versions.However, the old-style CPU initialization doesn't work with the new query code, meaning that attempting to use query-hotpluggable-cpus on a pseries-2.6 or earlier VM will cause qemu to SEGV.
This fixes the problem by simply disabling the hook for earlier machine types.
Quoted 6 lines
I had sent a patch to fix this and a couple of other related issues some time back and it indeed was accepted into your ppc-for-2.7 branch.
https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
Only now I am realizing that somehow that patch didn't make it to mainline.
Oh.. good point. Sorry, that one somehow slipped through the cracks.
So, the remaining question is, what's the preferred behaviour for older machine types:
1) should query-hotpluggable-cpus give an error, the same as it does on machine types which have never supported it (this is what my patch does)
Quoted 7 lines
or
2) Should query-hotpluggable-cpus succeed, but return an empty list? (this is what Bharata's patch does)
Igor and / or Peter, do you have an opinion on which behaviour is preferable?
If it doesn't have any output then it makes sense to set handler to NULL so it would return error.