Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4120520imu; Tue, 18 Dec 2018 09:20:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/VCkJ0FZAG5zrAP+vyv9yHShCvQ3hWAIiazioVKin6+j4sDGod9pBbkCR1ra3sMQhgCcRo/ X-Received: by 2002:a63:4187:: with SMTP id o129mr15250866pga.370.1545153399963; Tue, 18 Dec 2018 09:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545153399; cv=none; d=google.com; s=arc-20160816; b=J8gKfPq70aPym5kH87Gkv8Ol4PRzxov9PtNQPE9fQOQDrCYzRFN7rxYlcm5OzG0yxL cOCqdjZJto0pQlqcarzgTtqFcF01d4vx4qfixjFnG6QwetbUtUYo6nyVQIu8VXtVrn/Y r+EOKTfcbaVlxU+Lslbur1sjWWhpRjhoNVvSp7K0aFTBFJqiFrQ6ewuZ/x8gt0p8jo/C WOvqUkyG4nQTZxIuOej5ovWWpSEnrH16XeH/1vPHhHcLkBIhsGlnmskFKFbLXgu80+ds mflpNEg8X2xNzvtzOCBT9KzMXrIDNRp3Sp9Xn1XyT+zPyO3owHZxP0S36PVlyDQTZ7bq Y+cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=1gIcr9NhPydtZOUKyFWS61dSLglyROQJcZugYn27W6w=; b=0XxZkwlsM5Y95LmcY8WEq6QpVEuhmEYAKIItQA0b1XtEt5TdhwxnnkZHKbTFj239L+ WVSAq5r7weWsCoznoCIYs/aKjp4AY9vHq5TueHeSEaqreZ0Ff4LrQwdtvcqvwcMxw2d8 uXYztFbYO+dWqU6Q+yeJ0otoPpN+4SpWD6Ya0f1RbdqnlTwC3AIANbx7bh/GgYNUvjRq HPKh4YfkN/vKocKKxREY3X4SSP5XiOjWBf+sQ8GPvnr+oW7qwiXaL3OFIc3T3MSTcSm4 e5cvTn3FGiYO7OQE7Aahr+rkMwBcg4Rr2nUdTkTlAH8oCLi7IxIl9V0Gq3wfcQwx1WXB F7xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z186si6739475pgd.90.2018.12.18.09.16.21; Tue, 18 Dec 2018 09:16:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727350AbeLRROY (ORCPT + 99 others); Tue, 18 Dec 2018 12:14:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60374 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727321AbeLRROW (ORCPT ); Tue, 18 Dec 2018 12:14:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 877A5A04AE; Tue, 18 Dec 2018 17:14:21 +0000 (UTC) Received: from gondolin (ovpn-116-115.ams2.redhat.com [10.36.116.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3776E105B200; Tue, 18 Dec 2018 17:14:13 +0000 (UTC) Date: Tue, 18 Dec 2018 18:13:58 +0100 From: Cornelia Huck To: Stefan Hajnoczi Cc: David Hildenbrand , "Dr. David Alan Gilbert" , Vivek Goyal , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, miklos@szeredi.hu, sweil@redhat.com, swhiteho@redhat.com Subject: Re: [PATCH 18/52] virtio-fs: Map cache using the values from the capabilities Message-ID: <20181218181358.3bc2615a.cohuck@redhat.com> In-Reply-To: <20181217145638.GH6785@stefanha-x1.localdomain> References: <20181213091320.GA2313@work-vm> <20181213100058.GC2313@work-vm> <96d9ea85-ddf3-3331-77ce-124475b26da4@redhat.com> <20181213121548.GN2313@work-vm> <0f1b43f6-57e3-c6d2-7ffe-cf783e125a7b@redhat.com> <20181213133823.2272736b.cohuck@redhat.com> <20181214134434.GA3882@stefanha-x1.localdomain> <20181217145638.GH6785@stefanha-x1.localdomain> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/9D+IRyZBh7miHo=qk+bbEef"; protocol="application/pgp-signature" X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 18 Dec 2018 17:14:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/9D+IRyZBh7miHo=qk+bbEef Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 17 Dec 2018 14:56:38 +0000 Stefan Hajnoczi wrote: > On Mon, Dec 17, 2018 at 11:53:46AM +0100, David Hildenbrand wrote: > > On 14.12.18 14:44, Stefan Hajnoczi wrote: =20 > > > On Thu, Dec 13, 2018 at 01:38:23PM +0100, Cornelia Huck wrote: =20 > > >> On Thu, 13 Dec 2018 13:24:31 +0100 > > >> David Hildenbrand wrote: > > >>> As s390x does not have the concept of memory mapped io (RAM is RAM, > > >>> nothing else), this is not architectured. vitio-ccw can therefore n= ot > > >>> define anything similar like that. However, in virtual environments= we > > >>> can do whatever we want on top of the pure transport (e.g. on the v= irtio > > >>> layer). > > >>> > > >>> Conny can correct me if I am wrong. =20 > > >> > > >> I don't think you're wrong, but I haven't read the code yet and I'm > > >> therefore not aware of the purpose of this BAR. > > >> > > >> Generally, if there is a memory location shared between host and gue= st, > > >> we need a way to communicate its location, which will likely differ > > >> between transports. For ccw, I could imagine a new channel command > > >> dedicated to exchanging configuration information (similar to what > > >> exists today to communicate the locations of virtqueues), but I'd > > >> rather not go down this path. > > >> > > >> Without reading the code/design further, can we use one of the > > >> following instead of a BAR: > > >> - a virtqueue; > > >> - something in config space? > > >> That would be implementable by any virtio transport. =20 > > >=20 > > > The way I think about this is that we wish to extend the VIRTIO device > > > model with the concept of shared memory. virtio-fs, virtio-gpu, and > > > virtio-vhost-user all have requirements for shared memory. > > >=20 > > > This seems like a transport-level issue to me. PCI supports > > > memory-mapped I/O and that's the right place to do it. If you try to > > > put it into config space or the virtqueue, you'll end up with somethi= ng > > > that cannot be realized as a PCI device because it bypasses PCI bus > > > address translation. > > >=20 > > > If CCW needs a side-channel, that's fine. But that side-channel is a > > > CCW-specific mechanism and probably doesn't apply to all other > > > transports. > > >=20 > > > Stefan > > > =20 > >=20 > > I think the problem is more fundamental. There is no iommu. Whatever > > shared region you want to indicate, you want it to be assigned a memory > > region in guest physical memory. Like a DIMM/NVDIMM. And this should be > > different to the concept of a BAR. Or am I missing something? =20 >=20 > If you implement a physical virtio PCI adapter then there is bus > addressing and an IOMMU and VIRTIO has support for that. I'm not sure I > understand what you mean by "there is no iommu"? For ccw, there is no iommu; channel-program translation is doing similar things. (I hope that is what David meant :) >=20 > > I am ok with using whatever other channel to transport such information. > > But I believe this is different to a typical BAR. (I wish I knew more > > about PCI internals ;) ). > >=20 > > I would also like to know how shared memory works as of now for e.g. > > virtio-gpu. =20 >=20 > virtio-gpu currently does not use shared memory, it needs it for future > features. OK, that all sounds like we need to define a generic, per transport, device agnostic way to specify shared memory. Where is that memory situated? Is it something in guest memory (like virtqueues)? If it is something provided by the device, things will get tricky for ccw (remember that there's no mmio on s390; pci on s390 uses special instructions for that.) --Sig_/9D+IRyZBh7miHo=qk+bbEef Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw9DWbcNiT/aowBjO3s9rk8bwL68FAlwZKtYACgkQ3s9rk8bw L69vgRAAj9BVcoVfCIc4Aoyf/doQcUfdv2JytRFYbJFlHKvWWWoA6MePTWchtico BNPjr1QC0dDHCBC3m9ubm/EX1jIclQlX/VUEy55/f7REMKus7tLJLvekxqLHjKFW i8DdG2yfy1pyJchq76nbvpeYkO9NldX0JWOD4bcfxuuREjKGiLOVWP9jUt0HzNCd OZr7br2w1YRh1t2Zr0K75aW8qnMSv0Rbh7e4aQJK6TDfEszP7Ne5/0YcmDZSKWbI SzoCHiRGC8W8peZYBTtX18lvBHYtoNKr4uHDIXnKa2BC59KVZOYE7zJNplzE5FqE CwoyxQKnDbEpeeUl2m+cmrKpMp8ATanzdd0ien6DaufgnOmOraCvXlk7LWNDrCjH KxGMfbG6JLxQdECCXV67Rh6tR0NPWADzNJZ/mnBrUDdZ8iJ/C/lLiv5EAzX7Mn4D uS+guDA07fPa6aZATP4QxjiKW7HzZ4SuNOAt+48TP9iqohzcUWws9rRWNd7HQ1ru SSeffxLLsq9CCOjvdhyCSTo7T6QiexvZat6+LDHJi9rzNgXv/iqUBp7UY77gfVoO BtKk8iwyaz3LvDM3GU8ECco1gmr7odzu08SvO4x1yuJ41pyu7QNvNNH/YEy15qxa pn80JriRNy2oXSLN6MCmKmNffTSsbbdvnpMFRJapjm1bYk6I/jo= =TIKw -----END PGP SIGNATURE----- --Sig_/9D+IRyZBh7miHo=qk+bbEef--