|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] [Xen-devel] XEN/arm XENFB support
On Tue, 17 Dec 2013, Stefano Stabellini wrote:
> On Tue, 17 Dec 2013, peter wrote:
> > Thank you for the info/patch Ian.
> > With some modifications to Qemu, I managed to cross compile
> > qemu-system-arm with XEN support.
> > Based on version: 1c514a7734b7f98625a0d18d5e8ee7581f26e50c (Merge remote
> > branch 'perard/cpu-hotplug-port-v2' into xen-staging-master-7).
> > And got my Qemu backend working.
>
> Nice! Could you please post your patch?
Actually I have just tried it out and with the appended QEMU patch works fine.
I'll come up with a proper patch and send it upstream.
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index f0333a0..e9b1af8 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -409,7 +409,7 @@ static void input_event(struct XenDevice *xendev)
/* -------------------------------------------------------------------- */
-static void xenfb_copy_mfns(int mode, int count, unsigned long *dst, void *src)
+static void xenfb_copy_mfns(int mode, int count, xen_pfn_t *dst, void *src)
{
uint32_t *src32 = src;
uint64_t *src64 = src;
@@ -424,8 +424,8 @@ static int xenfb_map_fb(struct XenFB *xenfb)
struct xenfb_page *page = xenfb->c.page;
char *protocol = xenfb->c.xendev.protocol;
int n_fbdirs;
- unsigned long *pgmfns = NULL;
- unsigned long *fbmfns = NULL;
+ xen_pfn_t *pgmfns = NULL;
+ xen_pfn_t *fbmfns = NULL;
void *map, *pd;
int mode, ret = -1;
@@ -483,8 +483,8 @@ static int xenfb_map_fb(struct XenFB *xenfb)
n_fbdirs = xenfb->fbpages * mode / 8;
n_fbdirs = (n_fbdirs + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
- pgmfns = g_malloc0(sizeof(unsigned long) * n_fbdirs);
- fbmfns = g_malloc0(sizeof(unsigned long) * xenfb->fbpages);
+ pgmfns = g_malloc0(sizeof(xen_pfn_t) * n_fbdirs);
+ fbmfns = g_malloc0(sizeof(xen_pfn_t) * xenfb->fbpages);
xenfb_copy_mfns(mode, n_fbdirs, pgmfns, pd);
map = xc_map_foreign_pages(xen_xc, xenfb->c.xendev.dom,
diff --git a/xen-all.c b/xen-all.c
index 4a594bd..d45180d 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -381,8 +381,6 @@ static int xen_remove_from_physmap(XenIOState *state,
rc = xc_domain_add_to_physmap(xen_xc, xen_domid, XENMAPSPACE_gmfn,
idx, gpfn);
if (rc) {
- fprintf(stderr, "add_to_physmap MFN %"PRI_xen_pfn" to PFN %"
- PRI_xen_pfn" failed: %d\n", idx, gpfn, rc);
return -rc;
}
}
diff --git a/xen-mapcache.c b/xen-mapcache.c
index eda914a..baea376 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -33,13 +33,8 @@
# define DPRINTF(fmt, ...) do { } while (0)
#endif
-#if defined(__i386__)
# define MCACHE_BUCKET_SHIFT 16
# define MCACHE_MAX_SIZE (1UL<<31) /* 2GB Cap */
-#elif defined(__x86_64__)
-# define MCACHE_BUCKET_SHIFT 20
-# define MCACHE_MAX_SIZE (1UL<<35) /* 32GB Cap */
-#endif
#define MCACHE_BUCKET_SIZE (1UL << MCACHE_BUCKET_SHIFT)
/* This is the size of the virtual address space reserve to QEMU that will not
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |