From patchwork Tue Sep 3 16:08:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2853284 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EE7E6C0AB5 for ; Tue, 3 Sep 2013 16:09:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D337C2041A for ; Tue, 3 Sep 2013 16:09:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A175520424 for ; Tue, 3 Sep 2013 16:09:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756815Ab3ICQJF (ORCPT ); Tue, 3 Sep 2013 12:09:05 -0400 Received: from thoth.sbs.de ([192.35.17.2]:20631 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755723Ab3ICQJE (ORCPT ); Tue, 3 Sep 2013 12:09:04 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id r83G8rvb016565; Tue, 3 Sep 2013 18:08:53 +0200 Received: from mchn199C.mchp.siemens.de.de ([139.25.40.156]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id r83G8r5U018026; Tue, 3 Sep 2013 18:08:53 +0200 From: Jan Kiszka To: Paolo Bonzini , Gleb Natapov Cc: qemu-devel , kvm@vger.kernel.org, "Zhanghaoyu (A)" , "Huangweidong (C)" , Luonengjun , "Michael S. Tsirkin" , Eric Blake , qemu-stable@nongnu.org Subject: [uq/master][PATCH 2/3] kvmvapic: Enter inactive state on hardware reset Date: Tue, 3 Sep 2013 18:08:51 +0200 Message-Id: X-Mailer: git-send-email 1.8.1.1.298.ge7eed54 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ROM layout may change after reset of devices are hotplugged, so we have to pick up the physical address again when the ROM is initialized. This is best achieved by resetting the state to INACTIVE. CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka --- hw/i386/kvmvapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 7ac0fe1..f2e335d 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -510,9 +510,7 @@ static void vapic_reset(DeviceState *dev) { VAPICROMState *s = VAPIC(dev); - if (s->state == VAPIC_ACTIVE) { - s->state = VAPIC_STANDBY; - } + s->state = VAPIC_INACTIVE; vapic_enable_tpr_reporting(false); }