@@ -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)
@@ -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 */
}
In preparation for converting the int15 handler into C, move CF clearing to e820_query_map(). Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> --- tools/kvm/bios/bios.S | 3 --- tools/kvm/bios/e820.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)