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] [PATCH] Remove bogus variables on construct_dom0()

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remove bogus variables on construct_dom0()
From: Eduardo Habkost <ehabkost@xxxxxxxxxx>
Date: Mon, 3 Dec 2007 20:01:26 -0200
Delivery-date: Thu, 06 Dec 2007 08:32:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.14 (2007-02-12)
The check for supervisor_mode_kernel feature bit was being done on the
dom0_features_{supported,required} variables, but they are always set
to zero.

The feature bits are stored on elf_dom_parms struct, not on those variables.

Patch applies to xen-3.1 and xen-unstable.


diff -r 3057f813da14 -r 23fd32217c30 xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Thu Nov 29 19:30:33 2007 +0000
+++ b/xen/arch/x86/domain_build.c       Mon Dec 03 19:56:00 2007 -0200
@@ -252,10 +252,6 @@ int __init construct_dom0(
     /* Machine address of next candidate page-table page. */
     unsigned long mpt_alloc;
 
-    /* Features supported. */
-    uint32_t dom0_features_supported[XENFEAT_NR_SUBMAPS] = { 0 };
-    uint32_t dom0_features_required[XENFEAT_NR_SUBMAPS] = { 0 };
-
     /* Sanity! */
     BUG_ON(d->domain_id != 0);
     BUG_ON(d->vcpu[0] == NULL);
@@ -941,12 +937,12 @@ int __init construct_dom0(
         v->arch.guest_context.user_regs.gs &= ~3;
         printk("Dom0 runs in ring 0 (supervisor mode)\n");
         if ( !test_bit(XENFEAT_supervisor_mode_kernel,
-                       dom0_features_supported) )
+                       parms.f_supported) )
             panic("Dom0 does not support supervisor-mode execution\n");
     }
     else
     {
-        if ( test_bit(XENFEAT_supervisor_mode_kernel, dom0_features_required) )
+        if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) )
             panic("Dom0 requires supervisor-mode execution\n");
     }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove bogus variables on construct_dom0(), Eduardo Habkost <=