rpms/xen/devel xen-pvfb-04-compat.patch, 1.1, 1.2 xen.spec, 1.186, 1.187
Daniel P. Berrange (berrange)
fedora-extras-commits at redhat.com
Mon Sep 24 23:09:57 UTC 2007
- Previous message (by thread): rpms/phpTodo/F-7 phpTodo-0.8.1beta.patch, NONE, 1.1 phpTodo.httpd.conf, NONE, 1.1 phpTodo.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Time-Duration/F-7 perl-Time-Duration.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: berrange
Update of /cvs/pkgs/rpms/xen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8166
Modified Files:
xen-pvfb-04-compat.patch xen.spec
Log Message:
Make 32-bit FC6 guests work on 64-bit host
xen-pvfb-04-compat.patch:
Index: xen-pvfb-04-compat.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen-pvfb-04-compat.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xen-pvfb-04-compat.patch 24 Sep 2007 20:51:43 -0000 1.1
+++ xen-pvfb-04-compat.patch 24 Sep 2007 23:09:22 -0000 1.2
@@ -1,7 +1,7 @@
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.c xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.c
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.c xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.c
--- xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.c 1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.c 2007-09-24 13:46:13.000000000 -0400
-@@ -0,0 +1,569 @@
++++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.c 2007-09-24 18:51:06.000000000 -0400
+@@ -0,0 +1,610 @@
+#include <stdarg.h>
+#include <stdlib.h>
+#include <sys/types.h>
@@ -9,6 +9,7 @@
+#include <unistd.h>
+#include <xenctrl.h>
+#include <xen/io/xenbus.h>
++#include <xen/io/protocols.h>
+#include <sys/select.h>
+#include <stdbool.h>
+#include <xen/linux/evtchn.h>
@@ -49,6 +50,7 @@
+ struct xs_handle *xsh; /* xs daemon handle */
+ struct xenfb_device fb, kbd;
+ size_t fb_len; /* size of framebuffer */
++ char protocol[64]; /* frontend protocol */
+};
+
+static void oldxenfb_detach_dom(struct xenfb_private *);
@@ -179,37 +181,72 @@
+ return 0;
+}
+
++static void oldxenfb_copy_mfns(int mode, int count, unsigned long *dst, void *src)
++{
++ uint32_t *src32 = src;
++ uint64_t *src64 = src;
++ int i;
++
++ for (i = 0; i < count; i++)
++ dst[i] = (mode == 32) ? src32[i] : src64[i];
++}
+
+static int oldxenfb_map_fb(struct xenfb_private *xenfb, int domid)
+{
+ struct xenfb_page *page = xenfb->fb.page;
+ int n_fbmfns;
+ int n_fbdirs;
-+ unsigned long *fbmfns;
++ unsigned long *pgmfns = NULL;
++ unsigned long *fbmfns = NULL;
++ void *map;
++ int mode, ret = -1;
++
++ if (0 == strcmp(xenfb->protocol, XEN_IO_PROTO_ABI_NATIVE))
++ mode = sizeof(unsigned long) * 8;
++ else if (0 == strcmp(xenfb->protocol, XEN_IO_PROTO_ABI_X86_32))
++ mode = 32;
++ else if (0 == strcmp(xenfb->protocol, XEN_IO_PROTO_ABI_X86_64))
++ mode = 64;
++ else
++ return -1;
+
+ n_fbmfns = (xenfb->fb_len + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
-+ n_fbdirs = n_fbmfns * sizeof(unsigned long);
++ n_fbdirs = n_fbmfns * mode / 8;
+ n_fbdirs = (n_fbdirs + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
+
++ pgmfns = malloc(sizeof(unsigned long) * n_fbdirs);
++ fbmfns = malloc(sizeof(unsigned long) * n_fbmfns);
++ if (!pgmfns || !fbmfns)
++ goto out;
++
+ /*
+ * 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,
-+ PROT_READ, page->pd, n_fbdirs);
-+ if (fbmfns == NULL)
-+ return -1;
++ oldxenfb_copy_mfns(mode, n_fbdirs, pgmfns, page->pd);
++ map = xc_map_foreign_batch(xenfb->xc, domid,
++ PROT_READ, pgmfns, n_fbdirs);
++ if (map == NULL)
++ goto out;
++ oldxenfb_copy_mfns(mode, n_fbmfns, fbmfns, map);
++ munmap(map, n_fbdirs * XC_PAGE_SIZE);
+
+ xenfb->pub.pixels = xc_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);
-+ return -1;
++ goto out;
+ }
+
-+ return munmap(fbmfns, n_fbdirs * XC_PAGE_SIZE);
++ ret = 0; /* all is fine */
++
++ out:
++ if (pgmfns)
++ free(pgmfns);
++ if (fbmfns)
++ free(fbmfns);
++ return ret;
+}
+
+static int oldxenfb_bind(struct xenfb_device *dev)
@@ -319,6 +356,10 @@
+ if (oldxenfb_bind(&xenfb->kbd) < 0)
+ goto error;
+
++ if (oldxenfb_xs_scanf1(xsh, xenfb->fb.otherend, "protocol", "%63s",
++ xenfb->protocol) < 0)
++ xenfb->protocol[0] = '\0';
++
+ /* TODO check for permitted ranges */
+ fb_page = xenfb->fb.page;
+ xenfb->pub.depth = fb_page->depth;
@@ -571,9 +612,9 @@
+ xs_unwatch(xsh, p, "");
+ return ret;
+}
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.h xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.h
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.h xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.h
--- xen-3.1.0-src.orig/tools/ioemu/hw/oldxenfb.h 1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.h 2007-09-24 13:47:01.000000000 -0400
++++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenfb.h 2007-09-24 18:50:44.000000000 -0400
@@ -0,0 +1,106 @@
+/*
+ * linux/include/linux/xenfb.h -- Xen virtual frame buffer device
@@ -681,9 +722,9 @@
+};
+
+#endif
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/hw/oldxenkbd.h xen-3.1.0-src.new/tools/ioemu/hw/oldxenkbd.h
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/hw/oldxenkbd.h xen-3.1.0-src.new/tools/ioemu/hw/oldxenkbd.h
--- xen-3.1.0-src.orig/tools/ioemu/hw/oldxenkbd.h 1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenkbd.h 2007-09-24 13:47:01.000000000 -0400
++++ xen-3.1.0-src.new/tools/ioemu/hw/oldxenkbd.h 2007-09-24 18:50:44.000000000 -0400
@@ -0,0 +1,92 @@
+/*
+ * linux/include/linux/xenkbd.h -- Xen virtual keyboard/mouse
@@ -777,9 +818,9 @@
+void xenkbd_resume(void);
+
+#endif
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.c xen-3.1.0-src.new/tools/ioemu/hw/xenfb.c
---- xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.c 2007-09-24 13:42:20.000000000 -0400
-+++ xen-3.1.0-src.new/tools/ioemu/hw/xenfb.c 2007-09-24 13:44:38.000000000 -0400
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.c xen-3.1.0-src.new/tools/ioemu/hw/xenfb.c
+--- xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.c 2007-09-24 18:42:25.000000000 -0400
++++ xen-3.1.0-src.new/tools/ioemu/hw/xenfb.c 2007-09-24 18:50:44.000000000 -0400
@@ -41,6 +41,7 @@ struct xenfb_private {
struct xenfb_device fb, kbd;
size_t fb_len; /* size of framebuffer */
@@ -855,9 +896,9 @@
memset(&event, 0, XENKBD_IN_EVENT_SIZE);
event.type = XENKBD_TYPE_POS;
event.pos.abs_x = abs_x;
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.h xen-3.1.0-src.new/tools/ioemu/hw/xenfb.h
---- xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.h 2007-09-24 13:42:20.000000000 -0400
-+++ xen-3.1.0-src.new/tools/ioemu/hw/xenfb.h 2007-09-24 13:47:37.000000000 -0400
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.h xen-3.1.0-src.new/tools/ioemu/hw/xenfb.h
+--- xen-3.1.0-src.orig/tools/ioemu/hw/xenfb.h 2007-09-24 18:42:25.000000000 -0400
++++ xen-3.1.0-src.new/tools/ioemu/hw/xenfb.h 2007-09-24 18:50:44.000000000 -0400
@@ -36,4 +36,18 @@ int xenfb_send_key(struct xenfb *xenfb,
int xenfb_send_motion(struct xenfb *xenfb, int rel_x, int rel_y);
int xenfb_send_position(struct xenfb *xenfb, int abs_x, int abs_y);
@@ -877,10 +918,10 @@
+
+
#endif
-diff -rupN xen-3.1.0-src.orig/tools/ioemu/Makefile.target xen-3.1.0-src.new/tools/ioemu/Makefile.target
---- xen-3.1.0-src.orig/tools/ioemu/Makefile.target 2007-09-24 13:42:20.000000000 -0400
-+++ xen-3.1.0-src.new/tools/ioemu/Makefile.target 2007-09-24 13:48:04.000000000 -0400
-@@ -371,7 +376,7 @@ VL_OBJS+= xenstore.o
+diff -ruNp xen-3.1.0-src.orig/tools/ioemu/Makefile.target xen-3.1.0-src.new/tools/ioemu/Makefile.target
+--- xen-3.1.0-src.orig/tools/ioemu/Makefile.target 2007-09-24 18:42:25.000000000 -0400
++++ xen-3.1.0-src.new/tools/ioemu/Makefile.target 2007-09-24 18:50:44.000000000 -0400
+@@ -371,7 +371,7 @@ VL_OBJS+= xenstore.o
VL_OBJS+= xen_platform.o
VL_OBJS+= xen_machine_fv.o
VL_OBJS+= xen_machine_pv.o
@@ -889,10 +930,10 @@
VL_OBJS+= tpm_tis.o
DEFINES += -DHAS_AUDIO
endif
-diff -rupN xen-3.1.0-src.orig/tools/python/xen/xend/server/vfbif.py xen-3.1.0-src.new/tools/python/xen/xend/server/vfbif.py
---- xen-3.1.0-src.orig/tools/python/xen/xend/server/vfbif.py 2007-09-24 13:42:20.000000000 -0400
-+++ xen-3.1.0-src.new/tools/python/xen/xend/server/vfbif.py 2007-09-24 13:48:59.000000000 -0400
-@@ -53,7 +53,11 @@ class VfbifController(DevController):
+diff -ruNp xen-3.1.0-src.orig/tools/python/xen/xend/server/vfbif.py xen-3.1.0-src.new/tools/python/xen/xend/server/vfbif.py
+--- xen-3.1.0-src.orig/tools/python/xen/xend/server/vfbif.py 2007-09-24 18:42:25.000000000 -0400
++++ xen-3.1.0-src.new/tools/python/xen/xend/server/vfbif.py 2007-09-24 18:50:44.000000000 -0400
+@@ -50,7 +50,11 @@ class VfbifController(DevController):
if self.vm.info.is_hvm():
# is HVM, so qemu-dm will handle the vfb.
return
@@ -905,10 +946,10 @@
args = [ xen.util.auxbin.pathTo("qemu-dm"),
"-M", "xenpv",
"-d", "%d" % self.vm.getDomid(),
-diff -rupN xen-3.1.0-src.orig/tools/python/xen/xend/XendConfig.py xen-3.1.0-src.new/tools/python/xen/xend/XendConfig.py
---- xen-3.1.0-src.orig/tools/python/xen/xend/XendConfig.py 2007-09-24 13:42:20.000000000 -0400
-+++ xen-3.1.0-src.new/tools/python/xen/xend/XendConfig.py 2007-09-24 13:49:27.000000000 -0400
-@@ -690,7 +690,7 @@ class XendConfig(dict):
+diff -ruNp xen-3.1.0-src.orig/tools/python/xen/xend/XendConfig.py xen-3.1.0-src.new/tools/python/xen/xend/XendConfig.py
+--- xen-3.1.0-src.orig/tools/python/xen/xend/XendConfig.py 2007-05-18 10:45:21.000000000 -0400
++++ xen-3.1.0-src.new/tools/python/xen/xend/XendConfig.py 2007-09-24 18:50:44.000000000 -0400
+@@ -689,7 +689,7 @@ class XendConfig(dict):
self['vtpm_refs'] = cfg.get('vtpm_refs', [])
# coalesce hvm vnc frame buffer with vfb config
@@ -917,7 +958,7 @@
# add vfb device if it isn't there already
has_rfb = False
for console_uuid in self['console_refs']:
-@@ -705,7 +705,7 @@ class XendConfig(dict):
+@@ -704,7 +704,7 @@ class XendConfig(dict):
dev_config = ['vfb']
# copy VNC related params from platform config to vfb dev conf
for key in ['vncpasswd', 'vncunused', 'vncdisplay',
@@ -926,9 +967,9 @@
if key in self['platform']:
dev_config.append([key, self['platform'][key]])
-diff -rupN xen-3.1.0-src.orig/tools/python/xen/xm/create.py xen-3.1.0-src.new/tools/python/xen/xm/create.py
+diff -ruNp xen-3.1.0-src.orig/tools/python/xen/xm/create.py xen-3.1.0-src.new/tools/python/xen/xm/create.py
--- xen-3.1.0-src.orig/tools/python/xen/xm/create.py 2007-05-18 10:45:21.000000000 -0400
-+++ xen-3.1.0-src.new/tools/python/xen/xm/create.py 2007-09-24 13:49:55.000000000 -0400
++++ xen-3.1.0-src.new/tools/python/xen/xm/create.py 2007-09-24 18:50:44.000000000 -0400
@@ -610,7 +610,7 @@ def configure_vfbs(config_devs, vals):
d['type'] = 'sdl'
for (k,v) in d.iteritems():
Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen.spec,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -r1.186 -r1.187
--- xen.spec 24 Sep 2007 21:55:52 -0000 1.186
+++ xen.spec 24 Sep 2007 23:09:22 -0000 1.187
@@ -3,7 +3,7 @@
Summary: Xen is a virtual machine monitor
Name: xen
Version: 3.1.0
-Release: 7%{?dist}
+Release: 8%{?dist}
Group: Development/Libraries
License: GPL
URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -276,6 +276,9 @@
%{_libdir}/*.a
%changelog
+* Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-8.fc8
+- Make 32-bit FC-6 guest PVFB work on x86_64 host
+
* Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-7.fc8
- Re-add support for back-compat FC6 PVFB support
- Fix handling of explicit port numbers (rhbz #279581)
- Previous message (by thread): rpms/phpTodo/F-7 phpTodo-0.8.1beta.patch, NONE, 1.1 phpTodo.httpd.conf, NONE, 1.1 phpTodo.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Time-Duration/F-7 perl-Time-Duration.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list