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

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



On Wed, 18 Dec 2013, Ian Campbell wrote:
> On Tue, 2013-12-17 at 17:31 +0000, Stefano Stabellini wrote:
> > Collection of fixes to build QEMU with Xen support on ARM:
> > - use xenstore_read_fe_uint64 to retrieve the page-ref (xenfb);
> > - use xen_pfn_t instead of unsigned long in xenfb;
> > - unsigned long/xenpfn_t in xen_remove_from_physmap;
> > - add __arm__ and __aarch64__ cases in xen-mapcache.c.
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > ---
> >  hw/display/xenfb.c |   17 +++++++++--------
> >  xen-all.c          |    2 +-
> >  xen-mapcache.c     |    4 ++--
> >  3 files changed, 12 insertions(+), 11 deletions(-)
> > 
> > diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
> > index f0333a0..cbc2901 100644
> > --- a/hw/display/xenfb.c
> > +++ b/hw/display/xenfb.c
> > @@ -93,10 +93,11 @@ struct XenFB {
> >  
> >  static int common_bind(struct common *c)
> >  {
> > -    int mfn;
> > +    uint64_t mfn;
> 
> The commit message says you are switching to use xen_pfn_t in this
> file...
> 
> Somewhere along the line this will need to be cast to a xen_pfn_t, which
> would potentially involve a loss of the upper bits if xen_pfn_t is only
> 32-bits.
> 
> You might want an if (mfn != (xen_pfn_t)mfn) style check somewhere.

Good idea, I'll add an assert.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.