From nobody Wed May 1 04:07:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490184888827815.7819706918233; Wed, 22 Mar 2017 05:14:48 -0700 (PDT) Received: from localhost ([::1]:50695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqfA5-0005MZ-Kj for importer@patchew.org; Wed, 22 Mar 2017 08:14:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqf9C-0004wa-JF for qemu-devel@nongnu.org; Wed, 22 Mar 2017 08:13:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqf99-00083j-E6 for qemu-devel@nongnu.org; Wed, 22 Mar 2017 08:13:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53638) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cqf99-00083d-5S for qemu-devel@nongnu.org; Wed, 22 Mar 2017 08:13:47 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2F254E05D; Wed, 22 Mar 2017 12:13:46 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-117-235.ams2.redhat.com [10.36.117.235]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2MCDifu017951; Wed, 22 Mar 2017 08:13:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D2F254E05D Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D2F254E05D From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 22 Mar 2017 13:13:44 +0100 Message-Id: <20170322121344.5484-1-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 22 Mar 2017 12:13:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] Revert "apic: save apic_delivered flag" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dgilbert@redhat.com, Pavel Dovgalyuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit 07bfa354772f2de67008dc66c201b627acff0106. The global variable is only read as part of a apic_reset_irq_delivered(); qemu_irq_raise(s->irq); if (!apic_get_irq_delivered()) { sequence, so the value never matters at migration time. Reported-by: Dr. David Alan Gilbert Cc: Pavel Dovgalyuk Signed-off-by: Paolo Bonzini Reviewed-by: Peter Xu --- hw/intc/apic_common.c | 33 --------------------------------- include/hw/i386/apic_internal.h | 2 -- 2 files changed, 35 deletions(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 7a6e771..c3829e3 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -387,25 +387,6 @@ static bool apic_common_sipi_needed(void *opaque) return s->wait_for_sipi !=3D 0; } =20 -static bool apic_irq_delivered_needed(void *opaque) -{ - APICCommonState *s =3D APIC_COMMON(opaque); - return s->cpu =3D=3D X86_CPU(first_cpu) && apic_irq_delivered !=3D 0; -} - -static void apic_irq_delivered_pre_save(void *opaque) -{ - APICCommonState *s =3D APIC_COMMON(opaque); - s->apic_irq_delivered =3D apic_irq_delivered; -} - -static int apic_irq_delivered_post_load(void *opaque, int version_id) -{ - APICCommonState *s =3D APIC_COMMON(opaque); - apic_irq_delivered =3D s->apic_irq_delivered; - return 0; -} - static const VMStateDescription vmstate_apic_common_sipi =3D { .name =3D "apic_sipi", .version_id =3D 1, @@ -418,19 +399,6 @@ static const VMStateDescription vmstate_apic_common_si= pi =3D { } }; =20 -static const VMStateDescription vmstate_apic_irq_delivered =3D { - .name =3D "apic_irq_delivered", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D apic_irq_delivered_needed, - .pre_save =3D apic_irq_delivered_pre_save, - .post_load =3D apic_irq_delivered_post_load, - .fields =3D (VMStateField[]) { - VMSTATE_INT32(apic_irq_delivered, APICCommonState), - VMSTATE_END_OF_LIST() - } -}; - static const VMStateDescription vmstate_apic_common =3D { .name =3D "apic", .version_id =3D 3, @@ -465,7 +433,6 @@ static const VMStateDescription vmstate_apic_common =3D= { }, .subsections =3D (const VMStateDescription*[]) { &vmstate_apic_common_sipi, - &vmstate_apic_irq_delivered, NULL } }; diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_interna= l.h index 20ad28c..1209eb4 100644 --- a/include/hw/i386/apic_internal.h +++ b/include/hw/i386/apic_internal.h @@ -189,8 +189,6 @@ struct APICCommonState { DeviceState *vapic; hwaddr vapic_paddr; /* note: persistence via kvmvapic */ bool legacy_instance_id; - - int apic_irq_delivered; /* for saving static variable */ }; =20 typedef struct VAPICState { --=20 2.9.3