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

[Xen-devel] Re: [RFC PATCH 19/35] subarch support for control register a

To: Zachary Amsden <zach@xxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 19/35] subarch support for control register accesses
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Wed, 22 Mar 2006 13:45:56 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Wed, 22 Mar 2006 21:46:55 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <442110F0.9090805@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: <20060322063040.960068000@xxxxxxxxxxxxxxxxxx> <20060322063754.391952000@xxxxxxxxxxxxxxxxxx> <442110F0.9090805@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
* Zachary Amsden (zach@xxxxxxxxxx) wrote:
> Chris Wright wrote:
> >+#define read_cr4_safe() ({                        \
> >+    unsigned int __dummy;                         \
> >+    /* This could fault if %cr4 does not exist */ \
> >+    __asm__("1: movl %%cr4, %0              \n"   \
> >+            "2:                             \n"   \
> >+            ".section __ex_table,\"a\"      \n"   \
> >+            ".long 1b,2b                    \n"   \
> >+            ".previous                      \n"   \
> >+            : "=r" (__dummy): "0" (0));           \
> >+    __dummy;                                      \
> >+})
> 
> I think you'll find trap and emulate quite sufficient for this one.

Heh ;-)

> >+#define stts() write_cr0(8 | read_cr0())
> >  
> 
> Nit: You shouldn't need to redefine stts() in the subarch.

Yes, you're right, better to keep things consolidated.

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

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