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

[Xen-devel] Re: [PATCH]blkfront change to support unmodified linux

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH]blkfront change to support unmodified linux
From: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Date: Mon, 05 Sep 2005 17:02:12 +0800
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 05 Sep 2005 09:03:07 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <2cae6cf4b5de67a507637b24023d79b9@xxxxxxxxxxxx>
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>
References: <431BDA77.4020205@xxxxxxxxx> <2cae6cf4b5de67a507637b24023d79b9@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
Keir Fraser wrote:

On 5 Sep 2005, at 06:41, Xiaofeng Ling wrote:

This patch is to make blkfront can work both in xen-linux and in
unmodified guest which is shadow_model_translate enabled.


phys == machine from the p.o.v. of a shadow-translated guest, so why not modify virt_to_mfn and friends appropriately?

Sorry, I don't catch your meaning.
vmx guest is in shadow-translate mode, and gpfn need to translate to mfn in hypervisor. see the macro:

#define __gpfn_to_mfn(_d, gpfn)                        \
    ({                                                 \
        ASSERT(current->domain == (_d));               \
        (shadow_mode_translate(_d))                    \
        ? get_mfn_from_pfn(gpfn)                \
        : (gpfn);                                      \
    })

#define __gpfn_to_mfn_foreign(_d, gpfn)                \
    ( (shadow_mode_translate(_d))                      \
      ? gpfn_to_mfn_foreign(_d, gpfn)                  \
      : (gpfn) )

So I rename virt_to_mfn to virt_to_xfn which means if not in shadow translate mode, it will do translate in guest. for vmx guest, don't need the translation in guest. What is your suggestion?

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

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