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-changelog

[Xen-changelog] Hypercall preemption check also looks for pending event

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Hypercall preemption check also looks for pending event upcalls to
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 22 Apr 2005 16:34:45 +0000
Delivery-date: Fri, 22 Apr 2005 17:03:47 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1369, 2005/04/22 17:34:45+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Hypercall preemption check also looks for pending event upcalls to
        guest kernel.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 sched.h |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)


diff -Nru a/xen/include/xen/sched.h b/xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   2005-04-22 13:04:06 -04:00
+++ b/xen/include/xen/sched.h   2005-04-22 13:04:06 -04:00
@@ -301,8 +301,11 @@
         (unsigned long)(_a1), (unsigned long)(_a2), (unsigned long)(_a3), \
         (unsigned long)(_a4), (unsigned long)(_a5), (unsigned long)(_a6))
 
-#define hypercall_preempt_check() \
-    (unlikely(softirq_pending(smp_processor_id())))
+#define hypercall_preempt_check() (unlikely(            \
+        softirq_pending(smp_processor_id()) |           \
+        (!!current->vcpu_info->evtchn_upcall_pending &  \
+          !current->vcpu_info->evtchn_upcall_mask)      \
+    ))
 
 /* This domain_hash and domain_list are protected by the domlist_lock. */
 #define DOMAIN_HASH_SIZE 256
@@ -310,11 +313,13 @@
 extern struct domain *domain_hash[DOMAIN_HASH_SIZE];
 extern struct domain *domain_list;
 
-#define for_each_domain(_p) \
- for ( (_p) = domain_list; (_p) != NULL; (_p) = (_p)->next_list )
+#define for_each_domain(_d) \
+ for ( (_d) = domain_list; (_d) != NULL; (_d) = (_d)->next_list )
 
 #define for_each_exec_domain(_d,_ed) \
- for ( (_ed) = _d->exec_domain[0]; (_ed) != NULL; (_ed) = (_ed)->ed_next_list )
+ for ( (_ed) = (_d)->exec_domain[0]; \
+       (_ed) != NULL;                \
+       (_ed) = (_ed)->ed_next_list )
 
 #define EDF_DONEFPUINIT  0 /* Has the FPU been initialised for this task?    */
 #define EDF_USEDFPU      1 /* Has this task used the FPU since last save?    */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Hypercall preemption check also looks for pending event upcalls to, BitKeeper Bot <=