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] [linux-2.6.18-xen] linux/x86: don't hardcode is_running_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: don't hardcode is_running_on_xen() for pv-on-hvm drivers
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 07 Feb 2008 11:00:55 -0800
Delivery-date: Thu, 07 Feb 2008 11:01:15 -0800
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 1202380399 0
# Node ID 5c61cd349b208a19fd7e9c8d07963166690a3de4
# Parent  f85259abcddf3da59752e8032c4ea557243b97cd
linux/x86: don't hardcode is_running_on_xen() for pv-on-hvm drivers

Allowing graceful failure of these modules when inadvertently loaded
on native kernels.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 include/asm-i386/mach-xen/asm/hypervisor.h |    5 +++++
 1 files changed, 5 insertions(+)

diff -r f85259abcddf -r 5c61cd349b20 include/asm-i386/mach-xen/asm/hypervisor.h
--- a/include/asm-i386/mach-xen/asm/hypervisor.h        Tue Feb 05 10:05:19 
2008 +0000
+++ b/include/asm-i386/mach-xen/asm/hypervisor.h        Thu Feb 07 10:33:19 
2008 +0000
@@ -145,7 +145,12 @@ u64 jiffies_to_st(unsigned long jiffies)
 #define MULTI_UVMDOMID_INDEX 4
 #endif
 
+#ifdef CONFIG_XEN
 #define is_running_on_xen() 1
+#else
+extern char *hypercall_stubs;
+#define is_running_on_xen() (!!hypercall_stubs)
+#endif
 
 static inline int
 HYPERVISOR_yield(

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: don't hardcode is_running_on_xen() for pv-on-hvm drivers, Xen patchbot-linux-2.6.18-xen <=