From: David Sanders <linux@sandersweb.net>
To: linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: the arch/x86 maintainers <x86@kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] x86: Don't use NOPL on 32-bit cpu's because not all systems support it.
Date: Tue, 16 Sep 2008 13:48:23 -0400 [thread overview]
Message-ID: <200809161348.24130.linux@sandersweb.net> (raw)
In-Reply-To: <48CFDF82.3000704@zytor.com>
On Tuesday 16 September 2008 12:32, H. Peter Anvin wrote:
> Oh good grief.
>
> VPC is apparently so broken that these instructions work *some* of the
> time, which may include the first time, but not later. That is an
> impressive level of cockup.
>
> Given that, we should either just rip this code out, or detect VPC
> (how?). The latter option can be done post-.27, of course; if so, we
> should just force the bit off for now rather than doing it in the
> alternatives code. The only reason for doing the latter at all would be
> to mitigate the overhead of paravirt_ops and other dynamic patch sites.
>
> It would also be the least impact for .27, I believe.
I think you still want the nopl enabled for 64-bits.
This is how I detect virtual pc. I based it on a google search. Microsoft
itself provides no info:
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
void except(int e)
{
printf("Not in Virtual PC\n");
exit(1);
}
int main()
{
signal(SIGILL, except);
asm("\n"
"mov $0x01, %eax\n" /* function number */
".byte 0x0f, 0x3f, 0x07, 0x0b\n" /* call VPC */
);
printf("Inside Virtual PC\n");
return 0;
}
next prev parent reply other threads:[~2008-09-16 17:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 15:59 [PATCH] x86: Don't use NOPL on 32-bit cpu's because not all systems support it David Sanders
2008-09-16 16:32 ` H. Peter Anvin
2008-09-16 17:00 ` Alan Cox
2008-09-16 17:28 ` H. Peter Anvin
2008-09-16 17:50 ` David Sanders
2008-09-16 17:48 ` David Sanders [this message]
2008-09-16 18:03 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200809161348.24130.linux@sandersweb.net \
--to=linux@sandersweb.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox