From 0e753db4a3dad4fc3e6cbc4e97426573ff61490e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 12 Aug 2011 14:00:06 +0300 Subject: [PATCH] kvm tools, bios: Set CF for non-supported services Don't mislead callers into thinking that a non-implemented int15 service succeeded. Cc: Cyrill Gorcunov Cc: Ingo Molnar Cc: Sasha Levin Signed-off-by: Pekka Enberg --- bios/int15.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bios/int15.c b/bios/int15.c index e1a1ce4..faf5343 100644 --- a/bios/int15.c +++ b/bios/int15.c @@ -2,11 +2,17 @@ #include "kvm/e820.h" +#include + bioscall void int15_handler(struct biosregs *regs) { switch (regs->eax) { case 0xe820: e820_query_map(regs); break; + default: + /* Set CF to indicate failure. */ + regs->eflags |= X86_EFLAGS_CF; + break; } }