From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: Xen /dev/mcelog registration in Linux Date: Mon, 4 Jan 2016 22:00:38 +0100 Message-ID: <20160104210038.GD1101@mail-itl> References: <20151215135431.GQ16649@mail-itl> <20160104204911.GD17427@char.us.oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3355537664053473200==" Return-path: In-Reply-To: <20160104204911.GD17427@char.us.oracle.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: Konrad Rzeszutek Wilk Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============3355537664053473200== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 04, 2016 at 03:49:11PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Dec 15, 2015 at 02:54:31PM +0100, Marek Marczykowski-G=C3=B3recki= wrote: > > Hi, > >=20 > > Booting kernel with both CONFIG_X86_MCE=3Dy and CONFIG_XEN_MCE_LOG=3Dy > > results in "mce: Unable to init device /dev/mcelog (rc: -16)" error. I > > think that's because both drivers tries to register that character > > device (drivers/xen/mcelog.c: xen_late_init_mcelog; > > arch/x86/kernel/cpu/mcheck/mce.c: mcheck_init_device). So obviously one > > of them fails. CONFIG_XEN_MCE_LOG depends on CONFIG_X86_MCE... > > >=20 > Right. The baremetal one (mce.c) should fail and then the Xen one > will pick it up. There is a little comment in threshold_init_device: >=20 >=20 > /* = =20 > * there are 3 funcs which need to be _initcalled in a logic sequence: = =20 > * 1. xen_late_init_mcelog = =20 > * 2. mcheck_init_device = =20 > * 3. threshold_init_device = =20 > * = =20 > * xen_late_init_mcelog must register xen_mce_chrdev_device before = =20 > * native mce_chrdev_device registration if running under xen platform; = =20 > * = =20 > * mcheck_init_device should be inited before threshold_init_device to = =20 > * initialize mce_device, otherwise a NULL ptr dereference will cause pan= ic. =20 > * = =20 > * so we use following _initcalls = =20 > * 1. device_initcall(xen_late_init_mcelog); = =20 > * 2. device_initcall_sync(mcheck_init_device); = =20 > * 3. late_initcall(threshold_init_device); = =20 > * = =20 > * when running under xen, the initcall order is 1,2,3; = =20 > * on baremetal, we skip 1 and we do only 2 and 3. = =20 > */ =20 > =20 > > How is that supposed to work? >=20 > Hope the above explains it? Ok, so maybe it would be better to hide that error message somehow? This is the only dom0 kernel error during boot with "quiet" option. And scares users a lot (it is blamed for almost all boot problems). --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWit12AAoJENuP0xzK19csXBEH/1zmDqkBuHuQlxhxFz8rEYNf Yg0Lc86Jarxh6IjA8UqRQV0VbldCaCYVI9AJN6DU8ZUWps4rhQgxNLnMHKqBG0bM JBHU2stcfRTY5NK6zXraSbPuANF06qfj7a62R30VG0twpDcXGVyR7tp+bhFTfhic pgRW+CbnAWi43gPENWUv+pLDUlnGf5aE2XPtJMdS70MiZTKnD8WCMkO5+t5ng6wq XEeQqjRV05IWBECbNU2c/UREt++sKSBdW3/wUjL2X6NXRc7fMCWxZeexcYZ8XoS/ WLim7uTaIBvOUg4JSKi5VCAutWnpQtkoCOHn9/ljW8SqcwKybBqSfY9sJJ3+Cow= =X08/ -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7-- --===============3355537664053473200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3355537664053473200==--