xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Re: [Xen-users] rebased openSUSE Xen dom0 Patches
@ 2010-04-15 18:36 Simon Graham
  2010-04-15 18:41 ` Keir Fraser
  2010-04-16  7:58 ` Jan Beulich
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Graham @ 2010-04-15 18:36 UTC (permalink / raw)
  To: xen-devel

On Tue, Apr 06, 2010 at 02:37:35PM +0100, Andrew Lyon wrote:
> I've uploaded updated 2.6.31 and 2.6.32 rebased openSUSE Xen dom0
> patches and ebuilds to
> http://code.google.com/p/gentoo-xen-kernel/downloads/list
> 
> Notable change is that both include the online resize feature recently
> posted to xen-devel.
>

We're currently testing these patches with the Ubuntu 10.4 kernel and Xen 3.4.2 and have encountered some problems in the Xen mm code shortly after Dom0 starts to run.

The typical failure is that Dom0 is trying to write to a page table (a L4 PT in the example below) but finds the page it is writing to is a PGT_writable_page

...
(XEN) mm.c:2410:d0 Bad type (saw e800000000000001 != exp 8000000000000000) for mfn 0x114702 (pfn 0x702)
(XEN) mm.c:2802:d0 Error while pinning mfn 114702
[   18.549043] HYPERVISOR_mmuext_op failed:  pgd ffff880000703000 cmd0=3 mfn0=114702 cmd1=3 mfn1=114703 err=-22
[   18.549689] ------------[ cut here ]------------
[   18.549975] kernel BUG at /sandbox/orc-tree-10.4/orc-kernel/linux-2.6.32/arch/x86/mm/hypervisor.c:680!
[   18.550542] invalid opcode: 0000 [#1] SMP 

Another common failure is shown below.  Dom0 expects a page to be PGT_l1_page_table but instead finds the page's type is PGT_writable_page:

(XEN) mm.c:2410:d0 Bad type (saw e800000000000001 != exp 2000000000000000) for mfn 0x114711 (pfn 0x711)
(XEN) mm.c:2413:d0 Writable page alloc'd from ptwr_do_page_fault:4481
(XEN) mm.c:821:d0 Attempt to create linear p.t. with write perms
[   21.159495] HYPERVISOR_multicall_check failed on call 1 rc 4294967274
[   21.159498] HYPERVISOR_multicall_check failed page=ffff8800020bbc00 pfn=1808
[   21.159503] ------------[ cut here ]------------
[   21.159505] kernel BUG at /sandbox/orc-tree-10.4/orc-kernel/linux-2.6.32/arch/x86/mm/hypervisor.c:480!

It is not clear whether Dom0 is erroneously using pages that are and truly should be writable, or whether somehow pages have erroneously become writable; if anyone can suggest likely places to look for problems that would be awesome!

Simon

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Re: [Xen-users] rebased openSUSE Xen dom0 Patches
@ 2010-04-21  7:04 Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2010-04-21  7:04 UTC (permalink / raw)
  To: andrew.lyon, simon.graham; +Cc: xen-devel

>>> "Simon Graham"  04/20/10 6:08 PM >>>
>We now think we've found the problem which seems to be due to the
>following two calls in Linux within mark_rodata_ro():
>
>free_init_pages("unused kernel memory",
>(unsigned long)
>page_address(virt_to_page(text_end)),
>(unsigned long)
>page_address(virt_to_page(rodata_start)));
>free_init_pages("unused kernel memory",
>(unsigned long)
>page_address(virt_to_page(rodata_end)),
>(unsigned long)
>page_address(virt_to_page(data_start)));

This code is not present in 2.6.32.11, so your kernel source tree must have extra patches requiring proper Xen equivalents. In particular, our tree's version of that change has its Xen counterpart avoid the (pointless and perhaps wasteful) aligning to 2Mb boundaries in arch/x86/kernel/vmlinux.lds, thus yielding those two calls to free_init_pages() to be no-ops.

Jan

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

end of thread, other threads:[~2010-04-21  7:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 18:36 [Xen-users] rebased openSUSE Xen dom0 Patches Simon Graham
2010-04-15 18:41 ` Keir Fraser
2010-04-16  7:58 ` Jan Beulich
2010-04-16 13:42   ` Simon Graham
2010-04-19  8:41     ` Jan Beulich
2010-04-19 14:52       ` Simon Graham
2010-04-19 15:09         ` Jan Beulich
2010-04-20 16:07       ` Simon Graham
2010-04-20 19:01         ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2010-04-21  7:04 Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).