From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: VIRTIO - compatibility with different virtualization solutions Date: Tue, 18 Feb 2014 20:42:37 -0800 Message-ID: References: <20140217132331.GA3441@olila.local.net-space.pl> <87vbwcaqxe.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WFyzY-0004cK-0D for xen-devel@lists.xenproject.org; Wed, 19 Feb 2014 04:42:40 +0000 Received: by mail-qc0-f174.google.com with SMTP id x13so27030450qcv.33 for ; Tue, 18 Feb 2014 20:42:37 -0800 (PST) In-Reply-To: <87vbwcaqxe.fsf@rustcorp.com.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rusty Russell Cc: virtio-dev@lists.oasis-open.org, Wei Liu , Ian Campbell , Daniel Kiper , Stefano Stabellini , ian@bromium.com, sasha.levin@oracle.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, Feb 18, 2014 at 4:26 PM, Rusty Russell wrote: > Daniel Kiper writes: >> Hi, >> >> Below you could find a summary of work in regards to VIRTIO compatibility with >> different virtualization solutions. It was done mainly from Xen point of view >> but results are quite generic and can be applied to wide spectrum >> of virtualization platforms. > > Hi Daniel, > > Sorry for the delayed response, I was pondering... CC changed > to virtio-dev. > > From a standard POV: It's possible to abstract out the where we use > 'physical address' for 'address handle'. It's also possible to define > this per-platform (ie. Xen-PV vs everyone else). This is sane, since > Xen-PV is a distinct platform from x86. I'll go even further and say that "address handle" doesn't make sense too. Just using grant table references is not enough to make virtio work well under Xen. You really need to use bounce buffers ala persistent grants. I think what you ultimately want is virtio using a DMA API (I know benh has scoffed at this but I don't buy his argument at face value) and a DMA layer that bounces requests to a pool of persistent grants. > For platforms using EPT, I don't think you want anything but guest > addresses, do you? > > From an implementation POV: > > On IOMMU, start here for previous Linux discussion: > http://thread.gmane.org/gmane.linux.kernel.virtualization/14410/focus=14650 > > And this is the real problem. We don't want to use the PCI IOMMU for > PCI devices. So it's not just a matter of using existing Linux APIs. Is there any data to back up that claim? Just because power currently does hypercalls for anything that uses the PCI IOMMU layer doesn't mean this cannot be changed. It's pretty hacky that virtio-pci just happens to work well by accident on power today. Not all architectures have this limitation. Regards, Anthony Liguori > Cheers, > Rusty. >