WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xl vs. xm: floppy support
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 2 Mar 2011 10:03:08 +0000
Cc: Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Wed, 02 Mar 2011 02:04:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299058270.17907.1336.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <201103011037.19341.Christoph.Egger@xxxxxxx> <1298975916.5034.2102.camel@xxxxxxxxxxxxxxxxxxxxxx> <1298980811.20975.62.camel@xxxxxxxxxxxxxxxxxxxxxx> <1298981504.17907.14.camel@xxxxxxxxxxxxxxxxxxxxxx> <4D6CE734.9050001@xxxxxxxxxxxxx> <1298984600.17907.66.camel@xxxxxxxxxxxxxxxxxxxxxx> <19821.13157.422683.711736@xxxxxxxxxxxxxxxxxxxxxxxx> <alpine.DEB.2.00.1103011759440.2917@kaball-desktop> <1299011341.21399.10.camel@xxxxxxxxxxxxxxxxxxxxx> <1299058270.17907.1336.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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