From patchwork Fri Feb 10 18:31:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 140710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8F57FB6F98 for ; Sat, 11 Feb 2012 06:27:39 +1100 (EST) Received: from localhost ([::1]:56462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvGY-0002UF-NF for incoming@patchwork.ozlabs.org; Fri, 10 Feb 2012 13:32:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvFz-0000Ul-My for qemu-devel@nongnu.org; Fri, 10 Feb 2012 13:31:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvvFp-0002op-JQ for qemu-devel@nongnu.org; Fri, 10 Feb 2012 13:31:39 -0500 Received: from thoth.sbs.de ([192.35.17.2]:22649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvFp-0002nx-6k for qemu-devel@nongnu.org; Fri, 10 Feb 2012 13:31:29 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id q1AIVQYL029906; Fri, 10 Feb 2012 19:31:26 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id q1AIVOro025228; Fri, 10 Feb 2012 19:31:26 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Fri, 10 Feb 2012 19:31:23 +0100 Message-Id: <349dcecee4277db4c688cd2cfae36788656f557b.1328898681.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.2 Cc: Anthony Liguori , qemu-devel , kvm@vger.kernel.org, Gleb Natapov Subject: [Qemu-devel] [PATCH v2 8/8] kvmvapic: Use optionrom helpers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use OPTION_ROM_START/END from the common header file, add comment to init code. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/kvmvapic.S | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pc-bios/optionrom/kvmvapic.S b/pc-bios/optionrom/kvmvapic.S index 856c1e5..aa17a40 100644 --- a/pc-bios/optionrom/kvmvapic.S +++ b/pc-bios/optionrom/kvmvapic.S @@ -9,12 +9,10 @@ # option) any later version. See the COPYING file in the top-level directory. # - .text 0 - .code16 -.global _start -_start: - .short 0xaa55 - .byte (_end - _start) / 512 +#include "optionrom.h" + +OPTION_ROM_START + # clear vapic area: firmware load using rep insb may cause # stale tpr/isr/irr data to corrupt the vapic area. push %es @@ -26,8 +24,11 @@ _start: cld rep stosw pop %es + + # announce presence to the hypervisor mov $vapic_base, %ax out %ax, $0x7e + lret .code32 @@ -331,7 +332,4 @@ up_set_tpr_poll_irq: vapic: . = . + vapic_size -.byte 0 # reserve space for signature -.align 512, 0 - -_end: +OPTION_ROM_END