rpms/xen/F-7 xen-3.1.0-no-xenapi-docs.patch, NONE, 1.1 xen-pvfb-compat-32-on-64.patch, NONE, 1.1 xen.spec, 1.183, 1.184

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Tue Sep 25 00:18:53 UTC 2007


Author: berrange

Update of /cvs/pkgs/rpms/xen/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17301

Modified Files:
	xen.spec 
Added Files:
	xen-3.1.0-no-xenapi-docs.patch xen-pvfb-compat-32-on-64.patch 
Log Message:
Added patch for FC6 32-on-64 compat. Fixed man page build

xen-3.1.0-no-xenapi-docs.patch:

--- NEW FILE xen-3.1.0-no-xenapi-docs.patch ---
diff -rup xen-3.1.0-src/docs/Makefile xen-3.1.0-src.new/docs/Makefile
--- xen-3.1.0-src/docs/Makefile	2007-05-18 10:45:21.000000000 -0400
+++ xen-3.1.0-src.new/docs/Makefile	2007-06-14 16:29:21.000000000 -0400
@@ -22,9 +22,6 @@ all: build
 
 .PHONY: build
 build: ps pdf html man-pages
-	@if which $(DOT) 1>/dev/null 2>/dev/null ; then              \
-	$(MAKE) -C xen-api build ; else                              \
-        echo "Graphviz (dot) not installed; skipping xen-api." ; fi
 	rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
 
 .PHONY: dev-docs
@@ -67,7 +64,6 @@ man5/%.5: man/%.pod.5 Makefile
 
 .PHONY: clean
 clean:
-	$(MAKE) -C xen-api clean
 	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
 	rm -rf *.ilg *.log *.ind *.toc *.bak core
 	rm -rf $(GFX) ps pdf html
@@ -83,8 +79,6 @@ install: all
 	rm -rf $(DESTDIR)$(pkgdocdir)
 	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
 
-	$(MAKE) -C xen-api install
-
 	cp -dR ps $(DESTDIR)$(pkgdocdir)
 	cp -dR pdf $(DESTDIR)$(pkgdocdir)
 	$(INSTALL_DIR) $(DESTDIR)$(mandir)
Only in xen-3.1.0-src.new/docs: Makefile~

xen-pvfb-compat-32-on-64.patch:

--- NEW FILE xen-pvfb-compat-32-on-64.patch ---
diff -rup --exclude '*~' xen-3.1.0-src/tools/xenfb/oldxenfb.c xen-3.1.0-hacked/tools/xenfb/oldxenfb.c
--- xen-3.1.0-src/tools/xenfb/oldxenfb.c	2007-07-24 10:12:10.000000000 +0200
+++ xen-3.1.0-hacked/tools/xenfb/oldxenfb.c	2007-07-24 20:29:47.000000000 +0200
@@ -7,9 +7,9 @@
 #include <xen/io/xenbus.h>
 #include "oldxenfb.h"
 #include "oldxenkbd.h"
+#include <xen/io/protocols.h>
 #include <sys/select.h>
 #include <stdbool.h>
-#include <xen/linux/evtchn.h>
 #include <xen/event_channel.h>
 #include <sys/mman.h>
 #include <errno.h>
@@ -40,6 +40,7 @@ struct xenfb_private {
 	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 xenfb_detach_dom(struct xenfb_private *);
@@ -243,36 +244,71 @@ int xenfb_switch_to_old_protocol(char **
 	abort();
 }
 
+static void xenfb_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 xenfb_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;
+	xenfb_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;
+	xenfb_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;
-	}
+	if (xenfb->pub.pixels == NULL)
+		goto out;
+
+	ret = 0; /* all is fine */
 
-	return munmap(fbmfns, n_fbdirs * XC_PAGE_SIZE);
+ out:
+	if (pgmfns)
+		free(pgmfns);
+	if (fbmfns)
+		free(fbmfns);
+	return ret;
 }
 
 static int xenfb_bind(struct xenfb_device *dev)
@@ -373,7 +409,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 serrno;
 	struct xenfb_page *fb_page;
 	union xenfb_in_event event;
 
@@ -392,6 +428,10 @@ int xenfb_attach_dom(struct xenfb *xenfb
 	if (xenfb_bind(&xenfb->kbd) < 0)
 		goto error;
 
+	if (xenfb_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;


Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/F-7/xen.spec,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- xen.spec	24 Sep 2007 21:53:37 -0000	1.183
+++ xen.spec	25 Sep 2007 00:18:20 -0000	1.184
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.1.0
-Release: 4%{dist}
+Release: 5%{dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -26,6 +26,7 @@
 Patch30: xen-3.1.0-dev-native-protocol.patch
 Patch32: xen-clobber-vif-type.patch
 Patch33: xen-vmxassist-irqs.patch
+Patch34: xen-3.1.0-no-xenapi-docs.patch
 
 # Patches to modify the default config of xend
 Patch100: xen-config-dom0-minmem.patch
@@ -37,6 +38,7 @@
 Patch150: xen-pvfb-compat.patch
 Patch151: xen-pvfb-terminate.patch
 Patch152: xen-pvfb-no-hvm.patch
+Patch153: xen-pvfb-compat-32-on-64.patch
 
 Patch251: pygrub-manykernels.patch
 
@@ -128,6 +130,7 @@
 
 %patch32 -p1
 %patch33 -p1
+%patch34 -p1
 
 # config patches
 %patch100 -p1
@@ -138,6 +141,7 @@
 %patch150 -p1
 %patch151 -p1
 %patch152 -p1
+%patch153 -p1
 
 # upstream patches
 %patch251 -p1
@@ -276,6 +280,9 @@
 %{_libdir}/*.a
 
 %changelog
+* Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-5.fc7
+- Fix generation of manual pages (rhbz #250791)
+
 * Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-4.fc7
 - Fix VMX assist IRQ handling (rhbz #279581)
 




More information about the fedora-extras-commits mailing list