lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

Xen: enable Spice/QXL + add libhvm + minor fixes

+473 -47
+23
pkgs/applications/virtualization/xen/0000-qemu-seabios-enable-ATA_DMA.patch
··· 1 + diff --git a/src/Kconfig b/src/Kconfig 2 + index 45ca59c..faf8951 100644 3 + --- a/src/Kconfig 4 + +++ b/src/Kconfig 5 + @@ -144,13 +144,13 @@ menu "Hardware support" 6 + config ATA_DMA 7 + depends on ATA 8 + bool "ATA DMA" 9 + - default n 10 + + default y 11 + help 12 + Detect and try to use ATA bus mastering DMA controllers. 13 + config ATA_PIO32 14 + depends on ATA 15 + bool "ATA 32bit PIO" 16 + - default n 17 + + default y 18 + help 19 + Use 32bit PIO accesses on ATA (minor optimization on PCI 20 + transfers). 21 + config AHCI 22 + -- 23 + 1.7.10.4
+104
pkgs/applications/virtualization/xen/0001-libxl-Spice-image-compression-setting-support-for-up.patch
··· 1 + From bd71555985efc423b1a119b6a3177de855763453 Mon Sep 17 00:00:00 2001 2 + From: Fabio Fantoni <fabio.fantoni@m2r.biz> 3 + Date: Tue, 20 Jan 2015 11:26:30 +0100 4 + Subject: [PATCH] libxl: Spice image compression setting support for upstream 5 + qemu 6 + 7 + Usage: 8 + spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off] 9 + 10 + Specifies what image compression is to be used by spice (if given), 11 + otherwise the qemu default will be used. 12 + 13 + Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> 14 + Acked-by: Wei Liu <wei.liu2@citrix.com> 15 + --- 16 + docs/man/xl.cfg.pod.5 | 6 ++++++ 17 + tools/libxl/libxl.h | 11 +++++++++++ 18 + tools/libxl/libxl_dm.c | 4 ++++ 19 + tools/libxl/libxl_types.idl | 1 + 20 + tools/libxl/xl_cmdimpl.c | 2 ++ 21 + 5 files changed, 24 insertions(+) 22 + 23 + diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 24 + index e2f91fc..0c2cbac 100644 25 + --- a/docs/man/xl.cfg.pod.5 26 + +++ b/docs/man/xl.cfg.pod.5 27 + @@ -1427,6 +1427,12 @@ for redirection of up to 4 usb devices from spice client to domU's qemu. 28 + It requires an usb controller and if not defined it will automatically adds 29 + an usb2 controller. The default is disabled (0). 30 + 31 + +=item B<spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off]> 32 + + 33 + +Specifies what image compression is to be used by spice (if given), otherwise 34 + +the qemu default will be used. Please see documentations of your current qemu 35 + +version for details. 36 + + 37 + =back 38 + 39 + =head3 Miscellaneous Emulated Hardware 40 + diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h 41 + index 0a123f1..b8e0b67 100644 42 + --- a/tools/libxl/libxl.h 43 + +++ b/tools/libxl/libxl.h 44 + @@ -528,6 +528,17 @@ typedef struct libxl__ctx libxl_ctx; 45 + #define LIBXL_HAVE_SPICE_USBREDIREDIRECTION 1 46 + 47 + /* 48 + + * LIBXL_HAVE_SPICE_IMAGECOMPRESSION 49 + + * 50 + + * If defined, then the libxl_spice_info structure will contain a string type 51 + + * field: image_compression. This value defines what Spice image compression 52 + + * is used. 53 + + * 54 + + * If this is not defined, the Spice image compression setting support is ignored. 55 + + */ 56 + +#define LIBXL_HAVE_SPICE_IMAGECOMPRESSION 1 57 + + 58 + +/* 59 + * LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS 1 60 + * 61 + * If this is defined, libxl_domain_create_restore()'s API has changed to 62 + diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c 63 + index c2b0487..40c8649 100644 64 + --- a/tools/libxl/libxl_dm.c 65 + +++ b/tools/libxl/libxl_dm.c 66 + @@ -398,6 +398,10 @@ static char *dm_spice_options(libxl__gc *gc, 67 + if (!libxl_defbool_val(spice->clipboard_sharing)) 68 + opt = libxl__sprintf(gc, "%s,disable-copy-paste", opt); 69 + 70 + + if (spice->image_compression) 71 + + opt = libxl__sprintf(gc, "%s,image-compression=%s", opt, 72 + + spice->image_compression); 73 + + 74 + return opt; 75 + } 76 + 77 + diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl 78 + index 1214d2e..052ded9 100644 79 + --- a/tools/libxl/libxl_types.idl 80 + +++ b/tools/libxl/libxl_types.idl 81 + @@ -241,6 +241,7 @@ libxl_spice_info = Struct("spice_info", [ 82 + ("vdagent", libxl_defbool), 83 + ("clipboard_sharing", libxl_defbool), 84 + ("usbredirection", integer), 85 + + ("image_compression", string), 86 + ]) 87 + 88 + libxl_sdl_info = Struct("sdl_info", [ 89 + diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c 90 + index 0b02a6c..00aa69d 100644 91 + --- a/tools/libxl/xl_cmdimpl.c 92 + +++ b/tools/libxl/xl_cmdimpl.c 93 + @@ -1948,6 +1948,8 @@ skip_vfb: 94 + &b_info->u.hvm.spice.clipboard_sharing, 0); 95 + if (!xlu_cfg_get_long (config, "spiceusbredirection", &l, 0)) 96 + b_info->u.hvm.spice.usbredirection = l; 97 + + xlu_cfg_replace_string (config, "spice_image_compression", 98 + + &b_info->u.hvm.spice.image_compression, 0); 99 + xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0); 100 + xlu_cfg_get_defbool(config, "gfx_passthru", 101 + &b_info->u.hvm.gfx_passthru, 0); 102 + -- 103 + 1.9.2 104 +
+104
pkgs/applications/virtualization/xen/0002-libxl-Spice-streaming-video-setting-support-for-upst.patch
··· 1 + From 296c7f3284efe655d95a8ae045a5dc1a20d6fff0 Mon Sep 17 00:00:00 2001 2 + From: Fabio Fantoni <fabio.fantoni@m2r.biz> 3 + Date: Tue, 20 Jan 2015 11:33:17 +0100 4 + Subject: [PATCH] libxl: Spice streaming video setting support for upstream 5 + qemu 6 + 7 + Usage: 8 + spice_streaming_video=[filter|all|off] 9 + 10 + Specifies what streaming video setting is to be used by spice (if 11 + given), 12 + otherwise the qemu default will be used. 13 + 14 + Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> 15 + Acked-by: Wei Liu <wei.liu2@citrix.com> 16 + --- 17 + docs/man/xl.cfg.pod.5 | 5 +++++ 18 + tools/libxl/libxl.h | 11 +++++++++++ 19 + tools/libxl/libxl_dm.c | 4 ++++ 20 + tools/libxl/libxl_types.idl | 1 + 21 + tools/libxl/xl_cmdimpl.c | 2 ++ 22 + 5 files changed, 23 insertions(+) 23 + 24 + diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 25 + index 0c2cbac..408653f 100644 26 + --- a/docs/man/xl.cfg.pod.5 27 + +++ b/docs/man/xl.cfg.pod.5 28 + @@ -1433,6 +1433,11 @@ Specifies what image compression is to be used by spice (if given), otherwise 29 + the qemu default will be used. Please see documentations of your current qemu 30 + version for details. 31 + 32 + +=item B<spice_streaming_video=[filter|all|off]> 33 + + 34 + +Specifies what streaming video setting is to be used by spice (if given), 35 + +otherwise the qemu default will be used. 36 + + 37 + =back 38 + 39 + =head3 Miscellaneous Emulated Hardware 40 + diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h 41 + index b8e0b67..c219f59 100644 42 + --- a/tools/libxl/libxl.h 43 + +++ b/tools/libxl/libxl.h 44 + @@ -539,6 +539,17 @@ typedef struct libxl__ctx libxl_ctx; 45 + #define LIBXL_HAVE_SPICE_IMAGECOMPRESSION 1 46 + 47 + /* 48 + + * LIBXL_HAVE_SPICE_STREAMINGVIDEO 49 + + * 50 + + * If defined, then the libxl_spice_info structure will contain a string type 51 + + * field: streaming_video. This value defines what Spice streaming video setting 52 + + * is used. 53 + + * 54 + + * If this is not defined, the Spice streaming video setting support is ignored. 55 + + */ 56 + +#define LIBXL_HAVE_SPICE_STREAMINGVIDEO 1 57 + + 58 + +/* 59 + * LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS 1 60 + * 61 + * If this is defined, libxl_domain_create_restore()'s API has changed to 62 + diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c 63 + index 40c8649..d8d6f0c 100644 64 + --- a/tools/libxl/libxl_dm.c 65 + +++ b/tools/libxl/libxl_dm.c 66 + @@ -402,6 +402,10 @@ static char *dm_spice_options(libxl__gc *gc, 67 + opt = libxl__sprintf(gc, "%s,image-compression=%s", opt, 68 + spice->image_compression); 69 + 70 + + if (spice->streaming_video) 71 + + opt = libxl__sprintf(gc, "%s,streaming-video=%s", opt, 72 + + spice->streaming_video); 73 + + 74 + return opt; 75 + } 76 + 77 + diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl 78 + index 052ded9..02be466 100644 79 + --- a/tools/libxl/libxl_types.idl 80 + +++ b/tools/libxl/libxl_types.idl 81 + @@ -242,6 +242,7 @@ libxl_spice_info = Struct("spice_info", [ 82 + ("clipboard_sharing", libxl_defbool), 83 + ("usbredirection", integer), 84 + ("image_compression", string), 85 + + ("streaming_video", string), 86 + ]) 87 + 88 + libxl_sdl_info = Struct("sdl_info", [ 89 + diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c 90 + index 00aa69d..b7eac29 100644 91 + --- a/tools/libxl/xl_cmdimpl.c 92 + +++ b/tools/libxl/xl_cmdimpl.c 93 + @@ -1950,6 +1950,8 @@ skip_vfb: 94 + b_info->u.hvm.spice.usbredirection = l; 95 + xlu_cfg_replace_string (config, "spice_image_compression", 96 + &b_info->u.hvm.spice.image_compression, 0); 97 + + xlu_cfg_replace_string (config, "spice_streaming_video", 98 + + &b_info->u.hvm.spice.streaming_video, 0); 99 + xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0); 100 + xlu_cfg_get_defbool(config, "gfx_passthru", 101 + &b_info->u.hvm.gfx_passthru, 0); 102 + -- 103 + 1.9.2 104 +
+165
pkgs/applications/virtualization/xen/0003-Add-qxl-vga-interface-support-for-upstream-qem.patch
··· 1 + From 161212ef02312c0681d2d809c8ff1e1f0ea6f6f9 Mon Sep 17 00:00:00 2001 2 + From: Fabio Fantoni <fabio.fantoni@m2r.biz> 3 + Date: Wed, 29 Apr 2015 11:20:28 +0200 4 + Subject: [PATCH] libxl: Add qxl vga interface support for upstream qemu 5 + 6 + Usage: 7 + vga="qxl" 8 + 9 + Qxl vga support many resolutions that not supported by stdvga, 10 + mainly the 16:9 ones and other high up to 2560x1600. 11 + With QXL you can get improved performance and smooth video also 12 + with high resolutions and high quality. 13 + Require their drivers installed in the domU and spice used 14 + otherwise act as a simple stdvga. 15 + 16 + Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> 17 + Signed-off-by: Zhou Peng <zpengxen@gmail.com> 18 + Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> 19 + Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> 20 + Acked-by: George Dunlap <george.dunlap@eu.citrix.com> 21 + --- 22 + docs/man/xl.cfg.pod.5 | 10 +++++++++- 23 + tools/libxl/libxl.h | 10 ++++++++++ 24 + tools/libxl/libxl_create.c | 13 +++++++++++++ 25 + tools/libxl/libxl_dm.c | 8 ++++++++ 26 + tools/libxl/libxl_types.idl | 1 + 27 + tools/libxl/xl_cmdimpl.c | 2 ++ 28 + 6 files changed, 43 insertions(+), 1 deletion(-) 29 + 30 + diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 31 + index f936dfc..8e4154f 100644 32 + --- a/docs/man/xl.cfg.pod.5 33 + +++ b/docs/man/xl.cfg.pod.5 34 + @@ -1360,6 +1360,9 @@ qemu-xen-traditional device-model, the amount of video RAM is fixed at 4 MB, 35 + which is sufficient for 1024x768 at 32 bpp. For the upstream qemu-xen 36 + device-model, the default and minimum is 8 MB. 37 + 38 + +For B<qxl> vga, the default is both default and minimal 128MB. 39 + +If B<videoram> is set less than 128MB, an error will be triggered. 40 + + 41 + =item B<stdvga=BOOLEAN> 42 + 43 + Select a standard VGA card with VBE (VESA BIOS Extensions) as the 44 + @@ -1371,9 +1374,14 @@ This option is deprecated, use vga="stdvga" instead. 45 + 46 + =item B<vga="STRING"> 47 + 48 + -Selects the emulated video card (none|stdvga|cirrus). 49 + +Selects the emulated video card (none|stdvga|cirrus|qxl). 50 + The default is cirrus. 51 + 52 + +In general, QXL should work with the Spice remote display protocol 53 + +for acceleration, and QXL driver is necessary in guest in this case. 54 + +QXL can also work with the VNC protocol, but it will be like a standard 55 + +VGA without acceleration. 56 + + 57 + =item B<vnc=BOOLEAN> 58 + 59 + Allow access to the display via the VNC protocol. This enables the 60 + diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h 61 + index 44bd8e2..efc0617 100644 62 + --- a/tools/libxl/libxl.h 63 + +++ b/tools/libxl/libxl.h 64 + @@ -535,6 +535,16 @@ typedef struct libxl__ctx libxl_ctx; 65 + #define LIBXL_HAVE_DOMINFO_OUTSTANDING_MEMKB 1 66 + 67 + /* 68 + + * LIBXL_HAVE_QXL 69 + + * 70 + + * If defined, then the libxl_vga_interface_type will contain another value: 71 + + * "QXL". This value define if qxl vga is supported. 72 + + * 73 + + * If this is not defined, the qxl vga support is missed. 74 + + */ 75 + +#define LIBXL_HAVE_QXL 1 76 + + 77 + +/* 78 + * LIBXL_HAVE_SPICE_VDAGENT 79 + * 80 + * If defined, then the libxl_spice_info structure will contain a boolean type: 81 + diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c 82 + index e5a343f..188f7df 100644 83 + --- a/tools/libxl/libxl_create.c 84 + +++ b/tools/libxl/libxl_create.c 85 + @@ -248,6 +248,10 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, 86 + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) 87 + b_info->video_memkb = 0; 88 + break; 89 + + case LIBXL_VGA_INTERFACE_TYPE_QXL: 90 + + LOG(ERROR,"qemu upstream required for qxl vga"); 91 + + return ERROR_INVAL; 92 + + break; 93 + case LIBXL_VGA_INTERFACE_TYPE_STD: 94 + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) 95 + b_info->video_memkb = 8 * 1024; 96 + @@ -272,6 +276,15 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, 97 + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) 98 + b_info->video_memkb = 0; 99 + break; 100 + + case LIBXL_VGA_INTERFACE_TYPE_QXL: 101 + + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) { 102 + + b_info->video_memkb = (128 * 1024); 103 + + } else if (b_info->video_memkb < (128 * 1024)) { 104 + + LOG(ERROR, 105 + + "128 Mib videoram is the minimum for qxl default"); 106 + + return ERROR_INVAL; 107 + + } 108 + + break; 109 + case LIBXL_VGA_INTERFACE_TYPE_STD: 110 + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) 111 + b_info->video_memkb = 16 * 1024; 112 + diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c 113 + index 30c1578..58c9b99 100644 114 + --- a/tools/libxl/libxl_dm.c 115 + +++ b/tools/libxl/libxl_dm.c 116 + @@ -251,6 +251,8 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, 117 + case LIBXL_VGA_INTERFACE_TYPE_NONE: 118 + flexarray_append_pair(dm_args, "-vga", "none"); 119 + break; 120 + + case LIBXL_VGA_INTERFACE_TYPE_QXL: 121 + + break; 122 + } 123 + 124 + if (b_info->u.hvm.boot) { 125 + @@ -625,6 +627,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, 126 + break; 127 + case LIBXL_VGA_INTERFACE_TYPE_NONE: 128 + break; 129 + + case LIBXL_VGA_INTERFACE_TYPE_QXL: 130 + + /* QXL have 2 ram regions, ram and vram */ 131 + + flexarray_append_pair(dm_args, "-device", 132 + + GCSPRINTF("qxl-vga,vram_size_mb=%"PRIu64",ram_size_mb=%"PRIu64, 133 + + (b_info->video_memkb/2/1024), (b_info->video_memkb/2/1024) ) ); 134 + + break; 135 + } 136 + 137 + if (b_info->u.hvm.boot) { 138 + diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl 139 + index 117b61d..023b21e 100644 140 + --- a/tools/libxl/libxl_types.idl 141 + +++ b/tools/libxl/libxl_types.idl 142 + @@ -183,6 +183,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [ 143 + (1, "CIRRUS"), 144 + (2, "STD"), 145 + (3, "NONE"), 146 + + (4, "QXL"), 147 + ], init_val = "LIBXL_VGA_INTERFACE_TYPE_CIRRUS") 148 + 149 + libxl_vendor_device = Enumeration("vendor_device", [ 150 + diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c 151 + index 648ca08..526a1f6 100644 152 + --- a/tools/libxl/xl_cmdimpl.c 153 + +++ b/tools/libxl/xl_cmdimpl.c 154 + @@ -2115,6 +2115,8 @@ skip_vfb: 155 + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; 156 + } else if (!strcmp(buf, "none")) { 157 + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE; 158 + + } else if (!strcmp(buf, "qxl")) { 159 + + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL; 160 + } else { 161 + fprintf(stderr, "Unknown vga \"%s\" specified\n", buf); 162 + exit(1); 163 + -- 164 + 1.9.2 165 +
+20 -16
pkgs/applications/virtualization/xen/4.4.1.nix
··· 14 14 # Sources needed to build the xen tools and tools/firmware. 15 15 toolsGits = 16 16 [ # tag qemu-xen-4.4.1 17 - { name = "qemu-xen"; 18 - url = git://xenbits.xen.org/qemu-upstream-4.4-testing.git; 19 - rev = "65fc9b78ba3d868a26952db0d8e51cecf01d47b4"; 20 - sha256 = "e24fb58f773fd9134c5aae6d3ca7e9f754dc9822de92b1eb2cedc76faf911f18"; 17 + { git = { name = "qemu-xen"; 18 + url = git://xenbits.xen.org/qemu-upstream-4.4-testing.git; 19 + rev = "65fc9b78ba3d868a26952db0d8e51cecf01d47b4"; 20 + sha256 = "e24fb58f773fd9134c5aae6d3ca7e9f754dc9822de92b1eb2cedc76faf911f18"; 21 + }; 21 22 } 22 23 # tag xen-4.4.1 23 - { name = "qemu-xen-traditional"; 24 - url = git://xenbits.xen.org/qemu-xen-4.4-testing.git; 25 - rev = "6ae4e588081620b141071eb010ec40aca7e12876"; 26 - sha256 = "b1ed1feb92fbe658273a8d6d38d6ea60b79c1658413dd93979d6d128d8554ded"; 24 + { git = { name = "qemu-xen-traditional"; 25 + url = git://xenbits.xen.org/qemu-xen-4.4-testing.git; 26 + rev = "6ae4e588081620b141071eb010ec40aca7e12876"; 27 + sha256 = "b1ed1feb92fbe658273a8d6d38d6ea60b79c1658413dd93979d6d128d8554ded"; 28 + }; 27 29 } 28 30 ]; 29 31 30 32 firmwareGits = 31 33 [ # tag 1.7.3.1 32 - { name = "seabios"; 33 - url = git://xenbits.xen.org/seabios.git; 34 - rev = "7d9cbe613694924921ed1a6f8947d711c5832eee"; 35 - sha256 = "c071282bbcb1dd0d98536ef90cd1410f5d8da19648138e0e3863bc540d954a87"; 34 + { git = { name = "seabios"; 35 + url = git://xenbits.xen.org/seabios.git; 36 + rev = "7d9cbe613694924921ed1a6f8947d711c5832eee"; 37 + sha256 = "c071282bbcb1dd0d98536ef90cd1410f5d8da19648138e0e3863bc540d954a87"; 38 + }; 36 39 } 37 - { name = "ovmf"; 38 - url = git://xenbits.xen.org/ovmf.git; 39 - rev = "447d264115c476142f884af0be287622cd244423"; 40 - sha256 = "7086f882495a8be1497d881074e8f1005dc283a5e1686aec06c1913c76a6319b"; 40 + { git = { name = "ovmf"; 41 + url = git://xenbits.xen.org/ovmf.git; 42 + rev = "447d264115c476142f884af0be287622cd244423"; 43 + sha256 = "7086f882495a8be1497d881074e8f1005dc283a5e1686aec06c1913c76a6319b"; 44 + }; 41 45 } 42 46 ]; 43 47
+37 -16
pkgs/applications/virtualization/xen/4.5.0.nix
··· 14 14 # Sources needed to build the xen tools and tools/firmware. 15 15 firmwareGits = 16 16 [ # tag 1.7.5 17 - { name = "seabios"; 18 - url = git://xenbits.xen.org/seabios.git; 19 - rev = "e51488c5f8800a52ac5c8da7a31b85cca5cc95d2"; 20 - sha256 = "b96a0b9f31cab0f3993d007dcbe5f1bd69ad02b0a23eb2dc8a3ed1aafe7985cb"; 17 + { git = { name = "seabios"; 18 + url = git://xenbits.xen.org/seabios.git; 19 + rev = "e51488c5f8800a52ac5c8da7a31b85cca5cc95d2"; 20 + sha256 = "b96a0b9f31cab0f3993d007dcbe5f1bd69ad02b0a23eb2dc8a3ed1aafe7985cb"; 21 + }; 22 + patches = [ ./0000-qemu-seabios-enable-ATA_DMA.patch ]; 21 23 } 22 - { name = "ovmf"; 23 - url = git://xenbits.xen.org/ovmf.git; 24 - rev = "447d264115c476142f884af0be287622cd244423"; 25 - sha256 = "7086f882495a8be1497d881074e8f1005dc283a5e1686aec06c1913c76a6319b"; 24 + { git = { name = "ovmf"; 25 + url = git://xenbits.xen.org/ovmf.git; 26 + rev = "447d264115c476142f884af0be287622cd244423"; 27 + sha256 = "7086f882495a8be1497d881074e8f1005dc283a5e1686aec06c1913c76a6319b"; 28 + }; 26 29 } 27 30 ]; 28 31 29 32 toolsGits = 30 33 [ # tag qemu-xen-4.5.0 31 - { name = "qemu-xen"; 32 - url = git://xenbits.xen.org/qemu-upstream-4.5-testing.git; 33 - rev = "1ebb75b1fee779621b63e84fefa7b07354c43a99"; 34 - sha256 = "1j312q2mqvkvby9adkkxf7f1pn3nz85g5mr9nbg4qpf2y9cg122z"; 34 + { git = { name = "qemu-xen"; 35 + url = git://xenbits.xen.org/qemu-upstream-4.5-testing.git; 36 + rev = "1ebb75b1fee779621b63e84fefa7b07354c43a99"; 37 + sha256 = "1j312q2mqvkvby9adkkxf7f1pn3nz85g5mr9nbg4qpf2y9cg122z"; 38 + }; 35 39 } 36 40 # tag xen-4.5.0 37 - { name = "qemu-xen-traditional"; 38 - url = git://xenbits.xen.org/qemu-xen-4.5-testing.git; 39 - rev = "b0d42741f8e9a00854c3b3faca1da84bfc69bf22"; 40 - sha256 = "ce52b5108936c30ab85ec0c9554f88d5e7b34896f3acb666d56765b49c86f2af"; 41 + { git = { name = "qemu-xen-traditional"; 42 + url = git://xenbits.xen.org/qemu-xen-4.5-testing.git; 43 + rev = "b0d42741f8e9a00854c3b3faca1da84bfc69bf22"; 44 + sha256 = "ce52b5108936c30ab85ec0c9554f88d5e7b34896f3acb666d56765b49c86f2af"; 45 + }; 46 + } 47 + { git = { name = "xen-libhvm"; 48 + url = "https://github.com/ts468/xen-libhvm"; 49 + rev = "442dcc4f6f4e374a51e4613532468bd6b48bdf63"; 50 + sha256 = "9ba97c39a00a54c154785716aa06691d312c99be498ebbc00dc3769968178ba8"; 51 + }; 52 + description = '' 53 + Helper library for reading ACPI and SMBIOS firmware values 54 + from the host system for use with the HVM guest firmware 55 + pass-through feature in Xen. 56 + ''; 57 + #license = licenses.bsd2; 41 58 } 42 59 ]; 43 60 ··· 52 69 quilt push -a 53 70 substituteInPlace tools/xenguest/Makefile --replace "_BSD_SOURCE" "_DEFAULT_SOURCE" 54 71 ''; 72 + 73 + xenPatches = [ ./0001-libxl-Spice-image-compression-setting-support-for-up.patch 74 + ./0002-libxl-Spice-streaming-video-setting-support-for-upst.patch 75 + ./0003-Add-qxl-vga-interface-support-for-upstream-qem.patch ]; 55 76 }; 56 77 57 78 in callPackage ./generic.nix (args // { xenConfig=xenConfig; })
+20 -15
pkgs/applications/virtualization/xen/generic.nix
··· 3 3 , lvm2, utillinux, procps, texinfo, perl, pythonPackages 4 4 , glib, bridge-utils, xlibs, pixman, iproute, udev, bison 5 5 , flex, cmake, ocaml, ocamlPackages, figlet, libaio, yajl 6 - , checkpolicy, transfig, glusterfs, fetchgit, xz, spice 6 + , checkpolicy, transfig, glusterfs, acl, fetchgit, xz, spice 7 7 , spice_protocol, usbredir, alsaLib, quilt 8 8 , coreutils, gawk, gnused, gnugrep, diffutils, multipath_tools 9 9 , inetutils, iptables, openvswitch, nbd, drbd, xenConfig ··· 69 69 glib bridge-utils pixman iproute udev bison xlibs.libX11 70 70 flex ocaml ocamlPackages.findlib figlet libaio 71 71 checkpolicy pythonPackages.markdown transfig 72 - glusterfs cmake spice spice_protocol usbredir 72 + glusterfs acl cmake spice spice_protocol usbredir 73 73 alsaLib quilt 74 74 ]; 75 75 76 76 pythonPath = [ pythonPackages.curses ]; 77 77 78 - patchPhase = if ((xenserverPatched == true) && (builtins.hasAttr "xenserverPatches" xenConfig)) 79 - then xenConfig.xenserverPatches 80 - else ""; 78 + patches = stdenv.lib.optionals ((xenserverPatched == false) && (builtins.hasAttr "xenPatches" xenConfig)) xenConfig.xenPatches; 79 + patchPhase = stdenv.lib.optional ((xenserverPatched == true) && (builtins.hasAttr "xenserverPatches" xenConfig)) xenConfig.xenserverPatches; 81 80 82 81 preConfigure = '' 83 82 # Fake wget: copy prefetched downloads instead ··· 87 86 echo "cp \$4 \$3" >> wget/wget 88 87 chmod +x wget/wget 89 88 export PATH=$PATH:$PWD/wget 89 + export EXTRA_QEMUU_CONFIGURE_ARGS="--enable-spice --enable-usb-redir --enable-linux-aio" 90 90 ''; 91 - 92 - # TODO: If multiple arguments are given with with-extra-qemuu, 93 - # then the configuration aborts; the reason is unclear. 94 - # If you know how to fix it, please let me know! :) 95 - #configureFlags = "--with-extra-qemuu-configure-args='--enable-spice --enable-usb-redir --enable-linux-aio'"; 96 91 97 92 # TODO: Flask needs more testing before enabling it by default. 98 93 #makeFlags = "XSM_ENABLE=y FLASK_ENABLE=y PREFIX=$(out) CONFIG_DIR=/etc XEN_EXTFILES_URL=\\$(XEN_ROOT)/xen_ext_files "; ··· 154 149 155 150 # Xen's tools and firmares need various git repositories that it 156 151 # usually checks out at time using git. We can't have that. 157 - ${flip concatMapStrings xenConfig.toolsGits (x: let src = fetchgit x; in '' 152 + ${flip concatMapStrings xenConfig.toolsGits (x: let src = fetchgit x.git; in '' 158 153 cp -r ${src} tools/${src.name}-dir-remote 159 - chmod +w tools/${src.name}-dir-remote 154 + chmod -R +w tools/${src.name}-dir-remote 155 + '' + stdenv.lib.optionalString (builtins.hasAttr "patches" x) '' 156 + ( cd tools/${src.name}-dir-remote; ${concatStringsSep "; " (map (p: "patch -p1 < ${p}") x.patches)} ) 160 157 '')} 161 - ${flip concatMapStrings xenConfig.firmwareGits (x: let src = fetchgit x; in '' 158 + ${flip concatMapStrings xenConfig.firmwareGits (x: let src = fetchgit x.git; in '' 162 159 cp -r ${src} tools/firmware/${src.name}-dir-remote 163 - chmod +w tools/firmware/${src.name}-dir-remote 160 + chmod -R +w tools/firmware/${src.name}-dir-remote 161 + '' + stdenv.lib.optionalString (builtins.hasAttr "patches" x) '' 162 + ( cd tools/firmware/${src.name}-dir-remote; ${concatStringsSep "; " (map (p: "patch -p1 < ${p}") x.patches)} ) 164 163 '')} 165 164 166 165 # Xen's stubdoms and firmwares need various sources that are usually fetched ··· 178 177 postBuild = 179 178 '' 180 179 make -C docs man-pages 180 + 181 + (cd tools/xen-libhvm-dir-remote; make) 182 + (cd tools/xen-libhvm-dir-remote/biospt; cc -Wall -g -D_LINUX -Wstrict-prototypes biospt.c -o biospt -I../libhvm -L../libhvm -lxenhvm) 181 183 ''; 182 184 183 185 installPhase = ··· 192 194 193 195 shopt -s extglob 194 196 for i in $out/etc/xen/scripts/!(*.sh); do 195 - sed -i '2s@^@export PATH=$out/bin:${scriptEnvPath}@' $i 197 + sed -i "2s@^@export PATH=$out/bin:${scriptEnvPath}\n@" $i 196 198 done 199 + 200 + (cd tools/xen-libhvm-dir-remote; make install) 201 + cp tools/xen-libhvm-dir-remote/biospt/biospt $out/bin/. 197 202 ''; 198 203 199 204 meta = {