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

Re: [Xen-devel] [PATCH 1/4] Enable VirtualPC 2007 run on top of XEN :ltr

To: "Disheng Su" <disheng.su@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/4] Enable VirtualPC 2007 run on top of XEN :ltr emulation
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 01 Feb 2008 09:19:36 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 01 Feb 2008 01:19:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <FF386CB4AE0E4648B0A96060EC00F36C75964E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <FF386CB4AE0E4648B0A96060EC00F36C75964E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>@@ -2878,6 +2878,29 @@ x86_emulate(
>  twobyte_special_insn:
>     switch ( b )
>     {
>+    case 0x00: /* Grp6 */
>+        switch ( modrm_reg )
>+        {
>+        case 0x3: /* ltr */
>+            {
>+                unsigned long sel = 0;
>+
>+                if ( ea.type == OP_REG )
>+                    sel = *ea.reg & 0xffff;
>+                else
>+                    if ( (rc = ops->read(ea.mem.seg, ea.mem.off,
>+                                  &sel, sizeof(uint16_t), ctxt)) )
>+                        goto done;
>+
>+                if ( (rc = ops->ltr(sel, ctxt)) )

You should check ops->ltr against NULL before this call (perhaps the
whole block should be inside a respective if() clause).

>+                    goto done;
>+            }
>+            break;
>+        default:
>+            goto cannot_emulate;
>+        }
>+        break;
>+
>     case 0x01: /* Grp7 */ {
>         struct segment_register reg;
>         unsigned long base, limit, cr0, cr0w;



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH 1/4] Enable VirtualPC 2007 run on top of XEN :ltr emulation, Jan Beulich <=