WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] bus_to_virt()

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] bus_to_virt()
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 05 Jul 2007 11:13:31 +0100
Delivery-date: Thu, 05 Jul 2007 03:08:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <468CDE37.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ace+7SMsYbK7BirgEdy1sgAWy6hiGQ==
Thread-topic: [Xen-devel] bus_to_virt()
User-agent: Microsoft-Entourage/11.3.3.061214
This change would be fine, I'm pretty sure, although it might slow down pte
accesses since machine_to_phys() is used in pte_val() and friends. Perhaps a
machine_to_local_phys() would be the best way to go?

 -- Keir

On 5/7/07 11:04, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> Isn't it inappropriate for bus_to_virt() to use, through machine_to_phys(),
> mfn_to_pfn() rather than mfn_to_local_pfn()? If a foreign domain's address
> gets uses here, the virtual address returned might be anything. I'm
> specifically asking because I finally want to make an attempt to (a) merge
> our swiotlb.c up with native's lib/swiotlb.c and then (b) move ours to
> lib/swiotlb-xen.c. Native, however, uses a virtual address range check, and
> hence the bus_to_virt() return value must reliable. If changing the macro
> globally isn't appropriate (I can't see what valid uses there might be for
> this
> macro with non-local addresses, hence a change like this would be benign to
> all other users), I'd have to hand-craft a mechanism local to swiotlb.c to
> that
> I can keep the delta to native down.
> 
> Thanks, Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>