Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] [patch] make evtchn_upcall_pending arch-specific type

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] make evtchn_upcall_pending arch-specific type
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 31 Mar 2006 13:46:28 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 31 Mar 2006 12:47:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200603301313.44384.hollisb@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200603301313.44384.hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 30 Mar 2006, at 20:13, Hollis Blanchard wrote:

evtchn_upcall_pending is another variable that bitops are used on, so PowerPC wants it to be a long. Unfortunately, it's also part of the guest/hypervisor interface, so we can't change it for architectures with existing guests.

Compile-tested on x86(-32). Please apply.

Before going down this route, what about just casting the field to long, since it is actually aligned on a suitable boundary, as it happens? And what will your solution be for fields in grant_entry structure? That's another one where the fields to be atomically updated are at least 8-byte aligned, and where using longer types will bloat a structure that we'd prefer to pack nicely.

If this is the best way for ppc then I think atomic_bit_t would be a nicer typedef.

 -- Keir


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

<Prev in Thread] Current Thread [Next in Thread>