diff options
author | Avi Kivity <avi@redhat.com> | 2008-12-24 16:23:33 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-24 16:23:33 +0200 |
commit | e331020de867bb9f247b1e063464be35472e959a (patch) | |
tree | e85fef82741fd4c2b2f3be707eaab0b6c9baa6d6 | |
parent | 960057b5bd3f5c75a9de60522258a8b5b616ecdb (diff) |
kvm: bios: prevent compiler from caching cpu count while starting up smp
Other cpus are updating the count in parallel; if we get bad timing we might
not notice them starting up and hang.
Signed-off-by: Avi Kivity <avi@redhat.com>
-rwxr-xr-x | kvm/bios/rombios32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c index cceaedef0..321563dac 100755 --- a/kvm/bios/rombios32.c +++ b/kvm/bios/rombios32.c @@ -633,7 +633,7 @@ void smp_probe(void) #ifndef BX_QEMU delay_ms(10); #else - while (cmos_readb(0x5f) + 1 != smp_cpus) + while (cmos_readb(0x5f) + 1 != readw(&smp_cpus)) ; #endif } |