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

Re: [Xen-devel] xl vs. xm: floppy support



On Wed, 2011-03-02 at 09:31 +0000, Ian Campbell wrote:
> On Tue, 2011-03-01 at 20:29 +0000, Ian Campbell wrote:
> > 
> > I'll knock up a patch in the morning. 
> 
> ... 
[...]
> e.g. xl does not current support floppy disks but adding:
>      device_model_args = [ "-fda", "/scratch/fdboot.img" ]
> allowed me to boot FreeDOS from a floppy image.

We may as well have a patch for direct support for fdb/fdb too so we can
evaluate it on its merits for 4.1. I've no problem with deferring this
to 4.2 at this stage in the release but it is a pretty straightforward
patch...

This doesn't support stubdoms, not sure how that works in the xend case
either, but I'm pretty certain that patch would be too big for this
stage in the release.

8<----------------------------------------------


# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1299059966 0
# Node ID b91f5ffd1a6a863af6050e65f8d315fdcbceb5d9
# Parent  6c3ee3d7fd98768f17b24fcc96d2fb86914deb7f
libxl/xl: support floppy disk images for HVM guests

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 6c3ee3d7fd98 -r b91f5ffd1a6a tools/libxl/libxl.idl
--- a/tools/libxl/libxl.idl     Wed Mar 02 09:40:55 2011 +0000
+++ b/tools/libxl/libxl.idl     Wed Mar 02 09:59:26 2011 +0000
@@ -164,6 +164,8 @@ libxl_device_model_info = Struct("device
     ("vcpu_avail",       integer,           False, "vcpus actually available"),
     ("xen_platform_pci", integer,           False, "enable/disable the xen 
platform pci device"),
     ("extra",            libxl_string_list, False, "extra parameters pass 
directly to qemu, NULL terminated"),
+    ("fda",              string,            False, "floppy disk image, first 
drive"),
+    ("fdb",              string,            False, "floppy disk image, second 
drive"),
     ],
     comment=
 """Device Model information.
diff -r 6c3ee3d7fd98 -r b91f5ffd1a6a tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Wed Mar 02 09:40:55 2011 +0000
+++ b/tools/libxl/libxl_dm.c    Wed Mar 02 09:59:26 2011 +0000
@@ -119,6 +119,12 @@ static char ** libxl_build_device_model_
         }
         if (info->soundhw) {
             flexarray_vappend(dm_args, "-soundhw", info->soundhw, NULL);
+        }
+        if (info->fda) {
+            flexarray_vappend(dm_args, "-fda", info->fda, NULL);
+        }
+        if (info->fdb) {
+            flexarray_vappend(dm_args, "-fdb", info->fdb, NULL);
         }
         if (info->apic) {
             flexarray_append(dm_args, "-acpi");
@@ -255,6 +261,12 @@ static char ** libxl_build_device_model_
         }
         if (info->soundhw) {
             flexarray_vappend(dm_args, "-soundhw", info->soundhw, NULL);
+        }
+        if (info->fda) {
+            flexarray_vappend(dm_args, "-fda", info->fda, NULL);
+        }
+        if (info->fdb) {
+            flexarray_vappend(dm_args, "-fdb", info->fdb, NULL);
         }
         if (!info->apic) {
             flexarray_append(dm_args, "-no-acpi");
diff -r 6c3ee3d7fd98 -r b91f5ffd1a6a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed Mar 02 09:40:55 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Wed Mar 02 09:59:26 2011 +0000
@@ -365,6 +365,8 @@ static void printf_info(int domid,
         printf("\t\t\t(usb %d)\n", dm_info->usb);
         printf("\t\t\t(usbdevice %s)\n", dm_info->usbdevice);
         printf("\t\t\t(apic %d)\n", dm_info->apic);
+        printf("\t\t\t(fda %s)\n", dm_info->fda);
+        printf("\t\t\t(fdb %s)\n", dm_info->fdb);
         printf("\t\t)\n");
     } else {
         printf("\t\t(linux %d)\n", b_info->hvm);
@@ -1142,7 +1144,8 @@ skip_vfb:
         xlu_cfg_replace_string (config, "soundhw", &dm_info->soundhw);
         if (!xlu_cfg_get_long (config, "xen_platform_pci", &l))
             dm_info->xen_platform_pci = l;
-
+        xlu_cfg_replace_string (config, "fda", &dm_info->fda);
+        xlu_cfg_replace_string (config, "fdb", &dm_info->fdb);
         if (!xlu_cfg_get_list(config, "device_model_args", &dmargs, 
&nr_dmargs, 0))
         {
             int i;



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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