From nobody Mon Feb 9 18:44:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1684871820; cv=none; d=zohomail.com; s=zohoarc; b=L38MnTZ+U3vivTB+hG/BQSkeLAYBpPCq3TMyCKMf52VVSKb9OMZjsyExDLZXUCmOMInmNpIaaCEJU9h93tNtEsnaZafhwbp4w0rvuchS21AUY3d/ALjwRav1mRbQRxmcxj2BDrWIXGnN7XaBV/JYbdOqJZ/mm24af+podbUzB2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684871820; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Anz5dlSMRx2Ue0AdMLdpzN5IRHRJ9vVknwSj+KlouiQ=; b=bMBuFeCgoFC7b3GiR78TOuZgW15YFsME5Ya4cZUIHHt6BPUOp2OBwUcs0yn9uLKAowpl5cBS4bZ2T0La8RwvfkzhkrINwCRjgYEu2KHO26tvjBBQsfHktgpwVlZV+E4Bp7fIsDpYiQCseqIq1kiLKob5yhIWhVif422OwRkHTu8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684871820422189.65719819920946; Tue, 23 May 2023 12:57:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1Y7L-0000Pg-U2; Tue, 23 May 2023 15:56:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1Y7K-0000Nh-CN; Tue, 23 May 2023 15:56:22 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Y7I-0006SF-Od; Tue, 23 May 2023 15:56:22 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-96fa4a6a79bso603882466b.3; Tue, 23 May 2023 12:56:19 -0700 (PDT) Received: from Provence.localdomain (dynamic-077-183-025-113.77.183.pool.telefonica.de. [77.183.25.113]) by smtp.gmail.com with ESMTPSA id dk13-20020a170906f0cd00b00965af4c7f07sm4737740ejb.20.2023.05.23.12.56.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 12:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684871778; x=1687463778; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Anz5dlSMRx2Ue0AdMLdpzN5IRHRJ9vVknwSj+KlouiQ=; b=lhavaWV+SYTjo+t3S5Fuv8/3rTstVvBx6aE+XMI7G9/YILZZgGoqegTF4DN052SsqQ iAUcU3TYay1ie7OJphU2xE9UwUG39MwOdNXusTc91ywsV1Gz/vMjvvuzkU29s8lcwLyg FcG9aMbkHKSVgAtUALoFPEqFtbcM6E8AEItXg8G7geYZarXse39HM5IcfEM9AMAfaD24 29xW+EJjJ5eHKJ/0UJO5u9cRygAavLiHZzZL/l70G95Ki6xN0Lkt+k4gj5N5wKAdEs3s i6CLLAmQmZuVVjFmFpdUivzUmd2sP3S2g5ypWy7xSXNGzABiE46QqAXU8Sy9i1FWWKnj kCcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684871778; x=1687463778; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Anz5dlSMRx2Ue0AdMLdpzN5IRHRJ9vVknwSj+KlouiQ=; b=gMTz1TQuRWJbFnshSWvzD57UHk58yKa2nGrEQYdRdel+PtMyeysjClfPBwQi4Buj3/ hoDUKkk/A27yy7lVx7dTgL6dDXyFLnKz81O65rrOf4+FHZdekNA/C825L7YM0vq7The8 J0RANZNEGPAfPu33e5xrUAAP4k73XOFQkL1yWhxwYrsrQWEaHaRPcpa02NfRcy0Q/lZx rGK9WgcJKyTqzVwSuGN6+jKV0NMZkiYP6cuOgyEF5RphNsn0dOC5IlXVycR50VK7cF7/ KXefiseqyIv33A1IlNyYzbYaf0truBuUTrz/wjsdrpoea5rdJvVp+SQwS8ZPF0dFHUCY HOaw== X-Gm-Message-State: AC+VfDwFxT+YHKFoHs2cIeYnCTGBiBNH0SNP7rRnEqkEnr1fAmfaLXL+ ti4Hag2VAsyC1QliK89o7rWNjsks1ao= X-Google-Smtp-Source: ACHHUZ4mb7KXdDurq+1tOk1ptoZqbWeTgfymx1bxd/sh0EeDEQdiRXtooLMdgUZValSmHr9yx8XmRQ== X-Received: by 2002:a17:907:25cd:b0:96f:3f1c:3fd3 with SMTP id ae13-20020a17090725cd00b0096f3f1c3fd3mr12360958ejc.77.1684871778101; Tue, 23 May 2023 12:56:18 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Richard Henderson , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , "Michael S. Tsirkin" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell , qemu-ppc@nongnu.org, Marcel Apfelbaum , Eduardo Habkost , Michael Tokarev , qemu-arm@nongnu.org, Laurent Vivier , Paolo Bonzini , Bernhard Beschow , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/3] hw/timer/i8254_common: Share "iobase" property via base class Date: Tue, 23 May 2023 21:56:06 +0200 Message-Id: <20230523195608.125820-2-shentey@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230523195608.125820-1-shentey@gmail.com> References: <20230523195608.125820-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=shentey@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1684871822466100007 Both TYPE_KVM_I8254 and TYPE_I8254 have their own but same implementation of the "iobase" property. The storage for the property already resides in PITCommonState, so also move the property definition there. Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/kvm/i8254.c | 1 - hw/timer/i8254.c | 6 ------ hw/timer/i8254_common.c | 6 ++++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 191a26fa57..6a7383d877 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -301,7 +301,6 @@ static void kvm_pit_realizefn(DeviceState *dev, Error *= *errp) } =20 static Property kvm_pit_properties[] =3D { - DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1), DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState, lost_tick_policy, LOST_TICK_POLICY_DELAY), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c index c8388ea432..c235496fc9 100644 --- a/hw/timer/i8254.c +++ b/hw/timer/i8254.c @@ -350,11 +350,6 @@ static void pit_realizefn(DeviceState *dev, Error **er= rp) pc->parent_realize(dev, errp); } =20 -static Property pit_properties[] =3D { - DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1), - DEFINE_PROP_END_OF_LIST(), -}; - static void pit_class_initfn(ObjectClass *klass, void *data) { PITClass *pc =3D PIT_CLASS(klass); @@ -366,7 +361,6 @@ static void pit_class_initfn(ObjectClass *klass, void *= data) k->get_channel_info =3D pit_get_channel_info_common; k->post_load =3D pit_post_load; dc->reset =3D pit_reset; - device_class_set_props(dc, pit_properties); } =20 static const TypeInfo pit_info =3D { diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c index 050875b497..e4093e2904 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c @@ -240,6 +240,11 @@ static const VMStateDescription vmstate_pit_common =3D= { } }; =20 +static Property pit_common_properties[] =3D { + DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1), + DEFINE_PROP_END_OF_LIST(), +}; + static void pit_common_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -252,6 +257,7 @@ static void pit_common_class_init(ObjectClass *klass, v= oid *data) * done by board code. */ dc->user_creatable =3D false; + device_class_set_props(dc, pit_common_properties); } =20 static const TypeInfo pit_common_type =3D { --=20 2.40.1