summaryrefslogtreecommitdiff
path: root/bios/vapic.S
AgeCommit message (Collapse)AuthorFilesLines
2008-09-07kvm: bios: use windows pcr to get cpu number rather than trAvi Kivity1-9/+8
using tr to hold the current cpu number interferes with hibernate/resume in smp. so instead, get the cpu number directly from the windows pcr at fs:0x51. use byte 4 of the per-cpu vapic region to check whether vapic is enabled. Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-08-14kvm: bios: detect vapic calls to uninitialized vapicAvi Kivity1-0/+15
when resuming from hibernation, the saved image will contain calls to the vapic even though the vapic was never enabled on this run. add hooks so qemu can detect this condition. Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-16kvm: bios: add 'push tpr' instruction supportAvi Kivity1-0/+12
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-06-12kvm: bios: disable interrupts when accessing vtprAvi Kivity1-0/+2
Apparently the Windows code that accesses the tpr is preemptible, and this causes vtpr+smp to fail. Fix by disabling interrupts when accessing the vtpr. Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-01-31kvm: bios: separate vapic patch functions for smp and upAvi Kivity1-41/+126
up is simpler and doesn't need messing with tr; that may help with hibernate. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-12-26kvm: bios: add vapic supportAvi Kivity1-0/+181
Add supportint code for patching tpr accesses. The code includes a descriptor that allows locating the code in the bios, relocation information for patching it into whatever virtual address it ends up in, and vapic access code. Signed-off-by: Avi Kivity <avi@qumranet.com>