All of lore.kernel.org
 help / color / mirror / Atom feed
* how to boot Xen Dom0 in Grub2 SVN trunk
@ 2009-06-15 19:41 uzer cheg
  2009-06-15 20:05 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 8+ messages in thread
From: uzer cheg @ 2009-06-15 19:41 UTC (permalink / raw)
  To: The development of GRUB 2

Dear all,
I'd like to ask you for an advice regarding Xen Dom0 support in
current Grub2 trunk.
Has anybody tried to boot Xen Dom0 by Grub2 on latest versions (r 2322
for instance)?

I installed Debian Linux 5.0 (lenny) with Dom0.
It works fine and loads in Xen Dom0 via legacy grub supplied by Debian.
Than I got latest grub2 via svn and built it as usual. Also I made
custom /grub2/core.img by grub-mkimage
On start computer loads old legacy grub. Than it loads grub2 as
# kernel /grub2/core.img
Grub2 starts fine and I try to load Xen.
menuentry "xen" {

         multiboot /boot/xen-3.2-1-amd64.gz dom0_mem=640M
         module /boot/vmlinuz-2.6.26-1-amd64 root=/dev/mapper/mainVG-rootLV ro
         module /boot/initrd.img-2.6.26-1-amd64

}

It tries to boot and crash with message
...
(XEN) Early fatal page fault at e008:ffff828c801da4a2 ... etc
(XEN) Stack dump

I tried to load xen by using command
multiboot /boot/xen-3.2-1-amd64.gz dom0_mem=640M

Result was the same.


Please remeber that the same Xen Dom0 boots Ok via grub legacy.

Do I have to add any special commands to grub2.cfg ?

Is it Xen's fault and do I have to upgrade it?


Thank you in advance.



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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-15 19:41 how to boot Xen Dom0 in Grub2 SVN trunk uzer cheg
@ 2009-06-15 20:05 ` Vladimir 'phcoder' Serbinenko
  2009-06-15 21:44   ` uzer cheg
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-15 20:05 UTC (permalink / raw)
  To: The development of GRUB 2

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

On Mon, Jun 15, 2009 at 9:41 PM, uzer cheg<usercheg@gmail.com> wrote:
> Dear all,
> I'd like to ask you for an advice regarding Xen Dom0 support in
> current Grub2 trunk.
> Has anybody tried to boot Xen Dom0 by Grub2 on latest versions (r 2322
> for instance)?
>
> I installed Debian Linux 5.0 (lenny) with Dom0.
> It works fine and loads in Xen Dom0 via legacy grub supplied by Debian.
> Than I got latest grub2 via svn and built it as usual. Also I made
> custom /grub2/core.img by grub-mkimage
> On start computer loads old legacy grub. Than it loads grub2 as
> # kernel /grub2/core.img
> Grub2 starts fine and I try to load Xen.
> menuentry "xen" {
>
>         multiboot /boot/xen-3.2-1-amd64.gz dom0_mem=640M
>         module /boot/vmlinuz-2.6.26-1-amd64 root=/dev/mapper/mainVG-rootLV ro
>         module /boot/initrd.img-2.6.26-1-amd64
>
> }
>
> It tries to boot and crash with message
> ...
> (XEN) Early fatal page fault at e008:ffff828c801da4a2 ... etc
> (XEN) Stack dump
>
> I tried to load xen by using command
> multiboot /boot/xen-3.2-1-amd64.gz dom0_mem=640M
>
xen 3.3 has a bug which results in this behaviour. Either use xen 3.4
or try attached dirty workaround for grub2
> Result was the same.
>
>
> Please remeber that the same Xen Dom0 boots Ok via grub legacy.
>
> Do I have to add any special commands to grub2.cfg ?
>
> Is it Xen's fault and do I have to upgrade it?
>
>
> Thank you in advance.
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

[-- Attachment #2: modmem.diff --]
[-- Type: text/x-diff, Size: 1831 bytes --]

diff --git a/loader/i386/multiboot.c b/loader/i386/multiboot.c
index a59085c..9472f61 100644
--- a/loader/i386/multiboot.c
+++ b/loader/i386/multiboot.c
@@ -269,7 +269,8 @@ grub_multiboot (int argc, char *argv[])
   grub_multiboot_payload_size = cmdline_length
     /* boot_loader_name_length might need to grow for mbi,etc to be aligned (see below) */
     + boot_loader_name_length + 3
-    + sizeof (struct grub_multiboot_info) + mmap_length;
+    + sizeof (struct grub_multiboot_info) + mmap_length
+    + 100000;
 
   if (header->flags & MULTIBOOT_AOUT_KLUDGE)
     {
@@ -315,6 +316,7 @@ grub_multiboot (int argc, char *argv[])
   mbi_dest = mbi_addr (grub_multiboot_payload_dest);
   grub_memset (mbi, 0, sizeof (struct grub_multiboot_info));
   mbi->mmap_length = mmap_length;
+  mbi->mods_addr = mmap_addr (grub_multiboot_payload_dest) + mmap_length;
   
   grub_fill_multiboot_mmap (mmap_addr (grub_multiboot_payload_orig));
 
@@ -440,8 +442,8 @@ grub_module  (int argc, char *argv[])
     {
       struct grub_mod_list *modlist = (struct grub_mod_list *) mbi->mods_addr;
 
-      modlist = grub_realloc (modlist, (mbi->mods_count + 1)
-			               * sizeof (struct grub_mod_list));
+      // modlist = grub_realloc (modlist, (mbi->mods_count + 1)
+      //			               * sizeof (struct grub_mod_list));
       if (! modlist)
 	goto fail;
       mbi->mods_addr = (grub_uint32_t) modlist;
@@ -454,7 +456,8 @@ grub_module  (int argc, char *argv[])
     }
   else
     {
-      struct grub_mod_list *modlist = grub_malloc (sizeof (struct grub_mod_list));
+      struct grub_mod_list *modlist = (struct grub_mod_list *) mbi->mods_addr;
+      //      struct grub_mod_list *modlist = grub_malloc (sizeof (struct grub_mod_list));
       if (! modlist)
 	goto fail;
       modlist->mod_start = (grub_uint32_t) module;

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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-15 20:05 ` Vladimir 'phcoder' Serbinenko
@ 2009-06-15 21:44   ` uzer cheg
  2009-06-15 22:01     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 8+ messages in thread
From: uzer cheg @ 2009-06-15 21:44 UTC (permalink / raw)
  To: The development of GRUB 2

Thank you for quick response, Vladimir.

I just applied patch to grub2-r2322 and trying to build new grub2 image.

It compiles fine on i386 platformbut ./configure script on amd64
platform and MacOS X gets error message.
Here is a part of terminal screen from MacOS X:
====
...
checking for nm... nm
checking whether optimization for size works... yes
checking whether -falign-loops works... yes
checking whether our target compiler is apple cc... yes
checking for objconv... objconv
-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,
checking for command to convert module to ELF format...
checking whether `gcc' generates calls to `__enable_execute_stack()'... no
checking whether `gcc' accepts `-fstack-protector'... yes
checking whether `gcc' accepts `-mstack-arg-probe'... yes
checking whether target compiler is working... no
configure: error: cannot compile for the target
====

Anyway I'm installing now 32bit linux and will report you results soon.

Vladimir, I case of successful Xen Dom0 boot I intend to repeat my
Xserve Xen Dom0 tests.
I tried two weeks ago to boot Xen Unstable Dom0 on EFI Xserve using
one of the multiboot patches from May 3rd posted here.

Is the any fresh patches that I  might to try?

Thank you in advance.

On Mon, Jun 15, 2009 at 11:05 PM, Vladimir 'phcoder'
Serbinenko<phcoder@gmail.com> wrote:
> xen 3.3 has a bug which results in this behaviour. Either use xen 3.4
> or try attached dirty workaround for grub2



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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-15 21:44   ` uzer cheg
@ 2009-06-15 22:01     ` Vladimir 'phcoder' Serbinenko
  2009-06-15 22:51       ` Pavel Roskin
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-15 22:01 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Jun 15, 2009 at 11:44 PM, uzer cheg<usercheg@gmail.com> wrote:
> Thank you for quick response, Vladimir.
>
> I just applied patch to grub2-r2322 and trying to build new grub2 image.
>
> It compiles fine on i386 platformbut ./configure script on amd64
> platform and MacOS X gets error message.
> Here is a part of terminal screen from MacOS X:
Thank you for reporting this problem. Tomorrow I'll look for a fix
>
> Anyway I'm installing now 32bit linux and will report you results soon.
>
> Vladimir, I case of successful Xen Dom0 boot I intend to repeat my
> Xserve Xen Dom0 tests.
> I tried two weeks ago to boot Xen Unstable Dom0 on EFI Xserve using
> one of the multiboot patches from May 3rd posted here.
I use xen from mercurial.
>
> Is the any fresh patches that I  might to try?
None. These patches were a quick coding of requested feature but
together with it came some ugliness. I was working on making clean
interfaces in this direction however since it seemed that nobody cared
it faded out of my attention
>
> Thank you in advance.
>
> On Mon, Jun 15, 2009 at 11:05 PM, Vladimir 'phcoder'
> Serbinenko<phcoder@gmail.com> wrote:
>> xen 3.3 has a bug which results in this behaviour. Either use xen 3.4
>> or try attached dirty workaround for grub2
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-15 22:01     ` Vladimir 'phcoder' Serbinenko
@ 2009-06-15 22:51       ` Pavel Roskin
  2009-06-16 21:07         ` uzer cheg
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Roskin @ 2009-06-15 22:51 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2009-06-16 at 00:01 +0200, Vladimir 'phcoder' Serbinenko wrote:
> > Here is a part of terminal screen from MacOS X:
> Thank you for reporting this problem. Tomorrow I'll look for a fix

This message:

-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,

comes from

AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC])

which must be a leftover from temporary debugging code.

-- 
Regards,
Pavel Roskin



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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-15 22:51       ` Pavel Roskin
@ 2009-06-16 21:07         ` uzer cheg
  2009-06-16 21:25           ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 8+ messages in thread
From: uzer cheg @ 2009-06-16 21:07 UTC (permalink / raw)
  To: The development of GRUB 2

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

Pavel, patched Grub2 i386 loads Xen Dom0.
Honestly speaking it loads partially.
Now I got new error message
(XEN) elf_init: not an EL binary
...
Panic on CPU 0

I tried Xen 3.2.1 and Xen 3.4.

Unfortunately I do not have right CPU on my testing PC.
I think it's old Pentium without VT support.
Hope to find in google related advices and will try it.

Also I will try to find something more modern than my old PC to make full
test.

Anyway I have to say that previously reported error message (Early fatal
page fault) gone in i386.
Thank you.

[-- Attachment #2: Type: text/html, Size: 974 bytes --]

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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-16 21:07         ` uzer cheg
@ 2009-06-16 21:25           ` Vladimir 'phcoder' Serbinenko
  2009-06-16 21:48             ` uzer cheg
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-16 21:25 UTC (permalink / raw)
  To: The development of GRUB 2

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

On Tue, Jun 16, 2009 at 11:07 PM, uzer cheg <usercheg@gmail.com> wrote:

> Pavel, patched Grub2 i386 loads Xen Dom0.
> Honestly speaking it loads partially.
> Now I got new error message
> (XEN) elf_init: not an EL binary
> ...
> Panic on CPU 0
>
> I tried Xen 3.2.1 and Xen 3.4.
>
> Unfortunately I do not have right CPU on my testing PC.
> I think it's old Pentium without VT support.
> Hope to find in google related advices and will try it.
>
It should be ok. Be sure to have a kernel with dom0 support. My
recommendation is a kernel from git

git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
branch xen-tip/master
With enabled paravirtops

more details on: http://wiki.xensource.com/xenwiki/XenParavirtOps

>
> Also I will try to find something more modern than my old PC to make full
> test.
>
> Anyway I have to say that previously reported error message (Early fatal
> page fault) gone in i386.
> Thank you.
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>


-- 
Regards
Vladimir 'phcoder' Serbinenko

[-- Attachment #2: Type: text/html, Size: 2259 bytes --]

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

* Re: how to boot Xen Dom0 in Grub2 SVN trunk
  2009-06-16 21:25           ` Vladimir 'phcoder' Serbinenko
@ 2009-06-16 21:48             ` uzer cheg
  0 siblings, 0 replies; 8+ messages in thread
From: uzer cheg @ 2009-06-16 21:48 UTC (permalink / raw)
  To: The development of GRUB 2

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

Thank you for advice. It's certainly what I planned to do tomorrow.Vladimir,
I'm going to test Grub2 on mu Xserve is case of successful Xen Dom0 on Bios
PC.

As I see posted modmem.diff and posted before efiboot.diff both contains
patches for loader/i386/multiboot.c
Which code is actual for my EFI testing purpose?

Thank you in advance, usercheg.


On Wed, Jun 17, 2009 at 12:25 AM, Vladimir 'phcoder' Serbinenko <
phcoder@gmail.com> wrote:

> It should be ok. Be sure to have a kernel with dom0 support. My
> recommendation is a kernel from git
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
>
> branch xen-tip/master
> With enabled paravirtops
>
> more details on: http://wiki.xensource.com/xenwiki/XenParavirtOps
>

[-- Attachment #2: Type: text/html, Size: 1305 bytes --]

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

end of thread, other threads:[~2009-06-16 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 19:41 how to boot Xen Dom0 in Grub2 SVN trunk uzer cheg
2009-06-15 20:05 ` Vladimir 'phcoder' Serbinenko
2009-06-15 21:44   ` uzer cheg
2009-06-15 22:01     ` Vladimir 'phcoder' Serbinenko
2009-06-15 22:51       ` Pavel Roskin
2009-06-16 21:07         ` uzer cheg
2009-06-16 21:25           ` Vladimir 'phcoder' Serbinenko
2009-06-16 21:48             ` uzer cheg

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.