All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64-phys-ma.patch
@ 2005-05-12 21:07 Arun Sharma
  2005-05-12 21:30 ` Christian Limpach
  0 siblings, 1 reply; 4+ messages in thread
From: Arun Sharma @ 2005-05-12 21:07 UTC (permalink / raw)
  To: Ian Pratt, Keir Fraser; +Cc: xen-devel

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

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c	2005-05-12 13:23:19 -07:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c	2005-05-12 13:23:19 -07:00
@@ -328,7 +328,7 @@
 		}
 	}
 
-	new_pte = pfn_pte(phys >> PAGE_SHIFT, prot);
+	new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
 	pte = pte_offset_kernel(pmd, vaddr);
 
 	if (!pte_none(*pte) &&

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86-64-phys-ma.patch
  2005-05-12 21:07 [PATCH] x86-64-phys-ma.patch Arun Sharma
@ 2005-05-12 21:30 ` Christian Limpach
  2005-05-12 21:56   ` Arun Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Limpach @ 2005-05-12 21:30 UTC (permalink / raw)
  To: Arun Sharma; +Cc: Ian Pratt, xen-devel

On 5/12/05, Arun Sharma <arun.sharma@intel.com> 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...

    christian

> 
> Signed-off-by: Arun Sharma <arun.sharma@intel.com>
> 
> --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 2005-05-12 13:23:19 -07:00
> +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 2005-05-12 13:23:19 -07:00
> @@ -328,7 +328,7 @@
>                 }
>         }
> 
> -       new_pte = pfn_pte(phys >> PAGE_SHIFT, prot);
> +       new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
>         pte = pte_offset_kernel(pmd, vaddr);
> 
>         if (!pte_none(*pte) &&
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86-64-phys-ma.patch
  2005-05-12 21:30 ` Christian Limpach
@ 2005-05-12 21:56   ` Arun Sharma
  2005-05-12 22:04     ` Christian Limpach
  0 siblings, 1 reply; 4+ messages in thread
From: Arun Sharma @ 2005-05-12 21:56 UTC (permalink / raw)
  To: Christian.Limpach; +Cc: Ian Pratt, xen-devel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

Christian Limpach wrote:
> On 5/12/05, Arun Sharma <arun.sharma@intel.com> 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


[-- Attachment #2: pte-val-ma.patch --]
[-- Type: text/plain, Size: 965 bytes --]

===== 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)
 {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86-64-phys-ma.patch
  2005-05-12 21:56   ` Arun Sharma
@ 2005-05-12 22:04     ` Christian Limpach
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Limpach @ 2005-05-12 22:04 UTC (permalink / raw)
  To: Arun Sharma; +Cc: Ian Pratt, xen-devel

On 5/12/05, Arun Sharma <arun.sharma@intel.com> wrote:
> Christian Limpach wrote:
> > On 5/12/05, Arun Sharma <arun.sharma@intel.com> 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.

Thanks -- checked in.

     christian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-12 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 21:07 [PATCH] x86-64-phys-ma.patch Arun Sharma
2005-05-12 21:30 ` Christian Limpach
2005-05-12 21:56   ` Arun Sharma
2005-05-12 22:04     ` Christian Limpach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.