From nobody Mon Feb 9 12:15:16 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=1683972632; cv=none; d=zohomail.com; s=zohoarc; b=SKuEFHyqqs40YhJuXdcCFk8B/yhQwS7E39zvfMZs4sDNOccmLSyqYPkRzEpF/qvm81Lib8wfbf1VmPHqEF5fjqr3XlEbuxARN8G960hwHRUxjXDhdsfyLnwsHIKHFIt+0wB06VgBSyNahHFmib+kS2XyPeGX6h8krc9hLYxryMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683972632; h=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=yK2AXj3fPSIz6Utpl7jtL9tKbRJUXN66thbr8qDAiuQ=; b=BkVe8scYyafwDXvGDkg44GRIwjDnteDfh5/ROF4uxVCjOFYE/OErEINDxxdUJ8Q/PtWhREHNf9tfarKCMzhutZb0z211rBjbh/F0og+x9AeUtXMAz+egA7IZWzTQC3f/kqfqXctkgT8ycePlRobHfey1ygUCXvTqZV9nbmZ3AVY= 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 1683972632514239.4940235477353; Sat, 13 May 2023 03:10:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxmBy-0008Ho-Rr; Sat, 13 May 2023 06:09:34 -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 1pxmBv-0008Fn-8b; Sat, 13 May 2023 06:09:31 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxmBt-0004Mi-4G; Sat, 13 May 2023 06:09:30 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-966400ee79aso1541188566b.0; Sat, 13 May 2023 03:09:25 -0700 (PDT) Received: from Provence.localdomain (dynamic-077-013-174-037.77.13.pool.telefonica.de. [77.13.174.37]) by smtp.gmail.com with ESMTPSA id jr18-20020a170906515200b00965f5d778e3sm6645285ejc.120.2023.05.13.03.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 May 2023 03:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683972563; x=1686564563; 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=yK2AXj3fPSIz6Utpl7jtL9tKbRJUXN66thbr8qDAiuQ=; b=dM83n9nUFMaLC5GveBnX9eYbelu0mxXCc818g1/fREvWc+EdUIa6hL57y44sPuJLGO 5JNeHBUgwhuOjFjoLYGh2hw57L2DgAZe/oIiNqEyzBZGsnfu4ElFP2faTtc2BTFz5eAY gu75oYYBgq8zhH/ORLxvDeDR3wjwJAgN4KVGy1d6C5kTEt2Eq3K1Nic1mU/gwMZK2E6Q pzlPpTSrj8aVJ8HlYmnZkFMmNgzUaQlHv4V+3sObFM/iYVYPxdU+DLjNkIrLNvrgagOy PLMTF7KBaeFyybvmDU0B4OiAYZ4hor2f56HPS6ttMs+C8ygHImmxuVUaHCRra2uSasEo pxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683972563; x=1686564563; 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=yK2AXj3fPSIz6Utpl7jtL9tKbRJUXN66thbr8qDAiuQ=; b=NXcHiliOtTSk69u6+ACKA/Z15mk0+NZMtpb1ZfKF2Enm7a1cBq5UwzM3iUeXhGDOCz vvFqG94djAfrBuVsXxhVMtDnvXj9ZVpviOlyes6DN/RH5UIZBzdbWr3VpSIVWTdXDiFV f7ErELFFiBEL8libB4VWLXOcdLEsLD8C8AzlBJ8TB+qNA4vT9c/7ek0poWr6NhPta4ps D1EUVWwQ/x3TrzfnGjGxD3jYuHyVl7RYlo3RQ4l3xTU+44Qhp0ssZedGXpwd36RqhoU0 kQXQDZ62zZWMQHv0z5LYQiGtD3u/kNevOHXSsRybiNsT/yOesGn1mWqeSrEbOEgEuDrR Y4Hw== X-Gm-Message-State: AC+VfDxhmeckxGkjtp3ZBa2XZlOHrGhTBq8mgj+cbLT/bMPAexB3DIvr /FasCy6DENUcbpC6muVcY77AI0U3g60= X-Google-Smtp-Source: ACHHUZ5AUaO6yiHGekRTJ8vdomzOwy/8C0TCm5WR69hATQJFsimwD7Xa0bNVx7UfBAc3Z7B7pDcnVg== X-Received: by 2002:a17:907:9606:b0:932:7f5c:4bb2 with SMTP id gb6-20020a170907960600b009327f5c4bb2mr27463391ejc.75.1683972563195; Sat, 13 May 2023 03:09:23 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , qemu-arm@nongnu.org, Marcel Apfelbaum , "Michael S. Tsirkin" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Michael Tokarev , Laurent Vivier , Eduardo Habkost , qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell , Bernhard Beschow Subject: [PATCH 1/4] hw/timer/i8254_common: Share "iobase" property via base class Date: Sat, 13 May 2023 12:09:03 +0200 Message-Id: <20230513100906.46672-2-shentey@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230513100906.46672-1-shentey@gmail.com> References: <20230513100906.46672-1-shentey@gmail.com> MIME-Version: 1.0 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::634; envelope-from=shentey@gmail.com; helo=mail-ej1-x634.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: 1683972634036100003 Content-Type: text/plain; charset="utf-8" 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 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