From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC v1 6/8] x86/init: use linker table for i386 early setup Date: Wed, 20 Jan 2016 16:14:24 -0500 Message-ID: <20160120211424.GG4769@char.us.oracle.com> References: <1450217797-19295-1-git-send-email-mcgrof@do-not-panic.com> <1450217797-19295-7-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1450217797-19295-7-git-send-email-mcgrof@do-not-panic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Luis R. Rodriguez" Cc: peter.senna@gmail.com, ryabinin.a.a@gmail.com, JBeulich@suse.com, hpa@zytor.com, qiuxishi@huawei.com, boris.ostrovsky@oracle.com, xen-devel@lists.xensource.com, joro@8bytes.org, x86@kernel.org, mingo@redhat.com, aryabinin@virtuozzo.com, mchehab@osg.samsung.com, andreyknvl@google.com, mcgrof@suse.com, rusty@rustcorp.com.au, bp@alien8.de, tglx@linutronix.de, mcb30@ipxe.org, valentinrothberg@gmail.com, jgross@suse.com, linux-kernel@vger.kernel.org, luto@amacapital.net, long.wanglong@huawei.com List-Id: xen-devel@lists.xenproject.org On Tue, Dec 15, 2015 at 02:16:35PM -0800, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > This also annotates this is only used for PC and > lguest hardware subarchitectures. > > Signed-off-by: Luis R. Rodriguez On Xen the code path (before this patch) was: xen_start_kernel->i386_start_kernel->i386_default_early_setup and now you remove the i386_default_early_setup call? The mpparse.setup_ioapic_ids is irrelevant as under Xen code it does: 709 /* Avoid searching for BIOS MP tables */ 1710 x86_init.mpparse.find_smp_config = x86_init_noop; 1711 x86_init.mpparse.get_smp_config = x86_init_uint_noop; Great, MP tables is completly ignored. The next one : i386_reserve_resources Looks to be reserving VGA RAM .. which is a bit pointless when you have no legacy devices. The reserve_standard_io_resources means the /proc/ioport is smaller now. Actually looking under an PV guest it is: # cat /proc/ioports 0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-0060 : keyboard 0064-0064 : keyboard 0070-0071 : rtc_cmos 0080-008f : dma page reg 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu # cat /proc/iomem 00000000-00000fff : reserved 00001000-0009ffff : System RAM 000a0000-000fffff : reserved Which means /proc/ioports won't have anything in it (with your change) And /proc/iomem will have the 000a0000-000fffff region available (maybe?) Ah no. We mark it as reserved in the early part of boot: [ 0.000000] Xen: [mem 0x00000000000a0000-0x00000000000fffff] reserved I am curious - what does your kernel run as PV look like? Thanks. > --- > arch/x86/kernel/head32.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c > index 768fa3888066..1db8eec5b0e2 100644 > --- a/arch/x86/kernel/head32.c > +++ b/arch/x86/kernel/head32.c > @@ -21,12 +21,15 @@ > #include > #include > > -static void __init i386_default_early_setup(void) > +static void __init i386_set_setup_funcs(void) > { > /* Initialize 32bit specific setup functions */ > x86_init.resources.reserve_resources = i386_reserve_resources; > x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc; > } > +x86_init_early(BIT(X86_SUBARCH_PC) | > + BIT(X86_SUBARCH_LGUEST), > + NULL, NULL, i386_set_setup_funcs); > > asmlinkage __visible void __init i386_start_kernel(void) > { > @@ -41,9 +44,6 @@ asmlinkage __visible void __init i386_start_kernel(void) > case X86_SUBARCH_CE4100: > x86_ce4100_early_setup(); > break; > - default: > - i386_default_early_setup(); > - break; > } > > x86_init_fn_init_tables(); > -- > 2.6.2 >