From: Keir Fraser Date: Thu, 6 Dec 2007 17:49:00 +0000 (+0000) Subject: x86: Remove bogus variables on construct_dom0() X-Git-Tag: 3.1.3-rc1~67 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a098de3ff82ed0843569dd98a106b45488205ef7;p=people%2Fvhanquez%2Fxen.git x86: Remove bogus variables on construct_dom0() 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. From: Eduardo Habkost Signed-off-by: Keir Fraser xen-unstable changeset: 16553:b240698146a250d7f7cd5309325d743e9ec6f4d8 xen-unstable date: Thu Dec 06 17:47:53 2007 +0000 --- diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index dfc673452..8a0187859 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -251,10 +251,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); @@ -938,12 +934,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"); }