From patchwork Fri Aug 12 11:07:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pekka Enberg X-Patchwork-Id: 1060712 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7CB7NaS026201 for ; Fri, 12 Aug 2011 11:07:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753522Ab1HLLHN (ORCPT ); Fri, 12 Aug 2011 07:07:13 -0400 Received: from filtteri5.pp.htv.fi ([213.243.153.188]:57529 "EHLO filtteri5.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546Ab1HLLHJ (ORCPT ); Fri, 12 Aug 2011 07:07:09 -0400 Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id 365365A6457; Fri, 12 Aug 2011 14:07:08 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id NEzmI0+P7YbR; Fri, 12 Aug 2011 14:07:08 +0300 (EEST) Received: from localhost.localdomain (cs181136138.pp.htv.fi [82.181.136.138]) by smtp5.welho.com (Postfix) with ESMTP id E04125BC007; Fri, 12 Aug 2011 14:07:07 +0300 (EEST) From: Pekka Enberg To: kvm@vger.kernel.org Cc: Pekka Enberg , Cyrill Gorcunov , Ingo Molnar , Sasha Levin Subject: [PATCH 8/8] kvm tools, bios: Set CF for non-supported services Date: Fri, 12 Aug 2011 14:07:06 +0300 Message-Id: <1313147226-12400-8-git-send-email-penberg@kernel.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1313147226-12400-1-git-send-email-penberg@kernel.org> References: <1313147226-12400-1-git-send-email-penberg@kernel.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 12 Aug 2011 11:07:23 +0000 (UTC) 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 --- tools/kvm/bios/int15.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) 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 + 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; } }