apic: Fix access to non-existent APIC
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 8 Apr 2009 22:56:26 +0000 (22:56 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 8 Apr 2009 22:56:26 +0000 (22:56 +0000)
commit74cfe4415ddeac1acc07d8962f8480a5fe182ceb
tree24561f5158f97215c1576e6b3aa2fddaadeb9033
parent1e3167995d6b91ccc0d87ff41650d1f638073de4
apic: Fix access to non-existent APIC

When running with -M isapc, there is no env->apic_state. Fix
cpu_get/set_apic_* helpers to handle this corner case gracefully.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7048 c046a42c-6fe2-441c-8c8c-71466251a162
hw/apic.c