rpms/xen/FC-5 xen-destroydevice-args.patch, NONE, 1.1 xen-hotplug-error-reporting.patch, NONE, 1.1 xen-ipv6-xenbr.patch, NONE, 1.1 xen-man-pages.patch, NONE, 1.1 xen-pvfb-no-hvm.patch, NONE, 1.1 xen-pvfb-terminate.patch, NONE, 1.1 xen-qemu-close-fds.patch, NONE, 1.1 xen-shadow-enable.patch, NONE, 1.1 xen-vncpassword-remove.patch, NONE, 1.1 xen-pvfb-compat.patch, 1.1, 1.2 xen-pvfb-fixes.patch, 1.1, 1.2 xen-pvfb.patch, 1.2, 1.3 xen.spec, 1.121, 1.122

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 7 17:41:26 UTC 2007


Author: berrange

Update of /cvs/dist/rpms/xen/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv16435

Modified Files:
	xen-pvfb-compat.patch xen-pvfb-fixes.patch xen-pvfb.patch 
	xen.spec 
Added Files:
	xen-destroydevice-args.patch xen-hotplug-error-reporting.patch 
	xen-ipv6-xenbr.patch xen-man-pages.patch xen-pvfb-no-hvm.patch 
	xen-pvfb-terminate.patch xen-qemu-close-fds.patch 
	xen-shadow-enable.patch xen-vncpassword-remove.patch 
Log Message:
Pull in latest patches from FC-6 branch

xen-destroydevice-args.patch:
 DevController.py |    2 +-
 blkif.py         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE xen-destroydevice-args.patch ---
diff -rup xen-3.0.3_0-src.orig/tools/python/xen/xend/server/blkif.py xen-3.0.3_0-src.new/tools/python/xen/xend/server/blkif.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xend/server/blkif.py	2007-01-30 16:57:08.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xend/server/blkif.py	2007-01-30 16:59:27.000000000 -0500
@@ -130,7 +130,7 @@ class BlkifController(DevController):
         return result
 
 
-    def destroyDevice(self, devid, force):
+    def destroyDevice(self, devid, force=None):
         """@see DevController.destroyDevice"""
 
         # If we are given a device name, then look up the device ID from it,
diff -rup xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py	2007-01-30 16:57:08.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py	2007-01-30 16:59:05.000000000 -0500
@@ -191,7 +191,7 @@ class DevController:
         raise VmError('%s devices may not be reconfigured' % self.deviceClass)
 
 
-    def destroyDevice(self, devid, force):
+    def destroyDevice(self, devid, force=None):
         """Destroy the specified device.
 
         @param devid The device ID, or something device-specific from which

xen-hotplug-error-reporting.patch:
 examples/vif-bridge                     |    7 +++++++
 examples/xen-hotplug-common.sh          |    5 +++--
 python/xen/xend/server/DevController.py |   31 ++++++++++++++++---------------
 3 files changed, 26 insertions(+), 17 deletions(-)

--- NEW FILE xen-hotplug-error-reporting.patch ---
diff -ruN xen-3.0.3_0-src.orig/tools/examples/vif-bridge xen-3.0.3_0-src.new/tools/examples/vif-bridge
--- xen-3.0.3_0-src.orig/tools/examples/vif-bridge	2006-10-15 08:22:03.000000000 -0400
+++ xen-3.0.3_0-src.new/tools/examples/vif-bridge	2007-02-15 08:39:04.000000000 -0500
@@ -46,6 +46,13 @@
   fi
 fi
 
+RET=0
+ip link show $bridge 1>/dev/null 2>&1 || RET=1
+if [ "$RET" -eq 1 ]
+then
+    fatal "Could not find bridge device $bridge"
+fi
+
 case "$command" in
     online)
 	setup_bridge_port "$vif"
diff -ruN xen-3.0.3_0-src.orig/tools/examples/xen-hotplug-common.sh xen-3.0.3_0-src.new/tools/examples/xen-hotplug-common.sh
--- xen-3.0.3_0-src.orig/tools/examples/xen-hotplug-common.sh	2006-10-15 08:22:03.000000000 -0400
+++ xen-3.0.3_0-src.new/tools/examples/xen-hotplug-common.sh	2007-02-15 08:39:04.000000000 -0500
@@ -28,14 +28,15 @@
 unset $(set | grep ^LC_ | cut -d= -f1)
 
 fatal() {
-  xenstore_write "$XENBUS_PATH"/hotplug-status error
+  xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
+                 "$XENBUS_PATH/hotplug-status" error
   log err "$@"
   exit 1
 }
 
 success() {
   # Tell DevController that backend is "connected"
-  xenstore_write "$XENBUS_PATH"/hotplug-status connected
+  xenstore_write "$XENBUS_PATH/hotplug-status" connected
 }
 
 do_or_die() {
diff -ruN xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py	2007-02-15 08:38:23.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py	2007-02-15 08:40:36.000000000 -0500
@@ -148,7 +148,7 @@
     def waitForDevice(self, devid):
         log.debug("Waiting for %s.", devid)
         
-        status = self.waitForBackend(devid)
+        (status,err) = self.waitForBackend(devid)
 
         if status == Timeout:
             self.destroyDevice(devid)
@@ -158,24 +158,21 @@
 
         elif status == Error:
             self.destroyDevice(devid)
-            raise VmError("Device %s (%s) could not be connected. "
-                          "Backend device not found." %
-                          (devid, self.deviceClass))
-
+            if err is None:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "Backend device not found." %
+                              (devid, self.deviceClass))
+            else:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "%s" % (devid, self.deviceClass, err))
         elif status == Missing:
             # Don't try to destroy the device; it's already gone away.
             raise VmError("Device %s (%s) could not be connected. "
                           "Device not found." % (devid, self.deviceClass))
 
         elif status == Busy:
-            err = None
-            frontpath = self.frontendPath(devid)
-            backpath = xstransact.Read(frontpath, "backend")
-            if backpath:
-                err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
-            if not err:
+            if err is None:
                 err = "Busy."
-                
             self.destroyDevice(devid)
             raise VmError("Device %s (%s) could not be connected.\n%s" %
                           (devid, self.deviceClass, err))
@@ -428,17 +425,21 @@
         frontpath = self.frontendPath(devid)
         backpath = xstransact.Read(frontpath, "backend")
 
+
         if backpath:
             statusPath = backpath + '/' + HOTPLUG_STATUS_NODE
             ev = Event()
             result = { 'status': Timeout }
-            
+
             xswatch(statusPath, hotplugStatusCallback, ev, result)
 
             ev.wait(DEVICE_CREATE_TIMEOUT)
-            return result['status']
+
+            err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
+
+            return (result['status'], err)
         else:
-            return Missing
+            return (Missing, None)
 
 
     def backendPath(self, backdom, devid):

xen-ipv6-xenbr.patch:
 xen-network-common.sh |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE xen-ipv6-xenbr.patch ---
# User kfraser at localhost.localdomain
# Node ID c2fd75d7e2b7ab40e98936d10d5c31dbdc37af5b
# Parent  c71fe03f086f8f705bc11b0edc252d71f0a0eb17
[LINUX] ipv6: Disable addrconf on Xen bridge device

The ipv6-no-autoconf patch didn't disable IPv6 addrconf completely.
This means that the Xen bridge device still interfered with normal
IPv6 operation by engaging the IPv6 network with a bogus MAC address.

For details please refer to
        https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200360

The following patch completely disables IPv6 on the Xen bridge device
by temporarily setting the MTU to a value less than the minimum
allowed for IPv6.

Upstream will provide a cleaner way to disable IPv6 addrconf in
future, possibly in the form of a proc sysctl.  Of course if the Xen
loopback device is removed it would render this change unnecessary.

Signed-off-by: Herbert Xu

diff -r c71fe03f086f -r c2fd75d7e2b7 tools/examples/xen-network-common.sh
--- a/tools/examples/xen-network-common.sh	Fri Jan 12 15:19:23 2007 +0000
+++ b/tools/examples/xen-network-common.sh	Fri Jan 12 15:23:07 2007 +0000
@@ -117,7 +117,12 @@ create_bridge () {
         ip link set ${bridge} arp off
         ip link set ${bridge} multicast off
     fi
+
+    # A small MTU disables IPv6 (and therefore IPv6 addrconf).
+    mtu=$(ip link show ${bridge} | sed -n 's/.* mtu \([0-9]\+\).*/\1/p')
+    ip link set ${bridge} mtu 68
     ip link set ${bridge} up
+    ip link set ${bridge} mtu ${mtu:-1500}
 }
 
 # Usage: add_to_bridge bridge dev

xen-man-pages.patch:
 xm.pod.1           |  113 -----------------------------------------------------
 xmdomain.cfg.pod.5 |   12 -----
 2 files changed, 2 insertions(+), 123 deletions(-)

--- NEW FILE xen-man-pages.patch ---
--- xen-3.0.3_0-src/docs/man/xmdomain.cfg.pod.5~	2006-10-15 13:22:03.000000000 +0100
+++ xen-3.0.3_0-src/docs/man/xmdomain.cfg.pod.5	2007-02-07 18:43:17.000000000 +0000
@@ -268,18 +268,6 @@
 default xen kernel, and the file /var/xen/mylinux.img loopback mounted
 at hda1, which is the root filesystem.
 
-=item I<NFS Root>
-
-FIXME: write me
-
-=item I<LVM Root>
-
-FIXME: write me
-
-=item I<Two Networks>
-
-FIXME: write me
-
 =back
 
 =head1 SEE ALSO
--- xen-3.0.3_0-src/docs/man/xm.pod.1~	2006-10-15 13:22:03.000000000 +0100
+++ xen-3.0.3_0-src/docs/man/xm.pod.1	2007-02-07 19:18:34.000000000 +0000
@@ -182,7 +182,8 @@
 
 =item B<s - shutdown>
 
-FIXME: Why would you ever see this state?
+The guest has requested to be shutdown, rebooted or suspended, and the
+domain is in the process of being destroyed in response.
 
 =item B<c - crashed>
 
@@ -195,8 +196,6 @@
 The domain is in process of dying, but hasn't completely shutdown or
 crashed.
 
-FIXME: Is this right?
-
 =back
 
 B<LONG OUTPUT>
@@ -504,82 +503,6 @@
 
 =back
 
-=head1 SCHEDULER SUBCOMMANDS
-
-Xen ships with a number of domain schedulers, which can be set at boot
-time with the I<sched=> parameter on the Xen command line.  By
-default I<sedf> is used for scheduling.
-
-FIXME: we really need a scheduler expert to write up this section.
-
-=over 4
-
-=item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
-
-Set Simple EDF (Earliest Deadline First) scheduler parameters.  This
-scheduler provides weighted CPU sharing in an intuitive way and uses
-realtime-algorithms to ensure time guarantees.  For more information
-see docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
-
-B<PARAMETERS>
-
-=over 4
-
-=item I<period>
-
-The normal EDF scheduling usage in nanoseconds
-
-=item I<slice>
-
-The normal EDF scheduling usage in nanoseconds
-
-FIXME: these are lame, should explain more.
-
-=item I<latency-hint>
-
-Scaled period if domain is doing heavy I/O.
-
-=item I<extratime>
-
-Flag for allowing domain to run in extra time.
-
-=item I<weight>
-
-Another way of setting cpu slice.
-
-=back
-
-B<EXAMPLES>
-
-I<normal EDF (20ms/5ms):>
-
-    xm sched-sedf <dom-id> 20000000 5000000 0 0 0
-  
-I<best-effort domains (i.e. non-realtime):>
-
-    xm sched-sedf <dom-id> 20000000 0 0 1 0
- 
-I<normal EDF (20ms/5ms) + share of extra-time:>
-  
-    xm sched-sedf <dom-id> 20000000 5000000 0 1 0
-
-I<4 domains with weights 2:3:4:2>
-
-    xm sched-sedf <d1> 0 0 0 0 2
-    xm sched-sedf <d2> 0 0 0 0 3
-    xm sched-sedf <d3> 0 0 0 0 4
-    xm sched-sedf <d4> 0 0 0 0 2
-  
-I<1 fully-specified (10ms/3ms) domain, 3 other domains share available
-rest in 2:7:3 ratio:>
-
-    xm sched-sedf <d1> 10000000 3000000 0 0 0   
-    xm sched-sedf <d2> 0 0 0 0 2   
-    xm sched-sedf <d3> 0 0 0 0 7
-    xm sched-sedf <d4> 0 0 0 0 3
-
-=back
-
 =head1 VIRTUAL DEVICE COMMANDS
 
 Most virtual devices can be added and removed while guests are
@@ -646,9 +569,6 @@
 id given to the device by domain 0.  You will need to run I<xm
 block-list> to determine that number.
 
-FIXME: this is currently B<broken>.  Even though a block device is
-removed from domU, it appears to still be allocated in the domain 0.
-
 =item B<block-list> I<[-l|--long]> I<domain-id>
 
 List virtual block devices for a domain.  The returned output is
@@ -675,9 +595,6 @@
 
 Passes the specified IP Address to the adapter on creation.  
 
-FIXME: this currently appears to be B<broken>.  I'm not sure under what
-circumstances this should actually work.
-
 =item I<mac=macaddr>
 
 The MAC address that the domain will see on its Ethernet device.  If
@@ -701,9 +618,6 @@
 I<devid> is the virtual interface device number within the domain
 (i.e. the 3 in vif22.3).
 
-FIXME: this is currently B<broken>.  Network devices aren't completely
-removed from domain 0.
-
 =item B<network-list> I<[-l|--long]> I<domain-id>
 
 List virtual network interfaces for a domain.  The returned output is
@@ -718,29 +632,6 @@
 
 =back
 
-=head1 VNET COMMANDS
-
-The Virtual Network interfaces for Xen.
-
-FIXME: This needs a lot more explanation, or it needs to be ripped
-out entirely.
-
-=over 4
-
-=item B<vnet-list> I<[-l|--long]>
-
-List vnets.
-
-=item B<vnet-create> I<config>
-
-Create a vnet from a config file.
-
-=item B<vnet-delete> I<vnetid>
-
-Delete a vnet.
-
-=back
-
 =head1 ACCESS CONTROL SUBCOMMANDS
 
 Access Control in Xen consists of two components: (i) The Access

xen-pvfb-no-hvm.patch:
 create.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE xen-pvfb-no-hvm.patch ---
diff -ruNp xen-3.0.3_0-src.orig/tools/python/xen/xm/create.py xen-3.0.3_0-src.new/tools/python/xen/xm/create.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xm/create.py	2007-02-15 08:38:23.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xm/create.py	2007-02-15 09:36:51.000000000 -0500
@@ -558,7 +558,7 @@ def configure_usb(config_devs, vals):
 
 def configure_vfbs(config_devs, vals):
     # old config compatibility
-    if vals.vfb == [] and (vals.sdl or vals.vnc):
+    if vals.vfb == [] and (vals.sdl or vals.vnc) and vals.builder != 'hvm':
         if vals.vnc:
             cfg = 'type=vnc'
             if vals.vncdisplay:

xen-pvfb-terminate.patch:
 xenfb.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

--- NEW FILE xen-pvfb-terminate.patch ---
--- a/tools/xenfb/xenfb.c	2007-02-27 18:39:54.000000000 +0100
+++ b/tools/xenfb/xenfb.c	2007-03-02 15:06:07.000000000 +0100
@@ -243,6 +243,8 @@ static int xenfb_wait_for_state(struct x
 	unsigned state, dummy;
 	char **vec;
 
+	awaited |= 1 << XenbusStateUnknown;
+
 	for (;;) {
 		state = xenfb_read_state(xsh, dir);
 		if (state < 0)
@@ -317,6 +319,10 @@ static int xenfb_using_old_protocol(stru
 
 	for (;;) {
 		state = xenfb_read_state(xsh, xenfb->fb.otherend);
+		if (state == XenbusStateUnknown) {
+			ret = -1;
+			break;
+		}
 		if (state > XenbusStateInitialising) {
 			ret = 0; /* frontend talks xenbus protocol */
 			break;
@@ -534,7 +540,7 @@ int xenfb_attach_dom(struct xenfb *xenfb
 {
 	struct xenfb_private *xenfb = (struct xenfb_private *)xenfb_pub;
 	struct xs_handle *xsh = xenfb->xsh;
-	int val, serrno;
+	int ret, val, serrno;
 	struct xenfb_page *fb_page;
 
 	xenfb_detach_dom(xenfb);
@@ -564,8 +570,9 @@ int xenfb_attach_dom(struct xenfb *xenfb
 	if (!xs_watch(xsh, xenfb->kbd.otherend, ""))
 		goto error;
 
-	if (xenfb_using_old_protocol(xenfb))
-		return 1;
+	ret = xenfb_using_old_protocol(xenfb);
+	if (ret)
+		return ret;
 
 	if (xenfb_wait_for_frontend_initialised(&xenfb->fb) < 0)
 		goto error;

xen-qemu-close-fds.patch:
 vl.c  |    8 ++++++++
 vnc.c |    8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

--- NEW FILE xen-qemu-close-fds.patch ---
diff -r 3ac19fda0bc2 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c	Fri Mar 02 12:11:52 2007 +0000
+++ b/tools/ioemu/vl.c	Tue Mar 06 11:21:52 2007 -0500
@@ -3250,6 +3250,14 @@ static int net_tap_init(VLANState *vlan,
         pid = fork();
         if (pid >= 0) {
             if (pid == 0) {
+                int open_max = sysconf (_SC_OPEN_MAX), i;
+                for (i = 0; i < open_max; i++)
+                    if (i != STDIN_FILENO &&
+                        i != STDOUT_FILENO &&
+                        i != STDERR_FILENO &&
+                        i != fd)
+                        close(i);
+
                 parg = args;
                 *parg++ = (char *)setup_script;
                 *parg++ = ifname;
diff -r 3ac19fda0bc2 tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c	Fri Mar 02 12:11:52 2007 +0000
+++ b/tools/ioemu/vnc.c	Tue Mar 06 11:21:52 2007 -0500
@@ -1445,7 +1445,7 @@ int vnc_display_init(DisplayState *ds, i
 
 int vnc_start_viewer(int port)
 {
-    int pid;
+    int pid, i, open_max;
     char s[16];
 
     sprintf(s, ":%d", port);
@@ -1456,6 +1456,12 @@ int vnc_start_viewer(int port)
 	exit(1);
 
     case 0:	/* child */
+	open_max = sysconf (_SC_OPEN_MAX);
+	for (i = 0; i < open_max; i++)
+	    if (i != STDIN_FILENO &&
+		i != STDOUT_FILENO &&
+		i != STDERR_FILENO)
+		close(i);
 	execlp("vncviewer", "vncviewer", s, NULL);
 	fprintf(stderr, "vncviewer execlp failed\n");
 	exit(1);

xen-shadow-enable.patch:
 libxc/xc_hvm_build.c              |   12 ------------
 python/xen/lowlevel/xc/xc.c       |   32 ++++++++++++++++++++++++++++++++
 python/xen/xend/XendDomainInfo.py |    3 +++
 3 files changed, 35 insertions(+), 12 deletions(-)

--- NEW FILE xen-shadow-enable.patch ---
Herbert Xu wrote:
> 
> This patch fixes the "cannot allocate memory" error when starting HVM
> guests.  The cause of this is that shadow mode is enabled after memory
> allocation for the guest and before the physmap is filled.
> 
> It turns out that the bogus m2p entries are a recent introduction.  When
> shadow2 (changeset 11151) was introduced, upstream moved the code that enables
> shadow mode for HVM guests to user-space.  In particular, this was done after
> memory allocation and before the physmap has been populated.  This only
> affected HVM because PV translate mode populated the physmap before enabling
> shadow mode.
> 
> Upstream has since fixed it by moving the enabling of shadow mode back into the
> hypervisor which means that it will occur before memory allocation.  This patch
> tries to do this in a more conservative way by simply moving the enabling of
> shadow mode before memory allocation.
> 
> I've verified that running this version of xend allows me to start HVM guests
> on a host where otherwise you can't start HVM guests at all due to this bug.
> 
> When we move to 3.0.4 we can remove this patch.

diff -ur xen-3.0.3_0-src.orig/tools/libxc/xc_hvm_build.c xen-3.0.3_0-src/tools/libxc/xc_hvm_build.c
--- xen-3.0.3_0-src.orig/tools/libxc/xc_hvm_build.c	2006-10-15 22:22:03.000000000 +1000
+++ xen-3.0.3_0-src/tools/libxc/xc_hvm_build.c	2007-01-27 15:46:43.000000000 +1100
@@ -441,18 +441,6 @@
         goto error_out;
     }
 
-    /* HVM domains must be put into shadow mode at the start of day */
-    if ( xc_shadow_control(xc_handle, domid, XEN_DOMCTL_SHADOW_OP_ENABLE,
-                           NULL, 0, NULL, 
-                           XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT  |
-                           XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE |
-                           XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL, 
-                           NULL) )
-    {
-        PERROR("Could not enable shadow paging for domain.\n");
-        goto error_out;
-    }        
-
     memset(ctxt, 0, sizeof(*ctxt));
 
     ctxt->flags = VGCF_HVM_GUEST;
diff -ur xen-3.0.3_0-src.orig/tools/python/xen/lowlevel/xc/xc.c xen-3.0.3_0-src/tools/python/xen/lowlevel/xc/xc.c
--- xen-3.0.3_0-src.orig/tools/python/xen/lowlevel/xc/xc.c	2007-01-23 22:51:50.000000000 +1100
+++ xen-3.0.3_0-src/tools/python/xen/lowlevel/xc/xc.c	2007-01-27 15:40:48.000000000 +1100
@@ -647,6 +647,31 @@
     return Py_BuildValue("i", mbarg);
 }
 
+static PyObject *pyxc_hvm_shadow_enable(PyObject *self,
+                                    PyObject *args,
+                                    PyObject *kwds)
+{
+    XcObject *xc = (XcObject *)self;
+
+    uint32_t dom;
+
+    static char *kwd_list[] = { "dom", NULL };
+
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &dom) )
+        return NULL;
+
+    if ( xc_shadow_control(xc->xc_handle, dom, XEN_DOMCTL_SHADOW_OP_ENABLE,
+                           NULL, 0, NULL, 
+                           XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT  |
+                           XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE |
+                           XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL, 
+                           NULL) )
+        return PyErr_SetFromErrno(xc_error);
+    
+    Py_INCREF(zero);
+    return zero;
+}
+
 static PyObject *pyxc_sched_credit_domain_set(XcObject *self,
                                               PyObject *args,
                                               PyObject *kwds)
@@ -1089,6 +1114,13 @@
       " mb [int, -1]: MB of shadow memory this domain should have.\n\n"
       "Returns: [int] MB of shadow memory in use by this domain.\n" },
 
+    { "hvm_shadow_enable", 
+      (PyCFunction)pyxc_hvm_shadow_enable, 
+      METH_VARARGS | METH_KEYWORDS, "\n"
+      "Enable shadow pagetable\n"
+      " dom [int]:   Identifier of domain.\n\n"
+      "Returns: [int] 0 on success; -1 on error.\n" },
+
     { "domain_setmaxmem", 
       (PyCFunction)pyxc_domain_setmaxmem, 
       METH_VARARGS, "\n"
diff -ur xen-3.0.3_0-src.orig/tools/python/xen/xend/XendDomainInfo.py xen-3.0.3_0-src/tools/python/xen/xend/XendDomainInfo.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xend/XendDomainInfo.py	2007-01-23 22:51:50.000000000 +1100
+++ xen-3.0.3_0-src/tools/python/xen/xend/XendDomainInfo.py	2007-01-28 21:47:26.000000000 +1100
@@ -1349,6 +1349,9 @@
             shadow_cur = xc.shadow_mem_control(self.domid, shadow / 1024)
             self.info['shadow_memory'] = shadow_cur
 
+            if self.image.ostype == "hvm":
+                xc.hvm_shadow_enable(self.domid);
+
             # initial memory reservation
             xc.domain_memory_increase_reservation(self.domid, reservation, 0,
                                                   0)

xen-vncpassword-remove.patch:
 image.py  |   18 +++++++-----------
 image.py~ |only
 2 files changed, 7 insertions(+), 11 deletions(-)

--- NEW FILE xen-vncpassword-remove.patch ---
diff -ru xen-3.0.3_0-src/tools/python/xen/xend/image.py xen-3.0.3_0-src-new/tools/python/xen/xend/image.py
--- xen-3.0.3_0-src/tools/python/xen/xend/image.py	2006-12-18 16:30:04.000000000 -0500
+++ xen-3.0.3_0-src-new/tools/python/xen/xend/image.py	2006-12-18 16:29:35.000000000 -0500
@@ -365,7 +365,6 @@
 
         # get password from VM config(if password omitted, None)
         vncpasswd_vmconfig = sxp.child_value(config, 'vncpasswd')
-        vncpasswd = vncpasswd_vmconfig
 
         if nographic:
             ret.append('-nographic')
@@ -387,20 +386,17 @@
                 vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
             if vnclisten:
                 ret += ['-vnclisten', vnclisten]
-            # get password from xend-config(if password omitted, None)
-            vncpasswd_default = xen.xend.XendRoot.instance().get_vncpasswd_default()
-            # password check
+
+            vncpasswd = vncpasswd_vmconfig
             if vncpasswd is None:
-                if vncpasswd_default is None:
-                    raise VmError('vncpasswd is not setuped in VMconfig and xend-config.')
-                else:
-                    vncpasswd = vncpasswd_default
+                vncpasswd = (xen.xend.XendRoot.instance().
+                             get_vncpasswd_default())
+                if vncpasswd is None:
+                    raise VmError('vncpasswd is not set up in ' +
+                                  'VMconfig and xend-config.')
             if vncpasswd!='':
                 self.vm.storeVm("vncpasswd", vncpasswd)
 
-        # remove password
-        config.remove(['vncpasswd', vncpasswd_vmconfig])
-
         return ret
 
     def createDeviceModel(self):
Only in xen-3.0.3_0-src-new/tools/python/xen/xend: image.py~

xen-pvfb-compat.patch:
 b/tools/xenfb/oldxenfb.c              |  611 ++++++++++++++++++++++++++++++++++
 b/tools/xenfb/oldxenfb.h              |  108 ++++++
 b/tools/xenfb/oldxenkbd.h             |   92 +++++
 tools/python/xen/xend/server/vfbif.py |    3 
 tools/python/xen/xm/create.py         |   18 +
 tools/xenfb/Makefile                  |   15 
 tools/xenfb/sdlfb.c                   |   11 
 tools/xenfb/vncfb.c                   |   11 
 tools/xenfb/xenfb.c                   |   57 +++
 tools/xenfb/xenfb.h                   |    2 
 10 files changed, 925 insertions(+), 3 deletions(-)

Index: xen-pvfb-compat.patch
===================================================================
RCS file: /cvs/dist/rpms/xen/FC-5/xen-pvfb-compat.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xen-pvfb-compat.patch	30 Jan 2007 19:13:26 -0000	1.1
+++ xen-pvfb-compat.patch	7 Mar 2007 17:41:23 -0000	1.2
@@ -18,7 +18,7 @@
  
  def configure_vfbs(config_devs, vals):
 +    # old config compatibility
-+    if vals.vfb == [] and (vals.sdl or vals.vnc) and vals.builder != 'hvm':
++    if vals.vfb == [] and (vals.sdl or vals.vnc):
 +        if vals.vnc:
 +            cfg = 'type=vnc'
 +            if vals.vncdisplay:

xen-pvfb-fixes.patch:
 vncfb.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

Index: xen-pvfb-fixes.patch
===================================================================
RCS file: /cvs/dist/rpms/xen/FC-5/xen-pvfb-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xen-pvfb-fixes.patch	30 Jan 2007 19:13:26 -0000	1.1
+++ xen-pvfb-fixes.patch	7 Mar 2007 17:41:23 -0000	1.2
@@ -1,82 +1,28 @@
-diff -rup a/tools/xenfb/xenfb.c b/tools/xenfb/xenfb.c
---- a/tools/xenfb/xenfb.c	2006-12-19 19:40:21.000000000 +0100
-+++ b/tools/xenfb/xenfb.c	2006-12-19 19:37:53.000000000 +0100
-@@ -378,6 +378,48 @@ static int xenfb_wait_for_frontend_initi
- 	return 0;
- }
+diff -r 37141c3a3d39 tools/xenfb/vncfb.c
+--- a/tools/xenfb/vncfb.c	Mon Dec 11 15:06:53 2006 +0000
++++ b/tools/xenfb/vncfb.c	Wed Dec 13 09:37:56 2006 +0100
+@@ -148,6 +148,10 @@ static int xk2linux[0x10000] = {
+ 	[XK_plus] = KEY_EQUAL,
+ };
  
-+static void *xenfb_map_foreign_range(int xc_handle, uint32_t dom,
-+				     int size, int prot,
-+				     unsigned long mfn)
-+{
-+	int rc;
++static int btnmap[] = {
++	BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_FORWARD, BTN_BACK
++};
 +
-+	rc = xc_domain_translate_gpfn_list(xc_handle, dom, 1, &mfn, &mfn);
-+	if (rc < 0 && errno != EINVAL)
-+		return NULL;
-+	return xc_map_foreign_range(xc_handle, dom, size, prot, mfn);
-+}
-+
-+static void *xenfb_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
-+				     xen_pfn_t *arr, int num)
-+{
-+	xen_pfn_t *buf;
-+	int rc;
-+	void *ret;
-+
-+	/* make a copy to avoid clobbering arr[] */
-+	buf = malloc(num * sizeof(*buf));
-+	if (!buf)
-+		return NULL;
-+	memcpy(buf, arr, num * sizeof(*buf));
-+
-+	rc = xc_domain_translate_gpfn_list(xc_handle, dom, num, buf, buf);
-+	if (rc < 0 && errno != EINVAL) {
-+		free(buf);
-+		return NULL;
-+	}
-+
-+	/*
-+	 * Bug alert: xc_map_foreign_batch() can fail partly and
-+	 * return a non-null value.  This is a design flaw.  When it
-+	 * happens, we happily continue here, and later crash on
-+	 * access.
-+	 */
-+	ret = xc_map_foreign_batch(xc_handle, dom, prot, buf, num);
-+	free(buf);
-+	return ret;
-+}
-+
- static int xenfb_map_fb(struct xenfb_private *xenfb, int domid)
+ static void on_kbd_event(rfbBool down, rfbKeySym keycode, rfbClientPtr cl)
  {
- 	struct xenfb_page *page = xenfb->fb.page;
-@@ -389,18 +431,12 @@ static int xenfb_map_fb(struct xenfb_pri
- 	n_fbdirs = n_fbmfns * sizeof(unsigned long);
- 	n_fbdirs = (n_fbdirs + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
- 
--	/*
--	 * Bug alert: xc_map_foreign_batch() can fail partly and
--	 * return a non-null value.  This is a design flaw.  When it
--	 * happens, we happily continue here, and later crash on
--	 * access.
--	 */
--	fbmfns = xc_map_foreign_batch(xenfb->xc, domid,
-+	fbmfns = xenfb_map_foreign_batch(xenfb->xc, domid,
- 			PROT_READ, page->pd, n_fbdirs);
- 	if (fbmfns == NULL)
- 		return -1;
- 
--	xenfb->pub.pixels = xc_map_foreign_batch(xenfb->xc, domid,
-+	xenfb->pub.pixels = xenfb_map_foreign_batch(xenfb->xc, domid,
- 				PROT_READ | PROT_WRITE, fbmfns, n_fbmfns);
- 	if (xenfb->pub.pixels == NULL) {
- 		munmap(fbmfns, n_fbdirs * XC_PAGE_SIZE);
-@@ -428,7 +464,7 @@ static int xenfb_bind(struct xenfb_devic
- 	if (dev->port == -1)
- 		return -1;
- 
--	dev->page = xc_map_foreign_range(xenfb->xc, dev->otherend_id,
-+	dev->page = xenfb_map_foreign_range(xenfb->xc, dev->otherend_id,
- 			XC_PAGE_SIZE, PROT_READ | PROT_WRITE, mfn);
- 	if (dev->page == NULL)
- 		return -1;
+ 	/*
+@@ -184,8 +188,11 @@ static void on_ptr_event(int buttonMask,
+ 		down = buttonMask & (1 << i);
+ 		if (down == last_down)
+ 			continue;
+-		/* FIXME this assumes buttons are numbered the same; verify they are */
+-		if (xenfb_send_key(xenfb, down != 0, BTN_MOUSE + i) < 0)
++		if (i >= sizeof(btnmap) / sizeof(*btnmap))
++			break;
++		if (btnmap[i] == 0)
++			break;
++		if (xenfb_send_key(xenfb, down != 0, btnmap[i]) < 0)
+ 			fprintf(stderr, "Button %d %s lost (%s)\n",
+ 				i, down ? "down" : "up", strerror(errno));
+ 	}

xen-pvfb.patch:
 Config.mk                                           |    2 
 a/linux-2.6-xen-sparse/drivers/char/tty_io.c        | 3264 --------------------
 b/linux-2.6-xen-sparse/drivers/xen/fbfront/Makefile |    2 
 b/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c  |  682 ++++
 b/linux-2.6-xen-sparse/drivers/xen/fbfront/xenkbd.c |  300 +
 b/tools/check/check_libvncserver                    |   21 
 b/tools/check/check_sdl                             |   21 
 b/tools/python/xen/xend/server/vfbif.py             |   29 
 b/tools/xenfb/Makefile                              |   35 
 b/tools/xenfb/sdlfb.c                               |  334 ++
 b/tools/xenfb/vncfb.c                               |  393 ++
 b/tools/xenfb/xenfb.c                               |  691 ++++
 b/tools/xenfb/xenfb.h                               |   34 
 b/xen/include/public/io/fbif.h                      |  116 
 b/xen/include/public/io/kbdif.h                     |  108 
 buildconfigs/linux-defconfig_xen_ia64               |    2 
 buildconfigs/linux-defconfig_xen_x86_32             |    2 
 buildconfigs/linux-defconfig_xen_x86_64             |    2 
 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c   |    5 
 linux-2.6-xen-sparse/arch/ia64/kernel/setup.c       |    4 
 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c |    7 
 linux-2.6-xen-sparse/drivers/xen/Kconfig            |   23 
 linux-2.6-xen-sparse/drivers/xen/Makefile           |    2 
 linux-2.6-xen-sparse/drivers/xen/console/console.c  |   10 
 tools/Makefile                                      |    3 
 tools/check/Makefile                                |    6 
 tools/check/check_libvncserver                      |    6 
 tools/check/check_sdl                               |    6 
 tools/python/xen/xend/XendDomainInfo.py             |   42 
 tools/python/xen/xend/image.py                      |  148 
 tools/python/xen/xend/server/vfbif.py               |  130 
 tools/python/xen/xm/create.py                       |   88 
 tools/xenfb/sdlfb.c                                 |   10 
 tools/xenfb/vncfb.c                                 |   10 
 tools/xenfb/xenfb.c                                 |   32 
 tools/xenfb/xenfb.h                                 |    1 
 36 files changed, 3140 insertions(+), 3431 deletions(-)

Index: xen-pvfb.patch
===================================================================
RCS file: /cvs/dist/rpms/xen/FC-5/xen-pvfb.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xen-pvfb.patch	30 Jan 2007 19:13:26 -0000	1.2
+++ xen-pvfb.patch	7 Mar 2007 17:41:23 -0000	1.3
@@ -346,7 +346,7 @@
               'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
 -             'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
 -             'sdl', 'display', 'xauthority',
-              'acpi', 'apic', 'usb', 'usbdevice' ]
+              'acpi', 'apic', 'usb', 'usbdevice', 'keymap' ]
      for a in args:
          if a in vals.__dict__ and vals.__dict__[a] is not None:
 @@ -742,6 +766,8 @@ def make_config(vals):
@@ -6667,7 +6667,7 @@
               'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
 +             'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
 +             'sdl', 'display', 'xauthority',
-              'acpi', 'apic', 'usb', 'usbdevice' ]
+              'acpi', 'apic', 'usb', 'usbdevice', 'keymap' ]
      for a in args:
          if a in vals.__dict__ and vals.__dict__[a] is not None:
 @@ -767,7 +772,6 @@ def make_config(vals):
@@ -7298,40 +7298,3 @@
              spawn_detached(args[0], args + std_args, env)
          else:
              raise VmError('Unknown vfb type %s (%s)' % (t, repr(config)))
-# HG changeset patch
-# User kfraser at localhost.localdomain
-# Date 1166203851 0
-# Node ID 96b047d22ad5866d66508e64aac22b99b3a5dcd2
-# Parent  1b6354023e64af6d02909ac81dfe4b5f4e930dda
-Fix pointer encoding in vncfb (middle and right button were swapped).
-
-Signed-off-by: Markus Armbruster <armbru at redhat.com>
-
-diff -r 1b6354023e64 -r 96b047d22ad5 tools/xenfb/vncfb.c
---- a/tools/xenfb/vncfb.c	Fri Dec 15 17:29:25 2006 +0000
-+++ b/tools/xenfb/vncfb.c	Fri Dec 15 17:30:51 2006 +0000
-@@ -148,6 +148,10 @@ static int xk2linux[0x10000] = {
- 	[XK_plus] = KEY_EQUAL,
- };
- 
-+static int btnmap[] = {
-+	BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_FORWARD, BTN_BACK
-+};
-+
- static void on_kbd_event(rfbBool down, rfbKeySym keycode, rfbClientPtr cl)
- {
- 	/*
-@@ -184,8 +188,11 @@ static void on_ptr_event(int buttonMask,
- 		down = buttonMask & (1 << i);
- 		if (down == last_down)
- 			continue;
--		/* FIXME this assumes buttons are numbered the same; verify they are */
--		if (xenfb_send_key(xenfb, down != 0, BTN_MOUSE + i) < 0)
-+		if (i >= sizeof(btnmap) / sizeof(*btnmap))
-+			break;
-+		if (btnmap[i] == 0)
-+			break;
-+		if (xenfb_send_key(xenfb, down != 0, btnmap[i]) < 0)
- 			fprintf(stderr, "Button %d %s lost (%s)\n",
- 				i, down ? "down" : "up", strerror(errno));
- 	}


Index: xen.spec
===================================================================
RCS file: /cvs/dist/rpms/xen/FC-5/xen.spec,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- xen.spec	30 Jan 2007 19:13:26 -0000	1.121
+++ xen.spec	7 Mar 2007 17:41:23 -0000	1.122
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.0.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -17,6 +17,7 @@
 Patch8: xen-vmxballoon-hack.patch
 Patch9: xen-logfile-O_APPEND.patch
 Patch10: xen-uptime-device.patch
+
 Patch11: xen-print-fullpath.patch
 Patch12: xen-vmxassist-load16.patch
 Patch13: xen-dumpdir.patch
@@ -27,6 +28,7 @@
 Patch18: xen-qemu-ne2000-buffer.patch
 Patch19: xen-qemu-uppercase.patch
 Patch20: xen-floppy-device.patch
+
 Patch21: xen-blktap-no-aio-epoll.patch
 Patch22: xen-blktap-2tb.patch
 Patch23: xen-qemu-error-reporting.patch
@@ -37,6 +39,7 @@
 Patch28: xen-http-dump.patch
 Patch29: xen-xendomains-clean-restore.patch
 Patch30: xen-xc-loglevel.patch
+
 Patch31: xen-memory-map.patch
 Patch32: xen-qemu-cdrom-dma.patch
 Patch33: xen-xenbus-force-option.patch
@@ -44,8 +47,17 @@
 Patch35: xen-ja-keyboard.patch
 Patch36: xen-core-2gb.patch
 Patch37: xen-vnc-domid-vm.patch
+Patch38: xen-ipv6-xenbr.patch
+Patch39: xen-shadow-enable.patch
+Patch40: xen-man-pages.patch
 
-Patch80: xen-initscript-mods.patch
+Patch42: xen-qemu-close-fds.patch
+
+Patch80: xen-destroydevice-args.patch
+Patch81: xen-hotplug-error-reporting.patch
+
+# Ignore module loading for old Dom0/DomU split kernels
+Patch85: xen-initscript-mods.patch
 
 # Patches to modify the default config of xend
 Patch100: xen-config-dom0-minmem.patch
@@ -57,10 +69,13 @@
 Patch201: xen-pvfb.patch
 Patch202: xen-pvfb-compat.patch
 Patch203: xen-pvfb-fixes.patch
+Patch204: xen-pvfb-no-hvm.patch
+Patch205: xen-pvfb-terminate.patch
 
 # patches to make VNC only listen on localhost by default / use passwords
 Patch220: xen-3.0.4-vncpassword-pvfb-backport.patch
 Patch222: xen-vncpassword-5.patch
+Patch224: xen-vncpassword-remove.patch
 
 Patch251: pygrub-manykernels.patch
 Patch252: pygrub-cosmetics.patch
@@ -113,6 +128,7 @@
 #patch8 -p1 # FIXME: need to pull this one back
 %patch9 -p1
 %patch10 -p1
+
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
@@ -126,6 +142,7 @@
 %patch19 -p1
 # virtual floppy could be a device node
 %patch20 -p1
+
 # blktap patches
 %patch21 -p1
 # fix 2TB overflow/wraparound in blktap
@@ -146,6 +163,7 @@
 %patch29 -p1
 # use log level info for messages that are not errors
 %patch30 -p1
+
 # implement memory_map hypercall to determine maximum memory for a guest
 %patch31 -p1
 # enable DMA on virtual cdrom drive
@@ -156,13 +174,28 @@
 %patch34 -p1
 # make JP106 keyboards work - disable until new PVFB patches
 # are in due to patch conflicts
-#patch35 -p1
+%patch35 -p1
 # fix core dumps of 32 bit Xen guests with >2GB memory
 %patch36 -p1
 # write the /local/domain/vm node early in the startup process
 %patch37 -p1
+# disable ipv6 autoconf on xenbr* devices
+%patch38 -p1
+# fix use of destroyDevice
+%patch39 -p1
+# Sanitize man pages
+%patch40 -p1
+
+# Close QEMU file handles when running network script
+%patch42 -p1
 
+# fix HVM cannot allocate memory bug
 %patch80 -p1
+# hotplug script error reporting
+%patch81 -p1
+
+# Ignore module loading for old Dom0/DomU split kernels
+%patch85 -p1
 
 # config patches
 %patch100 -p1
@@ -174,10 +207,13 @@
 %patch201 -p1
 %patch202 -p1
 %patch203 -p1
+%patch204 -p1
+%patch205 -p1
 
 # vnclisten/password patches
 %patch220 -p1
 %patch222 -p1
+%patch224 -p1
 
 # upstream patches
 %patch251 -p1
@@ -286,6 +322,16 @@
 %dir %attr(0700,root,root) /var/log/xen
 
 %changelog
+* Tue Mar  6 2007 Daniel P. Berrange <berrange at redhat.com> - 3.0.3-4.fc5
+- Ensure PVFB daemon terminates if domain doesn't startup (bz 230634)
+- Close QEMU file handles when running network script
+- Improve hotplug error reporting
+- Don't start PVFB daemon for HVM guests
+- disable ipv6 autoconf on xenbr* devices (rhbz#216504)
+- Fixed destroyDevice callers
+- Workaround 'Cannot allocate memory' HVM bug
+- Santize man pages
+
 * Tue Jan 30 2007 Markus Armbruster <armbru at redhat.com>
 - Update Xen paravirt framebuffer patch to upstream xen-unstable
   changeset 13066.  This changes the protocol to the one accepted




More information about the fedora-cvs-commits mailing list