From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path Date: Mon, 16 Apr 2012 20:12:36 +0300 Message-ID: <20120416171235.GA19517@redhat.com> References: <20120405033450.25661.68810.stgit@bling.home> <1334584997.3112.8.camel@bling.home> <20120416150640.GB13713@redhat.com> <4F8C364F.6090901@siemens.com> <20120416160823.GA18914@redhat.com> <4F8C450F.9030706@siemens.com> <20120416163624.GD18914@redhat.com> <4F8C4AFE.8010309@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alex Williamson , "kvm@vger.kernel.org" , Avi Kivity , Marcelo Tosatti , "jbaron@redhat.com" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34437 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754601Ab2DPSK2 (ORCPT ); Mon, 16 Apr 2012 14:10:28 -0400 Content-Disposition: inline In-Reply-To: <4F8C4AFE.8010309@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Apr 16, 2012 at 06:38:22PM +0200, Jan Kiszka wrote: > On 2012-04-16 18:36, Michael S. Tsirkin wrote: > > On Mon, Apr 16, 2012 at 06:13:03PM +0200, Jan Kiszka wrote: > >> On 2012-04-16 18:08, Michael S. Tsirkin wrote: > >>> On Mon, Apr 16, 2012 at 05:10:07PM +0200, Jan Kiszka wrote: > >>>> On 2012-04-16 17:06, Michael S. Tsirkin wrote: > >>>>> On Mon, Apr 16, 2012 at 08:03:17AM -0600, Alex Williamson wrote: > >>>>>> The discussion on this patch seems to have fizzled, with no clear short > >>>>>> term solution. > >>>>> > >>>>> I think we are in concensus, it's just that there are > >>>>> multiple bugs still left to fix. > >>>>> > >>>>> First, we need to prevent guest from touching command > >>>>> register except for the bus master bit. Something like > >>>> > >>>> INTx is harmless as well. Denying access breaks masking for the guest. > >>> > >>> We currently mark intx as emulated, no? > >> > >> If we use the mask also in the kernel for IRQ sharing, we *monitor* it. > >> > >>> Anyway - care fixing it properly? > >> > >> There is nothing to fix. > >> > >> Jan > > > > Guest access to command register is a bug. > > E.g. it has no business enabling SERR as SERR crashes > > host when triggered. > > Maybe a misunderstanding. I agree that other bits are not guest > business. But INTx should be excluded from this filtering and handled as > is, i.e. passed through. > > Jan Ah, I see what you mean. So let's add pci_dev->emulate_config_write[PCI_COMMAND + 1] &= ~(PCI_COMMAND_INTX_DISABLE >> 8); on top? > -- > Siemens AG, Corporate Technology, CT T DE IT 1 > Corporate Competence Center Embedded Linux