All of lore.kernel.org
 help / color / mirror / Atom feed
* Setting page type for GDT page
@ 2007-08-31 16:15 Trammell Hudson
  2007-08-31 16:21 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Trammell Hudson @ 2007-08-31 16:15 UTC (permalink / raw)
  To: xen-devel

I'm trying to install my own GDT in a lightweight kernel domU
and am receiving an error from HYPERVISOR_set_gdt() that my page
does not have the expected type.  I've made sure that the page is
mapped read-only and walked the active page tables to check for
any writable mappings.  There are two mappings of page 0x2abcd,
both with only the present and user bits set:

load_gdt_xen:313: Setting GDT page 0000006000524000 read-only
Mappings of 0000006000524000 (page 000000002abcd000):
PML1 0x6000024000[124] = 001000002abcd005 (va=0000000000524000 000 000 002 124)
PML1 0x6000024000[124] = 001000002abcd005 (va=0000006000524000 000 180 002 124)
load_gdt_xen:318: Setting GDT 0x6000524000 => 000000000002abcd (12 entries)
(XEN) mm.c:1664:d10 Bad type (saw 00000000e8000001 != exp 00000000a0000000) for mfn 2abcd (pfn 524)
load_gdt_xen:322: Unable to set GDT!  rc=-22

Is there a way to designate that the page will be used for the GDT,
similar to MMUEXT_PIN_L4_TABLE?

-- Trammell

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

* Re: Setting page type for GDT page
  2007-08-31 16:15 Setting page type for GDT page Trammell Hudson
@ 2007-08-31 16:21 ` Keir Fraser
  2007-08-31 16:39   ` Trammell Hudson
  0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2007-08-31 16:21 UTC (permalink / raw)
  To: Trammell Hudson, xen-devel

The type code disagrees with you. There's still a writable mapping lurking
somewhere. Perhaps not in the page tables you are running on, though. What
do you do with the page tables that the domain builder provides you?

 -- Keir

On 31/8/07 17:15, "Trammell Hudson" <hudson@osresearch.net> wrote:

> I'm trying to install my own GDT in a lightweight kernel domU
> and am receiving an error from HYPERVISOR_set_gdt() that my page
> does not have the expected type.  I've made sure that the page is
> mapped read-only and walked the active page tables to check for
> any writable mappings.  There are two mappings of page 0x2abcd,
> both with only the present and user bits set:
> 
> load_gdt_xen:313: Setting GDT page 0000006000524000 read-only
> Mappings of 0000006000524000 (page 000000002abcd000):
> PML1 0x6000024000[124] = 001000002abcd005 (va=0000000000524000 000 000 002
> 124)
> PML1 0x6000024000[124] = 001000002abcd005 (va=0000006000524000 000 180 002
> 124)
> load_gdt_xen:318: Setting GDT 0x6000524000 => 000000000002abcd (12 entries)
> (XEN) mm.c:1664:d10 Bad type (saw 00000000e8000001 != exp 00000000a0000000)
> for mfn 2abcd (pfn 524)
> load_gdt_xen:322: Unable to set GDT!  rc=-22

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

* Re: Setting page type for GDT page
  2007-08-31 16:21 ` Keir Fraser
@ 2007-08-31 16:39   ` Trammell Hudson
  2007-08-31 17:51     ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Trammell Hudson @ 2007-08-31 16:39 UTC (permalink / raw)
  To: xen-devel

On Fri, Aug 31, 2007 at 05:21:25PM +0100, Keir Fraser wrote:
> The type code disagrees with you. There's still a writable mapping lurking
> somewhere. Perhaps not in the page tables you are running on, though. What
> do you do with the page tables that the domain builder provides you?

Nothing, so that's a very good possibility.  The domU has already
switched to its new basetable pointer, but the old L1 page tables
must be out there, somewhere, and are stil validated.

Thanks!
-- Trammell

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

* Re: Setting page type for GDT page
  2007-08-31 16:39   ` Trammell Hudson
@ 2007-08-31 17:51     ` Keir Fraser
  0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2007-08-31 17:51 UTC (permalink / raw)
  To: Trammell Hudson, xen-devel

You need to MMUEXT_UNPIN_TABLE the original page table provided by the
builder.

 -- Keir

On 31/8/07 17:39, "Trammell Hudson" <hudson@osresearch.net> wrote:

> On Fri, Aug 31, 2007 at 05:21:25PM +0100, Keir Fraser wrote:
>> The type code disagrees with you. There's still a writable mapping lurking
>> somewhere. Perhaps not in the page tables you are running on, though. What
>> do you do with the page tables that the domain builder provides you?
> 
> Nothing, so that's a very good possibility.  The domU has already
> switched to its new basetable pointer, but the old L1 page tables
> must be out there, somewhere, and are stil validated.
> 
> Thanks!
> -- Trammell
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2007-08-31 17:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-31 16:15 Setting page type for GDT page Trammell Hudson
2007-08-31 16:21 ` Keir Fraser
2007-08-31 16:39   ` Trammell Hudson
2007-08-31 17:51     ` Keir Fraser

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.