* Can not boot the OVMF
@ 2012-03-21 15:36 Bei Guan
2012-03-21 16:05 ` Attilio Rao
0 siblings, 1 reply; 5+ messages in thread
From: Bei Guan @ 2012-03-21 15:36 UTC (permalink / raw)
To: Attilio Rao; +Cc: Xen Devel
[-- Attachment #1.1: Type: text/plain, Size: 616 bytes --]
Hi Attilio
I have updated to the upstream Xen and try to boot into OVMF bios. Instead
of fetching the OVMF code from the git mirror, I just copy the OVMF bios
to ovmf directory.
I use the bios="ovmf" in the HVM config file. But, there is an error when I
create the domain.
root@gavin-laptop:~# xl create hvm_ubuntu.hvm
Parsing config file /root/hvm_ubuntu.hvm
WARNING: specifying "tsc_mode" as an integer is deprecated. Please use the
named parameter variant. e.g. tsc_mode="default"
failed to free memory for the domain
So, do you have any ideas about this problem? Thank you very much.
Best Regards,
Bei Guan
[-- Attachment #1.2: Type: text/html, Size: 881 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can not boot the OVMF
2012-03-21 15:36 Can not boot the OVMF Bei Guan
@ 2012-03-21 16:05 ` Attilio Rao
2012-03-22 3:10 ` Bei Guan
2012-03-22 5:21 ` Bei Guan
0 siblings, 2 replies; 5+ messages in thread
From: Attilio Rao @ 2012-03-21 16:05 UTC (permalink / raw)
To: Bei Guan; +Cc: Xen Devel
[-- Attachment #1.1: Type: text/plain, Size: 665 bytes --]
On 21/03/12 15:36, Bei Guan wrote:
> Hi Attilio
>
> I have updated to the upstream Xen and try to boot into OVMF bios.
> Instead of fetching the OVMF code from the git mirror, I just copy
> the OVMF bios to ovmf directory.
> I use the bios="ovmf" in the HVM config file. But, there is an error
> when I create the domain.
>
> root@gavin-laptop:~# xl create hvm_ubuntu.hvm
> Parsing config file /root/hvm_ubuntu.hvm
> WARNING: specifying "tsc_mode" as an integer is deprecated. Please use
> the named parameter variant. e.g. tsc_mode="default"
> failed to free memory for the domain
>
Really not, can you try to build the ovmf from the mirror please?
Attilio
[-- Attachment #1.2: Type: text/html, Size: 1220 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can not boot the OVMF
2012-03-21 16:05 ` Attilio Rao
@ 2012-03-22 3:10 ` Bei Guan
2012-03-22 5:21 ` Bei Guan
1 sibling, 0 replies; 5+ messages in thread
From: Bei Guan @ 2012-03-22 3:10 UTC (permalink / raw)
To: Attilio Rao; +Cc: Xen Devel
[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]
2012/3/22 Attilio Rao <attilio.rao@citrix.com>
> **
> On 21/03/12 15:36, Bei Guan wrote:
>
> Hi Attilio
>
> I have updated to the upstream Xen and try to boot into OVMF bios.
> Instead of fetching the OVMF code from the git mirror, I just copy the
> OVMF bios to ovmf directory.
> I use the bios="ovmf" in the HVM config file. But, there is an error when
> I create the domain.
>
> root@gavin-laptop:~# xl create hvm_ubuntu.hvm
> Parsing config file /root/hvm_ubuntu.hvm
> WARNING: specifying "tsc_mode" as an integer is deprecated. Please use the
> named parameter variant. e.g. tsc_mode="default"
> failed to free memory for the domain
>
>
> Really not, can you try to build the ovmf from the mirror please?
>
I just used your latest patch "[PATCH v4] Fetch the OVMF repository from
specific git mirror and enable it", and compiled the firmware
successfully. It's OK for me now.
I can get the right OVMF bios in tools/firmware/ovmf. I provide my
environment. It's Ubuntu 10.04 and X86_64 bit kernel.
However, I still cannot not boot into the OVMF bios. The error is the same
as the above.
Could anyone tell me how this error "failed to free memory for the domain"
came about?
Thanks.
>
>
> Attilio
>
--
Best Regards,
Bei Guan
[-- Attachment #1.2: Type: text/html, Size: 2216 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can not boot the OVMF
2012-03-21 16:05 ` Attilio Rao
2012-03-22 3:10 ` Bei Guan
@ 2012-03-22 5:21 ` Bei Guan
2012-03-22 9:00 ` Ian Campbell
1 sibling, 1 reply; 5+ messages in thread
From: Bei Guan @ 2012-03-22 5:21 UTC (permalink / raw)
To: Attilio Rao; +Cc: Xen Devel, Ian Campbell
[-- Attachment #1.1: Type: text/plain, Size: 2177 bytes --]
Hi,
I trace the code and there seems to be something error in the
function libxl__domain_build_info_setdefault() in libxl_create.c.
int libxl__domain_build_info_setdefault(libxl__gc *gc,
libxl_domain_build_info *b_info)
{
...
if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
if (!b_info->u.hvm.bios)
switch (b_info->device_model_version) {
case 1: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS; break;
case 2: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS; break;
default:return ERROR_INVAL;
}
/* Enforce BIOS<->Device Model version relationship */
switch (b_info->device_model_version) {
case 1:
if (b_info->u.hvm.bios != LIBXL_BIOS_TYPE_ROMBIOS)
return ERROR_INVAL;
break;
case 2:
if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS)
return ERROR_INVAL;
break;
default:abort();
}
}
Note the red part of the code above. If we set the option bios="ovmf" in
HVM config file, the vale of b_info->u.hvm.bios is 3. And the
variable LIBXL_BIOS_TYPE_ROMBIOS is always 1. So, in the xl_cmdimpl.c, we
get the error "failed to free memory for the domain". Maybe this error will
also happen when we boot into the Seabios.
Please correct me if possible. Thank you very much.
Bei Guan
2012/3/22 Attilio Rao <attilio.rao@citrix.com>
> **
> On 21/03/12 15:36, Bei Guan wrote:
>
> Hi Attilio
>
> I have updated to the upstream Xen and try to boot into OVMF bios.
> Instead of fetching the OVMF code from the git mirror, I just copy the
> OVMF bios to ovmf directory.
> I use the bios="ovmf" in the HVM config file. But, there is an error when
> I create the domain.
>
> root@gavin-laptop:~# xl create hvm_ubuntu.hvm
> Parsing config file /root/hvm_ubuntu.hvm
> WARNING: specifying "tsc_mode" as an integer is deprecated. Please use the
> named parameter variant. e.g. tsc_mode="default"
> failed to free memory for the domain
>
>
> Really not, can you try to build the ovmf from the mirror please?
>
> Attilio
>
--
Best Regards,
Bei Guan
[-- Attachment #1.2: Type: text/html, Size: 3716 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Can not boot the OVMF
2012-03-22 5:21 ` Bei Guan
@ 2012-03-22 9:00 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2012-03-22 9:00 UTC (permalink / raw)
To: Bei Guan; +Cc: Attilio Rao, Xen Devel
On Thu, 2012-03-22 at 05:21 +0000, Bei Guan wrote:
> Hi,
>
>
> I trace the code and there seems to be something error in the
> function libxl__domain_build_info_setdefault() in libxl_create.c.
>
>
> int libxl__domain_build_info_setdefault(libxl__gc *gc,
> libxl_domain_build_info
> *b_info)
> {
> ...
>
>
> if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
> if (!b_info->u.hvm.bios)
> switch (b_info->device_model_version) {
> case 1: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS;
> break;
> case 2: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS;
> break;
> default:return ERROR_INVAL;
> }
>
>
> /* Enforce BIOS<->Device Model version relationship */
> switch (b_info->device_model_version) {
> case 1:
> if (b_info->u.hvm.bios != LIBXL_BIOS_TYPE_ROMBIOS)
> return ERROR_INVAL;
> break;
> case 2:
> if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS)
> return ERROR_INVAL;
> break;
> default:abort();
> }
> }
>
>
> Note the red part of the code above. If we set the option bios="ovmf"
> in HVM config file, the vale of b_info->u.hvm.bios is 3. And the
> variable LIBXL_BIOS_TYPE_ROMBIOS is always 1.
OVMF and SeaBIOS are only going to be supported with upstream qemu and
ROMBIOS will only be supported with the traditional qemu tree.
Naughty of me to use the bare numbers there, I should have used the enum
names. Will send out a patch.
> So, in the xl_cmdimpl.c, we get the error "failed to free memory for
> the domain". Maybe this error will also happen when we boot into the
> Seabios.
This sounds like bad error handling in xl to me.
Ian.
>
>
> Please correct me if possible. Thank you very much.
>
>
>
>
> Bei Guan
>
>
> 2012/3/22 Attilio Rao <attilio.rao@citrix.com>
> On 21/03/12 15:36, Bei Guan wrote:
> > Hi Attilio
> >
> >
> > I have updated to the upstream Xen and try to boot into OVMF
> > bios. Instead of fetching the OVMF code from the git
> > mirror, I just copy the OVMF bios to ovmf directory.
> > I use the bios="ovmf" in the HVM config file. But, there is
> > an error when I create the domain.
> >
> >
> > root@gavin-laptop:~# xl create hvm_ubuntu.hvm
> > Parsing config file /root/hvm_ubuntu.hvm
> > WARNING: specifying "tsc_mode" as an integer is deprecated.
> > Please use the named parameter variant. e.g.
> > tsc_mode="default"
> > failed to free memory for the domain
> >
> >
>
>
> Really not, can you try to build the ovmf from the mirror
> please?
>
> Attilio
>
>
>
>
>
> --
> Best Regards,
> Bei Guan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-22 9:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 15:36 Can not boot the OVMF Bei Guan
2012-03-21 16:05 ` Attilio Rao
2012-03-22 3:10 ` Bei Guan
2012-03-22 5:21 ` Bei Guan
2012-03-22 9:00 ` Ian Campbell
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).