diff mbox

[8/8] kvm tools, bios: Set CF for non-supported services

Message ID 1313147226-12400-8-git-send-email-penberg@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Pekka Enberg Aug. 12, 2011, 11:07 a.m. UTC
Don't mislead callers into thinking that a non-implemented int15 service
succeeded.

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/int15.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/bios/int15.c b/tools/kvm/bios/int15.c
index e1a1ce4..faf5343 100644
--- a/tools/kvm/bios/int15.c
+++ b/tools/kvm/bios/int15.c
@@ -2,11 +2,17 @@ 
 
 #include "kvm/e820.h"
 
+#include <asm/processor-flags.h>
+
 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;
 	}
 }