Re: [PATCH 4/7] Allow selected bug checks to be skipped by paravirt kernels

Pavel Machek
2006-11-01T12:18:09Z

On Sat 2006-10-28 00:00:04, Chris Wright wrote:
> Allow selected bug checks to be skipped by paravirt kernels. The two most
> important are the F00F workaround (which is either done by the hypervisor,
> or not required), and the 'hlt' instruction check, which can break under
> some hypervisors.

How can hlt check break? It is hlt;hlt;hlt, IIRC, that looks fairly
innocent to me.

> --- linux-2.6-pv.orig/arch/i386/kernel/cpu/intel.c
> +++ linux-2.6-pv/arch/i386/kernel/cpu/intel.c
> @@ -107,7 +107,7 @@ static void __cpuinit init_intel(struct
> * Note that the workaround only should be initialized once...
> */
> c->f00f_bug = 0;
> - if ( c->x86 == 5 ) {
> + if (!paravirt_enabled() && c->x86 == 5) {

I'd do x86==5 check first... pentiums are not common any more.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html