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-changelog

[Xen-changelog] [xen-unstable] libxl/xl: implement xen_platform_pci enab

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl/xl: implement xen_platform_pci enable/disable
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Jun 2010 00:00:45 -0700
Delivery-date: Wed, 09 Jun 2010 00:00:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275980464 -3600
# Node ID 4c7b4066cb49acd69fef574ad7f5bb9cc597a656
# Parent  de101fc39fc3cd20d950bc9e905b7ad1ce71260c
libxl/xl: implement xen_platform_pci enable/disable

Implement xen_platform_pci support in xl/libxl to allow users to
disable the xen platform pci device from the VM config file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c      |    1 +
 tools/libxl/libxl.h      |    1 +
 tools/libxl/xl_cmdimpl.c |    3 +++
 3 files changed, 5 insertions(+)

diff -r de101fc39fc3 -r 4c7b4066cb49 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Jun 07 17:14:37 2010 +0100
+++ b/tools/libxl/libxl.c       Tue Jun 08 08:01:04 2010 +0100
@@ -1159,6 +1159,7 @@ int libxl_create_device_model(struct lib
 
     path = libxl_sprintf(ctx, "/local/domain/0/device-model/%d", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);
+    libxl_xs_write(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/disable_pf", path), 
"%d", !info->xen_platform_pci);
 
     libxl_create_logfile(ctx, libxl_sprintf(ctx, "qemu-dm-%s", 
info->dom_name), &logfile);
     logfile_w = open(logfile, O_WRONLY|O_CREAT, 0644);
diff -r de101fc39fc3 -r 4c7b4066cb49 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Mon Jun 07 17:14:37 2010 +0100
+++ b/tools/libxl/libxl.h       Tue Jun 08 08:01:04 2010 +0100
@@ -164,6 +164,7 @@ typedef struct {
     bool apic; /* apic enabled or disabled */
     int vcpus; /* max number of vcpus */
     int vcpu_avail; /* vcpus actually available */
+    int xen_platform_pci; /* enable/disable the xen platform pci device */
     char **extra; /* extra parameters pass directly to qemu, NULL terminated */
     /* Network is missing */
 } libxl_device_model_info;
diff -r de101fc39fc3 -r 4c7b4066cb49 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Mon Jun 07 17:14:37 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Jun 08 08:01:04 2010 +0100
@@ -240,6 +240,7 @@ static void init_dm_info(libxl_device_mo
     dm_info->boot = "cda";
     dm_info->usb = 0;
     dm_info->usbdevice = NULL;
+    dm_info->xen_platform_pci = 1;
 }
 
 static void init_nic_info(libxl_device_nic *nic_info, int devnum)
@@ -869,6 +870,8 @@ skip_pci:
             dm_info->usb = l;
         if (!xlu_cfg_get_string (config, "usbdevice", &buf))
             dm_info->usbdevice = strdup(buf);
+        if (!xlu_cfg_get_long (config, "xen_platform_pci", &l))
+            dm_info->xen_platform_pci = l;
     }
 
     dm_info->type = c_info->hvm ? XENFV : XENPV;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl/xl: implement xen_platform_pci enable/disable, Xen patchbot-unstable <=