From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [RFC PATCH v3 6/6] kvm/ppc/mpic: add KVM_CAP_IRQ_MPIC Date: Fri, 5 Apr 2013 12:11:52 -0500 Message-ID: <1365181912.17535.1@snotra> References: <13ED8055-A087-4FEE-B8B6-AFE78B08AF75@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Cc: "" , "" , "" To: Alexander Graf Return-path: Received: from mail-db8lp0185.outbound.messaging.microsoft.com ([213.199.154.185]:5329 "EHLO db8outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162035Ab3DERMG convert rfc822-to-8bit (ORCPT ); Fri, 5 Apr 2013 13:12:06 -0400 In-Reply-To: <13ED8055-A087-4FEE-B8B6-AFE78B08AF75@suse.de> (from agraf@suse.de on Fri Apr 5 01:09:50 2013) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On 04/05/2013 01:09:50 AM, Alexander Graf wrote: > > > Am 05.04.2013 um 00:35 schrieb Scott Wood : > > > On 04/04/2013 05:30:05 PM, Alexander Graf wrote: > >> Am 04.04.2013 um 20:41 schrieb Scott Wood > : > >> > On 04/04/2013 07:54:20 AM, Alexander Graf wrote: > >> >> On 03.04.2013, at 03:57, Scott Wood wrote: > >> >> > @@ -460,6 +464,13 @@ void kvm_arch_vcpu_free(struct kvm_vcpu > *vcpu) > >> >> > tasklet_kill(&vcpu->arch.tasklet); > >> >> > > >> >> > kvmppc_remove_vcpu_debugfs(vcpu); > >> >> > + > >> >> > + switch (vcpu->arch.irq_type) { > >> >> > + case KVMPPC_IRQ_MPIC: > >> >> > + kvmppc_mpic_put(vcpu->arch.mpic); > >> >> This doesn't tell the MPIC that this exact CPU is getting > killed. What if we hotplug remove just a single CPU? Don't we have to > deregister the CPU with the MPIC? > >> > > >> > If we ever support hot vcpu removal, yes. We'd probably need > some MPIC code changes to accommodate that, and we wouldn't currently > have a way to test it, so I'd rather make it obviously not supported > for now. > >> Is there any way to break heavily if user space attempts this? > > > > Is there any way for userspace to request this currently? They can > close the vcpu fd, but the vcpu won't actually be destroyed until the > vm goes down. > > Are you sure? X86 does CPU hotplug today, so there has to be > something :) Hot add, or hot remove? Can you give me any hint on where to look? kvm_cpu_hotplug() appears to deal with hotplug of *physical* cpus -- and is currently a no-op on powerpc. Other than that, grepping isn't turning up much. -Scott