[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Can not boot the OVMF


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;
        case 2:
            if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS)
                return ERROR_INVAL;

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@xxxxxxxxxx>
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?


Best Regards,
Bei Guan

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.