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] [PATCH] x86-64-phys-ma.patch

To: Christian.Limpach@xxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] x86-64-phys-ma.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Thu, 12 May 2005 14:56:26 -0700
Cc: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 12 May 2005 21:56:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3d8eece205051214305076efc5@xxxxxxxxxxxxxx>
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: <20050512210714.GA29374@xxxxxxxxx> <3d8eece205051214305076efc5@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
Christian Limpach wrote:
On 5/12/05, Arun Sharma <arun.sharma@xxxxxxxxx> wrote:

phys is machine physical already. So we shouldn't try to convert guest physical 
to machine physical.


Are you sure that the test a few lines further down shouldn't use (a
to be defined -- see i386) pte_val_ma to compare the currently
installed pte with the to-be-installed one?  You might be comparing
random values otherwise...


Sounds reasonable. I tested that this incremental patch doesn't cause any new regressions.

        -Arun

===== linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 1.7 vs edited =====
--- 1.7/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c       2005-05-12 
10:17:01 -07:00
+++ edited/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c    2005-05-12 
14:32:18 -07:00
@@ -332,7 +332,7 @@
        pte = pte_offset_kernel(pmd, vaddr);
 
        if (!pte_none(*pte) &&
-           pte_val(*pte) != (pte_val(new_pte) & __supported_pte_mask))
+           pte_val_ma(*pte) != (pte_val_ma(new_pte) & __supported_pte_mask))
                pte_ERROR(*pte);
 
         /* 
===== linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/page.h 1.2 vs edited 
=====
--- 1.2/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/page.h       
2005-04-02 12:27:09 -08:00
+++ edited/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/page.h    
2005-05-12 14:26:58 -07:00
@@ -92,6 +92,7 @@
 
 #define pte_val(x)     (((x).pte & 1) ? machine_to_phys((x).pte) : \
                         (x).pte)
+#define pte_val_ma(x)  ((x).pte)
 
 static inline unsigned long pmd_val(pmd_t x)
 {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>