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@xxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html