From nobody Fri Nov 6 02:25:49 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=1793908308; cv=none; d=zohomail.com; s=zohoarc; b=hAqr+3jNkA3ihWff61XokMdiOU9TAzwE1Qi66Li0RNBK63mip/L66OZpod7Q1fN6/rZH69mM5mEu6CjX2g56OK+xy6C4/HRcvcXaGSDW8aL0Ee42jbLse2IhEHP/TTaj99JSMwM0YWozjBqBDKd0xRsYMaS6/erFCMmaO+QO9VU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793908308; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WCuKVbiV8jkOh+eIzjYMJHPHCpTsJrz9kcbtXR7lnvQ=; b=eBydKhvIAfekwegisTzmNipqXSAjMwXmdIjufUbqVtLHPQzNrfZYgBGTIaGIvuCgx1fvqqKbWHPbeik/uUrWRFl3MUHLMiP4ukjG0KjDLPbDyLLlb88fZeVd6kQGuTp054aYnvNmbM0NEm/ZNdX681PI9P+V47t3YXc30wNmQuQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793908308371798.9652762322739; Thu, 5 Nov 2026 11:51:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP3Tq-000777-IB; Thu, 05 Nov 2026 14:50:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xP3Tb-00073Y-Jv for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:23 -0500 Received: from mail-dl1-x122e.google.com ([2607:f8b0:4864:20::122e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP3TZ-00024L-I9 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:23 -0500 Received: by mail-dl1-x122e.google.com with SMTP id a92af1059eb24-1438d9363fbso818309c88.0 for ; Thu, 05 Nov 2026 11:50:21 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b245c1c283sm19459875c88.4.2026.11.05.11.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 11:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793908220; x=1794513020; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=WCuKVbiV8jkOh+eIzjYMJHPHCpTsJrz9kcbtXR7lnvQ=; b=wjHiCLCsoeipRXcW4pJ1Whl+ny4z86Tlw3HkSa8tV19KmDh/PbGG6tgnFlkx1qVmDS 05aWhMnHrqTIkkKPG/8VD0TgKjgwhF+PU6+EUbXt/aEORyVsANEVHdjsxjIw3PecPFpK +AFOdckFLw6oyEeXZ6EpwduBdiS/8j7gOQ4fMWjjuD+Kz3ii8ZZIc+PdfLEiqZm9GmpU A+GdgQweKWgZfi1mXULSp8o8d6xO9fjfbuqRmBqq/ylwUaE5cOoWkZ2uTsLcyzk31Vh/ pPffZmwUql+Zmv8Go3q6BVFTFIeSr9VkYLotRervufPCabSerCenUNXnUoqB/z+9V0jD sRCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793908220; x=1794513020; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WCuKVbiV8jkOh+eIzjYMJHPHCpTsJrz9kcbtXR7lnvQ=; b=AJEtlIUEAElozs/ZEf8LZLiY4YNJ7R+z5tdNERJa46e7OkOmoo/VrJPiXQS9FFfl/X BE7IHolOf2pGQrWiQNJrpuEwJCYITNQ6Ih5V9yZ2B4XZvFoISToBH+hzrSk36tDpKTef p5AazzJdup29n/r9o0cpEcKTno8O6p0QsF/lT2VaxTUzPaT1a6ngBQwCNWVo4ZIyCtFG krrAyjy3QzyhKHzhzDFShyzvLYp6XA5YunsdLBWB1lpyHau7dmf3dqhYTb1CaH/CQCeT IHus/F1sofNoDBSEtCR6vIw/ju/A5nTBEHrmOb3/yeH6Wu6y1nBHLYhKT7pj6xpxHGB+ obag== X-Gm-Message-State: APuU4Z8I5J2XKkb7Gy1xz88YqVRPt5MUvTPxKlnDTeg/5PXd3F8DILIc gmkIS9nncJ34KAwNlyCh5HfB0lL04HIMGFeiWMdX9ikEn3SDnpGq1bNwnkYgE0gwCqc= X-Gm-Gg: AYBFou2yGJ/oAe4b719gMscTF+ui5FeBo3GYmMW3bEuhMfJ65sluZyFIGdQugk5K0UV etSIuevXdxLirMakAidtokGncRyHbGuSkAX3V8ydT4J2ZkIbPmHWaX13PDUlgGV90DsBSLOfUZH GitP95KxCmn8gBpBe1GdiOB/udvmFI0PQWX8RL71rMnGpa1N9a5mIuEHGMi9kNEHBEWgbok1trB VJbPHdI2QpPkr5kUC1vqdwMtYPcqUxEwO+Uc8VXb4LUGb1Q0h22bU+GIGqePCl2mkhjl3VBMjHG e22eqbnrwy2r6TJNj+IKZFg/nvoCk+RgCU4Zg1Cs8maeWWg6qSZv7bmWM7jwZuHGU+xoD+VVYJG yzfw0NPL8IixIF40090HFhBQWR8GnxsxcvlsmG2iiym1hqNA3/PmAsUYsDzbxYXjBoLX9Xj1Fqf 6hyF0+i4dX3KAga0j/UfIt1JDSB1jI1s+CToprdJMNMGwZwXaizlgGQaf5SfHG7YJ/X6GDDp5n4 SAltFGbQBr+kNb4DiyKBxWk3XQD+FsX6PEWCI9V/i3ncaX24mmF8yuIYnK9VfjPu2vHWyzVubJi WKNuEYKBI90XmJ0UziT1U+H/DfmvrW27MDGGJ3Ee0acrGN98 X-Received: by 2002:a05:7022:f107:b0:14e:37c7:2b20 with SMTP id a92af1059eb24-1b25d3399c6mr14075c88.20.1793908219746; Thu, 05 Nov 2026 11:50:19 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Matthew Rosato , "Michael S. Tsirkin" , Paolo Bonzini , "Edgar E. Iglesias" , Eric Farman , Cornelia Huck , Philippe Mathieu-Daude , David Hildenbrand , Fam Zheng , qemu-s390x@nongnu.org Subject: [PATCH v2 1/4] hw/pci: Avoid guard loadparm with target_s390x() for s390x in class_init Date: Fri, 6 Nov 2026 03:49:54 +0800 Message-ID: <20261105194958.1117-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105194958.1117-1-luoyonggang@gmail.com> References: <20261105194958.1117-1-luoyonggang@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=lists1p.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::122e; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x122e.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 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: qemu development 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: 1793908308782158500 With the multi-target work, the goal is to move to a single unified QOM tree that applies universally across all targets. This complements the migration away from instance level properties to class level properties, which again aims to ensure a fixed QOM object model for each class. This requires that properties are either unconditionally registered in the class, with invalid options rejected at runtime (for example, during realize()), or that distinct subclasses are used for specialized use cases that need a distinct impl for some targets. It is harmless to have the 'loadparm' property registered unconditionally so take the simple option. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Yonggang Luo --- hw/pci/pci.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index d8b117799f..3204939469 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2889,6 +2889,11 @@ static void pci_qdev_property_set_loadparm(Object *o= bj, const char *value, { void *lp_str; =20 + if (!target_s390x()) { + error_setg(errp, "'loadparm' is only supported on s390x"); + return; + } + if (object_property_get_int(obj, "bootindex", NULL) < 0) { error_setg(errp, "'loadparm' is only valid for boot devices"); return; @@ -2906,14 +2911,11 @@ void pci_qdev_property_add_specifics(DeviceClass *d= c) { ObjectClass *oc =3D OBJECT_CLASS(dc); =20 - /* The loadparm property is only supported on s390x */ - if (target_s390x()) { - object_class_property_add_str(oc, "loadparm", - pci_qdev_property_get_loadparm, - pci_qdev_property_set_loadparm); - object_class_property_set_description(oc, "loadparm", - "load parameter (s390x only)= "); - } + object_class_property_add_str(oc, "loadparm", + pci_qdev_property_get_loadparm, + pci_qdev_property_set_loadparm); + object_class_property_set_description(oc, "loadparm", + "load parameter (s390x only)"); } =20 MemoryRegion *pci_address_space(PCIDevice *dev) --=20 2.55.0.windows.3 From nobody Fri Nov 6 02:25:49 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=1793908308; cv=none; d=zohomail.com; s=zohoarc; b=RJSBL0G3uoe1hGRyUjnfg2iG0RlC/mwk1Pwve5VB++Ss8fchBmCc7WObg3mVous8cdLSVvPa2wiih/b1O3KlQWvdlSX5qZec9Pq1MHyrCJ+h4uYAxBLchsZnkLQvQvs+OSqQj/G94M4ptXK2bLF4nkIwRRiEvVxnGjeIBsIk5w0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793908308; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=b4Qkg1WlnjlDPElKS1NfJbk3KOMVachnC09ppt17eF8=; b=I0+yr5bDAXZtcIsyYkAYgWa/RSUHLmyKqgjH/pwPahnQ9GlMX6YK8mz+U8fXPF7LCG7VTF4d/uaP4WrWpU3n1ION8rXot3xFLz+XXYL82k3ekDN83jDkh/cAJwH3FcUJaUjpSKExvE/JcjIGnQroSJm6F4BbWw7x1jqAhlqQcuM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793908308496112.24608782986536; Thu, 5 Nov 2026 11:51:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP3Tr-00077O-QZ; Thu, 05 Nov 2026 14:50:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xP3Tn-00074r-LP for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:35 -0500 Received: from mail-dl1-x122a.google.com ([2607:f8b0:4864:20::122a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP3Tl-000279-Uw for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:35 -0500 Received: by mail-dl1-x122a.google.com with SMTP id a92af1059eb24-15ea896ddc8so3820955c88.0 for ; Thu, 05 Nov 2026 11:50:28 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b245c1c283sm19459875c88.4.2026.11.05.11.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 11:50:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793908227; x=1794513027; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=b4Qkg1WlnjlDPElKS1NfJbk3KOMVachnC09ppt17eF8=; b=A9sB8fDetfvnXUwVoVSL+u/M7QKLY2ID+oKRpplbOR7qcYbVaCUfwHWkRp8dZdFh3H 9RdI9zWaJZzt9tET2Y2wQh51QM0NvYkNFgnP+h2AYTNltHbsotaGlB76jYXN3H8YLyGm gmIP6eVgreyD0QJSZpq6H0cANtDThKPHJriWRqZNU4amP3HCTEOfIrp8L4SPaWJfizdj ObKfxh4DL3514Uk3y2VhuRhDPJIJlgJtyMqZesgVUjWsr9ttP6P7P567GCbKYr/u0APJ hCA7ZlsIqGizoweqrlA9OS6NC3KVRYGOSxVkmg8SjS5b54zD7nx98eEZ3tjIwEP1rwj3 TP9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793908227; x=1794513027; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=b4Qkg1WlnjlDPElKS1NfJbk3KOMVachnC09ppt17eF8=; b=Zv5f4HAhl1tf+nzzGeTfxq7LeSMVgHHLNhfWLc8aoqRbdEjamjEgfULmmXtZ2oTexC 5+xF1s1/qLbgXPRgBh+uIgLR28uGSb2jdioEis4QDRufnX1lkPN2w8JRAjVK82jUnjf1 GJ1vHGNwqb2VyTvCWa1xAbp6Zyc9Hk7nObyD7F/cJNPLe0kbT0k7XoUTcu00+V5U0EGf 7WPXvafcK6yajB88LDCO4airf1Q9hiTfFVW+n6nMRJE1rJth86RRL1YpdknQiVv40ppS BAXReTxzpMCSjnvWbzyhPClb0Kw0mlINNR5Or1XFZ4fwb2ybuAv9r8+MpIb4vPQlRH7c 3txw== X-Gm-Message-State: APuU4Z/BicIx/j5Z+kBIEdo6KYUAnaSHIi9I0Fqnt3BqYV8+/1TAUCAy horQvUOu1NulNOtsdR7s1WOZHLhDbmCnBTTG1Rx7SkFp3pUPmMME2GRZ7inb57ql/3g= X-Gm-Gg: AYBFou1YA/2ZkfPcdQS0PiVFWFrx+mGRXEyNn2yWDcdnZl5Q2pYvGQzG3JY6VtimWoT uL1CiS+FDlt1v2GXafxnsg6EGM+GI3V2hVi2CMZyUmK3FR9moFtjRhy3IgTg9jtb/4aWBFc0KkC pUDWqLaoSFlRJYVwnIu+hSs/5WEq4HwnmgyOCcggEW9BNTD6wwV7Lawth6eECCxuKYbYj6jDJQu IGzP5rQoG0wX7BZ73albaSrXznJcOFTb1+5fDGRoirH7XGDg36GzQODMvuC4ur6yKeWaeaL78MU VUdup5y+F34qqb7dR0/UapJ/BHgbQJNzUpYBIYc29I+3x4u7HkVQpDKJUIcBWwo5KrEwazS5ErA fnTBwyrqIwpN+Bv3bzAzVRcjHyMRMe77ko5/xbkR0heeklBJvOLW7z9f0Pb4Fb/zV+iSYeWChUL yncUu+71IUN2pzb4EqU6WS5KNan6kIhTmKkAZNIdvaUKUu4iZX+tZTJHg/1BkWaOeBL8gK0oAZP I6gHeJ9g865RHquZZQKs9EJcxyzwi6vyO1J+ct/PrgdIbA/SUvskgM68s2A66Cr14cmEnKzOIbj 0PoKAWJP6zLr3/RKjWL+YGsbigR01dAsGNUMR6E/k8Pe41CY X-Received: by 2002:a05:701b:2093:20b0:19e:f233:4f87 with SMTP id a92af1059eb24-1b25d2f734dmr33918c88.15.1793908227309; Thu, 05 Nov 2026 11:50:27 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Matthew Rosato , "Michael S. Tsirkin" , Paolo Bonzini , "Edgar E. Iglesias" , Eric Farman , Cornelia Huck , Philippe Mathieu-Daude , David Hildenbrand , Fam Zheng , qemu-s390x@nongnu.org Subject: [PATCH v2 2/4] hw/scsi: Avoid guard loadparm with target_s390x() for s390x in class_init Date: Fri, 6 Nov 2026 03:49:55 +0800 Message-ID: <20261105194958.1117-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105194958.1117-1-luoyonggang@gmail.com> References: <20261105194958.1117-1-luoyonggang@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=lists1p.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::122a; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x122a.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 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: qemu development 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: 1793908310834158500 With the multi-target work, the goal is to move to a single unified QOM tree that applies universally across all targets. This complements the migration away from instance level properties to class level properties, which again aims to ensure a fixed QOM object model for each class. This requires that properties are either unconditionally registered in the class, with invalid options rejected at runtime (for example, during realize()), or that distinct subclasses are used for specialized use cases that need a distinct impl for some targets. It is harmless to have the 'loadparm' property registered unconditionally so take the simple option. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Yonggang Luo --- hw/scsi/scsi-disk.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index de2b6d85da..7fec5a74d1 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -3212,6 +3212,11 @@ static void scsi_property_set_loadparm(Object *obj, = const char *value, { void *lp_str; =20 + if (!target_s390x()) { + error_setg(errp, "'loadparm' is only supported on s390x"); + return; + } + if (object_property_get_int(obj, "bootindex", NULL) < 0) { error_setg(errp, "'loadparm' is only valid for boot devices"); return; @@ -3229,14 +3234,11 @@ static void scsi_property_add_specifics(DeviceClass= *dc) { ObjectClass *oc =3D OBJECT_CLASS(dc); =20 - /* The loadparm property is only supported on s390x */ - if (target_s390x()) { - object_class_property_add_str(oc, "loadparm", - scsi_property_get_loadparm, - scsi_property_set_loadparm); - object_class_property_set_description(oc, "loadparm", - "load parameter (s390x only)= "); - } + object_class_property_add_str(oc, "loadparm", + scsi_property_get_loadparm, + scsi_property_set_loadparm); + object_class_property_set_description(oc, "loadparm", + "load parameter (s390x only)"); } =20 static void scsi_disk_base_class_initfn(ObjectClass *klass, const void *da= ta) --=20 2.55.0.windows.3 From nobody Fri Nov 6 02:25:49 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=1793908277; cv=none; d=zohomail.com; s=zohoarc; b=Fk2jUyNOg37bVwTLHo2A2zFA9HViGSRNYJTpTxlx3/693YTTpvUY9IZc9WoW0YbBSpkyJPJwVPu4OqibmApc2wGQvDBkQyVteNpnW2VPE4aPQ9ncKyCIUPUHOghjQhapayt9cd+adoupIC0szgsdgt2OyBru3KdM+s42id1RjTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793908277; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IcVukkOhjhrJmjYiZP9Q++vrUopM477cW4C0bRyyBbg=; b=DpTL/dsxu+vyp15iQu1Zc0NtehMSLYK5S/FiRYVpyiRfcdxEswMAHysrlxYYPFojDec2ys6/LQn+rFhLSW2lXilNz0LKKpt4ZgqlVjZGlRoHCzIXNy26+9Y9Ba5SzZ7suLt8QLtYOaR4j66Zing45yQ/cVHWZH9vptG8sc65210= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793908277449344.7052486756911; Thu, 5 Nov 2026 11:51:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP3Tt-00077w-5P; Thu, 05 Nov 2026 14:50:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xP3Tr-00077K-49 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:39 -0500 Received: from mail-dl1-x122e.google.com ([2607:f8b0:4864:20::122e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP3To-00028Q-4k for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:38 -0500 Received: by mail-dl1-x122e.google.com with SMTP id a92af1059eb24-1a3c08d6928so3477917c88.0 for ; Thu, 05 Nov 2026 11:50:35 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b245c1c283sm19459875c88.4.2026.11.05.11.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 11:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793908235; x=1794513035; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=IcVukkOhjhrJmjYiZP9Q++vrUopM477cW4C0bRyyBbg=; b=B2/uH9aWkkf9K95V1VhQUzvVfsGKUg7I0H4ALFNKd4q/GtoM4PYB1E+5KBAyv+cayi A9/aDHrPtu8ZZJeQER5D2b1qPyr5OAvcXgzUJ7xuElrm7aOxeAHWtuVaFOqvOwGqBUIh POLVNNWrM90n3OJBEyg1zKB1IWi6SXOP1GUwec3oD78lmvj6zg8M9FHJtup9Q3Zpo6Bl O/mUSrVXY0TguHFCRMTAgifDh+K2SbcHEveLX1aMtESmrTznn3HhX4nm32jwPbhl1XOf uMjZYgC51NIHMTrn04tOxpj8qbSZ7JEb4y771C/RwQo9qYrix9EnZFYoPvVrHCmHqN0y 49qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793908235; x=1794513035; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IcVukkOhjhrJmjYiZP9Q++vrUopM477cW4C0bRyyBbg=; b=Gw0qsnUWqYgbFwgkaLUlxXOz1MPi+z6FHCOTpnPH+IBmmb34imWqWqTLE9sVgB7+3A g5qoTvNpkPcRyq86iBI/bdVYsT3R/WDRthugmVPPLrYpT1HpxWZtZVPQl3bJf/JqIYUI 35CkNcxjw0axlJZN0gDm7eJtoqvHBbgDiwdbNhgClTMtvqVhU3QOWgRQKvt204sfPhPm hsRsTlOTVMD4ACzURctLSvevoGe/Fw6gyMILa7Rclhr8u04cef4axjIMwphKfH1KiOrR yz7LzXB77vlxM8HbxHZ47lA/BX2r7r+1MmcZLSkZURKhLCiXzEjCKnLJGjODyvDaDpaa q+Gg== X-Gm-Message-State: APuU4Z9kbypm0rsxaDSe+eZecRyjnLNB4PhQr/ZYKv8HGs92YX+bjW3S 1KpcLHEV6XQGohetdGFoA8UfMqzkZW1HgPHw4acKXo1uAqdsxMug4s4RbPvJybuIBAA= X-Gm-Gg: AYBFou03rU75ifmBrE/GMe+sK27tDOTxHzs9X4i+J1elRx5FZe2ocslK3C11Kotmp5J OxKD5LKSgmKAJ8Y4nnVXzgZqlC1rwTubGdKnE4amP3wtobQemblMSer3VAu8xbzSFtMAY3iOQDW 43yHVv/Clx4hQfmAy6yygSLFltbWJMl2XLB+dd62bV8f9MrDfeYYl44XT+r0ah3orNuq1lonHNi ZQjUc4fnqQiZTopQk8vRdyu0AEFki88nEiLDnl/17AUFAkf95Z/fHugbqc61RpughBMOrkNdwCo jiqrd0OBGRHNAjZ3+4Fvu0N8+mfMv/xbbjaUSNd6bxPfSoko4ymHqI5ghMwLfRUHaU9dyo+0QAF zGOKro0rO3c+07Ffdhq7Q4vP5m81lqCYoJMma3kRz04KX7J9y184okGDqvVoYkgyrK3eXki2x/e wt+/ohLk9jgzGE+Nts3M/fQLp6aihFDrSnnbdeT8NXTL7Qr67Pz6tqPim/LRFEALjDm1dHCUchq ea5Ltvd8E3LRfm8t/Ugzeviop6I6OwtleVF7QEv4ROXrzbpEdfpgtArQENsSlzJfbtAIinYM3T7 kYurFm7L2N/YP19091ffwQsogM8S6AbdUpSedoqbbYBImd9X X-Received: by 2002:a05:701b:4515:20b0:1b2:3448:840f with SMTP id a92af1059eb24-1b25d31edc9mr24329c88.7.1793908234428; Thu, 05 Nov 2026 11:50:34 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Matthew Rosato , "Michael S. Tsirkin" , Paolo Bonzini , "Edgar E. Iglesias" , Eric Farman , Cornelia Huck , Philippe Mathieu-Daude , David Hildenbrand , Fam Zheng , qemu-s390x@nongnu.org Subject: [PATCH v2 3/4] hw/virtio/virtio-mem: Avoid call to target_info() in class_init Date: Fri, 6 Nov 2026 03:49:56 +0800 Message-ID: <20261105194958.1117-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105194958.1117-1-luoyonggang@gmail.com> References: <20261105194958.1117-1-luoyonggang@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=lists1p.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::122e; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x122e.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 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: qemu development 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: 1793908278512158500 With the multi-target work, the goal is to move to a single unified QOM tree that applies universally across all targets. This complements the migration away from instance level properties to class level properties, which again aims to ensure a fixed QOM object model for each class. This requires that properties are either unconditionally registered in the class, with invalid options rejected at runtime (for example, during realize()), or that distinct subclasses are used for specialized use cases that need a distinct impl for some targets. It is harmless to have the "unplugged-inaccessible" property registered unconditionally so take the simple option. Done by merge virtio_mem_legacy_guests_properties into virtio_mem_propertie= s. And the rejection handled in virtio_mem_device_realize Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Yonggang Luo --- hw/virtio/virtio-mem.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 546ea18b7c..fb02958102 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -880,7 +880,11 @@ static void virtio_mem_device_realize(DeviceState *dev= , Error **errp) break; } } else { - vmem->unplugged_inaccessible =3D ON_OFF_AUTO_ON; + if (vmem->unplugged_inaccessible !=3D ON_OFF_AUTO_ON) { + error_setg(errp, "'%s' must be 'on' on non-x86 targets", + VIRTIO_MEM_UNPLUGGED_INACCESSIBLE_PROP); + return; + } } =20 if (vmem->dynamic_memslots && @@ -1573,9 +1577,6 @@ static const Property virtio_mem_properties[] =3D { early_migration, true), DEFINE_PROP_BOOL(VIRTIO_MEM_DYNAMIC_MEMSLOTS_PROP, VirtIOMEM, dynamic_memslots, false), -}; - -static const Property virtio_mem_legacy_guests_properties[] =3D { DEFINE_PROP_ON_OFF_AUTO(VIRTIO_MEM_UNPLUGGED_INACCESSIBLE_PROP, VirtIO= MEM, unplugged_inaccessible, ON_OFF_AUTO_ON), }; @@ -1640,9 +1641,6 @@ static void virtio_mem_class_init(ObjectClass *klass,= const void *data) RamDiscardSourceClass *rdsc =3D RAM_DISCARD_SOURCE_CLASS(klass); =20 device_class_set_props(dc, virtio_mem_properties); - if (virtio_mem_has_legacy_guests()) { - device_class_set_props(dc, virtio_mem_legacy_guests_properties); - } dc->vmsd =3D &vmstate_virtio_mem; =20 set_bit(DEVICE_CATEGORY_MISC, dc->categories); --=20 2.55.0.windows.3 From nobody Fri Nov 6 02:25:49 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=1793908278; cv=none; d=zohomail.com; s=zohoarc; b=M8GZ/XTg2m2+JW7YTyOUsqsB3+0uDsD/5dZTwRxdNc6KaB+adc7fIb5ZhJfzPDU5dsi/ur58S1KsOo6gTvYfC6TZxchZMIzj2d7/BHURty2D4+uMBrjiyCAV8PJnpQ2yr2NY0eGJR8/AnGVfBfjkD1za20M3ILDW+rk4dZAnRSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793908278; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SqfsJahb0343aGHyFL6VfVG8oC0BEkKW5Of59LmFpI0=; b=Z5cDyovpjxyL5+NpSGXHMpnwLPhOgR4Gi1aCB/7kgs/0XAR6HBJO+1E5Ke+eD1yfKJLUsqs+sVb+PVoLhRDyCkUfXqgiGGx7ha7VJ/Chl/nil+KhoeC5KAD1v343HpaFm4+mS5LUGsha+NbiPzKDQs+4bCpDm9ldZeuCl6u50Cs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793908278981308.40721323630737; Thu, 5 Nov 2026 11:51:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP3Tw-00078X-NA; Thu, 05 Nov 2026 14:50:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xP3Tv-00078G-Je for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:43 -0500 Received: from mail-dl1-x122b.google.com ([2607:f8b0:4864:20::122b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP3Tt-0002AD-UX for qemu-devel@nongnu.org; Thu, 05 Nov 2026 14:50:43 -0500 Received: by mail-dl1-x122b.google.com with SMTP id a92af1059eb24-1a3c08d6928so3478043c88.0 for ; Thu, 05 Nov 2026 11:50:41 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b245c1c283sm19459875c88.4.2026.11.05.11.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 11:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793908240; x=1794513040; darn=nongnu.org; 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:content-type; bh=SqfsJahb0343aGHyFL6VfVG8oC0BEkKW5Of59LmFpI0=; b=KcIcR9PF7GVtK822CpgDuESegoPtsKsY6fiwFloLX3/uGUnQ6bJKDpC2PHgiHKXlap wht4hF+JRPISZe4r6WrrWuDBCsowCWL/GbTmDBN5QYq9ujVFKIUuWiQ+GslaeOlyDLZg SRcH7I5pyHytUxlMVlzPAj+3CaRLIwGzgv/X/OLDzanB9zWIEiPeuOOuGmxBSNSR6ehd qrmvFQoc6nb8KPttJI9bbPFCyWX7x1grIey/6Svx25Y42uEAfe14HqI/+hleDBzIn/BH +pY47WU8yJ9GiMjsktrAYrdrXjLgrzrBaqNFkwHyh1F1Zhpdx/FSVvCSZIhGKQSGROvC ZrJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793908240; x=1794513040; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=SqfsJahb0343aGHyFL6VfVG8oC0BEkKW5Of59LmFpI0=; b=ypR3jjSiv5vZNMz6Sh351L3ExrC5aHVgBJqJu9ckIeKKasrpMELxRlKcJutg5GyJYO noQrLCSHN1jKT1uYF4QGUefS4qvilBD8qG8aafVqCwlmOo1ZXovbjiMICgw2JipbEQny tld3XDl38mwYiXC0rPH037b4ZD+2PuiALFrVSm/AU3s1i/l20OZxsRBfai1eGE89LD+1 8NM4LLCRp09Ym91SdwA7M0J0CfI5h+RxOcWtxyH69FRscwXcNjQghlkdcArnCXEX6qgS 4t2hZYkyy//MKqhYHLaQ/mVVcBUYK5R0KvZoCKaIuZU4cVvDrup/IKxo/HevSVQmsrC+ CcTA== X-Gm-Message-State: APuU4Z8vu3/v0F5jI1eAJlQCmeM+ZxGVrW0aOC5catBz2h/3Pktgue3R iDJxHRi2E2qCBnJ5ENhTTGfEHCm/WMbMbatRDm1KT1/71cJ4F7B6EmDznOpvz3Y3OWs= X-Gm-Gg: AYBFou2B3ou8xXLb74H/SaYnzxZJNfz5gEcdOSsC7FRqlxviZDhGRAqM+v/fePLFt8A wjPyyz5+0zVU5qlJoHrhLJ//of1t5lHzjjOpsAZMPNoBloqgijNJgpKw6bDoGwRzw1VzKRWNOWq AIZky68WLcaFMsXdDOZvKj5zay2vPaCDztJV6K/R3KvTAy07uG0Q7qlHLzGSDqAEAMCQ/qXqzOf 2nAGF6KG/gEC0ULQ/TftxGXIcuQlow9H14H6COhKhP5yMUlhZqEvtUNRtbUaJI7X3FENqp1hVzj ymM9y4PEYO5OsAzKu1ucAxFv9xHwYyUm/qh1uA09BoiCBjhZS3lvpLIhYFIe92NC6edn3UGhS0k nHxbFYPDq54cjuXJtIrfpmrrNjKTv6IcInoXpTLBMdtrwVrNYXSqP+JK87Zgl5AP0guWLrjY1vz n+AfTAQoTu3TEK9DKgMHn4iRCD0DrR4Or1WLqxrxTaQsRA38C66IYOcWX94H1D3RYOiQO2xUhA/ 3HHbzkIjnSfliU3MEZk2NmhLJgcHdaNzVLFNbilDAeOzF4OdUEip1wc0SD3LGOwNiFimunv1iux us9LtGT87gDVoifBCKFrKZW+wqluIYLmw8Pl1x2aGiyhHWbk X-Received: by 2002:a05:7022:1216:b0:1a9:f3d2:6262 with SMTP id a92af1059eb24-1b25d38a432mr6216c88.36.1793908240119; Thu, 05 Nov 2026 11:50:40 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Matthew Rosato , "Michael S. Tsirkin" , Paolo Bonzini , "Edgar E. Iglesias" , Eric Farman , Cornelia Huck , Philippe Mathieu-Daude , David Hildenbrand , Fam Zheng , qemu-s390x@nongnu.org Subject: [PATCH v2 4/4] hw/microblaze: defer PetaLogix endianness default until init Date: Fri, 6 Nov 2026 03:49:57 +0800 Message-ID: <20261105194958.1117-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105194958.1117-1-luoyonggang@gmail.com> References: <20261105194958.1117-1-luoyonggang@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=lists1p.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::122b; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x122b.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 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: qemu development 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: 1793908280326158500 Content-Type: text/plain; charset="utf-8" The PetaLogix machine read its endianness default from target_big_endian() in class_init. In a multi-target binary the target is not selected yet at class_init, so the default cannot be computed there. Set the property default to "unspecified" instead, and resolve it to big or little in petalogix_s3adsp1800_init(), where the target is known. Until the machine is initialized, endianness reads back as "unspecified" rather than big or little. Reviewed-by: Pierrick Bouvier Signed-off-by: Yonggang Luo --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 4ad04801ce..27f5e477a3 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -84,7 +84,13 @@ petalogix_s3adsp1800_init(MachineState *machine) MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; MemoryRegion *sysmem =3D get_system_memory(); - EndianMode endianness =3D psms->endianness; + EndianMode endianness; + + if (psms->endianness =3D=3D ENDIAN_MODE_UNSPECIFIED) { + psms->endianness =3D target_big_endian() ? ENDIAN_MODE_BIG : + ENDIAN_MODE_LITTLE; + } + endianness =3D psms->endianness; =20 cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort= ); @@ -179,8 +185,7 @@ static void petalogix_s3adsp1800_machine_class_init(Obj= ectClass *oc, &EndianMode_type_info, machine_get_endianness, machine_set_endianness); - object_property_set_default_str(prop, target_big_endian() ? "big" - : "little"); + object_property_set_default_str(prop, "unspecified"); object_class_property_set_description(oc, "endianness", "Defines whether the machine runs in big or little endian mode= "); } --=20 2.55.0.windows.3