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-ia64-devel

Re: [Xen-ia64-devel] PATCH: define guest_mode (instead of user_mode)

To: Tristan Gingold <tgingold@xxxxxxx>
Subject: Re: [Xen-ia64-devel] PATCH: define guest_mode (instead of user_mode)
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 08 May 2007 10:57:42 -0600
Cc: Xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 08 May 2007 09:56:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070508132606.GA16081@saphi>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <20070508132606.GA16081@saphi>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007-05-08 at 15:26 +0200, Tristan Gingold wrote:
> diff -r 8519e5db6510 -r 8e5083feaa52 xen/arch/ia64/vmx/vmx_process.c
> --- a/xen/arch/ia64/vmx/vmx_process.c   Tue May 08 15:07:51 2007 +0200
> +++ b/xen/arch/ia64/vmx/vmx_process.c   Tue May 08 15:24:57 2007 +0200
> @@ -164,7 +164,7 @@ vmx_ia64_handle_break (unsigned long ifa
>          if (iim == 0) 
>              vmx_die_if_kernel("Break 0 in Hypervisor.", regs, iim);
>  
> -        if (!user_mode(regs)) {
> +        if (ia64_psr(regs)->cpl == 0) {

Why is this first one a special case?  ie. why not !guest_mode(regs)
same as the next one?  Thanks,

        Alex

>              /* Allow hypercalls only when cpl = 0.  */
>              if (iim == d->arch.breakimm) {
>                  ia64_hypercall(regs);
> diff -r 8519e5db6510 -r 8e5083feaa52 xen/arch/ia64/xen/faults.c
> --- a/xen/arch/ia64/xen/faults.c        Tue May 08 15:07:51 2007 +0200
> +++ b/xen/arch/ia64/xen/faults.c        Tue May 08 15:24:57 2007 +0200
> @@ -209,7 +209,7 @@ void ia64_do_page_fault(unsigned long ad
>  
>         if (is_ptc_l_needed)
>                 vcpu_ptc_l(current, address, logps);
> -       if (!user_mode(regs)) {
> +       if (!guest_mode(regs)) { 

-- 
Alex Williamson                             HP Open Source & Linux Org.


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

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