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

Re: [Xen-devel] [PATCH 4/5] libxl: Load iPXE ROM from a file



On Thu, Mar 15, 2018 at 05:31:52PM +0000, Anoob Soman wrote:
> Load iPXE ROM from a file pointed to by IPXE_PATH. If --with-system-ipxe
> is not specified default Xen firmware directory is picked up as
> IPXE_PATH
> 
> Signed-off-by: Anoob Soman <anoob.soman@xxxxxxxxxx>
> ---
>  tools/libxl/libxl_dom.c      | 12 ++++++++++++
>  tools/libxl/libxl_internal.h |  1 +
>  tools/libxl/libxl_paths.c    |  9 +++++++++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index 2e29b52..104d6a0 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -1003,6 +1003,7 @@ static int libxl__domain_firmware(libxl__gc *gc,
>      int datalen = 0;
>      void *data;
>      const char *bios_filename = NULL;
> +    const char *ipxe_filename = NULL;
>  
>      if (info->type == LIBXL_DOMAIN_TYPE_HVM) {
>          if (info->u.hvm.firmware) {
> @@ -1094,6 +1095,17 @@ static int libxl__domain_firmware(libxl__gc *gc,
>          assert(info->type == LIBXL_DOMAIN_TYPE_HVM);
>          rc = xc_dom_kernel_file(dom, libxl__abs_path(gc, firmware,
>                                                   
> libxl__xenfirmwaredir_path()));
> +        if (rc) {
> +            LOGE(ERROR, "xc_dom_kernel_file failed");
> +            goto out;
> +        }
> +        if ((ipxe_filename = libxl__ipxe_path())) {
> +            rc = xc_dom_module_file(dom, ipxe_filename, "ipxe");
> +            if (rc) {
> +                LOGE(ERROR, "xc_dom_ipxe_module_file failed");
> +                goto out;

This is the wrong place. Being an HVM guest doesn't mean ipxe should be
loaded. You probably need to look a few lines down and add code in
appropriate places like when ROMBIOS is picked.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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