From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCH 0/3] generic hypercall support Date: Mon, 11 May 2009 15:01:40 +0200 Message-ID: <200905111501.41563.arnd@arndb.de> References: <4A031471.7000406@novell.com> <200905080011.52958.arnd@arndb.de> <1241821998.29028.5.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: Chris Wright , Gregory Haskins , Gregory Haskins , Avi Kivity , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Anthony Liguori To: Benjamin Herrenschmidt Return-path: Received: from moutng.kundenserver.de ([212.227.126.186]:52193 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbZEKNCo (ORCPT ); Mon, 11 May 2009 09:02:44 -0400 In-Reply-To: <1241821998.29028.5.camel@pasglop> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Saturday 09 May 2009, Benjamin Herrenschmidt wrote: > This was shot down by a vast majority of people, with the outcome being > an agreement that for IORESOURCE_MEM, pci_iomap and friends must return > something that is strictly interchangeable with what ioremap would have > returned. > > That means that readl and writel must work on the output of pci_iomap() > and similar, but I don't see why __raw_writel would be excluded there, I > think it's in there too. One of the ideas was to change pci_iomap to return a special token in case of virtual devices that causes iowrite32() to do an hcall, and to just define writel() to do iowrite32(). Unfortunately, there is no __raw_iowrite32(), although I guess we could add this generically if necessary. > Direct dereference is illegal in all cases though. right. > The token returned by pci_iomap for other type of resources (IO for > example) is also only supported for use by iomap access functions > (ioreadXX/iowriteXX) , and IO ports cannot be passed directly to those > neither. That still leaves the option to let drivers pass the IORESOURCE_PVIO for its own resources under some conditions, meaning that we will only use hcalls for I/O on these drivers but not on others, as Chris explained earlier. Arnd <><