Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 144287 Details for
Bug 216169
vncfb does not run on IA64
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch posted to virtualist on 12/19
ia64-pvfb.patch (text/plain), 5.84 KB, created by
Chris Lalancette
on 2006-12-22 15:15:10 UTC
(
hide
)
Description:
Patch posted to virtualist on 12/19
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2006-12-22 15:15:10 UTC
Size:
5.84 KB
patch
obsolete
>Return-Path: <virtualist-admin@redhat.com> >Received: from pobox.corp.redhat.com ([unix socket]) > by pobox.corp.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1) with LMTPA; > Tue, 19 Dec 2006 16:41:07 -0500 >X-Sieve: CMU Sieve 2.2 >Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) > by pobox.corp.redhat.com (8.13.1/8.12.8) with ESMTP id kBJLf67Y006380; > Tue, 19 Dec 2006 16:41:06 -0500 >Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [172.16.52.227]) > by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kBJLf2sS013346; > Tue, 19 Dec 2006 16:41:02 -0500 >Received: from post-office.corp.redhat.com (localhost.localdomain [127.0.0.1]) > by post-office.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id kBJLf2PI013742; > Tue, 19 Dec 2006 16:41:02 -0500 >Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) > by post-office.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id kBJLe5fx013554 > for <virtualist@post-office.corp.redhat.com>; Tue, 19 Dec 2006 16:40:05 -0500 >Received: from pike.pond.sub.org (vpn-4-11.str.redhat.com [10.32.4.11]) > by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kBJLe4Rs013020 > for <virtualist@redhat.com>; Tue, 19 Dec 2006 16:40:04 -0500 >Received: by pike.pond.sub.org (Postfix, from userid 1000) > id 368596769B; Tue, 19 Dec 2006 22:40:04 +0100 (CET) >To: virtualist@redhat.com >Subject: [PATCH RHEL5] BZ 216169: vncfb does not run on IA64 >From: Markus Armbruster <armbru@redhat.com> >Message-ID: <87irg7muob.fsf@pike.pond.sub.org> >User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) >MIME-Version: 1.0 >Content-Type: text/plain; charset=us-ascii >X-loop: virtualist@redhat.com >Sender: virtualist-admin@redhat.com >Errors-To: virtualist-admin@redhat.com >X-BeenThere: virtualist@redhat.com >X-Mailman-Version: 2.0.13 >Precedence: bulk >Reply-To: virtualist@redhat.com >List-Help: <mailto:virtualist-request@redhat.com?subject=help> >List-Post: <mailto:virtualist@redhat.com> >List-Subscribe: <http://post-office.corp.redhat.com/mailman/listinfo/virtualist>, > <mailto:virtualist-request@redhat.com?subject=subscribe> >List-Id: Virtualisation and Resource Management <virtualist.redhat.com> >List-Unsubscribe: <http://post-office.corp.redhat.com/mailman/listinfo/virtualist>, > <mailto:virtualist-request@redhat.com?subject=unsubscribe> >List-Archive: <http://post-office.corp.redhat.com/archives/virtualist/> >Date: Tue, 19 Dec 2006 22:40:04 +0100 > >The new pvfb works on IA-64 in xen-unstable. The backport to RHEL-5 >doesn't. That's because xen-unstable has more general functions >xc_map_foreign_range() and xc_map_foreign_batch() in libxc. The >actual smarts of that change are buried in the privcmd device driver >and/or the hypervisor. Backporting improvements there to fix this bug >seems way too risky to me. I didn't bother to track them down. > >Instead, I'm proposing to put the smarts into the vfb backend. > >The appended patch tries to filter mfns through >xc_domain_translate_gpfn_list() before feeding them to >xc_map_foreign_FOO(). If the guest is in shadow translate mode (the >case that's broken right now), xc_domain_translate_gpfn_list() >translates them. Else, it fails with EINVAL, leaving the mfns alone. > >Scratch rpms are at /mnt/redhat/brewroot/scratch/armbru/task_477555 >Jarod Wilson reports they fix IA-64 and is verifying that they don't >break x86_64. > >Please ACK. > > >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; > } > >+static void *xenfb_map_foreign_range(int xc_handle, uint32_t dom, >+ int size, int prot, >+ unsigned long mfn) >+{ >+ int rc; >+ >+ 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) > { > 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; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216169
: 144287 |
144308