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

Re: [Xen-devel] [PATCH] add canonical address checks to HVM


  • To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Fri, 01 Dec 2006 10:12:12 +0000
  • Delivery-date: Fri, 01 Dec 2006 02:12:27 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AccVMSrcaba2xIEkEduAwAAX8io7RQ==
  • Thread-topic: [Xen-devel] [PATCH] add canonical address checks to HVM



On 29/11/06 15:05, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> +#ifdef __x86_64__
> +#define IS_CANO_ADDRESS(add) (((long)(add) >> 47) == ((long)(add) >> 63))
> +#else
> +#define IS_CANO_ADDRESS(add) 1
> +#endif
> +

Is there any guarantee that right-shift is signed when using gcc?

How about (int16_t)((add) >> 48) == -(int)(((add) >> 47) & 1) ??

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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