All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] predicate NX flag
  2005-06-07 18:33 [patch] (resend) mask out nx bits when calculatingpfn/mfn Nakajima, Jun
@ 2005-06-07 19:12 ` Scott Parish
  2005-06-08 19:24   ` David F Barrera
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Parish @ 2005-06-07 19:12 UTC (permalink / raw)
  To: Nakajima, Jun; +Cc: xen-devel, Scott Parish

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

the NX flag should only be set when its use is enabled.

sRp

-- 
Scott Parish
Signed-off-by: srparish@us.ibm.com

[-- Attachment #2: predicate-nx.diff --]
[-- Type: text/plain, Size: 1141 bytes --]

diff -rN -u -p old-xen-64-4/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c new-xen-64-4/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c
diff -rN -u -p old-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h new-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
--- old-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h	2005-05-28 09:20:36.000000000 +0000
+++ new-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h	2005-06-07 18:55:36.000000000 +0000
@@ -186,12 +186,17 @@ static inline pte_t ptep_get_and_clear(p
 #define PAGE_READONLY	__pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
 #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
 #define __PAGE_KERNEL \
-	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX | _PAGE_USER )
+	((_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | \
+	 _PAGE_NX | _PAGE_USER ) & __supported_pte_mask)
 #define __PAGE_KERNEL_EXEC \
 	(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_USER )
 #define __PAGE_KERNEL_NOCACHE \

[-- 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] 8+ messages in thread

* RE: [patch] predicate NX flag
@ 2005-06-07 20:45 Nakajima, Jun
  2005-06-07 20:47 ` Scott Parish
  0 siblings, 1 reply; 8+ messages in thread
From: Nakajima, Jun @ 2005-06-07 20:45 UTC (permalink / raw)
  To: Scott Parish; +Cc: xen-devel

Scott Parish wrote:
> the NX flag should only be set when its use is enabled.
> 
> sRp

Rather than changing __PAGE_KERNEL, I think we should change set_p?d (?
= g, u, m, e) like

#define set_pmd(pmdptr, pmdval) xen_l2_entry_update(pmdptr, (pmdval)&
__supported_pte_mask)

Jun
---
Intel Open Source Technology Center

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

* Re: [patch] predicate NX flag
  2005-06-07 20:45 [patch] predicate NX flag Nakajima, Jun
@ 2005-06-07 20:47 ` Scott Parish
  2005-06-07 20:49   ` Scott Parish
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Parish @ 2005-06-07 20:47 UTC (permalink / raw)
  To: Nakajima, Jun; +Cc: xen-devel, Scott Parish

On Tue, Jun 07, 2005 at 01:45:45PM -0700, Nakajima, Jun wrote:

> Scott Parish wrote:
> > the NX flag should only be set when its use is enabled.
> > 
> > sRp
> 
> Rather than changing __PAGE_KERNEL, I think we should change set_p?d (?
> = g, u, m, e) like
> 
> #define set_pmd(pmdptr, pmdval) xen_l2_entry_update(pmdptr, (pmdval)&
> __supported_pte_mask)

Working on a patch.. there are places that xen_l1_entry_update() is
called directly with __PAGE_KERNEL, should those be converted to a
set_pte, or should xen_l1_entry_update be updated instead of the macros,
or should '& __supported_pte_mask' be hardcoded into these places. I'd
prefer to just modify the xen_l?_entry_update()s

btw, __supported_PTE_mask seems an unfortunate name for a mask that gets
used for other pagetable levels.

sRp

-- 
Scott Parish
Signed-off-by: srparish@us.ibm.com

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

* Re: [patch] predicate NX flag
  2005-06-07 20:47 ` Scott Parish
@ 2005-06-07 20:49   ` Scott Parish
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Parish @ 2005-06-07 20:49 UTC (permalink / raw)
  To: Scott Parish; +Cc: xen-devel, Nakajima, Jun

On Tue, Jun 07, 2005 at 08:47:16PM +0000, Scott Parish wrote:

> ... or should xen_l1_entry_update be updated instead of the macros ...

i guess this option is ruled out in light of future writable pagetable
support.

sRp

-- 
Scott Parish
Signed-off-by: srparish@us.ibm.com

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

* RE: [patch] predicate NX flag
@ 2005-06-07 21:02 Nakajima, Jun
  0 siblings, 0 replies; 8+ messages in thread
From: Nakajima, Jun @ 2005-06-07 21:02 UTC (permalink / raw)
  To: Nakajima, Jun, Scott Parish; +Cc: xen-devel

BTW, did this solve the driver problem on your machine?

Jun
---
Intel Open Source Technology Center 

-----Original Message-----
From: xen-devel-bounces@lists.xensource.com
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Nakajima,
Jun
Sent: Tuesday, June 07, 2005 1:46 PM
To: Scott Parish
Cc: xen-devel@lists.xensource.com
Subject: RE: [Xen-devel] [patch] predicate NX flag

Scott Parish wrote:
> the NX flag should only be set when its use is enabled.
> 
> sRp

Rather than changing __PAGE_KERNEL, I think we should change set_p?d (?
= g, u, m, e) like

#define set_pmd(pmdptr, pmdval) xen_l2_entry_update(pmdptr, (pmdval)&
__supported_pte_mask)

Jun
---
Intel Open Source Technology Center

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

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

* RE: [patch] predicate NX flag
@ 2005-06-07 21:45 Ian Pratt
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Pratt @ 2005-06-07 21:45 UTC (permalink / raw)
  To: Scott Parish; +Cc: xen-devel, Nakajima, Jun

> > ... or should xen_l1_entry_update be updated instead of the 
> macros ...
> 
> i guess this option is ruled out in light of future writable 
> pagetable support.

Yes. It's critical that everything uses writeable pagetables, as its
essential for SMP guest support. In general, the x86_64 linux port would
really benefit from some more unification with i386. It's currently
missing all sorts of fixes and improvements that have been implemented
on i386.

Ian

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

* RE: [patch] predicate NX flag
@ 2005-06-07 21:52 Nakajima, Jun
  0 siblings, 0 replies; 8+ messages in thread
From: Nakajima, Jun @ 2005-06-07 21:52 UTC (permalink / raw)
  To: Ian Pratt, Scott Parish; +Cc: xen-devel

Ian Pratt wrote:
>>> ... or should xen_l1_entry_update be updated instead of the macros
>>> ... 
>> 
>> i guess this option is ruled out in light of future writable
>> pagetable support.
> 
> Yes. It's critical that everything uses writeable pagetables, as its
> essential for SMP guest support. In general, the x86_64 linux port
> would really benefit from some more unification with i386. It's
> currently missing all sorts of fixes and improvements that have been
> implemented on i386.
> 
> Ian

BTW, with PAE support, is NX working on x86 side?

Jun
---
Intel Open Source Technology Center

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

* Re: [patch] predicate NX flag
  2005-06-07 19:12 ` [patch] predicate NX flag Scott Parish
@ 2005-06-08 19:24   ` David F Barrera
  0 siblings, 0 replies; 8+ messages in thread
From: David F Barrera @ 2005-06-08 19:24 UTC (permalink / raw)
  To: Scott Parish; +Cc: xen-devel, Nakajima, Jun

Scott,

This patch allowed me to finally be able to boot Dom0 on the HS20 Blade
(x86_64).

On Tue, 2005-06-07 at 19:12 +0000, Scott Parish wrote:
> the NX flag should only be set when its use is enabled.
> 
> sRp
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
-- 
Regards,

David F Barrera
Linux Technology Center
Systems and Technology Group, IBM

"The wisest men follow their own direction. "
                                                        Euripides

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

end of thread, other threads:[~2005-06-08 19:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-07 20:45 [patch] predicate NX flag Nakajima, Jun
2005-06-07 20:47 ` Scott Parish
2005-06-07 20:49   ` Scott Parish
  -- strict thread matches above, loose matches on Subject: below --
2005-06-07 21:52 Nakajima, Jun
2005-06-07 21:45 Ian Pratt
2005-06-07 21:02 Nakajima, Jun
2005-06-07 18:33 [patch] (resend) mask out nx bits when calculatingpfn/mfn Nakajima, Jun
2005-06-07 19:12 ` [patch] predicate NX flag Scott Parish
2005-06-08 19:24   ` David F Barrera

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.