From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ur7sy-0004Id-OP for mharc-qemu-trivial@gnu.org; Mon, 24 Jun 2013 10:36:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur7sw-0004IS-35 for qemu-trivial@nongnu.org; Mon, 24 Jun 2013 10:36:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur7sq-0007In-On for qemu-trivial@nongnu.org; Mon, 24 Jun 2013 10:36:49 -0400 Received: from mail-yh0-x235.google.com ([2607:f8b0:4002:c01::235]:64418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur7nM-0004l7-P3 for qemu-trivial@nongnu.org; Mon, 24 Jun 2013 10:31:04 -0400 Received: by mail-yh0-f53.google.com with SMTP id a41so4936824yho.40 for ; Mon, 24 Jun 2013 07:31:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:x-gm-message-state; bh=QzhR05ZvrzxgN4dsJ1OXXD7+SjhiIvmPfpyrAq0/Auc=; b=iLAuBudKxX+O2u1tdD+bEERCyGwm4KQuy/H6VT1qSOJmA/ML7RryB7ONqwrvXHe/Ds P8jR31bsPKKEWZ/x0ht0uLwldDEcCI8DjS8IHq9TQC95Gv7IFcul3ra5Al0SUDJM5GpV ymCmzLo7Fdjnl8Rpu6GIt3QAyIEJBoONNaQAn3Kb5PNGAbc9EXwQJtSroTi7zE4MM7w2 7i2Vt9BXwc8mltFXMj+blJ4OxSLwCL+jmgeHPcjbFk31t+hScc2JbJuT3TXpbZswtbX7 Pp1wmQgOy54xj/ipQ77W66mQgkvxoGCdCCQIOpTy3H2kuGSvlj7vtPLXj9XAAfaOjmOk AO2Q== X-Received: by 10.236.116.196 with SMTP id g44mr1435334yhh.243.1372084264084; Mon, 24 Jun 2013 07:31:04 -0700 (PDT) Received: from titi.smtp.gmail.com (cpe-70-112-157-87.austin.res.rr.com. [70.112.157.87]) by mx.google.com with ESMTPSA id d91sm30764656yhq.16.2013.06.24.07.31.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Jun 2013 07:31:03 -0700 (PDT) From: Anthony Liguori To: "Michael S. Tsirkin" In-Reply-To: <20130624134111.GA1109@redhat.com> References: <1371747090.32709.61.camel@ul30vt.home> <51C3B2E4.7000807@ozlabs.ru> <1371782063.30572.74.camel@ul30vt.home> <51C3BF3E.20901@ozlabs.ru> <1371789981.30572.114.camel@ul30vt.home> <20130624071338.GZ5832@redhat.com> <87sj07bsf3.fsf@codemonkey.ws> <20130624130642.GJ18508@redhat.com> <87hagnhbsz.fsf@codemonkey.ws> <20130624134111.GA1109@redhat.com> User-Agent: Notmuch/0.15.2+77~g661dcf8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 24 Jun 2013 09:31:01 -0500 Message-ID: <87zjufy40q.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQnt9nL86Du/FMD0ysPBEANIkWF99tk3yTtdjIQ/U0cpki5uFMXoT9/Ziyd2WpOdUHnczVPL X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::235 Cc: Gleb Natapov , Alexey Kardashevskiy , qemu-devel , Alexander Graf , qemu-trivial@nongnu.org, Alex Williamson , qemu-ppc@nongnu.org, Paolo Bonzini , Paul Mackerras , David Gibson Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jun 2013 14:36:51 -0000 "Michael S. Tsirkin" writes: > On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> Isn't this more or less what Avi's previous proposal was around changing >> the APIC interfaces to userspace? >> >> Regards, >> >> Anthony Liguori > > While that's not very elegant, I think we can use the existing > interface for this: just encode things in a fake > "msi message" in the format that kernel expects. This is, in fact, exactly what we do today. The MSI interfaces aren't for MSI. They are for sending messages to the APIC bus. What we should do is: #define KVM_SIGNAL_LAPIC KVM_SIGNAL_MSI #define KVM_IRQ_ROUTING_LAPIC KVM_IRQ_ROUTING_MSI And switch to using the new #defines in QEMU. That would make it more obvious where we need to refactor things. We currently hard code routing via a local APIC with MSI. We need to change this into a bus specific function that can choose the right interface. I think Power is fine with just doing all routing through the irqchip interface. We may need other routing interfaces for other architectures though. Regards, Anthony Liguori > >> > >> >> It seems like the only sane way to actually support (2) and (3). >> >> >> >> Regards, >> >> >> >> Anthony Liguori >> > >> > -- >> > Gleb. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur7rW-00023w-Di for qemu-devel@nongnu.org; Mon, 24 Jun 2013 10:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur7rR-0006VX-Pl for qemu-devel@nongnu.org; Mon, 24 Jun 2013 10:35:22 -0400 Received: from mail-yh0-x232.google.com ([2607:f8b0:4002:c01::232]:43360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur7nM-0004lA-Nw for qemu-devel@nongnu.org; Mon, 24 Jun 2013 10:31:04 -0400 Received: by mail-yh0-f50.google.com with SMTP id i72so4977319yha.37 for ; Mon, 24 Jun 2013 07:31:04 -0700 (PDT) From: Anthony Liguori In-Reply-To: <20130624134111.GA1109@redhat.com> References: <1371747090.32709.61.camel@ul30vt.home> <51C3B2E4.7000807@ozlabs.ru> <1371782063.30572.74.camel@ul30vt.home> <51C3BF3E.20901@ozlabs.ru> <1371789981.30572.114.camel@ul30vt.home> <20130624071338.GZ5832@redhat.com> <87sj07bsf3.fsf@codemonkey.ws> <20130624130642.GJ18508@redhat.com> <87hagnhbsz.fsf@codemonkey.ws> <20130624134111.GA1109@redhat.com> Date: Mon, 24 Jun 2013 09:31:01 -0500 Message-ID: <87zjufy40q.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Gleb Natapov , Alexey Kardashevskiy , qemu-devel , Alexander Graf , qemu-trivial@nongnu.org, Alex Williamson , qemu-ppc@nongnu.org, Paolo Bonzini , Paul Mackerras , David Gibson "Michael S. Tsirkin" writes: > On Mon, Jun 24, 2013 at 08:34:52AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> Isn't this more or less what Avi's previous proposal was around changing >> the APIC interfaces to userspace? >> >> Regards, >> >> Anthony Liguori > > While that's not very elegant, I think we can use the existing > interface for this: just encode things in a fake > "msi message" in the format that kernel expects. This is, in fact, exactly what we do today. The MSI interfaces aren't for MSI. They are for sending messages to the APIC bus. What we should do is: #define KVM_SIGNAL_LAPIC KVM_SIGNAL_MSI #define KVM_IRQ_ROUTING_LAPIC KVM_IRQ_ROUTING_MSI And switch to using the new #defines in QEMU. That would make it more obvious where we need to refactor things. We currently hard code routing via a local APIC with MSI. We need to change this into a bus specific function that can choose the right interface. I think Power is fine with just doing all routing through the irqchip interface. We may need other routing interfaces for other architectures though. Regards, Anthony Liguori > >> > >> >> It seems like the only sane way to actually support (2) and (3). >> >> >> >> Regards, >> >> >> >> Anthony Liguori >> > >> > -- >> > Gleb.