KVM: x86: Refactor persistent CPU state
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · Anthony Liguori
Quoted 7 lines · Blue Swirl
Quoted 4 lines · Anthony Liguori
From: Jan Kiszka <[email protected]>
This patch aligns the KVM-related layout and encoding of the CPU state to be saved to disk or migrated with qemu-kvm. The major differences
are
Quoted 11 lines
Quoted 11 lines
reordering of fields and a compressed
interrupt_bitmapinto a single number as there can be no more than one pending IRQ at a time.Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>+ for (i = 0; i <
ARRAY_SIZE(env->interrupt_bitmap); i++) {Quoted 4 lines
Quoted 3 lines
+ bit =
ffsll(env->interrupt_bitmap[i]);
Quoted 5 lines
Quoted 3 lines
This broke build on platforms without ffsll (Mingw32, *BSDs).
What version of mingw32? Mine seems to have ffsll (gcc 4.4.2).
Using built-in specs.
Target: i586-mingw32msvc
Configured with:/home/ron/devel/debian/mingw32/mingw32-4.2.1.dfsg/build_dir/src/gcc-4.2.1-2-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.2.1-sjlj (mingw32-2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines · Jan Kiszka
Quoted 20 lines · Anthony Liguori
Quoted 19 lines · Blue Swirl
Quoted 16 lines · Anthony Liguori
From: Jan Kiszka <[email protected]>
This patch aligns the KVM-related layout and encoding of the CPU state to be saved to disk or migrated with qemu-kvm. The major differences
are
reordering of fields and a compressedinterrupt_bitmapinto a single number as there can be no more than one pending IRQ at a time.Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>+ for (i = 0; i <
ARRAY_SIZE(env->interrupt_bitmap); i++) {
+ bit =ffsll(env->interrupt_bitmap[i]);Quoted 7 lines
Quoted 2 lines
This broke build on platforms without ffsll (Mingw32, *BSDs).
What version of mingw32? Mine seems to have ffsll (gcc 4.4.2).
Jan, can you send a patch to fix this?
Quoted 5 lines
I'm currently checking the mingw situation. I likely missed the warning,
but it seems to link - looking for the header...Can anyone comment on the BSD situation? I have no test env for such platforms.
Grepping for ffsll in /usr/include does not find anything, there is no man page either.
We could add a local qemu_ffsll (or qemu_ffs64) to osdep.c or cutils.c.