From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "David P. Reed" <dpreed-pPKjjScK5eQ@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Rene Herman <rene.herman-cENuUygGYd//D1n+0JDH9g@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.
Date: Wed, 19 Dec 2007 17:03:29 +0200 [thread overview]
Message-ID: <476932C1.8040703@qumranet.com> (raw)
In-Reply-To: <4763385E.9040106-pPKjjScK5eQ@public.gmane.org>
David P. Reed wrote:
> Avi Kivity wrote:
>> kvm will forward a virtual machine's writes to port 0x80 to the real
>> port. The reason is that the write is much faster than exiting and
>> emulating it; the difference is measurable when compiling kernels.
>>
>> Now if the cause is simply writing to port 0x80, then we must stop
>> doing that. But if the reason is the back-to-back writes, when we
>> can keep it, since the other writes will be trapped by kvm and
>> emulated. Do you which is the case?
>>
> As for kvm, I don't have enough info to know anything about that. Is
> there a test you'd like me to try?
>
I have a test, but I see that it is broken for mainline. I'll update it
eventually, but...
> I think you are also asking if the crash on these laptops is caused
> only by back-to-back writes. Actually, it doesn't seem to matter if
> they are back to back. I can cause the crash if the writes to 80 are
> very much spread out in time - it seems only to matter how many of
> them get executed - almost as if there is a buffer overflow. (And of
> course if you do back to back writes to other ports that are
> apparently fully unused, such as 0xED on my machine, no crash occurs).
>
> I believe (though no one seems to have confirming documentation from
> the chipset or motherboard vendor) that port 80 is actually functional
> for some unknown function on these machines. (They do respond to
> "in" instructions faster than a bus cycle abort does - more evidence).
That seems to be sufficient evidence for me to remove port 0x80
pass-through from kvm and emulate it instead. Given that port 80 writes
take 1 microsecond, and that an in-kernel exit handler takes a similar
amount of time, there won't be any significant performance loss.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
prev parent reply other threads:[~2007-12-19 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <466F0941.9060201@reed.com>
[not found] ` <1181682498.8176.224.camel@chaos>
[not found] ` <469578CD.3080609@reed.com>
[not found] ` <1184216528.12353.203.camel@chaos>
[not found] ` <1184218962.12353.209.camel@chaos>
[not found] ` <46964352.7040301@reed.com>
[not found] ` <1184253339.12353.223.camel@chaos>
[not found] ` <469697C6.50903@reed.com>
[not found] ` <1184274754.12353.254.camel@chaos>
[not found] ` <4761F193.7090400@reed.com>
2007-12-14 16:08 ` [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc Avi Kivity
2007-12-15 2:13 ` David P. Reed
2007-12-17 18:14 ` linux-os (Dick Johnson)
[not found] ` <Pine.LNX.4.61.0712171307150.4584-KUYkVxoy1ibZ8u7sGK6rWdBPR1lH4CV8@public.gmane.org>
2007-12-17 18:54 ` Rene Herman
[not found] ` <4763385E.9040106-pPKjjScK5eQ@public.gmane.org>
2007-12-15 2:20 ` H. Peter Anvin
2007-12-19 15:03 ` Avi Kivity [this message]
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=476932C1.8040703@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=dpreed-pPKjjScK5eQ@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.org \
--cc=rene.herman-cENuUygGYd//D1n+0JDH9g@public.gmane.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