From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH 5/5] VFIO based device assignment Date: Mon, 12 Jul 2010 09:37:10 +0300 Message-ID: <4C3AB816.4070907@redhat.com> References: <20100711180910.20121.93313.stgit@localhost6.localdomain6> <20100711180942.20121.97368.stgit@localhost6.localdomain6> <4C3A0D15.3070302@redhat.com> <1278877118.20397.103.camel@x201> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, pugs@cisco.com, chrisw@redhat.com, mst@redhat.com To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5795 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755093Ab0GLGhR (ORCPT ); Mon, 12 Jul 2010 02:37:17 -0400 In-Reply-To: <1278877118.20397.103.camel@x201> Sender: kvm-owner@vger.kernel.org List-ID: On 07/11/2010 10:38 PM, Alex Williamson wrote: > >> What >> about page attributes? >> >> There are two cases: >> >> - snoop capable iommu - can use write-backed RAM, but need to enable >> snoop. BARs still need to respect page attributes. >> - older mmu - need to respect guest memory type; probably cannot be done >> without kvm. >> >> If the guest maps a BAR or RAM using write-combine memory type, can we >> reflect that? This may provide a considerable performance benefit. >> > Do we do anything about this today in kvm device assignment? Maybe it's > buried in the kernel side bits and I've missed it. I would expect that > WC mappings in the guest carry through to host virtual mappings, but > maybe we can only do that with kvm. Yes, see arch/x86/kvm/mmu.c, set_spte() calling ->get_mt_mask(). Strangely, it's qualified with tdp. Perhaps because of all of the scary errata regarding mismatching memory types for a page. > The processor side mappings are > independent of the iommu mappings since devices don't care about such > things. Thanks, > Yeah. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.