From: Gerd Hoffmann Subject: Re: 32-on-64: pvfb issue Date: Wed, 24 Jan 2007 16:25:54 +0100 Message-ID: <45B77A82.5040307@suse.de> References: <45B60548.4060003@suse.de> <45B741B7.1080306@suse.de> <87sle0obnw.fsf@pike.pond.sub.org> <45B75343.1090409@suse.de> <87odooo645.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010904000804070800080901" Return-path: In-Reply-To: <87odooo645.fsf@pike.pond.sub.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Markus Armbruster Cc: Xen devel list , Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------010904000804070800080901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > Reading it next to reading feature-update would be much cleaner. Done, updated patch attached. cheers, Gerd -- Gerd Hoffmann --------------010904000804070800080901 Content-Type: text/x-patch; name="fbback-bimodal-fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fbback-bimodal-fix.diff" --- tools/xenfb/xenfb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: build-32-unstable-13568/tools/xenfb/xenfb.c =================================================================== --- build-32-unstable-13568.orig/tools/xenfb/xenfb.c +++ build-32-unstable-13568/tools/xenfb/xenfb.c @@ -362,12 +362,12 @@ static int xenfb_map_fb(struct xenfb_pri */ uint32_t *ptr32 = NULL; uint32_t *ptr64 = NULL; -#if defined(__i386_) - ptr32 = page->pd; +#if defined(__i386__) + ptr32 = (void*)page->pd; ptr64 = ((void*)page->pd) + 4; #elif defined(__x86_64__) ptr32 = ((void*)page->pd) - 4; - ptr64 = page->pd; + ptr64 = (void*)page->pd; #endif if (ptr32) { if (0 == ptr32[1]) { @@ -383,7 +383,7 @@ static int xenfb_map_fb(struct xenfb_pri /* 64bit dom0, 32bit domU */ mode = 32; pd = ((void*)page->pd) - 4; -#elif defined(__i386_) +#elif defined(__i386__) } else if (0 == strcmp(xenfb->protocol, XEN_IO_PROTO_ABI_X86_64)) { /* 32bit dom0, 64bit domU */ mode = 64; @@ -441,9 +441,6 @@ static int xenfb_bind(struct xenfb_devic if (xenfb_xs_scanf1(xenfb->xsh, dev->otherend, "event-channel", "%u", &evtchn) < 0) return -1; - if (xenfb_xs_scanf1(xenfb->xsh, dev->otherend, "protocol", "%63s", - xenfb->protocol) < 0) - xenfb->protocol[0] = '\0'; dev->port = xc_evtchn_bind_interdomain(xenfb->evt_xch, dev->otherend_id, evtchn); @@ -567,6 +564,9 @@ int xenfb_attach_dom(struct xenfb *xenfb errno = ENOTSUP; goto error; } + if (xenfb_xs_scanf1(xsh, xenfb->fb.otherend, "protocol", "%63s", + xenfb->protocol) < 0) + xenfb->protocol[0] = '\0'; xenfb_xs_printf(xsh, xenfb->fb.nodename, "request-update", "1"); /* TODO check for permitted ranges */ --------------010904000804070800080901 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------010904000804070800080901--