On Thu, Sep 29, 2016 at 17:37:53 +0530, Shivaprasad G Bhat wrote: > > > On 09/29/2016 05:32 PM, Peter Krempa wrote: > > On Thu, Sep 29, 2016 at 16:29:13 +0530, Shivaprasad G Bhat wrote: > >> On 09/21/2016 05:19 PM, Peter Krempa wrote: > >>> Implement support for VIR_DOMAIN_VCPU_HOTPLUGGABLE so that users can > >>> choose to make vcpus added by the API removable. > >>> --- > >>> src/qemu/qemu_driver.c | 22 ++++++++++++++++------ > >>> 1 file changed, 16 insertions(+), 6 deletions(-) > >>> > >>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > >>> index 357be4e..8453628 100644 > >>> --- a/src/qemu/qemu_driver.c > >>> +++ b/src/qemu/qemu_driver.c > >>> @@ -4912,7 +4912,8 @@ qemuDomainSetVcpusLive(virQEMUDriverPtr driver, > >>> */ > >>> static void > >>> qemuDomainSetVcpusConfig(virDomainDefPtr def, > >>> - unsigned int nvcpus) > >>> + unsigned int nvcpus, > >>> + bool hotpluggable) > >>> { > >>> virDomainVcpuDefPtr vcpu; > >> Here if (curvcpus == nvcpus) > >> > >> return > >> we still need to allow if someone wants to switch from hotpluggable > >> = yes to no/ vice versa. > > No. As no new vcpus were added there's nothing to turn to hotpluggable. > > The flag turns only the newly added vcpus as hotpluggable. > > What if someone had the hotplug = yes. And He wants to make it "no". ? > With no changes to the vcpus. You can make two calls to the API, decreasing and re-increasing the count. Or edit the XML directly since its a non-simple change. If the API call would change existing vcpus to either hotpluggable or not it would break configurations. Eg. as PPC requires first 8 vcpus to be non hotpluggable vs. just one on intel. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list