From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line Date: Mon, 08 Mar 2010 14:48:07 +0100 Message-ID: <4B950017.9010805@suse.de> References: <1267807842-3751-1-git-send-email-agraf@suse.de> <1267807842-3751-4-git-send-email-agraf@suse.de> <4B94FF27.5010800@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <4B94FF27.5010800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > On 03/05/2010 06:50 PM, Alexander Graf wrote: >> Userspace can tell us that it wants to trigger an interrupt. But >> so far it can't tell us that it wants to stop triggering one. >> >> So let's interpret the parameter to the ioctl that we have anyways >> to tell us if we want to raise or lower the interrupt line. >> >> Signed-off-by: Alexander Graf >> --- >> arch/powerpc/include/asm/kvm.h | 3 +++ >> arch/powerpc/include/asm/kvm_ppc.h | 2 ++ >> arch/powerpc/kvm/book3s.c | 6 ++++++ >> arch/powerpc/kvm/powerpc.c | 5 ++++- >> 4 files changed, 15 insertions(+), 1 deletions(-) >> >> diff --git a/arch/powerpc/include/asm/kvm.h >> b/arch/powerpc/include/asm/kvm.h >> index 19bae31..6c5547d 100644 >> --- a/arch/powerpc/include/asm/kvm.h >> +++ b/arch/powerpc/include/asm/kvm.h >> @@ -84,4 +84,7 @@ struct kvm_guest_debug_arch { >> #define KVM_REG_QPR 0x0040 >> #define KVM_REG_FQPR 0x0060 >> >> +#define KVM_INTERRUPT_SET -1U >> +#define KVM_INTERRUPT_UNSET -2U >> > > Funny choice of numbers. Qemu currently does explicitly set -1U and is the only user. > How does userspace know they exist? #ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that won't work without the hypervisor call anyways. > Can you use KVM_IRQ_LINE? I'd rather like to keep that around for when we get an in-kernel-mpic, which is what we probably ultimately want for qemu. Alex