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] [xen-unstable] minios: call do_hypervisor_callback direc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] minios: call do_hypervisor_callback directly from force_evtchn_callback
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Apr 2008 07:10:15 -0700
Delivery-date: Tue, 22 Apr 2008 07:10:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1208336779 -3600
# Node ID e35a379e7fe977627fb50f5ea694d6f940674180
# Parent  681cfd0eda786f5345b9e1dc226486dc04e1f4b3
minios: call do_hypervisor_callback directly from force_evtchn_callback
instead of unnecessarily going through the hypervisor.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/hypervisor.c         |   15 +++++++++++++++
 extras/mini-os/include/hypervisor.h |    4 +++-
 extras/mini-os/include/ia64/os.h    |   11 -----------
 extras/mini-os/include/x86/os.h     |    1 -
 4 files changed, 18 insertions(+), 13 deletions(-)

diff -r 681cfd0eda78 -r e35a379e7fe9 extras/mini-os/hypervisor.c
--- a/extras/mini-os/hypervisor.c       Wed Apr 16 10:05:57 2008 +0100
+++ b/extras/mini-os/hypervisor.c       Wed Apr 16 10:06:19 2008 +0100
@@ -66,6 +66,21 @@ void do_hypervisor_callback(struct pt_re
     in_callback = 0;
 }
 
+void force_evtchn_callback(void)
+{
+    vcpu_info_t *vcpu;
+    vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];
+    int save = vcpu->evtchn_upcall_mask;
+
+    while (vcpu->evtchn_upcall_pending) {
+        vcpu->evtchn_upcall_mask = 1;
+        barrier();
+        do_hypervisor_callback(NULL);
+        barrier();
+        vcpu->evtchn_upcall_mask = save;
+        barrier();
+    };
+}
 
 inline void mask_evtchn(u32 port)
 {
diff -r 681cfd0eda78 -r e35a379e7fe9 extras/mini-os/include/hypervisor.h
--- a/extras/mini-os/include/hypervisor.h       Wed Apr 16 10:05:57 2008 +0100
+++ b/extras/mini-os/include/hypervisor.h       Wed Apr 16 10:06:19 2008 +0100
@@ -24,6 +24,7 @@
 #else
 #error "Unsupported architecture"
 #endif
+#include <traps.h>
 
 /*
  * a placeholder for the start of day information passed up from the hypervisor
@@ -37,7 +38,8 @@ extern union start_info_union start_info
 #define start_info (start_info_union.start_info)
 
 /* hypervisor.c */
-//void do_hypervisor_callback(struct pt_regs *regs);
+void force_evtchn_callback(void);
+void do_hypervisor_callback(struct pt_regs *regs);
 void mask_evtchn(u32 port);
 void unmask_evtchn(u32 port);
 void clear_evtchn(u32 port);
diff -r 681cfd0eda78 -r e35a379e7fe9 extras/mini-os/include/ia64/os.h
--- a/extras/mini-os/include/ia64/os.h  Wed Apr 16 10:05:57 2008 +0100
+++ b/extras/mini-os/include/ia64/os.h  Wed Apr 16 10:06:19 2008 +0100
@@ -189,17 +189,6 @@ __synch_cmpxchg(volatile void *ptr, uint
        return ia64_cmpxchg_acq_64(ptr, old, new);
 }
 
-/*
- * Force a proper event-channel callback from Xen after clearing the
- * callback mask. We do this in a very simple manner, by making a call
- * down into Xen. The pending flag will be checked by Xen on return.
- */
-static inline void
-force_evtchn_callback(void)
-{
-       (void)HYPERVISOR_xen_version(0, NULL);
-}
-
 extern shared_info_t *HYPERVISOR_shared_info;
 
 static inline int
diff -r 681cfd0eda78 -r e35a379e7fe9 extras/mini-os/include/x86/os.h
--- a/extras/mini-os/include/x86/os.h   Wed Apr 16 10:05:57 2008 +0100
+++ b/extras/mini-os/include/x86/os.h   Wed Apr 16 10:06:19 2008 +0100
@@ -28,7 +28,6 @@ extern void do_exit(void) __attribute__(
 #include <xen/xen.h>
 
 
-#define force_evtchn_callback() ((void)HYPERVISOR_xen_version(0, 0))
 
 #define __KERNEL_CS  FLAT_KERNEL_CS
 #define __KERNEL_DS  FLAT_KERNEL_DS

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] minios: call do_hypervisor_callback directly from force_evtchn_callback, Xen patchbot-unstable <=