WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] make hypercall_preempt_check() a little more sen

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] make hypercall_preempt_check() a little more sensitive
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Mon, 10 Apr 2006 14:16:26 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 10 Apr 2006 12:15:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <071c0ccf5b43fa22350bcf72a3ea62c0@xxxxxxxxxxxx>
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>
Organization: IBM Linux Technology Center
References: <200603301117.24152.hollisb@xxxxxxxxxx> <071c0ccf5b43fa22350bcf72a3ea62c0@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2006-03-31 at 10:33 +0100, Keir Fraser wrote:
> On 30 Mar 2006, at 18:17, Hollis Blanchard wrote:
> 
> I'd rather move event_pending() into asm/event.h and then you can 
> monkey with it as you like. That'll also catch other uses of 
> event_pending() where you probably also want the same extra check. I 
> don't really want a proliferation of extra little functions called 
> arch_xxx.

OK. Compile-tested on x86.

-- 
Hollis Blanchard
IBM Linux Technology Center

Make event_pending() architecture-specific.
PowerPC needs this because the domain can directly modify the hardware's
"interrupts enabled" bit, and we don't want to patch Linux to replace
all those accesses to use evtchn_upcall_mask instead.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r 4ed269ac7d84 xen/include/asm-ia64/event.h
--- a/xen/include/asm-ia64/event.h      Mon Apr 10 13:24:58 2006 +0100
+++ b/xen/include/asm-ia64/event.h      Mon Apr 10 14:09:16 2006 -0500
@@ -32,4 +32,9 @@ static inline void evtchn_notify(struct 
        vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
 }
 
+/* Note: Bitwise operations result in fast code with no branches. */
+#define event_pending(v)                        \
+    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
+      !(v)->vcpu_info->evtchn_upcall_mask)
+
 #endif
diff -r 4ed269ac7d84 xen/include/asm-x86/event.h
--- a/xen/include/asm-x86/event.h       Mon Apr 10 13:24:58 2006 +0100
+++ b/xen/include/asm-x86/event.h       Mon Apr 10 14:09:16 2006 -0500
@@ -26,4 +26,9 @@ static inline void evtchn_notify(struct 
         smp_send_event_check_cpu(v->processor);
 }
 
+/* Note: Bitwise operations result in fast code with no branches. */
+#define event_pending(v)                        \
+    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
+      !(v)->vcpu_info->evtchn_upcall_mask)
+
 #endif
diff -r 4ed269ac7d84 xen/include/xen/event.h
--- a/xen/include/xen/event.h   Mon Apr 10 13:24:58 2006 +0100
+++ b/xen/include/xen/event.h   Mon Apr 10 14:09:16 2006 -0500
@@ -38,11 +38,6 @@ extern void send_guest_global_virq(struc
  */
 extern void send_guest_pirq(struct domain *d, int pirq);
 
-/* Note: Bitwise operations result in fast code with no branches. */
-#define event_pending(v)                        \
-    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
-      !(v)->vcpu_info->evtchn_upcall_mask)
-
 #define evtchn_pending(d, p)                    \
     (test_bit((p), &(d)->shared_info->evtchn_pending[0]))
 



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [patch] make hypercall_preempt_check() a little more sensitive, Hollis Blanchard <=