Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hn1BM-0003Tq-QE for mharc-qemu-riscv@gnu.org; Mon, 15 Jul 2019 09:38:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50618) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn1BJ-0003PD-OU for qemu-riscv@nongnu.org; Mon, 15 Jul 2019 09:38:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn1BI-0004Do-FP for qemu-riscv@nongnu.org; Mon, 15 Jul 2019 09:38:17 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn1BI-0004Cy-9E for qemu-riscv@nongnu.org; Mon, 15 Jul 2019 09:38:16 -0400 Received: by mail-wr1-f67.google.com with SMTP id x1so2137594wrr.9 for ; Mon, 15 Jul 2019 06:38:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CGv8daBN78F3fs7vQSkYuBd/QM6pYOhv9U+pxIfUj4A=; b=U2cNbuSiUeN3Y9xzWkmCj5Y6Y+hsw7AGCdYKuv0H22R3c0KZp3/bXtNGw7beRxuNJL hO/nvKCFi2WszCQ9jpqVOnenuIGu+cztqhaKR0+30Ni1gNcGe/iUUzewfljdwqQw0CcK k5hjpTwDa/yWl34zPeebQzeDGLib2JyCtP6re5uFuKP885Ts72dE//consOTjjRUiTur sLL58XgYqqs1ZkTva7FCrOaC3OcHOPd4VNJrDRleOezz6vm9yu2FXiHVINVVBNZjECr4 ZnmRGj0CUEzGGy4w9FpziZ32vXkZSljhGONAmoWyUecH59YvuKno3nkcRBH4/EJHKVOB Ibew== X-Gm-Message-State: APjAAAXO/hwiCT5puPV7fXqODByDgmqMt68nFak8Xs2dUmxf9bEk1CKJ eAOZJFICo8VAaHq7BzAvjIDzMQ== X-Google-Smtp-Source: APXvYqzv52vvyJ8udrEPcZgi/K/RhipRh2hvKTg+0shBuyl/mrr74n2zKWT29piXggF6Vdrqkix/mQ== X-Received: by 2002:a5d:4e50:: with SMTP id r16mr23517341wrt.227.1563197894996; Mon, 15 Jul 2019 06:38:14 -0700 (PDT) Received: from [192.168.1.38] (62.red-83-42-61.dynamicip.rima-tde.net. [83.42.61.62]) by smtp.gmail.com with ESMTPSA id b8sm16081336wrr.43.2019.07.15.06.38.13 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 06:38:14 -0700 (PDT) To: Thomas Huth , Cornelia Huck Cc: Peter Maydell , Collin Walling , Sagar Karandikar , "Michael S. Tsirkin" , Palmer Dabbelt , Mark Cave-Ayland , QEMU Developers , Alistair Francis , Gerd Hoffmann , Helge Deller , Marcel Apfelbaum , David Gibson , Artyom Tarasenko , Eduardo Habkost , "open list:S390" , qemu-arm , Richard Henderson , "open list:RISC-V" , qemu-ppc , Paolo Bonzini , Aurelien Jarno References: <20190715095545.28545-1-philmd@redhat.com> <20190715095545.28545-2-philmd@redhat.com> <6d69e8ad-d720-ce04-20f2-a03193903078@redhat.com> <20190715125653.6e65d575.cohuck@redhat.com> <20190715130955.4a117388.cohuck@redhat.com> <13fce62f-234c-1b13-595f-5910c066bc4f@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <6c39a198-e951-c0bd-1ddc-5d227afe72ff@redhat.com> Date: Mon, 15 Jul 2019 15:38:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <13fce62f-234c-1b13-595f-5910c066bc4f@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.67 Subject: Re: [Qemu-riscv] [qemu-s390x] [RFC PATCH 1/3] hw/Kconfig: PCI bus implies PCI_DEVICES X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 13:38:19 -0000 On 7/15/19 3:19 PM, Thomas Huth wrote: > On 15/07/2019 13.09, Cornelia Huck wrote: >> On Mon, 15 Jul 2019 13:04:28 +0200 >> Philippe Mathieu-Daudé wrote: >> >>> On 7/15/19 12:56 PM, Cornelia Huck wrote: >>>> On Mon, 15 Jul 2019 12:48:55 +0200 >>>> Thomas Huth wrote: >>>> >>>>> On 15/07/2019 12.19, Peter Maydell wrote: >>>>>> On Mon, 15 Jul 2019 at 11:15, Thomas Huth wrote: >>>>>>> >>>>>>> On 15/07/2019 11.55, Philippe Mathieu-Daudé wrote: >>>>>>>> If a controller device provides a PCI bus, we can plug any PCI >>>>>>>> daughter card on it. >>>>>>>> >>>>>>>> Signed-off-by: Philippe Mathieu-Daudé >>>>>>>> --- >>>>>> >>>>>>>> diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig >>>>>>>> index 77f8b005ff..0f7267db35 100644 >>>>>>>> --- a/hw/pci/Kconfig >>>>>>>> +++ b/hw/pci/Kconfig >>>>>>>> @@ -1,5 +1,6 @@ >>>>>>>> config PCI >>>>>>>> bool >>>>>>>> + imply PCI_DEVICES >>>>>>> >>>>>>> No, please don't change this. This was done on purpose, since almost all >>>>>>> PCI_DEVICES do not work on s390x (so s390x does *not* imply PCI_DEVICES). >>>>>> >>>>>> But that means that every board that provides PCI has to have an >>>>>> "imply PCI_DEVICES" line, which is pretty clunky just to work >>>>>> around an s390x limitation. >>>>>> >>>>>> Is there some way in the Kconfig syntax for s390x to say >>>>>> "no PCI_DEVICES" so we can have the corner-case be handled >>>>>> by the s390x Kconfig in one place rather than in 20 places >>>>>> affecting everywhere except s390x? >>>>> >>>>> IIRC the problem on s390x are the legacy IRQs. s390x has only MSIs. So I >>>>> guess the correct way to fix this would be to introduce some >>>>> PCI_LEGACY_IRQ switch and let all old devices that do not work with MSI >>>>> depend on it. >>>> >>>> s/MSI/MSI-X/, IIRC. Not sure how far 'legacy' would stretch. >>> >>> Maybe we can have something like PCI_LEGACY_DEVICES and PCI_MSI_DEVICES? >>> >>> So if s390x only selects PCI_LEGACY (not PCI_MSI) bus, then it only get >>> legacy devices? >> >> Wrong way around? We need MSI-X for s390x, not plain MSI or >> 'legacy' (whatever that is). > > With "legacy" I meant the old level-triggered interrupts from the early > PCI (non-express) days. Sorry for being imprecise here. > > So maybe we need two new switches, PCI_CLASSIC (or so) and PCI_MSIX, and > then the PCI devices should be marked with "default y if PCI_CLASSIC" if > they do not have MSIX support, and with "default y if PCI_MSIX" if they > have MSI-X support? Something like that :) Per Wikipedia: Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture. The PCI-SIG introduced the serial PCI Express in c. 2004. At the same time, they renamed PCI as Conventional PCI. PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively. What about PCI_CONVENTIONAL then? Regards, Phil.