diff options
author | Avi Kivity <avi@redhat.com> | 2009-07-05 20:09:26 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-07-05 20:09:26 +0300 |
commit | ae00eadddf49f3389516fcf7fc79325da4d7d08d (patch) | |
tree | 379bb27a421494d729d0d845758ca6cdef93bdc7 /target-i386/machine.c | |
parent | Add X2APIC support. (diff) | |
parent | Rename target_cpu to target_arch2 (diff) | |
download | qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.tar.gz qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.tar.bz2 qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.zip |
Merge commit '600309b6108484a60be4a84cfe68e6b8d645799c' into upstream-merge
* commit '600309b6108484a60be4a84cfe68e6b8d645799c':
Rename target_cpu to target_arch2
monitor: Fix typo in documentation
target-mips: fix MADD and MSUB/MSUBU instructions
Fix hxtool.
Use ctz64 in favor of ffsll
Respect the standard
Use pstrcpy and pstrcat to avoid OpenBSD linker warning
Suppress a GCC warning
Fix breakage by obsolete _P() for good
Fix sdl_zoom compile problems on OpenBSD
Fix missing strnlen problems
Fix typo
Remove bogus -Werror
Conflicts:
configure
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r-- | target-i386/machine.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c index 14942c026..10aa19b00 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -2,6 +2,7 @@ #include "hw/boards.h" #include "hw/pc.h" #include "hw/isa.h" +#include "host-utils.h" #include "exec-all.h" #include "kvm.h" @@ -151,9 +152,9 @@ void cpu_save(QEMUFile *f, void *opaque) to find it and save its number instead (-1 for none). */ pending_irq = -1; for (i = 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) { - bit = ffsll(env->interrupt_bitmap[i]); - if (bit) { - pending_irq = i * 64 + bit - 1; + if (env->interrupt_bitmap[i]) { + bit = ctz64(env->interrupt_bitmap[i]); + pending_irq = i * 64 + bit; break; } } |