qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] xen: build on ARM


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH 2/2] xen: build on ARM
Date: Tue, 17 Dec 2013 18:20:49 +0000
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

On Tue, 17 Dec 2013, Peter Maydell wrote:
> On 17 December 2013 17:31, Stefano Stabellini
> <address@hidden> wrote:
> > - add __arm__ and __aarch64__ cases in xen-mapcache.c.
> > --- a/xen-mapcache.c
> > +++ b/xen-mapcache.c
> > @@ -33,10 +33,10 @@
> >  #  define DPRINTF(fmt, ...) do { } while (0)
> >  #endif
> >
> > -#if defined(__i386__)
> > +#if defined(__i386__) || defined(__arm__)
> >  #  define MCACHE_BUCKET_SHIFT 16
> >  #  define MCACHE_MAX_SIZE     (1UL<<31) /* 2GB Cap */
> > -#elif defined(__x86_64__)
> > +#elif defined(__x86_64__) || defined(__aarch64__)
> >  #  define MCACHE_BUCKET_SHIFT 20
> >  #  define MCACHE_MAX_SIZE     (1UL<<35) /* 32GB Cap */
> >  #endif
> 
> Per-host-architecture ifdef ladders are kind of nasty. What's this
> code actually trying to do ? (looks like maybe "64 bit host addresses
> vs 32 bit host addresses" ?)

Almost.
It is trying to decide how much stuff we can map into QEMU's address
space (that is what the "Cap" is referring to). In particular consider
the case where we are running on an ARMv8 system, dom0 and QEMU are
32-bit and the guest is 64-bit.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]