In preparation for converting the int15 handler into C, move CF clearing to e820_query_map(). Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Sasha Levin <levinsasha928@xxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/bios/bios.S | 3 --- tools/kvm/bios/e820.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/kvm/bios/bios.S b/tools/kvm/bios/bios.S index eed97a9..fe2d97b 100644 --- a/tools/kvm/bios/bios.S +++ b/tools/kvm/bios/bios.S @@ -82,9 +82,6 @@ ENTRY(bios_int15) call e820_query_map RESTORE_BIOSREGS - - /* Clear CF to indicate success. */ - andl $~EFLAGS_CF, 0x4(%esp) 1: IRET ENTRY_END(bios_int15) diff --git a/tools/kvm/bios/e820.c b/tools/kvm/bios/e820.c index b5e2188..1eafb5b 100644 --- a/tools/kvm/bios/e820.c +++ b/tools/kvm/bios/e820.c @@ -4,6 +4,7 @@ #include "kvm/bios.h" #include "kvm/util.h" +#include <asm/processor-flags.h> #include <asm/e820.h> static inline void set_fs(u16 seg) @@ -64,6 +65,9 @@ bioscall void e820_query_map(struct biosregs *regs) regs->ecx = sizeof(struct e820entry); regs->ebx = ++ndx; + /* Clear CF to indicate success. */ + regs->eflags &= ~X86_EFLAGS_CF; + if (ndx >= map_size) regs->ebx = 0; /* end of map */ } -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html