From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: M A Young <m.a.young@durham.ac.uk>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] pvgrub2 is merged
Date: Thu, 14 Nov 2013 22:43:39 +0100 [thread overview]
Message-ID: <5285440B.2040301@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1311142058000.23922@procyon.dur.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 4203 bytes --]
On 14.11.2013 22:11, M A Young wrote:
> On Thu, 14 Nov 2013, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>
>> On 14.11.2013 19:57, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> On 14.11.2013 19:48, M A Young wrote:
>>>> On Thu, 14 Nov 2013, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>>>
>>>>> On 14.11.2013 18:03, M A Young wrote:
>>>>>>
>>>>>>
>>>>>> On Thu, 14 Nov 2013, M A Young wrote:
>>>>>>
>>>>>>> On Wed, 13 Nov 2013, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>>>>>>
>>>>>>>> On 13.11.2013 20:06, M A Young wrote:
>>>>>>>>> It doesn't seem to understand sub-partitions. I can get it to
>>>>>>>>> work if
>>>>>>>>> the boot files are in /dev/xvda but not in /dev/xvda1 .
>>>>>>>>>
>>>>>>>> insmod part_msdos
>>>>>>>> insmod part_gpt
>>>>>>>
>>>>>>> Right, if I add those to the embedded grub.cfg file I get to the
>>>>>>> standard grub menu and the boot starts. However the boot doesn't get
>>>>>>> very far - it loads the kernel and the initrd file and starts the
>>>>>>> kernel but the kernel doesn't see the virtual disks so it doesn't
>>>>>>> get
>>>>>>> very far.
>>>>>>
>>>>>> Using xenstore-ls from the dom0 on the guest when the boot stops the
>>>>>> local/domain/2/device/vbd/51712 section looks like
>>>>>> backend = "/local/domain/0/backend/vbd/2/51712"
>>>>>> backend-id = "0"
>>>>>> state = "6\000"
>>>>>> virtual-device = "51712"
>>>>>> device-type = "disk"
>>>>>> ring-ref = "\000"
>>>>>> event-channel = "\000"
>>>>>> protocol = "x86_64-abi\000"
>>>>>>
>>>>>> As nothing else has null character endings I suspend that is wrong.
>>>>>>
>>>>> Good catch. Could you test following:
>>>>> diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c
>>>>> index 3bfd99f..ab74543 100644
>>>>> --- a/grub-core/kern/xen/init.c
>>>>> +++ b/grub-core/kern/xen/init.c
>>>>> @@ -256,11 +256,10 @@ grub_xenstore_write_file (const char *dir, const
>>>>> void *buf, grub_size_t len)
>>>>>
>>>>> grub_memset (&msg, 0, sizeof (msg));
>>>>> msg.type = XS_WRITE;
>>>>> - msg.len = dirlen + len + 1;
>>>>> + msg.len = dirlen + len;
>>>>> grub_xen_store_send (&msg, sizeof (msg));
>>>>> grub_xen_store_send (dir, dirlen);
>>>>> grub_xen_store_send (buf, len);
>>>>> - grub_xen_store_send ("", 1);
>>>>> grub_xen_store_recv (&msg, sizeof (msg));
>>>>> resp = grub_malloc (msg.len + 1);
>>>>> if (!resp)
>>>>
>>>> The section is tidied up, ie.
>>>> backend = "/local/domain/0/backend/vbd/4/51712"
>>>> backend-id = "0"
>>>> state = "6"
>>>> virtual-device = "51712"
>>>> device-type = "disk"
>>>> ring-ref = ""
>>>> event-channel = ""
>>>> protocol = "x86_64-abi"
>>>>
>>>> but unfortunately it doesn't help as the boot process sticks at the
>>>> same
>>>> point. I notice this section is in state 6 which apparently is
>>>> "closed".
>>>> I wonder if the kernel expecting something else.
>>> Possible. I'd try this (on top of previous patch):
>>
>> Sorry, too tired. I meant:
>> diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c
>> index c449848..9b71d3a 100644
>> --- a/grub-core/disk/xen/xendisk.c
>> +++ b/grub-core/disk/xen/xendisk.c
>> @@ -449,5 +449,10 @@ grub_xendisk_fini (void)
>> grub_xen_free_shared_page (virtdisks[i].shared_page);
>>
>> grub_xen_event_channel_op (EVTCHNOP_close, &close_op);
>> +
>> + /* Prepare for handoff. */
>> + grub_snprintf (fdir, sizeof (fdir), "%s/state",
>> + virtdisks[i].frontend_dir);
>> + grub_xenstore_write_file (fdir, "0", 1);
>> }
>> }
>
> That doesn't work. However, according to the documentation state 0 is
> unknown, and the vif interface (while grub is running) is in state 1
> (initializing) so I thought I would try it, and if you replace "0" with
> "1" in the above patch then the kernel does boot.
>
Thanks.
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=c7995256e410c5272e2be2f94faf62d3c9d57b61
and
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=e1aa5b662088cea329fc968af7c819784b6da068
> Michael Young
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
next prev parent reply other threads:[~2013-11-14 21:43 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-09 20:52 pvgrub2 is merged Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-09 21:01 ` [Xen-devel] " Samuel Thibault
2013-11-10 4:47 ` Andrey Borzenkov
2013-11-11 11:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-13 19:06 ` [Xen-devel] " M A Young
2013-11-13 20:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 12:27 ` M A Young
2013-11-14 17:03 ` M A Young
2013-11-14 17:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 18:48 ` M A Young
2013-11-14 18:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 18:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 21:11 ` M A Young
2013-11-14 21:43 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-11-25 15:56 ` Fabio Fantoni
2013-11-25 19:35 ` M A Young
2013-11-26 17:58 ` Fabio Fantoni
2013-11-26 18:12 ` Andrey Borzenkov
2013-11-26 19:16 ` Andrew Cooper
2013-11-27 11:32 ` Fabio Fantoni
2013-11-27 11:50 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-27 15:59 ` Fabio Fantoni
2013-11-27 16:03 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-27 16:24 ` Fabio Fantoni
2013-11-27 17:35 ` Andrey Borzenkov
2013-11-28 13:07 ` Fabio Fantoni
2013-11-28 14:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-28 14:17 ` Fabio Fantoni
2013-11-29 11:28 ` Fabio Fantoni
[not found] ` <52987D7F.3050006@gmail.com>
[not found] ` <52988F86.6050008@m2r.biz>
2013-12-03 10:31 ` Fabio Fantoni
2013-12-03 10:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 11:22 ` Fabio Fantoni
[not found] ` <529DC07E.8000201@gmail.com>
[not found] ` <529DE3FD.90002@m2r.biz>
2013-12-03 15:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 16:16 ` Fabio Fantoni
2013-12-06 11:11 ` Fabio Fantoni
2013-12-06 11:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-06 14:44 ` Fabio Fantoni
2013-12-06 14:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-06 15:22 ` Fabio Fantoni
2013-12-07 10:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-09 10:06 ` Fabio Fantoni
2013-12-17 10:44 ` Fabio Fantoni
2013-12-17 11:03 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-17 13:11 ` Fabio Fantoni
2013-12-17 13:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-17 13:55 ` Fabio Fantoni
2013-12-17 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-17 14:10 ` Fabio Fantoni
2013-12-17 14:35 ` Fabio Fantoni
2013-12-18 14:58 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-18 19:39 ` Stefano Stabellini
2013-12-18 20:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-19 11:54 ` Stefano Stabellini
2013-12-20 12:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-06 12:23 ` Stefano Stabellini
2014-11-07 15:20 ` Stefano Stabellini
2013-12-17 11:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-05 15:50 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-05 16:04 ` Fabio Fantoni
2013-11-27 16:10 ` M A Young
2013-11-11 10:10 ` Ian Campbell
2013-11-11 11:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-11 12:06 ` Ian Campbell
2013-11-11 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 9:48 ` Dario Faggioli
2013-11-13 16:36 ` Ian Campbell
2013-11-13 18:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 8:37 ` Ian Campbell
2013-12-11 11:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-11 11:51 ` Ian Campbell
2013-12-11 11:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-11 14:34 ` Dario Faggioli
2013-12-14 17:13 ` Leif Lindholm
2014-01-06 15:35 ` Lars Kurth
2013-11-29 13:24 ` Colin Watson
2013-11-29 17:44 ` Andrey Borzenkov
2013-11-29 18:16 ` Colin Watson
2013-12-02 9:48 ` [Xen-devel] " Ian Campbell
2013-12-02 10:37 ` Samuel Thibault
2013-12-02 10:46 ` Ian Campbell
2013-12-03 17:27 ` Colin Watson
2013-12-03 17:41 ` Ian Campbell
2013-11-30 10:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5285440B.2040301@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
--cc=m.a.young@durham.ac.uk \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).