Hi Peter, On 12/08/2014 05:26 PM, Peter Maydell wrote: > On 8 December 2014 at 09:16, Bharata B Rao <bharata....@gmail.com> wrote: >> So this approach of parking the vcpu fd in QEMU and reusing it next >> time during CPU hotplug will only work if all architectures supported >> by KVM driver are ok with reuse of vcpu object in the kernel. I am >> using relevant bits of this patch of yours with PowerPC architecture >> to support cpu unplug and I realize that there is at least one case >> where reuse of vcpu object in the kernel causes problems. Before I >> attempt to fix that in ppc KVM, I wanted to check if there is >> consensus on this approach (parking and reusing kvm vcpu fd) in QEMU. > > For ARM we've just clarified the kernel-to-userspace ABI, and > among other things it says you can't reuse the VCPU unless it's > for exactly the same CPU type and feature configuration. So
Yes, it's a limitation now, but it is not the final implementation. As to the QEMU side, the vcpu object in kernel is stateless, and a reset operation will be done when we hot add a vcpu, so I think we can kill the limitation, just choose a parked vcpu and reconfigure it before we use it. Thanks, Gu > I'm not sure this park-and-reuse approach will work... > > -- PMM > . >