From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] tpr optimization: clear the vapic area on boot
Date: Tue, 16 Nov 2010 12:52:51 +0200 [thread overview]
Message-ID: <4CE26283.7010304@redhat.com> (raw)
In-Reply-To: <1289904577-32248-1-git-send-email-avi@redhat.com>
On 11/16/2010 12:49 PM, Avi Kivity wrote:
> If the option rom is loaded with rep/insb (as newer seabios versions do), then
> the writes to the vapic area may be corrupted by the kernel.
>
> Fix by explicitly clearing the vapic area on option rom startup.
>
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
> pc-bios/bios.bin | Bin 131072 -> 131072 bytes
This bit was unintended.
> diff --git a/pc-bios/optionrom/vapic.S b/pc-bios/optionrom/vapic.S
> index afe98a9..3c8dcf1 100644
> --- a/pc-bios/optionrom/vapic.S
> +++ b/pc-bios/optionrom/vapic.S
> @@ -4,6 +4,17 @@
> _start:
> .short 0xaa55
> .byte (_end - _start) / 512
> + # clear vapic area: firmware load using rep insb may cause
> + # stale tpr/isr/irr data to corrupt the vapic area.
> + push %es
> + push %cs
> + pop %es
> + xor %ax, %ax
> + mov $vapic_size/2, %cx
> + lea vapic, %di
> + cld
> + rep stosw
> + pop %es
> mov $vapic_base, %ax
> out %ax, $0x7e
> lret
This is the interesting part.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-11-16 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 10:49 [PATCH] tpr optimization: clear the vapic area on boot Avi Kivity
2010-11-16 10:52 ` 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=4CE26283.7010304@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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