rpms/xen/F-7 xen-pvfb-compat-32-on-64.patch, 1.1, 1.2 xen.spec, 1.184, 1.185
Daniel P. Berrange (berrange)
fedora-extras-commits at redhat.com
Tue Sep 25 04:57:09 UTC 2007
- Previous message (by thread): rpms/firefox/devel firefox.spec, 1.198, 1.199 firefox-1.0-system-nspr-ldap.patch, 1.1, NONE firefox-1.1-nss-system-nspr.patch, 1.2, NONE firefox-1.5-with-system-nss.patch, 1.1, NONE firefox-2.0-visibility.patch, 1.3, NONE firefox-RC1-stock-icons-be.patch, 1.1, NONE firefox-RC1-stock-icons-fe.patch, 1.1, NONE firefox-RC1-stock-icons-gnomestripe.patch, 1.1, NONE firefox-gnomestripe-0.1-livemarks.patch, 1.1, NONE
- Next message (by thread): rpms/xen/devel xen-pvfb-04-compat.patch,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: berrange
Update of /cvs/pkgs/rpms/xen/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20593
Modified Files:
xen-pvfb-compat-32-on-64.patch xen.spec
Log Message:
Really fix 32-on-64 FC6 guests this time
xen-pvfb-compat-32-on-64.patch:
Index: xen-pvfb-compat-32-on-64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xen/F-7/xen-pvfb-compat-32-on-64.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xen-pvfb-compat-32-on-64.patch 25 Sep 2007 00:18:20 -0000 1.1
+++ xen-pvfb-compat-32-on-64.patch 25 Sep 2007 04:57:02 -0000 1.2
@@ -1,6 +1,6 @@
-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
+diff -ruNp xen-3.1.0-src.orig/tools/xenfb/oldxenfb.c xen-3.1.0-src.new/tools/xenfb/oldxenfb.c
+--- xen-3.1.0-src.orig/tools/xenfb/oldxenfb.c 2007-09-25 00:40:35.000000000 -0400
++++ xen-3.1.0-src.new/tools/xenfb/oldxenfb.c 2007-09-25 00:45:47.000000000 -0400
@@ -7,9 +7,9 @@
#include <xen/io/xenbus.h>
#include "oldxenfb.h"
@@ -90,10 +90,10 @@
- }
+ if (xenfb->pub.pixels == NULL)
+ goto out;
-+
-+ ret = 0; /* all is fine */
- return munmap(fbmfns, n_fbdirs * XC_PAGE_SIZE);
++ ret = 0; /* all is fine */
++
+ out:
+ if (pgmfns)
+ free(pgmfns);
@@ -123,3 +123,163 @@
/* TODO check for permitted ranges */
fb_page = xenfb->fb.page;
xenfb->pub.depth = fb_page->depth;
+@@ -430,10 +470,10 @@ static void xenfb_detach_dom(struct xenf
+ }
+ }
+
+-static void xenfb_on_fb_event(struct xenfb_private *xenfb)
++static void xenfb_on_fb_event32(struct xenfb_private *xenfb)
+ {
+ uint32_t prod, cons;
+- struct xenfb_page *page = xenfb->fb.page;
++ struct xenfb_page32 *page = xenfb->fb.page;
+
+ prod = page->out_prod;
+ if (prod == page->out_cons)
+@@ -456,6 +496,50 @@ static void xenfb_on_fb_event(struct xen
+ xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port);
+ }
+
++static void xenfb_on_fb_event64(struct xenfb_private *xenfb)
++{
++ uint32_t prod, cons;
++ struct xenfb_page64 *page = xenfb->fb.page;
++
++ prod = page->out_prod;
++ if (prod == page->out_cons)
++ return;
++ rmb(); /* ensure we see ring contents up to prod */
++ for (cons = page->out_cons; cons != prod; cons++) {
++ union xenfb_out_event *event = &XENFB_OUT_RING_REF(page, cons);
++
++ switch (event->type) {
++ case XENFB_TYPE_UPDATE:
++ if (xenfb->pub.update)
++ xenfb->pub.update(&xenfb->pub,
++ event->update.x, event->update.y,
++ event->update.width, event->update.height);
++ break;
++ }
++ }
++ mb(); /* ensure we're done with ring contents */
++ page->out_cons = cons;
++ xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port);
++}
++
++static void xenfb_on_fb_event(struct xenfb_private *xenfb)
++{
++ int mode;
++ 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;
++
++ if (mode == 32)
++ xenfb_on_fb_event32(xenfb);
++ else
++ xenfb_on_fb_event64(xenfb);
++}
++
+ static void xenfb_on_kbd_event(struct xenfb_private *xenfb)
+ {
+ struct xenkbd_info *page = xenfb->kbd.page;
+@@ -541,11 +625,11 @@ int xenfb_select_fds(struct xenfb *xenfb
+ return fd1 > fd2 ? fd1 + 1 : fd2 + 1;
+ }
+
+-static int xenfb_fb_event(struct xenfb_private *xenfb,
+- union xenfb_in_event *event)
++static int xenfb_fb_event32(struct xenfb_private *xenfb,
++ union xenfb_in_event *event)
+ {
+ uint32_t prod;
+- struct xenfb_page *page = xenfb->fb.page;
++ struct xenfb_page32 *page = xenfb->fb.page;
+
+ prod = page->in_prod;
+ if (prod - page->in_cons == XENFB_IN_RING_LEN) {
+@@ -560,6 +644,44 @@ static int xenfb_fb_event(struct xenfb_p
+ return xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port);
+ }
+
++static int xenfb_fb_event64(struct xenfb_private *xenfb,
++ union xenfb_in_event *event)
++{
++ uint32_t prod;
++ struct xenfb_page64 *page = xenfb->fb.page;
++
++ prod = page->in_prod;
++ if (prod - page->in_cons == XENFB_IN_RING_LEN) {
++ errno = EAGAIN;
++ return -1;
++ }
++
++ mb(); /* ensure ring space available */
++ XENFB_IN_RING_REF(page, prod) = *event;
++ wmb(); /* ensure ring contents visible */
++ page->in_prod = prod + 1;
++ return xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port);
++}
++
++static int xenfb_fb_event(struct xenfb_private *xenfb,
++ union xenfb_in_event *event)
++{
++ int mode;
++ 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;
++
++ if (mode == 32)
++ return xenfb_fb_event32(xenfb, event);
++ else
++ return xenfb_fb_event64(xenfb, event);
++}
++
+ static int xenfb_kbd_event(struct xenfb_private *xenfb,
+ union xenkbd_in_event *event)
+ {
+diff -ruNp xen-3.1.0-src.orig/tools/xenfb/oldxenfb.h xen-3.1.0-src.new/tools/xenfb/oldxenfb.h
+--- xen-3.1.0-src.orig/tools/xenfb/oldxenfb.h 2007-09-25 00:40:35.000000000 -0400
++++ xen-3.1.0-src.new/tools/xenfb/oldxenfb.h 2007-09-25 00:38:30.000000000 -0400
+@@ -98,6 +98,32 @@ struct xenfb_page
+
+ unsigned long pd[2]; /* FIXME rename to pgdir? */
+ /* FIXME pd[1] unused at this time, shrink? */
++};
++struct xenfb_page32
++{
++ __u16 width; /* the width of the framebuffer (in pixels) */
++ __u16 height; /* the height of the framebuffer (in pixels) */
++ __u32 line_length; /* the length of a row of pixels (in bytes) */
++ __u32 mem_length; /* the length of the framebuffer (in bytes) */
++ __u8 depth; /* the depth of a pixel (in bits) */
++
++ __u32 pd[2]; /* FIXME rename to pgdir? */
++ /* FIXME pd[1] unused at this time, shrink? */
++
++ __u32 in_cons, in_prod;
++ __u32 out_cons, out_prod;
++};
++
++struct xenfb_page64
++{
++ __u16 width; /* the width of the framebuffer (in pixels) */
++ __u16 height; /* the height of the framebuffer (in pixels) */
++ __u32 line_length; /* the length of a row of pixels (in bytes) */
++ __u32 mem_length; /* the length of the framebuffer (in bytes) */
++ __u8 depth; /* the depth of a pixel (in bits) */
++
++ __u64 pd[2]; /* FIXME rename to pgdir? */
++ /* FIXME pd[1] unused at this time, shrink? */
+
+ __u32 in_cons, in_prod;
+ __u32 out_cons, out_prod;
Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/F-7/xen.spec,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- xen.spec 25 Sep 2007 00:18:20 -0000 1.184
+++ xen.spec 25 Sep 2007 04:57:02 -0000 1.185
@@ -282,6 +282,7 @@
%changelog
* Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-5.fc7
- Fix generation of manual pages (rhbz #250791)
+- Fix 32-on-64 PVFB for FC6 legacy guests
* Mon Sep 24 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-4.fc7
- Fix VMX assist IRQ handling (rhbz #279581)
- Previous message (by thread): rpms/firefox/devel firefox.spec, 1.198, 1.199 firefox-1.0-system-nspr-ldap.patch, 1.1, NONE firefox-1.1-nss-system-nspr.patch, 1.2, NONE firefox-1.5-with-system-nss.patch, 1.1, NONE firefox-2.0-visibility.patch, 1.3, NONE firefox-RC1-stock-icons-be.patch, 1.1, NONE firefox-RC1-stock-icons-fe.patch, 1.1, NONE firefox-RC1-stock-icons-gnomestripe.patch, 1.1, NONE firefox-gnomestripe-0.1-livemarks.patch, 1.1, NONE
- Next message (by thread): rpms/xen/devel xen-pvfb-04-compat.patch,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list