diff options
author | Fabio Fantoni <fabio.fantoni@heliman.it> | 2013-02-15 13:32:27 +0000 |
---|---|---|
committer | Fabio Fantoni <fabio.fantoni@heliman.it> | 2013-02-15 13:32:27 +0000 |
commit | 2e814a017155b885e4d4b5a88dc05e7367a9722a (patch) | |
tree | 5b71335e941fd0d668f95a9b90e7531dc8c42ce0 /tools/libxl/libxl_create.c | |
parent | edb15bf83c43842edd0ed2a9a1e9c8daaebb4b45 (diff) | |
download | xen-2e814a017155b885e4d4b5a88dc05e7367a9722a.tar.gz xen-2e814a017155b885e4d4b5a88dc05e7367a9722a.tar.bz2 xen-2e814a017155b885e4d4b5a88dc05e7367a9722a.zip |
tools/libxl: Improve videoram setting
- If videoram setting is less than 8 mb shows error and exit.
- Added videoram setting for qemu upstream with cirrus (added in qemu 1.3).
- Updated xl.cfg man.
- Default and minimal videoram changed to 16 mb if stdvga is set and upstream
qemu is being used. This is required by qemu 1.4 to avoid a xen memory error
(qemu 1.3 doesn't complain about it, probably buggy).
Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_create.c')
-rw-r--r-- | tools/libxl/libxl_create.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index a8dfe610e2..fa81f884d9 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -197,8 +197,24 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, case LIBXL_DOMAIN_TYPE_HVM: if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) b_info->shadow_memkb = 0; - if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) + + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && + b_info->device_model_version == + LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) + b_info->video_memkb = 16 * 1024; + else if (b_info->video_memkb < (16 * 1024) ){ + LOG(ERROR, + "videoram must be at least 16 mb with stdvga"); + return ERROR_INVAL; + } + } else if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) b_info->video_memkb = 8 * 1024; + else if (b_info->video_memkb < (8 * 1024) ){ + LOG(ERROR,"videoram must be at least 8 mb"); + return ERROR_INVAL; + } + if (b_info->u.hvm.timer_mode == LIBXL_TIMER_MODE_DEFAULT) b_info->u.hvm.timer_mode = LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS; |