From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH] KVM: Add KVM_CAP_IRQ_ARCH capability Date: Thu, 14 Mar 2013 14:10:58 -0500 Message-ID: <1363288258.28440.11@snotra> References: <1363285238.28440.9@snotra> <310786EE-868C-4C07-A037-DAA2101B0F21@suse.de> <1363286128.28440.10@snotra> <76C38059-3AE6-45F3-9CAC-D3041FFEF54C@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Cc: Paul Mackerras , , To: Alexander Graf Return-path: In-Reply-To: <76C38059-3AE6-45F3-9CAC-D3041FFEF54C@suse.de> (from agraf@suse.de on Thu Mar 14 14:03:30 2013) Content-Disposition: inline Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/14/2013 02:03:30 PM, Alexander Graf wrote: > > On 14.03.2013, at 19:35, Scott Wood wrote: > > > On 03/14/2013 01:33:30 PM, Alexander Graf wrote: > >> On 14.03.2013, at 19:20, Scott Wood wrote: > >> > On 03/13/2013 08:20:44 PM, Paul Mackerras wrote: > >> >> Setting this capability on a vcpu connects that vcpu to an > interrupt > >> >> controller device. The args[0] field of the argument > kvm_enable_cap > >> >> struct specifies the overall architecture of the interrupt > >> >> controller. The args[1] field specifies the CPU number for the > vcpu > >> >> from the interrupt controller's point of view. > >> >> Signed-off-by: Paul Mackerras > >> >> --- > >> >> arch/powerpc/include/asm/kvm_host.h | 3 +++ > >> >> arch/powerpc/kvm/powerpc.c | 29 > +++++++++++++++++++++++++++++ > >> >> include/uapi/linux/kvm.h | 1 + > >> >> 3 files changed, 33 insertions(+) > >> >> diff --git a/arch/powerpc/include/asm/kvm_host.h > b/arch/powerpc/include/asm/kvm_host.h > >> >> index f4ba881..dd167e4 100644 > >> >> --- a/arch/powerpc/include/asm/kvm_host.h > >> >> +++ b/arch/powerpc/include/asm/kvm_host.h > >> >> @@ -373,6 +373,9 @@ struct kvmppc_booke_debug_reg { > >> >> struct kvm_vcpu_arch { > >> >> ulong host_stack; > >> >> u32 host_pid; > >> >> + > >> >> + u32 intr_ctrler; > >> >> + > >> > > >> > That abbreviation seems a bit awkward, and we should also have a > >> > private-data pointer. > >> > > >> > How about: > >> > > >> > u32 irq_arch; > >> We also want int pic_fd, no? > > > > Not sure we really need that on the vcpu. We'll need it on the vm > unless we add it as an arg to the vcpu cap enable. > > I don't think we need anything vm global for the cpu <-> PIC > connections. The two components have to link up somehow. If the vcpu cap enable ioctl doesn't specify it, then the device creation will have to stick a reference to itself somewhere in the vm. > Also, if you want to deregister a CPU (hotplug remove), you probably > want to tell the PIC that the CPU has gone. Yes, I mentioned that in my previous e-mail. -Scott