From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v3 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Date: Wed, 3 Nov 2010 11:18:26 +0200 Message-ID: <20101103091826.GK6772@redhat.com> References: <628f014fb1efb8e2208db03d13198ba301a3a34c.1288771873.git.jan.kiszka@web.de> <20101103084320.GF6772@redhat.com> <4CD1227E.9020908@web.de> <20101103090550.GG6772@redhat.com> <4CD1284F.7070003@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm , Alex Williamson , Jan Kiszka To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46589 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685Ab0KCJS3 (ORCPT ); Wed, 3 Nov 2010 05:18:29 -0400 Content-Disposition: inline In-Reply-To: <4CD1284F.7070003@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 03, 2010 at 10:15:59AM +0100, Jan Kiszka wrote: > Am 03.11.2010 10:05, Michael S. Tsirkin wrote: > > On Wed, Nov 03, 2010 at 09:51:10AM +0100, Jan Kiszka wrote: > >> Am 03.11.2010 09:43, Michael S. Tsirkin wrote: > >>> On Wed, Nov 03, 2010 at 09:11:16AM +0100, Jan Kiszka wrote: > >>>> From: Jan Kiszka > >>>> > >>>> PCI 2.3 allows to generically disable IRQ sources at device level. This > >>>> enables us to share IRQs of such devices between on the host side when > >>>> passing them to a guest. This feature is optional, user space has to > >>>> request it explicitly. > >>>> > >>>> Signed-off-by: Jan Kiszka > >>> > >>> > >>> I just realized something. > >>> With this patch, if guest ever looks at > >>> interrupt disable bit, it will go crazy as that bit goes on/off by > >>> itself. I guess we could have an ioctl to set/clear the bit on > >>> device, and have qemu call that on config write into command/status > >>> register. > >> > >> I understand the problem, but I don't get why the kernel should bother. > >> User space has to filter the config space access, returning precisely > >> the value of the INTx disabled bit that the guest wrote. > > > > Yes but if guest disables INTx it should not get interrupts :) > > Right, got this meanwhile. KVM-in-KVM with nested device assignment > would break otherwise - intolerable. :) > > Jan > Or something simpler like WHQL :) -- MST