From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597324; cv=none; d=zohomail.com; s=zohoarc; b=HOFwLwRyDSnCDOtu8pWDw2PSKmK14cYOYpRwBnhzeyWHu4umbZrmnxFSrrjREnxEZ6T1k1ptQyphCesn6E990aO70Xa+1MdPVYo0YQnVnjUZQpz+U6qf33nRLnATH3qWFetOF6l+XJJNMRVAt+4I9PCtUvbnzT6lLv/sCNrHAkI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597324; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sjB2VJ8djP/uFaRO5FuiFnPqLl7LJ/cFgV1DnxC9eUY=; b=j53wUuGskTADUWrgSipg/YUG6IZTBkd9TgyjaY+8CdP2CX1M8uqPsEsByh5WQEHxEoolO/RzrtY+LkG95QK/h0bKoMkFJQ1qZq/01MWTHmIsqU0Zhbue9G0qItoM84TSPbrffTmlINy8G8+hIO4M1rNtKly2L9Fr61GfVBP4ncg= 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 1734597324477800.1150410817959; Thu, 19 Dec 2024 00:35:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxa-0004RO-Ra; Thu, 19 Dec 2024 03:32:42 -0500 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 1tOBxW-0004Qi-8v for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxU-00053M-HG for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:38 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-e8rJJAk8MI-2bHMw6O634w-1; Thu, 19 Dec 2024 03:32:33 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4361c040ba8so3020875e9.1 for ; Thu, 19 Dec 2024 00:32:33 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4365c08afcbsm21964005e9.21.2024.12.19.00.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sjB2VJ8djP/uFaRO5FuiFnPqLl7LJ/cFgV1DnxC9eUY=; b=Nvw2UHmj5UHtR/Xh9h6+m2PqivEl7xqqGkqnPTHWyquwWMaFCwYlIMSc5u/TqXvCe6itgF n5K05N0wQdS2fA23P5nQU1nueuJIx0F+Qsiq8U1X2pQztA7OvwmyBikS52NOi4r6o0JnZr Wrw3fKGvOzY9GML8xQ6uVgj/vkDTY1g= X-MC-Unique: e8rJJAk8MI-2bHMw6O634w-1 X-Mimecast-MFC-AGG-ID: e8rJJAk8MI-2bHMw6O634w X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597151; x=1735201951; 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=sjB2VJ8djP/uFaRO5FuiFnPqLl7LJ/cFgV1DnxC9eUY=; b=VqiquPmTogf9kU9Xigt9UfCVIZNoetp5Na6bOnEHizqpKIdTBYRzpUPP3hrjHJO4qK A/8c4WO9JtHqor+k13qu3nQqSXkw+lfGlb4kiSXq8a9AbVVUkvrdSaW/r+oRI+zPPi56 hKGo7jVB4hT0DkeXYB0clLaOOFnUB13zdxkM3U/XE0zz7u6SJGmxix+6YctU/5fhfw2Q pWh3AKpQCXb6VYosH7D52DIHn0XAPLlT3bpM42vXvtwCryhEFLcQB4iWTEB4i2nPpQR1 nFDBgKVxSrGBahi5toeYhONSski/c2ec3bZqHTgelZWUjoGhnOwRoSZJVF06Kxt1wAvE geNw== X-Gm-Message-State: AOJu0YyNAAt2t+ZyJ2aSnzg6MJrHtviITSVXsdbnnKnDdtPDu+Di1HJk c28SMNhIdCGx6m7kDZ3/2C+veh80ciX6XGcnudQdj30J8c+cTKz1q64DJD3B0biNU895Xyr+jjT do6EALFKHcRXBRLwGFmH3/T+D7+RO2CTyeSfGnRxXjrWaAeKcW0D7L8vDn5VzCgLeBo8B/2fS+J /MZxyvOy6XiCoVM9B3+7dF1Qp6B1HltN/fFIkU X-Gm-Gg: ASbGncuJ0fz56IghTstfEHEkNuDHxL1AuUeHdSb/OzkGThjsOJdnb1bwMb/R7ESPh39 xj5PbAofgDyQCRyQNmrKXsndmnfK9zwmAhD1ehDndUlZUq2VlkloV0pkqPcOIIjuYHDNy6FyR5r 5ESq5+F1HF0mlXze14RKz2qrkqsOqYFvfjWnk02LV+JMXOwO4SGLTE7dnLKBmiOypE1vUllyHEv 8/crbUD8LrACpu0s3FDC6atBy7GdTsEcxi/A+gMINvkvce0mbJJWNyMRSmd X-Received: by 2002:a5d:6c65:0:b0:385:fb2c:6021 with SMTP id ffacd0b85a97d-38a19b37343mr2227542f8f.39.1734597151605; Thu, 19 Dec 2024 00:32:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKIo5mU6U86hdFDV7SM7Z/zTRYu1hfJUrxxaNDsPhniKvo5ox08Jqd5wHtGCZ28GbnZYxUuA== X-Received: by 2002:a5d:6c65:0:b0:385:fb2c:6021 with SMTP id ffacd0b85a97d-38a19b37343mr2227513f8f.39.1734597151192; Thu, 19 Dec 2024 00:32:31 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 01/41] migration: Constify migration_properties Date: Thu, 19 Dec 2024 09:31:48 +0100 Message-ID: <20241219083228.363430-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597325294116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-2-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- migration/options.h | 2 +- migration/options.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/options.h b/migration/options.h index 79084eed0dd..a360f93a44f 100644 --- a/migration/options.h +++ b/migration/options.h @@ -20,7 +20,7 @@ =20 /* migration properties */ =20 -extern Property migration_properties[]; +extern const Property migration_properties[]; =20 /* capabilities */ =20 diff --git a/migration/options.c b/migration/options.c index ad8d6989a80..24cc8471aa0 100644 --- a/migration/options.c +++ b/migration/options.c @@ -85,7 +85,7 @@ #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT_PERIOD 1000 /* millisecond= s */ #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT 1 /* MB/s */ =20 -Property migration_properties[] =3D { +const Property migration_properties[] =3D { DEFINE_PROP_BOOL("store-global-state", MigrationState, store_global_state, true), DEFINE_PROP_BOOL("send-configuration", MigrationState, --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597224; cv=none; d=zohomail.com; s=zohoarc; b=lkkQA3lFI5j2HP/Ytq96JZI+wai6JmrY7muhLpsGBEATYzZW++DtRSyixDmsszFuq7YpZTyJscqBe/hj8d6LedIf6T03y4pfrfbYJYN+hrNzQ1qkJHcJw8L6S8YNATLEY+u8ez7TXwpon5E+kPCv6FkxMLxaFvBXJ/nRa1QKAcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597224; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WE9KFCxmYVUk9291lRKTVOkRERI6hjq2PtIskZNM7k8=; b=DsS0GsQRxQdJxxik7C9yHReFEMBh2sMOA9IIBQ3XuBCtt8cCQfjSW8lnIyXhIpVsA5i1BwJLEbTPTU87NOTc6RebM0tMDjk4LO2cELAUprFITkL2KMUVBuD0LVvFtQXS088MKZrlaZaBLKyAkShYGGTYCxv324Lj1JGv0cTXzRg= 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 1734597224374191.30083096480314; Thu, 19 Dec 2024 00:33:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxb-0004Rx-8x; Thu, 19 Dec 2024 03:32:43 -0500 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 1tOBxY-0004R2-EY for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxW-00053t-Rq for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:40 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-540-LKQujxB6Op-t3n5_dxSyXQ-1; Thu, 19 Dec 2024 03:32:36 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-436248d1240so2774145e9.0 for ; Thu, 19 Dec 2024 00:32:35 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43661219a71sm11171835e9.26.2024.12.19.00.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WE9KFCxmYVUk9291lRKTVOkRERI6hjq2PtIskZNM7k8=; b=IBSurRcFykpATRmCWkDqMOcjUeAKSyl/bT3oh5H7ZIEW6DUV6Y/jilCdf3eIMOaay0FEeq Jf+rupwT/bmtwTzKo2OMBuGGfuyBUN7CP8+IkNS54/tWwUu5kbuch/+Mx0YpaPLyUg9JU+ 4Nsi4NQPhNWuo87q5mT9Vmavnk9+jFg= X-MC-Unique: LKQujxB6Op-t3n5_dxSyXQ-1 X-Mimecast-MFC-AGG-ID: LKQujxB6Op-t3n5_dxSyXQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597154; x=1735201954; 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=WE9KFCxmYVUk9291lRKTVOkRERI6hjq2PtIskZNM7k8=; b=AUFgYlP2+HPfx69kHVkfgiAz9Xy8vLmjqasPj1JOWIzLXGjOI/OCknwKwuqRxdCXYY /WbzgEjyZTU/VTO7JkwVAyoem+rT8kddqTO4lXgkbOJM/6+RV4Hkh0keJc/dpbKiGLB1 pvLpqA+dRw4UxYvi+lQQotuhTGCVD7Sdey6biKV7WLTnaBXrZj7Yf5knhBoJx+zeSrXn HZyXyDhLhhPe+krRC3mE+V83oTniy0k/4pla1+BC7zwrhNgKpCyuhEcjR6bUmyFHxky+ fWrcViWKzb0MK+hL591fh2kaMu9rZ30IfseP0q4FAEbYpwfpqEKNrbGRf3cBI21jMRnd SNmg== X-Gm-Message-State: AOJu0Yx057hs+3WcLgc/cf2aRmW1JMMNRYF0uGdTfCk2c/rHAHxHlsNx CiTm9syiSp5njfPD7Y3xNdd/Land9RQ/RiqFOENQt7j8fO/WII3N6qBzyuzKiF2yYYTik8TcBa3 Hgtikc6/V6Ry+mgxC0hjrNDb7UPx+rzKOoWxV9plyBXywsGbO0xo5HFXX1fecmJfWSkjPB8HfRR eTUmC0GhBVdQHm/rymjxghFs/tcEuE81bvjZ75 X-Gm-Gg: ASbGncuN/D3DfMtRh/7wojIijBukQ0ojkf4PPJPRL0kkBMdyptjQpHsRSFgqHY0N79B VbskUaGe4L918rn6zstXru3zK5ae7xr7RDoJ0qdE7aXhpVw4FeY/Ptu6ChAQ1iNEIRyjDSh0txp IDllAAlRGfXE4oOJcdUn+nh+GJtMSQXjVW7NfcX8ePUbvjgJMrgJ7EoCl3DwEo83L/AOy9fdidx WxZIWUFQgF7nh1oXQGg3JGQRZTlWMqNEBHJDEr3FlXaCj7upbHmjyZ2/1/V X-Received: by 2002:a05:600c:46ca:b0:434:f270:a4f0 with SMTP id 5b1f17b1804b1-43655426983mr48859595e9.21.1734597154452; Thu, 19 Dec 2024 00:32:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IE12NLXDvv4ugXxw1LDuIGbypwM/9didO30SVTtU9JCv9/7K+CKrdIruc+42G7t9pAbiskHxQ== X-Received: by 2002:a05:600c:46ca:b0:434:f270:a4f0 with SMTP id 5b1f17b1804b1-43655426983mr48859335e9.21.1734597154044; Thu, 19 Dec 2024 00:32:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 02/41] hw/ide: Constify sysbus_ahci_properties Date: Thu, 19 Dec 2024 09:31:49 +0100 Message-ID: <20241219083228.363430-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_SPACE_RATIO=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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597227222116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-3-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- hw/ide/ahci-sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/ahci-sysbus.c b/hw/ide/ahci-sysbus.c index d43db0923f1..2432039290b 100644 --- a/hw/ide/ahci-sysbus.c +++ b/hw/ide/ahci-sysbus.c @@ -62,7 +62,7 @@ static void sysbus_ahci_realize(DeviceState *dev, Error *= *errp) ahci_realize(&s->ahci, dev, &address_space_memory); } =20 -static Property sysbus_ahci_properties[] =3D { +static const Property sysbus_ahci_properties[] =3D { DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1), DEFINE_PROP_END_OF_LIST(), }; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597418; cv=none; d=zohomail.com; s=zohoarc; b=OWSBL8csLb02a4bvE99gk70ACOyaUfkJL89WtsLr6syrMI7uPWrpNQViK6d/TeixmaqfUXB3lqOskA8XD95cyFJh5Bq8gFKddq6HF5/pVLRxw6VnQAlKiEUuP++C3e8V1uEhGFABFU2FNjfSvmsh6+/oixCpfUjut4mb7rTRvpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597418; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NPK5B7YtV2XjDkMxiykKFLkaimx0AMVIvQ26Q2lKHEs=; b=JNlLOF8mAZeYg7RHB7vcAeDC0qgIn/HsgTx6lTY/vxuFIlgIjcpcxY9FNsYJ50lFBFXkXr5nObFLznVHhf6iKbVfFE61dqwStJ4CYmFc0cFoFnxEOrrDJdlE3QUIn7LBRHTE5x6aj5+n/CQEDrKbF2/L0zJbTXundXUZ08mQmdM= 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 1734597418771204.9687722973547; Thu, 19 Dec 2024 00:36:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxm-0004Tm-N8; Thu, 19 Dec 2024 03:32:54 -0500 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 1tOBxd-0004SB-5z for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxb-00054k-A8 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:44 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-586-vYxBOmMuNpCxROYuzGv-KA-1; Thu, 19 Dec 2024 03:32:38 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385e1fd40acso293550f8f.3 for ; Thu, 19 Dec 2024 00:32:38 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b4432dsm44551265e9.41.2024.12.19.00.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NPK5B7YtV2XjDkMxiykKFLkaimx0AMVIvQ26Q2lKHEs=; b=eICV+vo4N8BQskoZdr2vu1vYJFdP1E4X7JM5+BM7jHYrXMMvMn0UFvfBcJ9jDBpPXuj1hY +XIPSD7xsTXgxZl1wopRW4ufksFf/P8mYqNn3pEuAkl51av0M91JRsxD7tqIMT0uTObzPQ dUWBSaLnPs95xUEOy7qrU+zOLGn2CQc= X-MC-Unique: vYxBOmMuNpCxROYuzGv-KA-1 X-Mimecast-MFC-AGG-ID: vYxBOmMuNpCxROYuzGv-KA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597156; x=1735201956; 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=NPK5B7YtV2XjDkMxiykKFLkaimx0AMVIvQ26Q2lKHEs=; b=NqYxxXZNSZ+Ekhfssvz07DNDMH7qv3pD0VDFp9GyqY4oWxL82BGkCaW1CEDyPEe6WN Ql40hZ0I8hACUwlmm8yB0DDYfm7tr7oJwV+ycVELAeaxCaIVH5fyWzJjP+oFXiZJjmpc 7FJp7EDX7oDQrTfkyDRC/A1IRnZp11CLTPvXE3o4xHQCUSqy96wYvkA9lkQmQFKdtumn HxNKDMjcmN8OskCt8uwaYC6hexfdcCQ7awwDTEWrPSrPL6dSMAi5zquRR4YbxprH4gHZ HYXVG0dFrPuxbtDYDSTlAl4DpUUOB9ZlgMyZ8VnXjPyr9w8Pd/T0DxHdH/M73dUW7VXG f9eA== X-Gm-Message-State: AOJu0YxnChOsvKGjLIyswJwYcWfyTj70Wve2qcv/P6mOv0eCdT9j74QH KbwNvUlbXyWRLADwRLFvqAwW6A1Kr27Stk9uLHKD9guKzhzWj0vezboCqV2h3PQNKxndvVLR0dJ hPL8DcYGS+LqukZFnBL1MxuB3TQgT+5fv3uLCXJOdfUS6Lqzk9rMUNwFvdFMrSTvhqpJuU0DzIA 1oTZVH7pFQf4Vip+sIW0V6+Uva4pLohdkfOV1z X-Gm-Gg: ASbGnctUiFGyg67to0Va0jy3VdEEBvr60Cizq0XmmH+RF/6P398pSuaOgVkmmkhNXHl V+xJj/Tk0VwbiO4sdQ7Mt/ROWYzd+U/lMcBwA8DkFvr//tIJXnuxnI/3rMtJz3k5WAMUXSc6zuo hBZeRziA/WEeSSWqugcp+gEdpHwjY1pWN97Ybn32H3xwVdyxUr8rE8tcNwMb8igic3co3KHgHzG UEvXe6U1sAoKBLEG6j1PxEpgQmttDT0pq0KZY+LAM2ib2/gok0VQym95jML X-Received: by 2002:a05:6000:4b0b:b0:386:3b93:6ccf with SMTP id ffacd0b85a97d-388e4d5f125mr5148607f8f.32.1734597156002; Thu, 19 Dec 2024 00:32:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXiJ3hfiZdwZXJlW1EnLgdY5Q2vNsdKew//1XV57xNJzp6PUBRkYmYChmzUIKN60zymaLRVQ== X-Received: by 2002:a05:6000:4b0b:b0:386:3b93:6ccf with SMTP id ffacd0b85a97d-388e4d5f125mr5148586f8f.32.1734597155652; Thu, 19 Dec 2024 00:32:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , Harsh Prateek Bora Subject: [PULL 03/41] target/ppc: Remove empty property list Date: Thu, 19 Dec 2024 09:31:50 +0100 Message-ID: <20241219083228.363430-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597419658116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora Link: https://lore.kernel.org/r/20241216035109.3486070-4-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- target/ppc/cpu_init.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622c..5e95790deff 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7414,11 +7414,6 @@ static void ppc_disas_set_info(CPUState *cs, disasse= mble_info *info) #endif } =20 -static Property ppc_cpu_properties[] =3D { - /* add default property here */ - DEFINE_PROP_END_OF_LIST(), -}; - #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" =20 @@ -7468,7 +7463,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void = *data) device_class_set_parent_unrealize(dc, ppc_cpu_unrealize, &pcc->parent_unrealize); pcc->pvr_match =3D ppc_pvr_match_default; - device_class_set_props(dc, ppc_cpu_properties); =20 resettable_class_set_parent_phases(rc, NULL, ppc_cpu_reset_hold, NULL, &pcc->parent_phases); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597509; cv=none; d=zohomail.com; s=zohoarc; b=CYt6rIE6gARYTksQXZZACXfAB3VJQM54RgSXpQ+B3lTkhTRWpaLcAGKNz3++gBHXjmtbwpsvJb8GlMliiBtG0ycj3JqmDvk/fFfVqtNzK9OVMUXuXEukUwKXVraa83d7Z4MTJWSXiNDYwGyjLK1W0hUx1LlvlbNyUXZ78LGdLrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597509; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IFjwhxqsfjuevOjG/oLbzLqe5I9lt5Dktq2jkNMeE3k=; b=RtLo2hiw2Jaolo1/PaszqSkcWkrjPMiCNH9yoOoPFHNlpW2WBYDgTB1FqfgdQl9HVMADvfDBFoui4ACWcn6HwloXnHzqAEIOqKvO0C6CMufw/RgR4sEftdeNiwPZhUWRt6Oykvn3UzFTGEV12U0ddiHPqh1GBskjXLUlt9V268w= 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 1734597509377672.0462003343134; Thu, 19 Dec 2024 00:38:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxn-0004U5-3F; Thu, 19 Dec 2024 03:32:55 -0500 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 1tOBxc-0004S3-Cv for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxa-00054i-Q2 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:44 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-402-w-OLHRXdOYq9QELFSUeXWw-1; Thu, 19 Dec 2024 03:32:41 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-436328fcfeeso4199915e9.1 for ; Thu, 19 Dec 2024 00:32:40 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c832c45sm980369f8f.32.2024.12.19.00.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IFjwhxqsfjuevOjG/oLbzLqe5I9lt5Dktq2jkNMeE3k=; b=T9BLULDwVateM4r2bYJNTtzZfma0zItH2Ie6143JePTOGCezrHsCzTnCXFkoeK8lWTwfaN rKmQ0UCgV/1se9SQWixg/9TnKDAz6NDqDeJacN8Q21EJevk8wV0/pMAhBvkF7r0tT0njvP 9UlmLmHSu6aeIHEWPCYuyPqyyEyP3ZE= X-MC-Unique: w-OLHRXdOYq9QELFSUeXWw-1 X-Mimecast-MFC-AGG-ID: w-OLHRXdOYq9QELFSUeXWw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597159; x=1735201959; 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=IFjwhxqsfjuevOjG/oLbzLqe5I9lt5Dktq2jkNMeE3k=; b=OlxKKZIP8JoNeaGmXPZAA9BWtroPV7bU1LTdp4xT1zzs4Oxi7PdLaA6LradwAMCMxe 1CbXCswBedEHTMBSvBjhoq5Aw4DEWiIR4+2TQLDQ6X6tKElDhvACIZekMujA9LofZd/M CgYJkHa7s5/6l5a5PKoD6hkOCLFIrVe0HVviBPAe7NsnVSdPe7Lb/l9yjwJ0mGxZun6w QzPJlEVGVvNo5TsNJ8Z2XpeDYNHqLNEiuMGKgLO9YeL+k0Dt/lhonQ+1oD3sP+Qcvl99 1bYs71gDqn9C5TvPirvKus6KftbFPeUy6cFmxP47Xoy3jk/Bs2vDK4teB2qGirDGUCA6 xDug== X-Gm-Message-State: AOJu0YyzMsPvMaFxR8MzTYWFpaLnEJ23H6skagJwYAVFSyG4oe84MIo+ xNrU0Gg3xxbzs2krcv43iLg6qaHVpXjX2v2QbHo3TIezrqTzesZpI1MVSzMOXqujdITD1JDnVZ3 iFPY/i/99vsxKJRd1tggbhy6B/fX8Ofo5c7UUozW6NPelXjH2Oplhb2aiOLz2hkdUXswRVvpUpR 6wmNtz5sod1RYsVGLftuIrgVliuxId/bGSrZ+0 X-Gm-Gg: ASbGncvKUphowAVdMIzQ4/sS1ANMQ6pSl1r09/sa4BnmVBefaDPWhr5CdRsXvgeOkdZ 7xAZRgubi7JZVE30d1dd8Qa/EXmmCFFHJOw1AtZGfF5J/fK3+FKePbvpetL3J28JrrQV1YxIjFM SEVfewjy4ddvVsx/+JYyzmmMQIVTXlcBx62CQ0uCddFLLc9sET8TRus2zlNUkPhAkFdQRTeRP8g u8375M4djgiQTwjIVQ+B1YLSHPEZhTdLQ7ZAMq29o30zxaXE5WQi9PVeeSD X-Received: by 2002:a5d:59a8:0:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-388e4d65796mr5705114f8f.35.1734597159112; Thu, 19 Dec 2024 00:32:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxYvK4bFK8oz8Gs/heaVQA/Xw+b2f52+IbKLAIyYECueKiz/SKsrjxskWMlF5NkIR7yZELZg== X-Received: by 2002:a5d:59a8:0:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-388e4d65796mr5705087f8f.35.1734597158689; Thu, 19 Dec 2024 00:32:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only Date: Thu, 19 Dec 2024 09:31:51 +0100 Message-ID: <20241219083228.363430-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597510062116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Avoid the empty property list for user-only mode. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-5-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- target/s390x/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 4702761ca30..263f9e84ed6 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -309,8 +309,8 @@ static const gchar *s390_gdb_arch_name(CPUState *cs) return "s390:64-bit"; } =20 +#ifndef CONFIG_USER_ONLY static const Property s390x_cpu_properties[] =3D { -#if !defined(CONFIG_USER_ONLY) DEFINE_PROP_UINT32("core-id", S390CPU, env.core_id, 0), DEFINE_PROP_INT32("socket-id", S390CPU, env.socket_id, -1), DEFINE_PROP_INT32("book-id", S390CPU, env.book_id, -1), @@ -318,9 +318,9 @@ static const Property s390x_cpu_properties[] =3D { DEFINE_PROP_BOOL("dedicated", S390CPU, env.dedicated, false), DEFINE_PROP_CPUS390ENTITLEMENT("entitlement", S390CPU, env.entitlement, S390_CPU_ENTITLEMENT_AUTO), -#endif DEFINE_PROP_END_OF_LIST() }; +#endif =20 #ifdef CONFIG_TCG #include "hw/core/tcg-cpu-ops.h" @@ -388,7 +388,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) =20 device_class_set_parent_realize(dc, s390_cpu_realizefn, &scc->parent_realize); - device_class_set_props(dc, s390x_cpu_properties); dc->user_creatable =3D true; =20 resettable_class_set_parent_phases(rc, NULL, s390_cpu_reset_hold, NULL, @@ -404,6 +403,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) cc->gdb_read_register =3D s390_cpu_gdb_read_register; cc->gdb_write_register =3D s390_cpu_gdb_write_register; #ifndef CONFIG_USER_ONLY + device_class_set_props(dc, s390x_cpu_properties); s390_cpu_class_init_sysemu(cc); #endif cc->disas_set_info =3D s390_cpu_disas_set_info; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597516; cv=none; d=zohomail.com; s=zohoarc; b=C8Eaddt3XPKmiIXQ8GWJ8t95x7vmnmYSNf01y92ru7ubcm0RXDxIAiksBCL2ZUywH5Ybp1GEinITArSDwMfLRRkuQ8EM9EFhtknOkoLzz2MiugLfcT0wVbz3d55G/fbsOnLxq3WEpTJhRX8mdOsxx24QXtjI7RnMSRSBo6YXK/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597516; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=inDs3wrtPcf3Fxmch4fAFhjkkRLJg4db13zJUiW/S3Y=; b=Lqj8PIxzhrd8jKXGFAQtcDs6YFBH6yQaCaYJ8qGUzA5mYoI/D9ArmmoLrdddHlTkCYl3WiL+Ok5aPdWP4EVLM8iWh2nHRlW6MmBhyOhP2RCoL5w1E792v3OScNmpjUNGqafvJt0qeTdvi0kdCi5D9TgaK5z2IzK7dGXTMuBtOsg= 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 17345975164361004.5380125660101; Thu, 19 Dec 2024 00:38:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxn-0004UL-Sf; Thu, 19 Dec 2024 03:32:55 -0500 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 1tOBxf-0004Sg-Lz for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxe-00054t-2B for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:47 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-97-H2uSaLUCPqqom8f-rgcNpA-1; Thu, 19 Dec 2024 03:32:42 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-436289a570eso4197195e9.0 for ; Thu, 19 Dec 2024 00:32:41 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8bb4d3sm974303f8f.110.2024.12.19.00.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=inDs3wrtPcf3Fxmch4fAFhjkkRLJg4db13zJUiW/S3Y=; b=UmCFgRMkKV3xIH3DYkXGhBY1uFOU7iXgwVXGXjKrFkl/5i3LCXC2WsclZX31umFiLoQt3k FYjCaON36Pdmb+YtjtZMBc2/b+IIbioVJoMET9rzWVcQw6IzQOKRT/CoqUVL1KKSqV1HQE Oal1/OJY1dJfnCj1sfT/88H6pj7CknM= X-MC-Unique: H2uSaLUCPqqom8f-rgcNpA-1 X-Mimecast-MFC-AGG-ID: H2uSaLUCPqqom8f-rgcNpA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597160; x=1735201960; 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=inDs3wrtPcf3Fxmch4fAFhjkkRLJg4db13zJUiW/S3Y=; b=TQc1f4pf+fAj15BN596kr2Zde4jr0umqPhbA0eC1Sg/Z7H/I3nFhRFcvnd2FbrZ/5K UinrVKs5z/65hn51108pYdDsoyKch+hMJITXhxBbWv8x+8c84S3XNoMy2oORCkKukSsG 9SbCoaArr/rQTh+tjtlwsV0tp/ahi7MlsAKKkI3yi2Zw5T13h81PLEsWLhe9UZZG/8sA RuOvWnwb5VuBZzz1fuUiDf88dp4WtixA29Ip///MXrVI3O9HRhX6ZmFDVx7KM3pA5SbE 7wnHVdWuEoViBD10B868h5no+aYogvW7ZpwUGVS/+8WX2/L6VRmh/W5dxIRv+xc9iuCR i8lw== X-Gm-Message-State: AOJu0Yztlr1QCBkuiDxlCJLbtekKwgEFH/mGpO5keMrjodlVaqc6N6Oo DfpeVMZY47G4zaR68rhZVs9hMt20i3ppvkkTwwwxs78D1lFSlmyreak1aSOyUTK87rPL73kXYpn skMnREmU1+9mEwX0jeUHi/VXiFdRviLnlPkGD+q5GLFM6Kbn1yR56jFybQ6vBMW4qb8nO8qKBdv d4xVC1EBYdtwcRMlGMU9Q+EBqkKW9c+t9mDMhu X-Gm-Gg: ASbGnctQ36J4POM2LOofRqngO5OHhAnlO5345zSmxaBonFHLJWLEl/GkypDJpnF3KEP KAfF5S7Z6GCmIJwKge980+aa7WH2crP/G4sPWnyzxNDdbPEpqz02425reFE7UfT3zr2PbGt27x/ Kyhd7HNL06J+GtWMAyl3lB1JC4BcFgATQsQyUCNkCPYDZ93dEvXK1IrwdHobevqvMNlY43JxpIw MT5kMBpOkmoa98wu5ySM0X53gtN9Ic+BXG5VdTON+spkgs94jMVAhdiGsPn X-Received: by 2002:a05:6000:1866:b0:385:df73:2f42 with SMTP id ffacd0b85a97d-38a19b139cbmr2130653f8f.32.1734597160226; Thu, 19 Dec 2024 00:32:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWgeOHhNpzuDJdD5wojsTkJp/zHVITJypv/L16EMxrJFrh02K5V+C7O/sTT5pF88I8FSpDuQ== X-Received: by 2002:a05:6000:1866:b0:385:df73:2f42 with SMTP id ffacd0b85a97d-38a19b139cbmr2130616f8f.32.1734597159742; Thu, 19 Dec 2024 00:32:39 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 05/41] hw/pci-host/astro: Remove empty Property list Date: Thu, 19 Dec 2024 09:31:52 +0100 Message-ID: <20241219083228.363430-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597518031116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-6-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- hw/pci-host/astro.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c index 379095b3566..62e9c8acbf4 100644 --- a/hw/pci-host/astro.c +++ b/hw/pci-host/astro.c @@ -461,10 +461,6 @@ static void elroy_pcihost_init(Object *obj) qdev_init_gpio_in(DEVICE(obj), elroy_set_irq, ELROY_IRQS); } =20 -static Property elroy_pcihost_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static const VMStateDescription vmstate_elroy =3D { .name =3D "Elroy", .version_id =3D 1, @@ -490,7 +486,6 @@ static void elroy_pcihost_class_init(ObjectClass *klass= , void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 device_class_set_legacy_reset(dc, elroy_reset); - device_class_set_props(dc, elroy_pcihost_properties); dc->vmsd =3D &vmstate_elroy; dc->user_creatable =3D false; } --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597472; cv=none; d=zohomail.com; s=zohoarc; b=Gf76rxpUDnbu0lNjqf45MCAA8qU8t58SVXR8WR1/rztcVExPXUXC6ItpT29O00Din0GG2GhGCV+5nsfU8Ez7nsa/Gdxy/BrKZ06H89eCrz+kq0s2h01Wv60UwGJv4P5i5LFULwm4GLuUPsDUNRx4Sys6dX71ExrPa+XjJU10mMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597472; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=m3TnyK753dqDu4koeMykmPOwEc/VEMfDm3HvpCbzTwI=; b=NXMu8/JT9f9HkKbXJIKgf8aEL+5wAUE+U5B8KeJ8ULe8PbSUqs60Sc4/Zm1T9AksnPwrXNObMjE4MOoz2/iFIi0o+O9JCYvIamPJ/WecTn9XWaYslnoCLaZSZu+wRxiSmIpBIJl5hR2jH1z62/6F5dJSetBLODTHSNH8NXNn0fc= 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 173459747243890.33602173073473; Thu, 19 Dec 2024 00:37:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxn-0004UJ-Rh; Thu, 19 Dec 2024 03:32:55 -0500 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 1tOBxg-0004Sh-3H for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxe-00055C-Fm for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:47 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-tHqClV4eOImpFE4EAib5QA-1; Thu, 19 Dec 2024 03:32:44 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3862a49fbdaso235233f8f.1 for ; Thu, 19 Dec 2024 00:32:44 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c828a8dsm1004177f8f.2.2024.12.19.00.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m3TnyK753dqDu4koeMykmPOwEc/VEMfDm3HvpCbzTwI=; b=Gjj1n3Ecu0rLf9aECsRNK7xq1xd6vCqCSxR1nb7lEXr0PeAvxKItQiYjXA7odemiijJU/h tK8s79xrrLSR3AELaJ+KVISg5M2Uep0apQ+Hu+UAo4v6iunrxKKnDbj5FktwFV/spRl9SF L2ckn9S8eF/a5Y8Y2nA32eUDTaXR10w= X-MC-Unique: tHqClV4eOImpFE4EAib5QA-1 X-Mimecast-MFC-AGG-ID: tHqClV4eOImpFE4EAib5QA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597162; x=1735201962; 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=m3TnyK753dqDu4koeMykmPOwEc/VEMfDm3HvpCbzTwI=; b=enoSZVmN8yFL2pg511hN++MHEW71DalOb0PMWr8toG+FAjrI/gYoi7qObfDC3sL1+L wn5Tf7ZoE/FKsv/4YQ1CQrujG6PqN7cmwimdJszQcExF/n3MvVKsPNlEob6m2V3TNOzA rQqHUUbkQkItrzGT5ycGqfG9MlEGs1vECeiMJGtuDptDXwN/LB/9mZHEA3cUtLrFmi+R 1oe8MUW7K4nz3GfB29t+55mIRUFDVYZqL5M4mzMBJUfpFfd476q4fiDLUbEJZky1EU5p xEdKfZCtCiBmQyda3I98h+WOqHsKC27bJ8vDpmIKMtzyK6CEFLVUIAvtBJ6JVLeLLCjj vlOg== X-Gm-Message-State: AOJu0Yx/B7igWUtMI8e0ohG/jXci17C2/tUa+RxWX/xv+8KQptaF4aVk kLXYlhnndlsB42dRcx86OyF41e1Fd14lIJ4aR3xJzXcJjAdi7BzYly4tTpwQ8KEY5rgH3wMUWt/ xhU9/0qSixFmUy3z8qFZhfzaDUHGmIzTnak7fnddwXtjIo5HQPgDVg7CKHiEgLnFzg59kgrFOEw c+U6S7T0kxXKAHE9w88uo4JjYnngTT3p4DEWgn X-Gm-Gg: ASbGncv4s20dO/K0v2nelfRtj2fzPKBwF4Hx/o1HirFCUPqKGORXUImihOU00m7zpxC m8b/HuaN3CKsF1VmgHYBj22mLp59oCBEMJKcFS9JKy2M2DQgN7E1nztI4b/fxAi7O5U3YFgkD8A yeFDp2uQA5C8MeRFArLTLvvJKlCrXCVUAzLzWYrYhZpnlyYHGg8NPJhKqXBm0F2+kWuxAwNOwrv GcVRQXrWceAwpIahsqqD2GKuC/UkTZDXsWY/fN0OZc6pkqUuiT7zqguUL6x X-Received: by 2002:a5d:5f83:0:b0:385:e38f:8dd with SMTP id ffacd0b85a97d-38a19b3702cmr2366435f8f.46.1734597162237; Thu, 19 Dec 2024 00:32:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOSLx+ewTZ0Dw46r7I5GSRtFsA+5Px+cgdxviXxYvN9v4DnHCRbbJc6QRD1wgm6eyxwCiRpQ== X-Received: by 2002:a5d:5f83:0:b0:385:e38f:8dd with SMTP id ffacd0b85a97d-38a19b3702cmr2366399f8f.46.1734597161765; Thu, 19 Dec 2024 00:32:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 06/41] hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM Date: Thu, 19 Dec 2024 09:31:53 +0100 Message-ID: <20241219083228.363430-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597473880116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Do not register an empty set of properties. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-7-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_nvdimm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c index 2ef6f29f3dd..8bcce4146a5 100644 --- a/hw/ppc/spapr_nvdimm.c +++ b/hw/ppc/spapr_nvdimm.c @@ -884,22 +884,23 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm) vmstate_unregister(NULL, &vmstate_spapr_nvdimm_states, dimm); } =20 -static const Property spapr_nvdimm_properties[] =3D { #ifdef CONFIG_LIBPMEM +static const Property spapr_nvdimm_properties[] =3D { DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, fa= lse), -#endif DEFINE_PROP_END_OF_LIST(), }; +#endif =20 static void spapr_nvdimm_class_init(ObjectClass *oc, void *data) { - DeviceClass *dc =3D DEVICE_CLASS(oc); NVDIMMClass *nvc =3D NVDIMM_CLASS(oc); =20 nvc->realize =3D spapr_nvdimm_realize; nvc->unrealize =3D spapr_nvdimm_unrealize; =20 - device_class_set_props(dc, spapr_nvdimm_properties); +#ifdef CONFIG_LIBPMEM + device_class_set_props(DEVICE_CLASS(oc), spapr_nvdimm_properties); +#endif } =20 static void spapr_nvdimm_init(Object *obj) --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597227; cv=none; d=zohomail.com; s=zohoarc; b=Xa/lxmGClhFn2MjrJ53NNmV8UXmxeeZyg2Y4b5s1YTqKneqZV0pD2GV+eO0Wwg/x/nKZKmnNyWsXUTus7JVdOzU9ezBtK1ZYS6Qlfa5mGE18/pnfU4EEuapnzOXnbT240RCsDYzCTaW7ut2r1nUeQI2TmOc2u/0/wepbbysaBPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597227; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f7BcPA5dTlWF5fYX3mQy4xElZYCb69b4ktHM7D7aGrk=; b=cxvCzU5Km0c/1nAoV5Yw68+FV9jM9bCJE2HLW1nWcxDNsLbX6aZqzVfEZfz2nvQYQyw7ID6eoBwo83Ngo8XhMYM5f8CNF0SM9F3uEDP38zjRg9hzQ8gpSHpjOnukBnXKrmFMSwvZ2HzxYY+RCf0ekplJ2/58aSJrzA44q+SOJ7w= 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 1734597227793992.0346692742276; Thu, 19 Dec 2024 00:33:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxq-0004Vz-TP; Thu, 19 Dec 2024 03:32:58 -0500 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 1tOBxh-0004Sl-8t for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxf-00055P-OG for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:49 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-364-7LWEOcr3OBKg_qwgiFCvxA-1; Thu, 19 Dec 2024 03:32:45 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-385e1fd40acso293619f8f.3 for ; Thu, 19 Dec 2024 00:32:45 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e150sm968670f8f.66.2024.12.19.00.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f7BcPA5dTlWF5fYX3mQy4xElZYCb69b4ktHM7D7aGrk=; b=EaXOKkgAIYNjQZSUJYwyOj1ZvBhd2D0is4ye9LpwtsmY0RcWPZ55ga42yHyCvpwgqcAZmN WLphmmfPZ31MS+Yp8D/gO6gIZlcjWJffkCBZXsWwQ8luc80HK7oKoAZ6AKT6rr1f+08V2B qFyHtVaFAALL4hM0vxrm7KN8Fhamdfs= X-MC-Unique: 7LWEOcr3OBKg_qwgiFCvxA-1 X-Mimecast-MFC-AGG-ID: 7LWEOcr3OBKg_qwgiFCvxA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597163; x=1735201963; 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=f7BcPA5dTlWF5fYX3mQy4xElZYCb69b4ktHM7D7aGrk=; b=jpzM9LGOhA6AfD5j3lyh88NDUtgSNtEPjUX/+HDn6EJhJfNzNjkHMiWD/XTdDhmPZr X7NwfhcmQWqcL2cTzx8wnyAakL37Icgll+FCT5VIC6JatJUc4wdJmddR/VkKD1z8qNp6 MU9PyYuoQnJZt+oRqknGhbGa9+ue77EhjrdFM3zP8jL5KSW7bsPL8gU7sxZ+Ot75lhTc KhXbpyyvyt9Ro0g8kgBfNaDaD4hKlOwY10luFqBJANOjOTE/yi0z0f42nz8JxP+cSJiO UqZN7rA3AJomSQ7YYLf7q4VzENrrb317ERPesOJLKA0TTSl/coovlNYNZ7g1UDIj1/ms Mg7A== X-Gm-Message-State: AOJu0Ywj/g+d08vaJiDWacBvI6puF9kNyOQi2MuIQQU6Zy5UWdbGVH4a DKf8jwUg3/8GDIboL9O01NTAB7KYxhP0X6hnr6+3ydFGd+GWS0tLYjhd4nchGOupZH5CB85sLxr A1EBZapOKJm2lbeo2MK92jXxGI2Ra7bxmm4G0/7yoSUUjLNAv5JXKVSpzzFl9SHlXhnmK6tlEdR Env0/0MaqkKGklbihHe1i+b5SbouNxcRyMlX8O X-Gm-Gg: ASbGncuu4Vekh1cvl8DsrIQ54dC1gSzb6BYxZ5qFite16WQDTEzT/7y25m5JksrSbjk 6gq+fdokwTOSYKXJASY8nd5ILo/kaOEJEmGLxf+fidjLrJtH02ikoJqTPjl0gkxLF66cAc2L8Cw za9MSZZbUkdPVmSn5Q6/CUFfIV8YUUYV1OzsdDO2rU4ZjOu9x4UKTX09KgMNuwUW4paJAUxmmnc sIb1WSbR6qaq0lfq2+iw40nZOBxGVBxvZu0jT43sMDFINAasJTpjh8ek6rD X-Received: by 2002:a5d:5f4e:0:b0:385:e9ba:acda with SMTP id ffacd0b85a97d-388e4d31165mr6080767f8f.2.1734597163212; Thu, 19 Dec 2024 00:32:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfMwN/JVcwHhwoi0mP33jwr18oFvQ6fM6kQPgWVzIRHyz/tklNrZzw2X6083HlLugdjInDFQ== X-Received: by 2002:a5d:5f4e:0:b0:385:e9ba:acda with SMTP id ffacd0b85a97d-388e4d31165mr6080741f8f.2.1734597162866; Thu, 19 Dec 2024 00:32:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 07/41] hw/tricore: Remove empty Property lists Date: Thu, 19 Dec 2024 09:31:54 +0100 Message-ID: <20241219083228.363430-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597229032116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-8-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- hw/tricore/tc27x_soc.c | 5 ----- hw/tricore/tricore_testdevice.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c index ecd92717b50..81bb16d89b6 100644 --- a/hw/tricore/tc27x_soc.c +++ b/hw/tricore/tc27x_soc.c @@ -201,16 +201,11 @@ static void tc27x_soc_init(Object *obj) object_initialize_child(obj, "tc27x", &s->cpu, sc->cpu_type); } =20 -static Property tc27x_soc_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static void tc27x_soc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->realize =3D tc27x_soc_realize; - device_class_set_props(dc, tc27x_soc_properties); } =20 static void tc277d_soc_class_init(ObjectClass *oc, void *data) diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevic= e.c index ae95c495654..e60866d76fa 100644 --- a/hw/tricore/tricore_testdevice.c +++ b/hw/tricore/tricore_testdevice.c @@ -58,15 +58,10 @@ static void tricore_testdevice_init(Object *obj) "tricore_testdevice", 0x4); } =20 -static Property tricore_testdevice_properties[] =3D { - DEFINE_PROP_END_OF_LIST() -}; - static void tricore_testdevice_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, tricore_testdevice_properties); device_class_set_legacy_reset(dc, tricore_testdevice_reset); } =20 --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597388; cv=none; d=zohomail.com; s=zohoarc; b=l6h54iksV07I8Fofm6RlO7ms/K5Etgz1eLiuUJusyTDYSTmNBqGy+bkAvlRWyF1YUWKGgCjOHWd7HHejjJYCTqBBCkWgRPB0DJohcnkg+TEcPoyb1awS69XpYffs9gnrnJqnKlFDeXgj8o2a8vTOz2XWAMVp8aYeTB/Jtpq3gU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597388; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=10btOK/tXOZbr6ihErAOqq4vVYs+KgwJjIF/DYaWyuU=; b=Z5k4RjX1snGPEpk20LKdlm88BLVazR2RJi3V1lHvL1qXLNZ1ilrv9/tRh45WUp1YtPTNCpZGOQDfXUPh6WbMlATjmUUAQmPmCJhSbrkEOYAc5NeOXNx0ELY8CMWHm34MAvQaqdccWpqX+w3A3hyYyx6gU4BO8sct+4UN+9mHiGs= 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 1734597388620939.965679574109; Thu, 19 Dec 2024 00:36:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxo-0004VK-OQ; Thu, 19 Dec 2024 03:32:56 -0500 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 1tOBxi-0004TJ-VJ for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxh-00055l-Fe for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:50 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-WY89vAePOFa-Pmxy63cF6Q-1; Thu, 19 Dec 2024 03:32:47 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-43626224274so3086765e9.0 for ; Thu, 19 Dec 2024 00:32:47 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8289a0sm1024941f8f.7.2024.12.19.00.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=10btOK/tXOZbr6ihErAOqq4vVYs+KgwJjIF/DYaWyuU=; b=Sboe1cHg67tBwoKtVUKtgBA74RXMdiRmJOI08k0UC012/Qs3WF74akCcQb2Koa52e85kM0 mvDUDfa9ATwtfBSOLPocdNKCrNJMH8tzXk+np0i4P1PKhEHn7A6IY0pqmPIWXola1wy6Va e1oMjSlKRiNtD2RGGSWb2kjn2y3TnOw= X-MC-Unique: WY89vAePOFa-Pmxy63cF6Q-1 X-Mimecast-MFC-AGG-ID: WY89vAePOFa-Pmxy63cF6Q X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597166; x=1735201966; 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=10btOK/tXOZbr6ihErAOqq4vVYs+KgwJjIF/DYaWyuU=; b=alUQMcufXz5J1NTYIdjnCwLy0KtubBuTEb0TE4LnRQdc4RUfTLHTjHl3t0DsCe7zci Whdp5Ry805mnlbYFZtS2cFXQmt0gyaTGh9bPqfpramrANCnrWW4I7OsHW3hllMSsAvjJ a5NxTcGhzbSF7flE6YssoUKGxj8OZqPxJ4vZ5+Yvd4zuhXfXsoLYTRmN09jgpJaUhcmh 84+nZikNixQKe61uETsHaoPzJ4qwd2+9PorLuQu/Es8jPJCD8Ad/+9/AKj6IcwKqwow2 iEldj+vn6oXb4LalIX+CD/iKF9k6vFhaT1iItRn7kNb136BVoCSTAZWbrwwlXqSYudTp X94g== X-Gm-Message-State: AOJu0YyaGrnW31AH2MsD24jz/ctI/OrmhbGYvER0/X5L6bAVrHRE/spU Ge49flq7aX2GUULBW3gfwRkLjJHBGUybV9uhtZf9sGeV+Q0KoMIPFmBkef4knlHuOfqJbpMs5AF QwDgW3zb0DDluyu6T3izqWOLMEk8D68R+XrmXVA4vXkspLCvGutDFrDSTQEJ/F7qpgbtgYM+TQx fTxeU4s4d9MsxL7BwN8x8BQzcTW7waataIiSTs X-Gm-Gg: ASbGncuDi3leM7iQH/uUrBvEdqUxhz7K8gNlCcmPFAY5QG60QNY3bpF2a2DqPOOCXhz Z8cSOjxoSFUFNJaVNy1z16l2ba1MWNBo/RtdfT0aqbefXt+xKmyNbc1JbHJ5hnBLTlxkWOMg7tB YllDxchQjaJEZalioHj++kMFMqIVhFJhSXkyDn4Kwj+p9DsMaamZfIs6JhmA5a05d8pkjJtz3V6 TX2J9ONPJTxI5gEc3dHybJ79ccGrz8I6pM0CrseEFPuc9t7hchnvuCamT0a X-Received: by 2002:a05:600c:3146:b0:434:f5c0:328d with SMTP id 5b1f17b1804b1-4365c7c88f1mr13594515e9.23.1734597165802; Thu, 19 Dec 2024 00:32:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoQ85XVPvBcEf0aad7LVDe87tNoujNdUKPOdG2ATAirmPr0ml2o0Tu7kj7suwCVIRhvADTXw== X-Received: by 2002:a05:600c:3146:b0:434:f5c0:328d with SMTP id 5b1f17b1804b1-4365c7c88f1mr13594315e9.23.1734597165397; Thu, 19 Dec 2024 00:32:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 08/41] hw/s390x: Remove empty Property lists Date: Thu, 19 Dec 2024 09:31:55 +0100 Message-ID: <20241219083228.363430-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597389632116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-9-richard.henderson@= linaro.org Signed-off-by: Paolo Bonzini --- hw/s390x/3270-ccw.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c index 69e6783ade5..3a8930dfd15 100644 --- a/hw/s390x/3270-ccw.c +++ b/hw/s390x/3270-ccw.c @@ -150,15 +150,10 @@ out_err: g_free(sch); } =20 -static Property emulated_ccw_3270_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, emulated_ccw_3270_properties); dc->realize =3D emulated_ccw_3270_realize; dc->hotpluggable =3D false; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597514; cv=none; d=zohomail.com; s=zohoarc; b=mUu0nkaA7erj2ddGrpAfOkJ1mTXHkpRRiEW8SHz9F3ZRKFCMjldjhGhrrPaXE7VhnjjeQpwugC/mLea8FUaVTejQV31hLhpgSrjJvF55+ohUO8L8yMTSHWyDLezjN0vBqYHfWw8Zed12WIDa+i923oVCZiMCSL3U3JlihIMJ8RI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597514; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QdTS6Bb8vn16TywEE3D3gC5PFxCWwUIxmBPDQfeiLAs=; b=eT2YurhQdY5ArNmiry45xaK6gT57unmF1uwxj07sjdB0Pr+Gr0yQPmvSMPVfASOAhtpiFXUXbtaqA8UlV7Oy5bvbFT2pckNaHOc23RcSHqpc76Fop3sC0tQEJdn2IL05bUnDtdDdFbhxkWGE46b5EAEusAKzX4fU/wpXaNQ15TI= 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 1734597514803593.6706056568527; Thu, 19 Dec 2024 00:38:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxn-0004U7-9c; Thu, 19 Dec 2024 03:32:55 -0500 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 1tOBxm-0004Tg-FE for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxk-00056T-4Z for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:53 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-gEpHzY7PMK6J0qNlv_shJg-1; Thu, 19 Dec 2024 03:32:49 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4361ac607b6so4588315e9.0 for ; Thu, 19 Dec 2024 00:32:49 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b0153asm45376125e9.14.2024.12.19.00.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QdTS6Bb8vn16TywEE3D3gC5PFxCWwUIxmBPDQfeiLAs=; b=X6RCFEl1wq02NWeEEawlYXSGhYHo20/YdU2oSk7/RMf8vr7w0wg46YAlfhNBVZX/tWJNsI dXuNDj1QAmCRqHfaGAqZnJ4N0URVlBMS4Wa/ItPiHOmh3BOS48D6waBZ7SE83J1pFI8ggV obWwQ7onYOztX/JJ3tYR7rpXm+wN+ig= X-MC-Unique: gEpHzY7PMK6J0qNlv_shJg-1 X-Mimecast-MFC-AGG-ID: gEpHzY7PMK6J0qNlv_shJg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597168; x=1735201968; 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=QdTS6Bb8vn16TywEE3D3gC5PFxCWwUIxmBPDQfeiLAs=; b=THVqjkLp0tN1llF3dtPraCpNHokKr6tMnnxgOMXxgXI2Nqm3fjrDS01wd3cfbcg9wR MY9f/kJMOjZcEQ8pKoPosMg1CbvTLJtCbTMKQLTz/3k8g81IkxnycWAYESFr1B+6DETZ OvFsB9AvYKAEtCDxmdmU870EdhfLOYzaV6AuoGxpc96og6tfuHU9wLCuIU75LEWaU09/ zzW7HEYmTQrCJp7cfnwm8SDPW96w9JRMQ5c3Mg3WKQlBqH3SozXXlzfCnJJgl2u6cHHh NljBlKxb42gLwueHdxUwYHJZ8XbEMm86eTquouwHX3NrN4vDrazPFi92qlikdNrj611A Ko6A== X-Gm-Message-State: AOJu0YyRM17HJZBz3E0CI91/3ZCgEAdxWrQ7tcfJti2KzHSoa/5fRylh SCp5MC61FPaGP3tvxZ5D2DJ5FYxtJbm4SS9315Jxin//uiIuPgVorHv3zlylA8ZdsVj2hZ2vfpo ncDoos1VePIGOcSQ4878BknadZJO8iTmglzYBWsUKVttOjwu16zsVH2M/zKwR5+8Gg/cgG2P6Uf 6n1qb1y6qThyLLw1KJAYlsPl1ZtoGBn6W841zu X-Gm-Gg: ASbGncuWVnFKxDqpp8a3k+F90SSrkokq7J8MOfh0MoZbd/xaH36kD37SriuvSpOrxF/ C05EfIDKGz7WssnHtys7mdzIYDI+1uvMShdQoXtCYyqEchdgR8rp16g0nu81+xWU7aX6ZxfVBkU 7qW8dimvk+kxIV73bGC4OSqamNDdbk/l2LUkoB2urtUCI/TfYdOPua8gapLsoZe8AYG/jq9jYEs Ht0XOO+VnjLd8xnnKy1xzUHak0d+cWA+NV0eSPk4kc8euMq4V6NzQiLJkgI X-Received: by 2002:a05:600c:3548:b0:434:f5c0:3288 with SMTP id 5b1f17b1804b1-436553f5497mr44032315e9.29.1734597167765; Thu, 19 Dec 2024 00:32:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDC75sFFIRDdKT60wIsTi4MwfMpSoyJ3Gg/hCRtZ0o5Q7vGYtJD5B3hv8j8XGnt8OoQebAFQ== X-Received: by 2002:a05:600c:3548:b0:434:f5c0:3288 with SMTP id 5b1f17b1804b1-436553f5497mr44032075e9.29.1734597167332; Thu, 19 Dec 2024 00:32:47 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 09/41] hw/xen: Remove empty Property lists Date: Thu, 19 Dec 2024 09:31:56 +0100 Message-ID: <20241219083228.363430-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597516063116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson There is no point in registering no properties. Remove xen_sysdev_class_init entirely, as it did nothing else. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-10-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/xen/xen-legacy-backend.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index e8e1ee4f7d8..118c571b3a7 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -635,15 +635,10 @@ int xen_be_bind_evtchn(struct XenLegacyDevice *xendev) } =20 =20 -static Property xendev_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static void xendev_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, xendev_properties); set_bit(DEVICE_CATEGORY_MISC, dc->categories); /* xen-backend devices can be plugged/unplugged dynamically */ dc->user_creatable =3D true; @@ -674,22 +669,10 @@ static const TypeInfo xensysbus_info =3D { } }; =20 -static Property xen_sysdev_properties[] =3D { - {/* end of property list */}, -}; - -static void xen_sysdev_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - - device_class_set_props(dc, xen_sysdev_properties); -} - static const TypeInfo xensysdev_info =3D { .name =3D TYPE_XENSYSDEV, .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(SysBusDevice), - .class_init =3D xen_sysdev_class_init, }; =20 static void xenbe_register_types(void) --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597418; cv=none; d=zohomail.com; s=zohoarc; b=L5yylIaMOyJj3lGzH4n+vYHML80qJnZ9uF+MNYJHG29CW6nlPRYAUeEQG8XGzLPt5bGOWNwlvVhTTc24BzYsjunCSmRFYHkeJK8nNvDzYTRrWRYXXwDLfWaLvsXhvoU9BJY/7QB/OP1e2ZPuxTPxRxHyhAm8JK4pS/VQCYMy3AM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597418; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V/ENCW2ZbKsFmMbQzc45gFjdcifV8MZLOt5dduiBsBs=; b=hx9x4OHsiXfYRtc1EnLMn9AJVRkAzGuGt8XmkZ5cg7iTBSLMO1L+YZU1jIYAAr7NN/SoNvyRnXxBmTcbbkL4C+QF/bpFtBfGtjUq8UYJGI983T0faS79fWQB84R3AY8F60BIzpS7EVYOqaAtUQbEudSzhO//Tg0XObgdNcsSgDY= 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 1734597418803673.965582111873; Thu, 19 Dec 2024 00:36:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxq-0004Vx-EA; Thu, 19 Dec 2024 03:32:58 -0500 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 1tOBxo-0004Ud-0k for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxm-00056d-8j for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:55 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-269-me-VUX5AOXWAHkvO4-wAPg-1; Thu, 19 Dec 2024 03:32:51 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4361fc2b2d6so2983505e9.3 for ; Thu, 19 Dec 2024 00:32:51 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436612008bcsm11140035e9.16.2024.12.19.00.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V/ENCW2ZbKsFmMbQzc45gFjdcifV8MZLOt5dduiBsBs=; b=RtWAtRQyb8h91gFSbC9OHiwsBc9Kx6EoeitqMgjgvauc2A5fV8sk9fXLbwmjPdYuIJ7oDt xCuJntnRjyCy2jAz8yHqSAbySnscIFdBrlCEfS1riqDVOsz74Ww6b60qH2QrVVCdUGjj7F BpgLDVqS429sPN29jHid6B8KvhFThi0= X-MC-Unique: me-VUX5AOXWAHkvO4-wAPg-1 X-Mimecast-MFC-AGG-ID: me-VUX5AOXWAHkvO4-wAPg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597169; x=1735201969; 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=V/ENCW2ZbKsFmMbQzc45gFjdcifV8MZLOt5dduiBsBs=; b=YmmLtnxSW5WF28qor+baCwaje4nnh0JYtuVlqrF1sCCpjm91v5vNjoQpe8U7lfUusJ paZIymDEa5kwpS38Aw6Zni8xeBR+w2F4PxEmx0CsJ6S9eHW99IbFhK9qiHrj6ykzi90c yEDekkUNsqxk8IXFU78S5Elj+1t8cnSTgwJFJHAZVYCPY8q7yoSxjbGPZH+aVGW/pwfu 7klrLAIDFBpw3nspOkvS46HW6bu2U+owz7z3Rvau5Vr03Hl0Z6SO/9xB1dYQ6oky0Mak R94Rg2VMKozhfJ5hfRG13Wf2DeCBGXLzULdiW2xMxeRkGEhmiIW7XeLR29xJU79kxpXJ SNPg== X-Gm-Message-State: AOJu0Yy1lm+6Z3k/Mjy6pnLI/NkYT/Q8osXSpHKE61ZxF0n1k/GuH/3C UvHzqHRm+XVxwHjD5uvmq6e3h9RC5KYB3pUsLXWizktaibgswHg96XsrqRwLXUY39v6A5Qhrv4d F0CB+/QUhnJDxZTwN+qWU8i16nQn3AD1D5JTNu+AUFNpphIb2i1wEryQRVURYIOTxzM4XiF/3ze fD8kvopaP4hs4HVksnTG5/NAJ7AvbVr0kFL75R X-Gm-Gg: ASbGncsOEsQOK+/svKZJfdQ2VgXh5dRmYRm2SQ52KNVgnim0T7dr6a5DMVmra/a9GG0 HjGXnRe6TVLOL7ektm4a8JqH+ttXuKHlWGlzLEHMzQsYwLS7E1sFKVjTW+H4LGYvTo1/ULmUSiE QQpjtiRtcgBUTo7KV0BlbvpOZYOQMWLMGN68pdVhxRWp9O1dnrdEvSuFp58Q1Se3kCU1xrNz6mW 99DPOHcWbEK1eg0icd7EYFEhCmVlQa3Fh/g6jNhMzB0klQoY7EC21raQVZk X-Received: by 2002:a7b:cde1:0:b0:436:5165:f21f with SMTP id 5b1f17b1804b1-4365c7c9713mr14808285e9.26.1734597169705; Thu, 19 Dec 2024 00:32:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcjR+VMxAu0nFHCgL4AzVlqS/5SaastdJGcxUUecubn4xtJRVQYzz0CHTdDnXcZOqc/2/u+Q== X-Received: by 2002:a7b:cde1:0:b0:436:5165:f21f with SMTP id 5b1f17b1804b1-4365c7c9713mr14808035e9.26.1734597169333; Thu, 19 Dec 2024 00:32:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 10/41] hw/sparc: Remove empty Property lists Date: Thu, 19 Dec 2024 09:31:57 +0100 Message-ID: <20241219083228.363430-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597419656116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-11-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/sparc/sun4m.c | 5 ----- hw/sparc64/sun4u.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index d52e6a7213f..7ec346533e2 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -732,15 +732,10 @@ static void prom_realize(DeviceState *ds, Error **err= p) sysbus_init_mmio(dev, &s->prom); } =20 -static Property prom_properties[] =3D { - {/* end of property list */}, -}; - static void prom_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, prom_properties); dc->realize =3D prom_realize; } =20 diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 7088ac273ea..05b8c7369e2 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -471,15 +471,10 @@ static void prom_realize(DeviceState *ds, Error **err= p) sysbus_init_mmio(dev, &s->prom); } =20 -static Property prom_properties[] =3D { - {/* end of property list */}, -}; - static void prom_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, prom_properties); dc->realize =3D prom_realize; } =20 --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597373; cv=none; d=zohomail.com; s=zohoarc; b=BLeq/J/WeKOqUw4ina6ygcmazeuGx2OW8Aihlxz8lOlZMtTSfMrb1V4sW+kI/JyOAaf4byHdUAp59FVTe0sb/U/rh495EFmsKOYfJ5g3au18rYHZC9kjJRTfUkOllMCBvEz+5ny3q5meHvijJr7euUsHQXFopI7uP3qC5quiQ7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597373; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BRvXaOIiQljc+ZwkCS91Aq82+cVbl1J4OCKByiO2hkw=; b=NXwyZL2X3KrUiaZtRlBOLx+7XoxA8mA2a3hrSx5hSKenw9iPu4GC7+2XdmEzHirEX+WZfFXmAvk7mIfX+HzZUrt8bzrLcg8O1+akbHOrKHk2Yi8ewsWC3LT9L+KuatF3BHpRlyaBxrZkEdiupMd3IFM3xLr3JzS8vQvau9CWGUo= 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 1734597373125315.34766701135914; Thu, 19 Dec 2024 00:36:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxr-0004Wg-IB; Thu, 19 Dec 2024 03:32:59 -0500 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 1tOBxp-0004Vm-Cl for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxn-00056w-I5 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:56 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-GW3S7Ww-NSqGBZ1UG82NMw-1; Thu, 19 Dec 2024 03:32:53 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385df115300so257124f8f.2 for ; Thu, 19 Dec 2024 00:32:53 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e2d2sm988883f8f.71.2024.12.19.00.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BRvXaOIiQljc+ZwkCS91Aq82+cVbl1J4OCKByiO2hkw=; b=HzxEuJPsYJPiHcnngpOs14x7B0HVKNAp4Q2NsYAv6PSageFa6Du4BcSAjgaDRjR0d8gas6 MSXkl86dWtbYsfMBMQVeLLPW9NAq+n9R3Dzr046Ygi0yngA3i+fc7TvZ2aT81/whO4hM0y jGZz9lm0keD80zUuNL4cgNUiXEbFJj8= X-MC-Unique: GW3S7Ww-NSqGBZ1UG82NMw-1 X-Mimecast-MFC-AGG-ID: GW3S7Ww-NSqGBZ1UG82NMw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597172; x=1735201972; 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=BRvXaOIiQljc+ZwkCS91Aq82+cVbl1J4OCKByiO2hkw=; b=egXkdGDbP02XaX1zfILcAceJn5lMcIzQKblU9rTwCC3L9GyD8d+avnIvBaigvQKGlB czSqKBf4uLJWEhy+Dqp5cEfNqWV09iOHMhEXn2oAfcsJQBD14iXzsDNK74GvQcBZwOUj jEXWKPkI3/aP4w4R+e/d5/+DilTzSP3biI5ReRBGUOy1WU7jWqovA879w2EkqGHYDIpS K4TfWH/dR1A+I1a3QhBjnbXxBp+xBkGfXgucqcF7RhajEbEAEAnByiDzEvSDgQeQ8otZ UNELxVSf9rn9twr5exBoHVGGgIcooI86hz3+a90m4rLHZtSmC3okAxwk6+3QUpYOX+ZA wevA== X-Gm-Message-State: AOJu0YwRZZUNXSzg0Gt3ZK9lPr/TJtg6lLtWE2ECK8Yj+ilOfjRqJWiX 0VyxP6mgDzTnIslBY1ZduV1uBcsuGYuGcyblb/kFwHr4bVCOQQ4Gv1btplSOaD+TDRBOWf3fqeK WPYnxiXm7S75qx/AqUv2kKPjVoQiKTlJMUNxtA9SmQaqO9QZWKM8qjyYahjjBS74McekK+AlEKp YZesNmYOsQMJm54EY9KWfNPM5b5Sey5OVIIfwx X-Gm-Gg: ASbGnct2y76S1fKCxCGFcmXF9vHwESTo0p5852SnNN9TqP4nCsWo+gwW1faJU56k9Lo CLLEi7UITNk877KjGaDOVqUHhlp2CVpOegCtXDgo8rqXca34XKskLcnLngYArP6oXdGlKN3r/PZ 976hfK0k5MFDCkiI4O6wAZjnN35E+i0bp07W5y7+aeufU1QcbQ/7uGl0ZOyU4oHWnM1DySTCiSI 6QtUdeRQwgV7f71Zm6VPsUUeKdhiXSbhuJICU/ISGcMcLOEYMZz0CyBdTGN X-Received: by 2002:a5d:59a3:0:b0:374:c4e2:3ca7 with SMTP id ffacd0b85a97d-388e4d4b63cmr5617955f8f.5.1734597171799; Thu, 19 Dec 2024 00:32:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ09Z+lsYrzmr5vyDxKKNjJvs02a0DcXYW666qQbSnNJ3MgDr8R8G96myg3ZKg4BSKuWpmGQ== X-Received: by 2002:a5d:59a3:0:b0:374:c4e2:3ca7 with SMTP id ffacd0b85a97d-388e4d4b63cmr5617929f8f.5.1734597171359; Thu, 19 Dec 2024 00:32:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 11/41] hw/virtio: Remove empty Property lists Date: Thu, 19 Dec 2024 09:31:58 +0100 Message-ID: <20241219083228.363430-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597373555116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-12-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/virtio/vdpa-dev-pci.c | 5 ----- hw/virtio/vhost-user-snd-pci.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/hw/virtio/vdpa-dev-pci.c b/hw/virtio/vdpa-dev-pci.c index 5446e6b393e..787926801a1 100644 --- a/hw/virtio/vdpa-dev-pci.c +++ b/hw/virtio/vdpa-dev-pci.c @@ -48,10 +48,6 @@ static void vhost_vdpa_device_pci_instance_init(Object *= obj) "bootindex"); } =20 -static Property vhost_vdpa_device_pci_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static int vhost_vdpa_device_pci_post_init(VhostVdpaDevice *v, Error **err= p) { VhostVdpaDevicePCI *dev =3D container_of(v, VhostVdpaDevicePCI, vdev); @@ -80,7 +76,6 @@ static void vhost_vdpa_device_pci_class_init(ObjectClass = *klass, void *data) VirtioPCIClass *k =3D VIRTIO_PCI_CLASS(klass); =20 set_bit(DEVICE_CATEGORY_MISC, dc->categories); - device_class_set_props(dc, vhost_vdpa_device_pci_properties); k->realize =3D vhost_vdpa_device_pci_realize; } =20 diff --git a/hw/virtio/vhost-user-snd-pci.c b/hw/virtio/vhost-user-snd-pci.c index d61cfdae631..0cb86b7d85d 100644 --- a/hw/virtio/vhost-user-snd-pci.c +++ b/hw/virtio/vhost-user-snd-pci.c @@ -23,10 +23,6 @@ typedef struct VHostUserSoundPCI VHostUserSoundPCI; DECLARE_INSTANCE_CHECKER(VHostUserSoundPCI, VHOST_USER_SND_PCI, TYPE_VHOST_USER_SND_PCI) =20 -static Property vhost_user_snd_pci_properties[] =3D { - DEFINE_PROP_END_OF_LIST(), -}; - static void vhost_user_snd_pci_realize(VirtIOPCIProxy *vpci_dev, Error **e= rrp) { VHostUserSoundPCI *dev =3D VHOST_USER_SND_PCI(vpci_dev); @@ -44,7 +40,6 @@ static void vhost_user_snd_pci_class_init(ObjectClass *kl= ass, void *data) PCIDeviceClass *pcidev_k =3D PCI_DEVICE_CLASS(klass); k->realize =3D vhost_user_snd_pci_realize; set_bit(DEVICE_CATEGORY_SOUND, dc->categories); - device_class_set_props(dc, vhost_user_snd_pci_properties); pcidev_k->vendor_id =3D PCI_VENDOR_ID_REDHAT_QUMRANET; pcidev_k->device_id =3D 0; /* Set by virtio-pci based on virtio id */ pcidev_k->revision =3D 0x00; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597498; cv=none; d=zohomail.com; s=zohoarc; b=WBkYJAbaafr8RuDUVw+yzR9kSgUx0tyR6caWE/D5YRJcEzpZjFf6PqoL1jTMJEgfmLvKiCdiKnL3sEU50+OpMG3SzFmgkOD5Z8jw+nbUD57ghwMPxMXmb5wB0pNI0TTfMHXgyykCucw/MarYGxEpPlQpS1ckpyMXofrN0JTBqP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597498; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DHSMfA4p8emdOQqYqGttRQGDx+jWhVOuqAnBtD1lJmc=; b=df/UUVmBVq/5V/wOXmPPDdAwsZb/q+QhssCwdcl7/26O63mrrWrEvx2Wg2Wp6Fpw8du353h20AsDH9227bvTDnLuABUC5/U5sFBAwMr3iFOlww6Ddt+O0qI8KW9bHXu2G4Hzb5YlO0pbysojaNHraqC7WkmdV1tCx4akyI3KGKY= 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 1734597498848795.411046232865; Thu, 19 Dec 2024 00:38:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxt-0004X6-1s; Thu, 19 Dec 2024 03:33:01 -0500 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 1tOBxr-0004W6-4P for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxp-00057G-IL for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:32:58 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-_vHX8csXO9eKvQ8A6EoJRg-1; Thu, 19 Dec 2024 03:32:55 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3862b364578so826203f8f.1 for ; Thu, 19 Dec 2024 00:32:55 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acc02sm971232f8f.104.2024.12.19.00.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DHSMfA4p8emdOQqYqGttRQGDx+jWhVOuqAnBtD1lJmc=; b=F9Eg08Gu/My/SBjChcEsAba6D38DPuuaAZbP/jdoYxL69Diu52v/t+I1iRuNabaKt6iP6P uX/2OT66agDRwJLMBtGuooE0hVm/wnoYEM81nWYVa2yYGy08RshJr5vCbMz8Lj9dc0JRa7 2n2uM8AbVJYV8P+Ocr7Dh4Oys3UXPrI= X-MC-Unique: _vHX8csXO9eKvQ8A6EoJRg-1 X-Mimecast-MFC-AGG-ID: _vHX8csXO9eKvQ8A6EoJRg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597174; x=1735201974; 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=DHSMfA4p8emdOQqYqGttRQGDx+jWhVOuqAnBtD1lJmc=; b=Uvxru+Fg6eNDIcbzzIyrZnXfgCboaeneKpQKkJ6OXqBbY3RddBDSy5AnqGsFMszDpw H0zJ7gXaroke+ipVzDt6Lujx0RjOgIc7Y3Dgz79h+HaqSzw8+jpWENDlEg+OECbwkAv+ ffUKWuUez+VGyPzh8lN0gB8qnDweHNuhe9mRq7DtrNlbZcNoICQrAF5Xd3PWYOkEvlT6 uW6YGhMkuSSY6j6XbZmfFvHQFsc5a2EugmPAD7FrGTRA0bJgSe6wwN3Tedw9gLUemiNy Rrzm3xAcwqEcUYoFvPnS9Ld0+RT2q42PAuw0GVYxh/4983c12v9QEphSa+3xp71sjXvw d5UA== X-Gm-Message-State: AOJu0Yy5YNsvZ84cN+fAusuHLH3oyHyYXJcl9n15UE/yhsKV5O271ABw 6l58OzQFkpzzcMoqAux2M39tZ3il5O4hodjc4E954KDddATs+ZiqAR+CSsoduTGEA0LeTCg1lEY d1ROmEDzkD0NW0bMdrYpfX8etdTqOMhn8FSGCmdtDkUpo8hNJmiaFEk2V4NX2Be97QwKxdv+8y9 YqfvNiRD9VJJBJp8J0ZLsuQNYuvULhAtpIK8pm X-Gm-Gg: ASbGncuvvyXs0Gn1vbpJ9cdFQE7NR+uaiwxJcaSjmN1Mvi18Hn7egrcL+Ti95nN5Cla 73Fqx7y6mntiLNtF61cK/uoDqER9QxTHq4jdsNW2CaEmET/cstZYz4SS2kgSHw+LepZIuKgpo4N cjYXjczWY5kxMkJyseL9EQlA/qErSenpEJGrE+9jpLqv9dyJtaOrWbh8jgqv8BEqNi1372kPyBV k+Fa/j3YPdNps9JTkmD/zM59qGs0fD2u7jSt56Y39k/nixUpkz8GB0H0dXZ X-Received: by 2002:a5d:6c64:0:b0:385:e90a:b7de with SMTP id ffacd0b85a97d-38a1a1f9f38mr1570178f8f.5.1734597173846; Thu, 19 Dec 2024 00:32:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpzVp+rdUfEwhoS9mPfpLdBoyJEXuXG6TC4MXMoEbWgKhwSaBr1kmImIx1MuCXBch0+1WNpQ== X-Received: by 2002:a5d:6c64:0:b0:385:e90a:b7de with SMTP id ffacd0b85a97d-38a1a1f9f38mr1570157f8f.5.1734597173446; Thu, 19 Dec 2024 00:32:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 12/41] include/hw/qdev-core: Detect most empty Property lists at compile time Date: Thu, 19 Dec 2024 09:31:59 +0100 Message-ID: <20241219083228.363430-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597500032116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-13-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 8 ++++++++ hw/core/qdev-properties.c | 2 +- migration/migration.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 5be9844412f..b2859d1e39e 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -943,6 +943,14 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *= bus, DeviceState *dev); */ void device_class_set_props(DeviceClass *dc, const Property *props); =20 +/* Validate at least one Property, plus the terminator. */ +#define device_class_set_props(DC, PROPS) \ + do { \ + QEMU_BUILD_BUG_ON(sizeof(PROPS) !=3D sizeof(const Property *) && \ + sizeof(PROPS) < 2 * sizeof(Property)); \ + (device_class_set_props)(DC, PROPS); \ + } while (0) + /** * device_class_set_parent_realize() - set up for chaining realize fns * @dc: The device class diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 315196bd85a..de618a964a9 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1061,7 +1061,7 @@ static void qdev_class_add_legacy_property(DeviceClas= s *dc, const Property *prop NULL, NULL, (Property *)prop); } =20 -void device_class_set_props(DeviceClass *dc, const Property *props) +void (device_class_set_props)(DeviceClass *dc, const Property *props) { const Property *prop; =20 diff --git a/migration/migration.c b/migration/migration.c index 8c5bd0a75c8..6b3b85d31e5 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3822,7 +3822,7 @@ static void migration_class_init(ObjectClass *klass, = void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->user_creatable =3D false; - device_class_set_props(dc, migration_properties); + (device_class_set_props)(dc, migration_properties); } =20 static void migration_instance_finalize(Object *obj) --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597339; cv=none; d=zohomail.com; s=zohoarc; b=h1QFQGGO0unUJRE3zUQbrgpEAKJk0Agg1hA6iEHe4WOtfFEo6JHMDzgrRAUNnbnP8sYQydt/1JHwwie6PBoFQ+y992oRb3uZ4mwRmNpLm74a+w9aka8oR02ClqVY5onZ1oB2hpIH+6kO53MXe5wyRJdo8K/9u+KHo69YqxSU7gQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597339; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4eJZ4T+6hj0lMuTqdhGtKSNhMjurrg/zB/nnKEWfpPg=; b=l6MmtaNU9rhHBEAMbf4VMhs/J6omP6sUB/6gmhyDA3g2ztVKsfqE26AwmdbMXgO7Cf5DzM25rdJ8Gzqc4a9havNEVLRNgfB66dKDgQ2EEoJ/WzUHwtH9jgwVjx5mmZ2pw++l1+zQX6tVgl+SWSixm3h5EtcopxK/FTCsKGhu+4c= 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 1734597339725277.6133609022007; Thu, 19 Dec 2024 00:35:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxw-0004Xr-9b; Thu, 19 Dec 2024 03:33:04 -0500 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 1tOBxu-0004XS-Tg for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxt-00057r-68 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:02 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-313-WaZcAmEbNzqdCRnJP4tLsA-1; Thu, 19 Dec 2024 03:32:58 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4359eb032c9so4474205e9.2 for ; Thu, 19 Dec 2024 00:32:58 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8bb4bcsm967160f8f.111.2024.12.19.00.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4eJZ4T+6hj0lMuTqdhGtKSNhMjurrg/zB/nnKEWfpPg=; b=UGmUiQw6d//Xf6E1pnHVS/5wvuk8BPq8dB/8kqI9zpePGAUBF6SM9HgJOlVaskbFROiCkM d5oeoTwH7UWkTZbybjVU/ul/cLY6dRGmuQiL1sdnTd/pxDIS8AFbaVK4C4+IUL7ntKTkJa kJw9kDo+2glK2w1RYM/9RpQgKijiHOI= X-MC-Unique: WaZcAmEbNzqdCRnJP4tLsA-1 X-Mimecast-MFC-AGG-ID: WaZcAmEbNzqdCRnJP4tLsA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597176; x=1735201976; 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=4eJZ4T+6hj0lMuTqdhGtKSNhMjurrg/zB/nnKEWfpPg=; b=JvczF4Hd/bclzq7rELk8ikmf+7T0uD/IxMN7TWGjQIFiFXr0w4Br3WEHluYkmfBpC7 JqQLieGRT1oe+ujIJEs+CHYkXdVwnUCxw5XfnkwER4uQaE9/MPRkfkybh+FHyKb4klh+ CryftaoPGiG/5+q/ftZ2mYhGwTnojrvYbD7294+UnBaouUViTXnq0DROm1e2/r8jwAar G14PIZYFtCe25kjXfwkSRoB7+2Ygy05j3GFlv4EZ28T+p9Rtmv+mj67VODsszwjlKhCu /YQHCyXkhfyu7Lfr5NUstV3krWfl2H5Mpdn6hieY4JyYRk2ULBqktkbTyFoHOPB3GoCs HY3A== X-Gm-Message-State: AOJu0YxiO9XQbipd2OxHUdACZMEv2+fJko9u5HI3L0ESAuuVYi8LE6/6 aUWIjrlf/5ymXSWrBJ9KAwOO4G19/a/4Xdpstrbd6dhKL1l8VkmkQ3kHau4CP/Q9GfLi7Ullfws YVl0Kobv189hpUigzDGXhRo3QWTWD3BGxgcVxgKmpoP8hVtjQGv03ofMXzFfQF7hDXZoEDZEZ4+ nUVfyhicERG080Q8o/n8GMaz4jj0IrVnPQCqvg X-Gm-Gg: ASbGnctFHy9QUiTYCch5Xw2hL9GYPE/ZXOKRoqsOe158/9HZMBdsELz7wkuh7m9GshK pcuuGxrj25IA7MmhXkuOdgbaEWP5cJ6vExo/0v8Tfz8+7Stulb/QXgpoQC6dFCdMGWSvXKFof9d Hvk87uRZfN9gYLgs/j75gT48xlXnDXqig7zxn7m4dPVeKGLDzbhakESeXZKFotP+imbQzWZZZwE fJUWhUluV+o4c4L5b3oSO5NhgpVMezu7yggXd6fYci3vDdOzF5FHUnUra9G X-Received: by 2002:a05:6000:4a03:b0:385:faf5:eba6 with SMTP id ffacd0b85a97d-388e4d2e302mr6064965f8f.1.1734597175820; Thu, 19 Dec 2024 00:32:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBBCo0NqcOg5OkGNc3CoJKlOjKzVeYTHrpDTvFIrrn6eIggcXdieSsWJY02Or/BPf0raEkfw== X-Received: by 2002:a05:6000:4a03:b0:385:faf5:eba6 with SMTP id ffacd0b85a97d-388e4d2e302mr6064931f8f.1.1734597175388; Thu, 19 Dec 2024 00:32:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 13/41] hw/core: Introduce device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:00 +0100 Message-ID: <20241219083228.363430-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597341529116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-14-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 18 ++++++++++++++++++ hw/core/qdev-properties.c | 39 +++++++++++++++++++++++++++++---------- hw/core/qdev.c | 1 + system/qdev-monitor.c | 15 +++++++-------- 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index b2859d1e39e..cd0ddf84ca5 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -138,6 +138,12 @@ struct DeviceClass { */ const Property *props_; =20 + /** + * @props_count_: number of elements in @props_; should only be + * assigned by using device_class_set_props(). + */ + uint16_t props_count_; + /** * @user_creatable: Can user instantiate with -device / device_add? * @@ -951,6 +957,18 @@ void device_class_set_props(DeviceClass *dc, const Pro= perty *props); (device_class_set_props)(DC, PROPS); \ } while (0) =20 +/** + * device_class_set_props_n(): add a set of properties to an device + * @dc: the parent DeviceClass all devices inherit + * @props: an array of properties, not terminated by DEFINE_PROP_END_OF_LI= ST. + * @n: ARRAY_SIZE(@props) + * + * This will add a set of properties to the object. It will fault if + * you attempt to add an existing property defined by a parent class. + * To modify an inherited property you need to use???? + */ +void device_class_set_props_n(DeviceClass *dc, const Property *props, size= _t n); + /** * device_class_set_parent_realize() - set up for chaining realize fns * @dc: The device class diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index de618a964a9..31e3072b559 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -749,16 +749,13 @@ const PropertyInfo qdev_prop_array =3D { =20 /* --- public helpers --- */ =20 -static const Property *qdev_prop_walk(const Property *props, const char *n= ame) +static const Property *qdev_prop_walk(DeviceClass *cls, const char *name) { - if (!props) { - return NULL; - } - while (props->name) { - if (strcmp(props->name, name) =3D=3D 0) { - return props; + for (int i =3D 0, n =3D cls->props_count_; i < n; ++i) { + const Property *prop =3D &cls->props_[i]; + if (strcmp(prop->name, name) =3D=3D 0) { + return prop; } - props++; } return NULL; } @@ -771,7 +768,7 @@ static const Property *qdev_prop_find(DeviceState *dev,= const char *name) /* device properties */ class =3D object_get_class(OBJECT(dev)); do { - prop =3D qdev_prop_walk(DEVICE_CLASS(class)->props_, name); + prop =3D qdev_prop_walk(DEVICE_CLASS(class), name); if (prop) { return prop; } @@ -1064,9 +1061,31 @@ static void qdev_class_add_legacy_property(DeviceCla= ss *dc, const Property *prop void (device_class_set_props)(DeviceClass *dc, const Property *props) { const Property *prop; + size_t n; =20 dc->props_ =3D props; - for (prop =3D props; prop && prop->name; prop++) { + for (prop =3D props, n =3D 0; prop && prop->name; prop++, n++) { + qdev_class_add_legacy_property(dc, prop); + qdev_class_add_property(dc, prop->name, prop); + } + + /* We used a hole in DeviceClass because that's still a lot. */ + assert(n <=3D UINT16_MAX); + dc->props_count_ =3D n; +} + +void device_class_set_props_n(DeviceClass *dc, const Property *props, size= _t n) +{ + /* We used a hole in DeviceClass because that's still a lot. */ + assert(n <=3D UINT16_MAX); + assert(n !=3D 0); + + dc->props_ =3D props; + dc->props_count_ =3D n; + + for (size_t i =3D 0; i < n; ++i) { + const Property *prop =3D &props[i]; + assert(prop->name); qdev_class_add_legacy_property(dc, prop); qdev_class_add_property(dc, prop->name, prop); } diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 5f13111b77c..57c1d9df3a7 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -703,6 +703,7 @@ static void device_class_base_init(ObjectClass *class, = void *data) * so do not propagate them to the subclasses. */ klass->props_ =3D NULL; + klass->props_count_ =3D 0; } =20 static void device_unparent(Object *obj) diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index 03ae6106497..6831fffd9d5 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -752,19 +752,18 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **= errp) =20 #define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", #= # __VA_ARGS__) =20 -static void qdev_print_props(Monitor *mon, DeviceState *dev, const Propert= y *props, +static void qdev_print_props(Monitor *mon, DeviceState *dev, DeviceClass *= dc, int indent) { - if (!props) - return; - for (; props->name; props++) { + for (int i =3D 0, n =3D dc->props_count_; i < n; ++i) { + const Property *prop =3D &dc->props_[i]; char *value; - char *legacy_name =3D g_strdup_printf("legacy-%s", props->name); + char *legacy_name =3D g_strdup_printf("legacy-%s", prop->name); =20 if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) { value =3D object_property_get_str(OBJECT(dev), legacy_name, NU= LL); } else { - value =3D object_property_print(OBJECT(dev), props->name, true, + value =3D object_property_print(OBJECT(dev), prop->name, true, NULL); } g_free(legacy_name); @@ -772,7 +771,7 @@ static void qdev_print_props(Monitor *mon, DeviceState = *dev, const Property *pro if (!value) { continue; } - qdev_printf("%s =3D %s\n", props->name, + qdev_printf("%s =3D %s\n", prop->name, *value ? value : ""); g_free(value); } @@ -812,7 +811,7 @@ static void qdev_print(Monitor *mon, DeviceState *dev, = int indent) } class =3D object_get_class(OBJECT(dev)); do { - qdev_print_props(mon, dev, DEVICE_CLASS(class)->props_, indent); + qdev_print_props(mon, dev, DEVICE_CLASS(class), indent); class =3D object_class_get_parent(class); } while (class !=3D object_class_by_name(TYPE_DEVICE)); bus_print_dev(dev->parent_bus, mon, dev, indent); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597251; cv=none; d=zohomail.com; s=zohoarc; b=eNPKJ0q4yK495AI7NR5dXXZl6gFGlkeuhutzYTnL/DeCCWEm/4r5pNs5FqK0pjOjbtdRUNNIr4vAjVKGHJCS5z7A50U0fS1zt2BnQJ4yOyVYdJv2t/xuzijr6LMeFzchnr6UFF6SB4KMFP1wjMZqxHT4GKsDgckaSv+cjR/3BuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597251; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CRUx0ihRVJNBkx25RdEddlnJRXUqJCkYhNyCELXxXGg=; b=HVm1ENdGWiTmUUqK7zrAAyyTOkB4MRbaMsmgYmYTVh5JlZmkKGPyvH0Wv9RM7k0W+458hl2Qyt/8NOG1mM5CWJ1/roNE2DZJVscjm+IPBKMhHz3+QxFRcT2ZCpft51IVYtq6S7mD15/SNi2OKMiJgRae0aEOIb5rYiaUwa4lr50= 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 1734597251585728.5221986624772; Thu, 19 Dec 2024 00:34:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBxz-0004YQ-FS; Thu, 19 Dec 2024 03:33:07 -0500 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 1tOBxy-0004Y7-6u for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxw-00058E-OU for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:05 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-TA4oGsRnO-m8vnCNBxDY_g-1; Thu, 19 Dec 2024 03:32:59 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-43635895374so8047905e9.0 for ; Thu, 19 Dec 2024 00:32:59 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e219sm992373f8f.84.2024.12.19.00.32.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CRUx0ihRVJNBkx25RdEddlnJRXUqJCkYhNyCELXxXGg=; b=K6tsfJU5cMclqrbt4IwP4EmSHJmhf4PmERqK1n22xT0Nd4q4gJThbZUCEI11vrajL+3DvM 8N60lElS8EIG7J/pBqeEkbqpz+s3KvwGBdsJASWGOrZYSps0Hb5p9g/Juizc1j8vLv4Ni+ uVOLGe8Mts7gYLKZkKum5juKHx2NalA= X-MC-Unique: TA4oGsRnO-m8vnCNBxDY_g-1 X-Mimecast-MFC-AGG-ID: TA4oGsRnO-m8vnCNBxDY_g X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597177; x=1735201977; 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=CRUx0ihRVJNBkx25RdEddlnJRXUqJCkYhNyCELXxXGg=; b=aVNVZXbfYZtQEaJ6H9mck4T2mEcxb+F15jwIDPFwg1eQkC9/pHRRtZPrvRqTGtjME0 q6SD/FVnpFRCVlT2HvtDs+GAbYs/oDrlnYGh6V0vqUF0YcS7jQxIE9iAGIjCCnOdnrMN oaiEPJQzMX84PA4g0la8Kv4Ltu4mab/9YK6ReSgfbEag84QcUpfpwxPicePuXCxc5MdM FfqHAWR3YOvaL7K3VWHKUA0bB6fM+/x37Wfx/WucjjbQ5isLaQl6gmCVhy4UJb0K4Eul DoA+9D9zwpw1hO+FS9xz03gZoxfAPphAdymplH/f7LX+KeaNDYkV86xsI9+aBVzR2ogx +n4Q== X-Gm-Message-State: AOJu0Yzmbby2xxaC7anytgo5exbIbQAtGb8sLhL+k6D63CcRhV9mFg/M v3GuTab7SzMzcljN7Y1/D/rvLC4LkW5ii0B3xm9fTW2K/dW6tcAT71DgvnlwuaxVQht94i90zFB ZvBmc5gb5PvqfSsaca0Cyqv7W9Vt0+Qpd/yE/UlrWare1n7Hrn+1dp2ARS4QVSQssI3ZEa1MFXT hm+GISmw8HhceAPdGE9JnlPArPoMhpZ7JYqloU X-Gm-Gg: ASbGncvzFZUDv7NamuBXvWqCIJPVxyS3gIUbylUm9fkls4GmOtsG8IxXv12ErRhUCiK q4kzIr7QF4ZOgBqGi/ojScXuOMqkvvadfmvBhRTElxruh00CnXSL20IgZj0klA0OFb/389iX78L fD1ZW14k0RTzkrsbhoAGigLbdEYxdnHNil/JCkcZKO5SfQ9Zrsvv6sU0+VkbenKY93+ZbUU3cy0 zynTTxbWHUqfOsJGuKwdrTskHrsEIyNOl4CrtVqQPOV/Pfjjqk4KH/sXnZP X-Received: by 2002:a05:6000:1a85:b0:385:f64e:f177 with SMTP id ffacd0b85a97d-38a1a20497fmr1844545f8f.11.1734597176903; Thu, 19 Dec 2024 00:32:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtngBPPfg14UQsoMZ5uPMt/AMHpdSGsKHQkQGeKh2ZeglvOoSJmI59/+Vbg/oFOq2hosBb5g== X-Received: by 2002:a05:6000:1a85:b0:385:f64e:f177 with SMTP id ffacd0b85a97d-38a1a20497fmr1844507f8f.11.1734597176462; Thu, 19 Dec 2024 00:32:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 14/41] migration: Use device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:01 +0100 Message-ID: <20241219083228.363430-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597253125116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Export the migration_properties array size from options.c; use that to feed device_class_set_props_n. We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-15-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- migration/options.h | 1 + migration/migration.c | 3 ++- migration/options.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/options.h b/migration/options.h index a360f93a44f..762be4e641a 100644 --- a/migration/options.h +++ b/migration/options.h @@ -21,6 +21,7 @@ /* migration properties */ =20 extern const Property migration_properties[]; +extern const size_t migration_properties_count; =20 /* capabilities */ =20 diff --git a/migration/migration.c b/migration/migration.c index 6b3b85d31e5..d23d392685e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3822,7 +3822,8 @@ static void migration_class_init(ObjectClass *klass, = void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->user_creatable =3D false; - (device_class_set_props)(dc, migration_properties); + device_class_set_props_n(dc, migration_properties, + migration_properties_count); } =20 static void migration_instance_finalize(Object *obj) diff --git a/migration/options.c b/migration/options.c index 24cc8471aa0..70ff56535a2 100644 --- a/migration/options.c +++ b/migration/options.c @@ -196,8 +196,8 @@ const Property migration_properties[] =3D { MIGRATION_CAPABILITY_SWITCHOVER_ACK), DEFINE_PROP_MIG_CAP("x-dirty-limit", MIGRATION_CAPABILITY_DIRTY_LIMIT), DEFINE_PROP_MIG_CAP("mapped-ram", MIGRATION_CAPABILITY_MAPPED_RAM), - DEFINE_PROP_END_OF_LIST(), }; +const size_t migration_properties_count =3D ARRAY_SIZE(migration_propertie= s); =20 bool migrate_auto_converge(void) { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597319; cv=none; d=zohomail.com; s=zohoarc; b=buNtkO0MWEnzvxH8nlWxcjsmQfctD/4+ADwo45UEKH075+Y1P17CcUNSWxArbAFgfl7goC0a2BXsUGIEFdX0bVppsFRis6h/1BT6eesC1zklRdMd51ShC9VKEPLd22HN2qIq32XfwiWobF80rOJyFsuLZqV/LKIl4kOi7tkBL7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597319; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lszIW+6n3q7LxjSiG56S8Pvl926aYIlcMEY05VSrnOQ=; b=nsxt4mpuqc6MgUYWg2R/SusOmiCGyXg3HF0usLT7uuMj97beBrRknYUwr6pqPbl8IxMnGP55BW4iSUvJOsio/O9w487gliSBiNBW6lrh1RkTcTDjmV0VsV++DeGwof/e440LwkgR+oDHkUMma2bIJu80VSbqOvG/JaiAYkIHsuE= 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 1734597319937648.7814801741723; Thu, 19 Dec 2024 00:35:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy0-0004YW-3K; Thu, 19 Dec 2024 03:33:08 -0500 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 1tOBxx-0004Y5-RW for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBxw-000585-A1 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:05 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-82-tc8wQJvvNe6K0nXTpI19YQ-1; Thu, 19 Dec 2024 03:33:01 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43610eba55bso4157925e9.3 for ; Thu, 19 Dec 2024 00:33:01 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43661289a18sm11005085e9.37.2024.12.19.00.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lszIW+6n3q7LxjSiG56S8Pvl926aYIlcMEY05VSrnOQ=; b=Eq/YHqKfjdVC7kBB5+ivQHdVXIoYOiJ0hhUs1ePrbs2fJx42kW8rtc9JalAmzxK2/hfhLU 4vKeOSnmZoDxWKaNh/YCIAnyWuhuLaG0qvLZcoGj2qAQsg19imU4Y63+64Knx2MyRhIlbR TmtWfW8vjkUKAcRiVIbhzhLffYq8/Vk= X-MC-Unique: tc8wQJvvNe6K0nXTpI19YQ-1 X-Mimecast-MFC-AGG-ID: tc8wQJvvNe6K0nXTpI19YQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597180; x=1735201980; 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=lszIW+6n3q7LxjSiG56S8Pvl926aYIlcMEY05VSrnOQ=; b=Aj6w1tisUt0eL4Za8s2qBlAlHSaLkSwRs0vBhBf1ptdzHaujhJM6SbswpEUmqYI70B T71sOx/LOvjZiaeRD8TDmMakbRKmEQt9W0nNhHLspODbDLiSOF77sgxjxBtn+VwoE0bP x4i1Hb+Dijt/qUliDl1LiUcsj20SiuVoyxYbRIfw7BpvF+WmlAR3wxe5oOXrlKl4MQaz vh8zDc+tonrVPyCvJE82xGGzCNxn5Cdofb7qEiMeJ+bAXFOGg0KYK1UmoWMeT2p/TrsW EMs8u1eS4NUEOc35LkAKUYjziw31sYu9S0Ng2lZ68OBHdEv8IDWl/MWguLK64fAuLk43 tyuA== X-Gm-Message-State: AOJu0YwIy+J/pXa2EjPcRzNVsZoElP2Ir0A53MTW21EST3PPrymRzyNl u83aPiyMkJyglSw79re9ckPivBsS9Zqd0lu7m8pBhHurry1JvwyhbozKDE4gk9L3OW3kWWPqviL 6mx9iAIzuEw0tdGEgz0XV4+c7fHt87fk5Jn7nLS5KOckyT5znmEdcgFSGkgY6q8ZyC3fuejhT/D Da/M72CJzK1VIThwZiGbGzlcBWYbleJYHBIXQq X-Gm-Gg: ASbGnct36GuLhAPa2lBRnTOLAsva6w482uxgYh+huyIGLmDtrspJk25hR8ehVnH5nUs UjQH2e284rSoFAw+8iFS8AeRD+y1nSOyWV/47ka9sBDmIlVdZq6P3LsgU6wBTy1UmbycnGlrtc/ fU2ALFScsXVzABHLn9bek3w7wNmOu1d0a2D8ov9nLX9e3RMh48LtoRf1FWmPbZ6EPy6puy4LuB3 Ytugt92uuILDMKtTO8/hPL8EFiQumbNlcMzrntKcflwl63I0p6O4XJfM7hI X-Received: by 2002:a05:600c:35cb:b0:436:18e5:6917 with SMTP id 5b1f17b1804b1-436550ae455mr63097015e9.0.1734597180116; Thu, 19 Dec 2024 00:33:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsRG1DbeOh9+AUSz+1fbD9kFpxeX2SDBruG+NR7c1YUJIvmIwJzvu2T9LyjwhiUeF83SXlrw== X-Received: by 2002:a05:600c:35cb:b0:436:18e5:6917 with SMTP id 5b1f17b1804b1-436550ae455mr63096555e9.0.1734597179574; Thu, 19 Dec 2024 00:32:59 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 15/41] hw/scsi/megasas: Use device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:02 +0100 Message-ID: <20241219083228.363430-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597321305116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-16-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 8323cd18e3a..7f012c218b4 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2459,7 +2459,6 @@ static const Property megasas_properties_gen1[] =3D { DEFINE_PROP_ON_OFF_AUTO("msix", MegasasState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("use_jbod", MegasasState, flags, MEGASAS_FLAG_USE_JBOD, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static const Property megasas_properties_gen2[] =3D { @@ -2473,7 +2472,6 @@ static const Property megasas_properties_gen2[] =3D { DEFINE_PROP_ON_OFF_AUTO("msix", MegasasState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("use_jbod", MegasasState, flags, MEGASAS_FLAG_USE_JBOD, false), - DEFINE_PROP_END_OF_LIST(), }; =20 typedef struct MegasasInfo { @@ -2488,6 +2486,7 @@ typedef struct MegasasInfo { int osts; const VMStateDescription *vmsd; const Property *props; + size_t props_count; InterfaceInfo *interfaces; } MegasasInfo; =20 @@ -2504,6 +2503,7 @@ static struct MegasasInfo megasas_devices[] =3D { .osts =3D MFI_1078_RM | 1, .vmsd =3D &vmstate_megasas_gen1, .props =3D megasas_properties_gen1, + .props_count =3D ARRAY_SIZE(megasas_properties_gen1), .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, { }, @@ -2520,6 +2520,7 @@ static struct MegasasInfo megasas_devices[] =3D { .osts =3D MFI_GEN2_RM, .vmsd =3D &vmstate_megasas_gen2, .props =3D megasas_properties_gen2, + .props_count =3D ARRAY_SIZE(megasas_properties_gen2), .interfaces =3D (InterfaceInfo[]) { { INTERFACE_PCIE_DEVICE }, { } @@ -2546,7 +2547,7 @@ static void megasas_class_init(ObjectClass *oc, void = *data) e->osts =3D info->osts; e->product_name =3D info->product_name; e->product_version =3D info->product_version; - device_class_set_props(dc, info->props); + device_class_set_props_n(dc, info->props, info->props_count); device_class_set_legacy_reset(dc, megasas_scsi_reset); dc->vmsd =3D info->vmsd; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597297; cv=none; d=zohomail.com; s=zohoarc; b=lJ3Y6Enj5GmaytRa6zT8+wd6dZ7Vt0HF3vUF5reBoxXwf03KIdG03dHkbldApvJBi2iaWpD1a6DOOC1U+yk+BRR0/1OMkAK0yhCn90Io0MlcuAGqyqtwk+Ov2mxokfaMv2Uf1aDEVICk+PO4d2EwCITWSB7esPjRZykGuIWKSUE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597297; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=Laji5MIK+owOsE30WGuvXvFIaKBudj0GXeKbmobT1aJqk4AzRztip/vZ7jDB5GdVVLXlyQyGOE/+/KBCZU4rHCEr2ag+GEEEqLGKtqCxIGdsml/aVATIgLmHJRrKzaU3gwwHZCY/3y8Xpv6dXgOajF8wv9bcJ7WSSxW6ODo/L7E= 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 1734597297845507.06568892945234; Thu, 19 Dec 2024 00:34:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy2-0004ZP-Tr; Thu, 19 Dec 2024 03:33:10 -0500 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 1tOBy1-0004Z7-Jh for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBy0-00058e-1T for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:09 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-136-eYdVgMtlMmu7JOATeaDLKw-1; Thu, 19 Dec 2024 03:33:04 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-385dcae001fso230821f8f.1 for ; Thu, 19 Dec 2024 00:33:04 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm962448f8f.92.2024.12.19.00.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=F3oXNTD9ZQ/sgMJ8GbC3cAAtqUwYNJBpZmy/OFO65/oRKVJmmLhEOsNqjjZzjkVE+UeM0r DbckksghalKy3zUwFO7bvCyTOWXtfSnaIrqz0Hw4gFhNVtqbASwECvG502U+jx/JnOgEsG z3XSao53rsovxC/2fqRlV1bbST5rr14= X-MC-Unique: eYdVgMtlMmu7JOATeaDLKw-1 X-Mimecast-MFC-AGG-ID: eYdVgMtlMmu7JOATeaDLKw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597182; x=1735201982; 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=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=vhweHV2r1TGG698Vqy4777GGRTddmxU2OaUVqTi98ytst/XKq3fqZEswYx1bnxXoGx 7KWcX+7IKTi7wLUQwIdTtNbENec7vHi3OFufEXX+3j3Ok8Cb/vxOQC3ZuZZZXaomjMUR ImSi0xn9whnmojfeY3kst7p2raqQCYwW4pfgGgr9On2hYz3hAelNLhotor3cP5Xf9Oy2 ZBS4MzRWaBTq32WXKlxTshj/gCC6kKREAYYdRmvlDQAWBJ+PvlfYHWZOcfbBymUSLtwU gBKX6iwIWQSllvUgs9FNTvn9rkZNtQI4ksCpcsbbH585CLLzxIEy7Jbm8McIoLC/Ohy4 lv7g== X-Gm-Message-State: AOJu0Yy9gSdtmxpgKaEuZn83XmicXZ1AAxTiZoziwYSOc7o2N3lsqKmU GPGYup7PFp2/QOAVdkP/jveyd4PW7svf6Qbx8sI058zpyiQO5jtW+EnL0oLu3X8niPSwigQZuf+ 0Q1OCvl0pQ3sN9SmNQ/a+O0dFxJvW1FqBB4twWUTM9FZ9RA2vu6QA6SR5oohr2uUdHUpspwsEbE XOsCJWEvtyc/tH/Ov6aCnWg7xPC3fzS4Di0e7b X-Gm-Gg: ASbGncuyNgvZbmHnse69puVeCU5BLox9ALk/8t3YguEwOxjDgXLPrNhvTUV3nKBmyrD Wq4d0SyhnxQQtfyfQG70M+nFAeGu73cchLiiQbIY9fl/QqYVqusKlqU8mUTOaqpBHrsHFGaSILO EdN2SGuiBEjUytXad4Cv9NpXKa0TbVa+eYnU+i6IGfpqsTc1UsjodQr4GYS2DkrtiPW7ouKCHIq vcYJAPuWu/BWHLcMJmUb+6iV5IRbtznTxQUB8u+73pNwoD4sLq0YtQV3mHS X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6063772f8f.43.1734597182184; Thu, 19 Dec 2024 00:33:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKjGpwbAYyzTyApgi/Hc//OmdMRx57jNbb8c2W3s8J/3ePLHgS5d9ooc/n2BgOKe9BwhyFVw== X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6063737f8f.43.1734597181722; Thu, 19 Dec 2024 00:33:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 16/41] hw/arm/armsse: Use device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:03 +0100 Message-ID: <20241219083228.363430-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597299282116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-17-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/arm/armsse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 1cd6b4a4b2b..ffd732f8068 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -72,6 +72,7 @@ struct ARMSSEInfo { bool has_cpu_pwrctrl; bool has_sse_counter; bool has_tcms; + uint8_t props_count; const Property *props; const ARMSSEDeviceInfo *devinfo; const bool *irq_is_common; @@ -87,7 +88,6 @@ static const Property iotkit_properties[] =3D { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property sse200_properties[] =3D { @@ -104,7 +104,6 @@ static const Property sse200_properties[] =3D { DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), DEFINE_PROP_UINT32("CPU1_MPU_NS", ARMSSE, cpu_mpu_ns[1], 8), DEFINE_PROP_UINT32("CPU1_MPU_S", ARMSSE, cpu_mpu_s[1], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property sse300_properties[] =3D { @@ -117,7 +116,6 @@ static const Property sse300_properties[] =3D { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const ARMSSEDeviceInfo iotkit_devices[] =3D { @@ -528,6 +526,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D false, .has_tcms =3D false, .props =3D iotkit_properties, + .props_count =3D ARRAY_SIZE(iotkit_properties), .devinfo =3D iotkit_devices, .irq_is_common =3D sse200_irq_is_common, }, @@ -549,6 +548,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D false, .has_tcms =3D false, .props =3D sse200_properties, + .props_count =3D ARRAY_SIZE(sse200_properties), .devinfo =3D sse200_devices, .irq_is_common =3D sse200_irq_is_common, }, @@ -570,6 +570,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D true, .has_tcms =3D true, .props =3D sse300_properties, + .props_count =3D ARRAY_SIZE(sse300_properties), .devinfo =3D sse300_devices, .irq_is_common =3D sse300_irq_is_common, }, @@ -1699,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, voi= d *data) =20 dc->realize =3D armsse_realize; dc->vmsd =3D &armsse_vmstate; - device_class_set_props(dc, info->props); + device_class_set_props_n(dc, info->props, info->props_count); device_class_set_legacy_reset(dc, armsse_reset); iic->check =3D armsse_idau_check; asc->info =3D info; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597227; cv=none; d=zohomail.com; s=zohoarc; b=ktXlAhnx67V3Sb/HUyXmU6/M4OjRzxuqeetMbx9WOxJOthg6JET2k/EIklrr4TVrFc1QVwOtpRQ/6HGcLXOgB6H4KYsrcF1m2FS/LweQiOnFxAl4mzOITYKN5i6yggJmzviQcKc1SI8ha+IXWckOtI2BBbrf2c7jQkgwNAbu21M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597227; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VfN/9GQVfhxdzR3tEbIrQoWnaMvt0ggSFeNUo7cpLhw=; b=azCAuBdjhvTESroW5We6f3nqBuuJegWENnnJ0Nv8SY7BkMEcH5z/YPYtXjb3Ncemy8RPGHS44s5myxv77Asa0/y6dkq30ko5aPixoWyha9cQ8aJd3XGOP1hM09NimJZ1x+3UZ4Df3ffbI3RpZuYuVsbiUMADHTZ1R8k0r7EuPiI= 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 1734597227984272.76361276736463; Thu, 19 Dec 2024 00:33:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy4-0004aX-Nu; Thu, 19 Dec 2024 03:33:12 -0500 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 1tOBy2-0004ZQ-St for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBy0-000592-TX for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:10 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-nkFEBQSDNbqI8M91HITnnA-1; Thu, 19 Dec 2024 03:33:07 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-385e27c5949so347204f8f.3 for ; Thu, 19 Dec 2024 00:33:06 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8add5asm964519f8f.107.2024.12.19.00.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VfN/9GQVfhxdzR3tEbIrQoWnaMvt0ggSFeNUo7cpLhw=; b=AaAN+piWo676q/qSFOGnbVABo5D2pCahVqd8jQfSOayBKn62f/1I0oFR0rprOgojAUlAof eW2cgJDWxYEPoaz//tcYzZNnlaxwj/2wyPSql8brq4JF5J7yTXBaJtUVBiT+yncFL56q+K sV6QzWKYtk8SKPyhcGvgzP9y7JGZgUE= X-MC-Unique: nkFEBQSDNbqI8M91HITnnA-1 X-Mimecast-MFC-AGG-ID: nkFEBQSDNbqI8M91HITnnA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597185; x=1735201985; 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=VfN/9GQVfhxdzR3tEbIrQoWnaMvt0ggSFeNUo7cpLhw=; b=JnK11wIw1bBHk2lBSxbIo0k+2xfRuwNyFPoTX7x0ZqxaoKvVDU20dKMdjruaIbFzEb IzVjq6XpGDBt4TPcKGR9rLbkUjOU0Qavi9pE8Rc84mv9aQzNLMJn9qcOdf0CEuwUNcFV e7eBmtu0Dlm50ny3n00ZJ5RN0Rxl65B+nEU4/g5kYS821FuCrWH4Cyil6nvmpaL/Rfqa oFSQnkAOOYdqb5OyaGsQ8K2zpzcgNwbW9um0bZ6far9GE1CoNY2mzIZr/3XlauEdgtPM 8e2lQT/2pCnsK5cranYICZethLV8paklIzkK0NN3vMNInBsULMHF5DG8y9WDfei7QkE6 /kYw== X-Gm-Message-State: AOJu0YyrvBrcPTV70eKtDqjDLXqhF9lapsYCAjRpKBYn1yQZJKbTgC5U R0zhmNktc/624Jpn0tCxgqi+1z11MGCTs1ZSVBeOW+zZpojSpcKLQKLamYFtLpek5KWJHrZhkd3 TsG94FCIuK4KgOrm9juRJnlPg2/+ENndOPj2Ehq1EEMf1XeD0RzpattqH/A0fCo11yYwbMjVc7j CnrcvM0u0rJ65pB84k5Kwmj1zs3JdxrtPiR7FS X-Gm-Gg: ASbGncseQdM3EfSuwG7aeHg+7u4ZnPWtTZNhx9GGwOakr4KgZFDzSQZ5mRTyPG3xpS+ pYIXp8U80jvWS5Os8hdc+n1nZVFF8DoPXl3mu8RCz2Pnbz5iZpylHAUq0lWbJgI4wfkLKX3SHBR 4J0zhgPhwJlXgM66onp2qQSrSkVUbitmEfqt8u042Ieszv77kcTTadET11J0qkObZ7YTCPHtQrn /FVB1iqGlqlVuQOHdcdJlb2lBCjWFelQAM19vF46wl9trmrgPyfC8muCfPq X-Received: by 2002:a05:6000:4916:b0:386:37f5:99e7 with SMTP id ffacd0b85a97d-388e4d64938mr5959489f8f.33.1734597185072; Thu, 19 Dec 2024 00:33:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6tZMVwBA7gyFZ5L/qy4qkPy8xuADDK7kUaGu2ZLlU02ZkIR5eJwLLWgmHCt5KQePV7L8Eow== X-Received: by 2002:a05:6000:4916:b0:386:37f5:99e7 with SMTP id ffacd0b85a97d-388e4d64938mr5959455f8f.33.1734597184659; Thu, 19 Dec 2024 00:33:04 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-rust@nongnu.org Subject: [PULL 17/41] rust/qemu-api: Use device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:04 +0100 Message-ID: <20241219083228.363430-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597229069116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson This means we can update declare_properties to drop the zero terminator at the end of the array as well. Cc: qemu-rust@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20241216035109.3486070-18-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/device_class.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/qemu-api/src/device_class.rs b/rust/qemu-api/src/device_c= lass.rs index 03d03feee83..c98f0b2c7da 100644 --- a/rust/qemu-api/src/device_class.rs +++ b/rust/qemu-api/src/device_class.rs @@ -7,7 +7,6 @@ use crate::{ bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Propert= y, VMStateDescription}, prelude::*, - zeroable::Zeroable, }; =20 /// Trait providing the contents of [`DeviceClass`]. @@ -31,7 +30,7 @@ pub trait DeviceImpl { /// device. Not a `const` because referencing statics in constants /// is unstable until Rust 1.83.0. fn properties() -> &'static [Property] { - &[Zeroable::ZERO; 1] + &[] } =20 /// A `VMStateDescription` providing the migration format for the devi= ce @@ -87,7 +86,10 @@ fn vmsd() -> Option<&'static VMStateDescription> { if let Some(vmsd) =3D ::vmsd() { dc.vmsd =3D vmsd; } - bindings::device_class_set_props(dc, ::properties= ().as_ptr()); + let prop =3D ::properties(); + if !prop.is_empty() { + bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len= ()); + } } } =20 @@ -134,7 +136,7 @@ macro_rules! define_property { macro_rules! declare_properties { ($ident:ident, $($prop:expr),*$(,)*) =3D> { pub static $ident: [$crate::bindings::Property; { - let mut len =3D 1; + let mut len =3D 0; $({ _ =3D stringify!($prop); len +=3D 1; @@ -142,7 +144,6 @@ macro_rules! declare_properties { len }] =3D [ $($prop),*, - $crate::zeroable::Zeroable::ZERO, ]; }; } --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597332; cv=none; d=zohomail.com; s=zohoarc; b=U82WOrrW5IKV3thhKFTsVmRyYiGhG7P+CC6RKDCZ64C4YglPtGuaTBqg94zVMI8ONzyu3IoziW1mqStqfIqtKcE/mjHzMXZEpjAoJ2h/olNaJb/fgdi9cZSqE2bQLG4s8HqozyQ6Gb0NzVHH+GzMge2Ut2C6Y87rkYghHoWMYTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597332; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uej8kMO7NCkobLHrnQz1TU29MyTwJWko3Jex+3x88Oc=; b=Q3mt5Hq/+ztSnTtWo8lwuKQGkSq4D92HC2s3H4npRsdt1JBAq129Crsd/Ush6VVsFIxjcRyNbWpQ0zWMh8OOShWuI+XuESJBlvJK/C2+J4/ZihfF+nCJztMls6U06+mzr+mfJElaP7uRp+5aD+Z9hQWxHAKHToQ92/faMwotJ1w= 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 1734597332851459.23593889793403; Thu, 19 Dec 2024 00:35:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy7-0004bG-Sj; Thu, 19 Dec 2024 03:33:15 -0500 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 1tOBy4-0004am-R2 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBy3-00059Y-9f for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:12 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-392-g2X_1CkCP_ajmaPxF22G4Q-1; Thu, 19 Dec 2024 03:33:09 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4362b9c15d8so2896065e9.3 for ; Thu, 19 Dec 2024 00:33:08 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b119d7sm44931385e9.20.2024.12.19.00.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uej8kMO7NCkobLHrnQz1TU29MyTwJWko3Jex+3x88Oc=; b=azw6T7YTS1KqvF/pltIk/ANJxGWRZJwQgBeI2xVWNZ4oO9EFieQ17DaQJgN4D2zFVenrKK +UCcZed/AjcOcgL/vFzZbcvCJIywET3wlvv2QV26xyQdTjbvzl8KseUZ4FdUkb4HM2vkc3 DVy6Rq8E024fDlVlEDqNisD/fRyoJ/s= X-MC-Unique: g2X_1CkCP_ajmaPxF22G4Q-1 X-Mimecast-MFC-AGG-ID: g2X_1CkCP_ajmaPxF22G4Q X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597187; x=1735201987; 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=uej8kMO7NCkobLHrnQz1TU29MyTwJWko3Jex+3x88Oc=; b=NxBEurRdFgouSzWcX+gSfpm+F+7Z4PkT6Ib7+DKq71bQMfheEgsHY1TkdYbHeP8pTF nN9BiJeAv1LggqncJ8gJ+f9B74+lz4bjB1DwmI/8b4hJS5lO1L9LKCfiGiH3N5u+WVbB LfllJqGPl5L3HDZO4MIG4HtfR4mMULezvA1nNIlVEl71JcznotofsycuZeJJP93UZw7I 5baJF0UASrfTIw3nXdVbUZGj+jZUiEvFTSIfVSFFJHNeZf/s+uE4tmG2kzR7TXD/XRF6 ypkFg84pZy0UuE3JWDpPYkTZkA9j0Um7Imi+0l0CNRwPnU+T3u1h2I0xFL5qhTRIgrWD dv2A== X-Gm-Message-State: AOJu0YwaUvQ9ZHCyOxqXpJEG7nr4toznHrpZ1VAQAvvh3qKpJoyZDG33 qTF9s58XoUc9Y7DTkM1hfguncZNDQa4jV7/hQr0CX3LGeWha9xcyTgF8GNFTBfBDjeoA2R4g6pm GaGvtiWe8QWEC+qC+79AcdoXLxNJb8VWvbEonxQv6/NlOEZiIHFK0m/k5JngbBCIkwBvyqcG1G2 d4izpmkwPFzL9mN/BnlaD8I5etK4MMWVf0YJtw X-Gm-Gg: ASbGncsqkgx1PMcNO8/ea2V9sOAtI4GI3/gewq5B9RE8LqvOPvOfTk6ro5cyfQVnCA7 KxpGg4GyERf36lwuWWhEwyjCWnCwfwCZlWPY08oMb/i3ylfEPTxBhMxqQK8yB2QE7XWbU1owhBa PwLauFKjuW8KGLCTMJfiA3S6L59Uqt+Fky5i5VVgIX46jfJ9dfBoFBj7sdy5KphKdCOqufh14z8 j+e/GZ0fafCSO7IErP2u/c9Gf8dqIN+Bh8S+CUq64+eSHhsEkrNucixijbH X-Received: by 2002:a05:600c:510f:b0:436:1b08:4c78 with SMTP id 5b1f17b1804b1-43655401b49mr58588065e9.31.1734597187090; Thu, 19 Dec 2024 00:33:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuDqkZNP9JNxZMMT+1kXsDPde+6BfP4PEWrSyz5Xen2nIGPkpognO7hlfhI5420tdMt6GHBg== X-Received: by 2002:a05:600c:510f:b0:436:1b08:4c78 with SMTP id 5b1f17b1804b1-43655401b49mr58587725e9.31.1734597186686; Thu, 19 Dec 2024 00:33:06 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 18/41] hw/core: Replace device_class_set_props with a macro Date: Thu, 19 Dec 2024 09:32:05 +0100 Message-ID: <20241219083228.363430-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597333645116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Use ARRAY_SIZE to implement as device_class_set_props_n. Remove any DEFINE_PROP_END_OF_LIST terminator from the count. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-19-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 21 +++++++++++++-------- hw/core/qdev-properties.c | 16 ---------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index cd0ddf84ca5..5dc46402585 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -941,20 +941,25 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState = *bus, DeviceState *dev); /** * device_class_set_props(): add a set of properties to an device * @dc: the parent DeviceClass all devices inherit - * @props: an array of properties, terminate by DEFINE_PROP_END_OF_LIST() + * @props: an array of properties * * This will add a set of properties to the object. It will fault if * you attempt to add an existing property defined by a parent class. * To modify an inherited property you need to use???? + * + * Validate that @props has at least one Property plus the terminator. + * Validate that @props is an array, not a pointer, via ARRAY_SIZE. + * Validate that the array is terminated at compile-time (with -O2), + * which requires the array to be const. */ -void device_class_set_props(DeviceClass *dc, const Property *props); - -/* Validate at least one Property, plus the terminator. */ -#define device_class_set_props(DC, PROPS) \ +#define device_class_set_props(dc, props) \ do { \ - QEMU_BUILD_BUG_ON(sizeof(PROPS) !=3D sizeof(const Property *) && \ - sizeof(PROPS) < 2 * sizeof(Property)); \ - (device_class_set_props)(DC, PROPS); \ + QEMU_BUILD_BUG_ON(sizeof(props) < 2 * sizeof(Property)); \ + size_t props_count_ =3D ARRAY_SIZE(props) - 1; \ + if ((props)[props_count_].name !=3D NULL) { \ + qemu_build_not_reached(); \ + } \ + device_class_set_props_n((dc), (props), props_count_); \ } while (0) =20 /** diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 31e3072b559..a3d49e20202 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1058,22 +1058,6 @@ static void qdev_class_add_legacy_property(DeviceCla= ss *dc, const Property *prop NULL, NULL, (Property *)prop); } =20 -void (device_class_set_props)(DeviceClass *dc, const Property *props) -{ - const Property *prop; - size_t n; - - dc->props_ =3D props; - for (prop =3D props, n =3D 0; prop && prop->name; prop++, n++) { - qdev_class_add_legacy_property(dc, prop); - qdev_class_add_property(dc, prop->name, prop); - } - - /* We used a hole in DeviceClass because that's still a lot. */ - assert(n <=3D UINT16_MAX); - dc->props_count_ =3D n; -} - void device_class_set_props_n(DeviceClass *dc, const Property *props, size= _t n) { /* We used a hole in DeviceClass because that's still a lot. */ --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597227; cv=none; d=zohomail.com; s=zohoarc; b=PVCxPvABTc5Kw8FOb+n6F2NrMU1Xi1M9Auxw1K+Kd66sytSd0ht+d3fQe0WhQvhkF6Ym0O/7dVp+cedqYCCawmJl8pc84eazvtJAXGCAv4IDH5ODmsyi+BKWU7kLyaWoZYFQHo8HdbOKL0R/dc3jUtiq/AdBX2e0ygy/yV/3H9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597227; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rpJlOEJ961c7veV4jeI0mdyngDxo3kPLK4mRT/QxfVE=; b=gK6dUKS8nxtf3lxz5M5eMIusJ87PB7b2b7EJH8U3WNORYf0+YttHA5mHuoDFS5w1uYm+5TZgvRMEntx/1KBuVvf1mbTwodYGGnnllT9aDKSCj8FRpmt6Cd6Ua4go5/wg2OfdxL+gX8+PiPo6xzchlD7V/tQdWrdPkkr4qlHmep4= 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 1734597227888981.3826272764179; Thu, 19 Dec 2024 00:33:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy8-0004cA-EL; Thu, 19 Dec 2024 03:33:16 -0500 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 1tOBy6-0004bF-Q8 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBy5-00059v-23 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:14 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-96CbZZuENKy4hcjJNTPdTw-1; Thu, 19 Dec 2024 03:33:11 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4361ecebc5bso2933605e9.1 for ; Thu, 19 Dec 2024 00:33:10 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea40csm11186705e9.1.2024.12.19.00.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rpJlOEJ961c7veV4jeI0mdyngDxo3kPLK4mRT/QxfVE=; b=VRjsEOohnkdb3LdmAKWDdO79vrDKw7+Q1Hw9Fg85jzN3em0UzmtdVgcrtdMQmis4F6pz1h uA2GRAmbBHuYlT6Uk3QpNVX42AxFnlJqiAom7ZCCO/uzdYt0yp9kQyj7uYhQUSs0wizAYj N8CBPbIebL3lExPeqGG+zDwfImoGcos= X-MC-Unique: 96CbZZuENKy4hcjJNTPdTw-1 X-Mimecast-MFC-AGG-ID: 96CbZZuENKy4hcjJNTPdTw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597189; x=1735201989; 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=rpJlOEJ961c7veV4jeI0mdyngDxo3kPLK4mRT/QxfVE=; b=alt6BuSYbGHLaWOuA2YhxUQN8STAxEjandOkdAcrZbw4yjm5JRSq54Ed4cBDzOqZIz MFfUa9AfHmcWBtRO+s0Hs0ibT9uPU4wC0aoy5lpR2ZH/hKFCG825ZZCNTOJsoAqCOaQx 75hC28QaGOhRMOjzXIqJGeecNdSI03GVnhLZbx18pfwZooWEoY3JLHPgSmI0jx7b40/9 2SWzgfMZ5Dm5g+8iczvuBKgB13TMlCTLbozSZXARLy6EK3zNbIvPmPBt6VULXOxJGVb4 L9Fy26GDd6k1iVxDJXSquHLt65s/7hMb4gH6HJBwubpOPQ9jSO6x8elnOgYJst7jRhgS EEiw== X-Gm-Message-State: AOJu0YwXDy1WrKMtdw2iVJUY9PnE7Oid4mavRZWo19zzjWKoH+bTv7gS CJAQJJrl6LBqsD/Zss/xyzMDJOH+yIbjktYPuaYxmv5EBSkmMWk1aF7Kn+taKSeiqsziTD5mFwl QjSRvLxTeESi20s6NC97y0gCkpieFiCzS7UN4S8ZlNP2gEM4n+MSNDH71fOfW1Lim2iJotrsAv6 ny+dTlxh+1nKdM1cerGzfuQux97ktGOtif/XWH X-Gm-Gg: ASbGncuumBvClhIjg9EZSVaZAtu79GEC2HhyxMk0T284Dv5Fz9CENZp0lcPO+EwkPR6 jktFrc80NJ2XXy11n4ulM2R1DgpKFPxuaO+8Y2HSRyE4GUNByaE1NlijButbHicvCDwj1hBhqSm McZ81/goOs+y4CujQwNh8mCzL1x/3qhmY0mkU0A3TbOYMBiBJCm0ABGDyZ6/nhN6jJzVxFdOA+4 xCY9gBCUQP2tQwNlgkHq4E7fqsYhfdhXSjuHdYGXRWRBXVuKZpUNflc+7Es X-Received: by 2002:a05:600c:5107:b0:434:ff9d:a370 with SMTP id 5b1f17b1804b1-4365c7415f9mr22208645e9.0.1734597189154; Thu, 19 Dec 2024 00:33:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0ft6AoK4qyt2SBK+6eKmzZNwLB9YgQsLbUYr6S07T6byM2bmBH/OaV/q8xYBdLj04E3VOEw== X-Received: by 2002:a05:600c:5107:b0:434:ff9d:a370 with SMTP id 5b1f17b1804b1-4365c7415f9mr22208245e9.0.1734597188680; Thu, 19 Dec 2024 00:33:08 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 19/41] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST Date: Thu, 19 Dec 2024 09:32:06 +0100 Message-ID: <20241219083228.363430-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597229075116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson These are not arrays of Property and had no business using DEFINE_PROP_END_OF_LIST. Use plain { } instead. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-20-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- target/riscv/cpu.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4329015076d..a5aa3a8670a 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -213,7 +213,7 @@ const RISCVIsaExtData isa_edata_arr[] =3D { ISA_EXT_DATA_ENTRY(xtheadsync, PRIV_VERSION_1_11_0, ext_xtheadsync), ISA_EXT_DATA_ENTRY(xventanacondops, PRIV_VERSION_1_12_0, ext_XVentanaC= ondOps), =20 - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 bool isa_ext_is_enabled(RISCVCPU *cpu, uint32_t ext_offset) @@ -1575,7 +1575,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = =3D { MULTI_EXT_CFG_BOOL("zvksc", ext_zvksc, false), MULTI_EXT_CFG_BOOL("zvksg", ext_zvksg, false), =20 - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[] =3D { @@ -1592,12 +1592,12 @@ const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[= ] =3D { MULTI_EXT_CFG_BOOL("xtheadsync", ext_xtheadsync, false), MULTI_EXT_CFG_BOOL("xventanacondops", ext_XVentanaCondOps, false), =20 - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 /* These are experimental so mark with 'x-' */ const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[] =3D { - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 /* @@ -1610,7 +1610,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_experimental_e= xts[] =3D { const RISCVCPUMultiExtConfig riscv_cpu_named_features[] =3D { MULTI_EXT_CFG_BOOL("zic64b", ext_zic64b, true), =20 - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 /* Deprecated entries marked for future removal */ @@ -1627,7 +1627,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_deprecated_ext= s[] =3D { MULTI_EXT_CFG_BOOL("Zve64f", ext_zve64f, false), MULTI_EXT_CFG_BOOL("Zve64d", ext_zve64d, false), =20 - DEFINE_PROP_END_OF_LIST(), + { }, }; =20 static void cpu_set_prop_err(RISCVCPU *cpu, const char *propname, @@ -2699,7 +2699,6 @@ static const Property riscv_cpu_properties[] =3D { * it with -x and default to 'false'. */ DEFINE_PROP_BOOL("x-misa-w", RISCVCPU, cfg.misa_w, false), - DEFINE_PROP_END_OF_LIST(), }; =20 #if defined(TARGET_RISCV64) --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597455; cv=none; d=zohomail.com; s=zohoarc; b=krBp0hpo9VNfyV5p4GdxRaxgkl7wmOuxcxGo/tYJ/PxWGP7Pl/rg2xihmQOv7fzFzQqnnlH6pe2dsMSOEBCKLh4QX5rc3jkHsTDvSgiXrl3OrYzh444M/qAe4DCs5UR9d6pwCcg16RFO9P7w3JxCu2MtSMnpLQpkT2OnkAOYrqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597455; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xunHf48iJuMGUpixXVnyEKo+P9jgijA9sAHDqAGbtPQ=; b=QqUM0NDIPU0XjyXuoMGdAhl6QR87o7aCMBuRcdjrwinnIBcL6X/Hxxcr3pa0xfGErohwB3Ix2Cufoj7NYela3kF9j6zXJua5uQqAsRxg9jiIcscBPgnZ6EfOozWjUqzoYLaopdDTIqxuX8fzdp+i+YbGTwCINbxI/b8CXtYd07M= 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 1734597455320513.2490387776643; Thu, 19 Dec 2024 00:37:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByO-0005X0-GM; Thu, 19 Dec 2024 03:33:32 -0500 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 1tOByM-0005PC-OD for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:30 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByH-0005CQ-NZ for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:30 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-483-E8dNttjhPnSwJt-kmbjvNA-1; Thu, 19 Dec 2024 03:33:17 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43627bb20b5so4528655e9.1 for ; Thu, 19 Dec 2024 00:33:16 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ace0esm964755f8f.106.2024.12.19.00.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xunHf48iJuMGUpixXVnyEKo+P9jgijA9sAHDqAGbtPQ=; b=eDSqDATzo/PfIf/4oEle6Pe0c5A+Z/kK9dfj8RnTW+rulc7YEHJ7n6eSjAnAAP4tIQ1GEc LafPJ+6S+4TP9u9h7Lwu/pXmN68AlixhswRLdJKuMeIUyu+XSfyp9JnAWoKylclFxN/3KA M9FEBlt3J6YYColmk82L9X7D3S3KI7I= X-MC-Unique: E8dNttjhPnSwJt-kmbjvNA-1 X-Mimecast-MFC-AGG-ID: E8dNttjhPnSwJt-kmbjvNA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597194; x=1735201994; 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=xunHf48iJuMGUpixXVnyEKo+P9jgijA9sAHDqAGbtPQ=; b=ksMGpqI9rVW6wTDKbvzKzReuJFqQpLdW675AaFioCEeoxgGES5af8Pel69BNXxVHcF vaqIWwGQ9ulq6iSxYVQigZIuyANvVQwOoM0JVAEcxi4xdl/YsDqiwplLl7FNA43YKPFk wHc5DaCaxy+Ao2hEwSR39/D8ENOwWU5f6Hzd0OSzw+GSvSeaBk/2AJx5X/SH8kbD+Nz8 btWCr/niS0dlTYThiCwQk7uaXvsIaqpDVGtYZbpGG/jebev8MjbA5mQsyX3EQgh6nC6v NZ1hjBTQFg4zEa+NXrFeNs9m7olY3Dw5r5CLd8y+3HqKJFYJweCcngsOeSIo0AT5eX+6 dqHQ== X-Gm-Message-State: AOJu0YzxEHJ0NFIpYJ3EDhlwALpGWvt7rTVLxwGHgjsT77Gp2bzEdDG7 fN4l4kDuSFIVymHFeh11xDz+anjlbnCh0DCgsD8OooWOsv7ubRu3N2HaH/3bWM7hlpHqHOaTLxw b3+JxiPsBPCMDk4OksZqI+gKnSOLSCu1ETxZcer6MEDsok37tmvLZdFlX0YmPSZSQxNMcATvIbE MmnKqol/vfBTetelHFDOiATWGVrEmPw1czXvZ2 X-Gm-Gg: ASbGnctLr08McwiQo/dpezK4QKLoudyxrJIyu57hbfyvZ5/MdsZ83zJi5LjCHg48qvy TdsYA215uTsR2nEuCyHSLRiIy6OBjxaF0+JmqIwUqN7Zn5UYW9yUJo/+oq2Uw+EzfGoNO9UcjT5 7888KFkzqMm9yvrln90oZd7mWsH5bMGRKslGkMgyibUiE7BEaZNp1h61VgPSYv7MT8+EmamtbDk sgB2LO9nssYARKPzMVkiWqyjJ29y/8iiMII+/wn3lkVztT1Ko/2Nm5RkhiC X-Received: by 2002:a05:600c:4706:b0:42c:b9c8:2bb0 with SMTP id 5b1f17b1804b1-43655341361mr51308705e9.4.1734597193077; Thu, 19 Dec 2024 00:33:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEB0YIh+wkJqG8Oy+Td7v0Mt8++2ETCj16tdVKiLm/IJ+M7zDu2kLTZyco88Qqg/xginrjJlQ== X-Received: by 2002:a05:600c:4706:b0:42c:b9c8:2bb0 with SMTP id 5b1f17b1804b1-43655341361mr51307435e9.4.1734597191368; Thu, 19 Dec 2024 00:33:11 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 20/41] include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST Date: Thu, 19 Dec 2024 09:32:07 +0100 Message-ID: <20241219083228.363430-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597456020116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match. With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-21-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- docs/devel/migration/compatibility.rst | 1 - docs/devel/virtio-backends.rst | 1 - include/hw/qdev-core.h | 14 +++++++------- include/hw/qdev-properties.h | 3 --- cpu-target.c | 1 - hw/9pfs/virtio-9p-device.c | 1 - hw/acpi/erst.c | 1 - hw/acpi/generic_event_device.c | 1 - hw/acpi/piix4.c | 1 - hw/acpi/vmgenid.c | 1 - hw/adc/aspeed_adc.c | 1 - hw/adc/npcm7xx_adc.c | 1 - hw/arm/armv7m.c | 2 -- hw/arm/aspeed_soc_common.c | 1 - hw/arm/fsl-imx25.c | 1 - hw/arm/fsl-imx6.c | 1 - hw/arm/fsl-imx6ul.c | 1 - hw/arm/fsl-imx7.c | 1 - hw/arm/integratorcp.c | 1 - hw/arm/msf2-soc.c | 1 - hw/arm/npcm7xx.c | 1 - hw/arm/nrf51_soc.c | 1 - hw/arm/smmu-common.c | 1 - hw/arm/smmuv3.c | 1 - hw/arm/stellaris.c | 1 - hw/arm/strongarm.c | 1 - hw/arm/xlnx-versal.c | 1 - hw/arm/xlnx-zynqmp.c | 1 - hw/audio/ac97.c | 1 - hw/audio/adlib.c | 1 - hw/audio/asc.c | 1 - hw/audio/cs4231a.c | 1 - hw/audio/es1370.c | 1 - hw/audio/gus.c | 1 - hw/audio/hda-codec.c | 1 - hw/audio/intel-hda.c | 2 -- hw/audio/pcspk.c | 1 - hw/audio/pl041.c | 1 - hw/audio/sb16.c | 1 - hw/audio/via-ac97.c | 1 - hw/audio/virtio-snd-pci.c | 1 - hw/audio/virtio-snd.c | 1 - hw/audio/wm8750.c | 1 - hw/avr/atmega.c | 1 - hw/block/fdc-isa.c | 1 - hw/block/fdc-sysbus.c | 2 -- hw/block/fdc.c | 1 - hw/block/m25p80.c | 1 - hw/block/nand.c | 1 - hw/block/pflash_cfi01.c | 1 - hw/block/pflash_cfi02.c | 1 - hw/block/swim.c | 1 - hw/block/vhost-user-blk.c | 1 - hw/block/virtio-blk.c | 1 - hw/block/xen-block.c | 1 - hw/char/avr_usart.c | 1 - hw/char/bcm2835_aux.c | 1 - hw/char/cadence_uart.c | 1 - hw/char/cmsdk-apb-uart.c | 1 - hw/char/debugcon.c | 1 - hw/char/digic-uart.c | 1 - hw/char/escc.c | 1 - hw/char/exynos4210_uart.c | 1 - hw/char/goldfish_tty.c | 1 - hw/char/grlib_apbuart.c | 1 - hw/char/ibex_uart.c | 1 - hw/char/imx_serial.c | 1 - hw/char/ipoctal232.c | 1 - hw/char/mcf_uart.c | 1 - hw/char/nrf51_uart.c | 1 - hw/char/parallel.c | 1 - hw/char/pl011.c | 1 - hw/char/renesas_sci.c | 1 - hw/char/sclpconsole-lm.c | 1 - hw/char/sclpconsole.c | 1 - hw/char/serial-isa.c | 1 - hw/char/serial-mm.c | 1 - hw/char/serial-pci-multi.c | 2 -- hw/char/serial-pci.c | 1 - hw/char/serial.c | 1 - hw/char/sh_serial.c | 1 - hw/char/shakti_uart.c | 1 - hw/char/sifive_uart.c | 1 - hw/char/spapr_vty.c | 1 - hw/char/stm32f2xx_usart.c | 1 - hw/char/stm32l4x5_usart.c | 1 - hw/char/terminal3270.c | 1 - hw/char/virtio-console.c | 1 - hw/char/virtio-serial-bus.c | 2 -- hw/char/xen_console.c | 1 - hw/char/xilinx_uartlite.c | 1 - hw/core/generic-loader.c | 1 - hw/core/guest-loader.c | 1 - hw/core/or-irq.c | 1 - hw/core/platform-bus.c | 1 - hw/core/split-irq.c | 1 - hw/cpu/a15mpcore.c | 1 - hw/cpu/a9mpcore.c | 1 - hw/cpu/arm11mpcore.c | 1 - hw/cpu/cluster.c | 1 - hw/cpu/realview_mpcore.c | 1 - hw/cxl/switch-mailbox-cci.c | 1 - hw/display/artist.c | 1 - hw/display/ati.c | 1 - hw/display/bcm2835_fb.c | 1 - hw/display/bochs-display.c | 1 - hw/display/cg3.c | 1 - hw/display/cirrus_vga.c | 1 - hw/display/cirrus_vga_isa.c | 1 - hw/display/exynos4210_fimd.c | 1 - hw/display/g364fb.c | 1 - hw/display/i2c-ddc.c | 1 - hw/display/macfb.c | 2 -- hw/display/pl110.c | 1 - hw/display/qxl.c | 1 - hw/display/ramfb-standalone.c | 1 - hw/display/sm501.c | 2 -- hw/display/tcx.c | 1 - hw/display/vga-isa.c | 1 - hw/display/vga-mmio.c | 1 - hw/display/vga-pci.c | 2 -- hw/display/vhost-user-gpu.c | 1 - hw/display/virtio-gpu-gl.c | 1 - hw/display/virtio-gpu-pci.c | 1 - hw/display/virtio-gpu-rutabaga.c | 1 - hw/display/virtio-gpu.c | 1 - hw/display/virtio-vga.c | 1 - hw/display/vmware_vga.c | 1 - hw/display/xlnx_dp.c | 1 - hw/dma/i82374.c | 1 - hw/dma/i8257.c | 1 - hw/dma/pl080.c | 1 - hw/dma/pl330.c | 2 -- hw/dma/xilinx_axidma.c | 1 - hw/dma/xlnx-zdma.c | 1 - hw/dma/xlnx_csu_dma.c | 1 - hw/gpio/imx_gpio.c | 1 - hw/gpio/npcm7xx_gpio.c | 1 - hw/gpio/omap_gpio.c | 1 - hw/gpio/pca9552.c | 1 - hw/gpio/pca9554.c | 1 - hw/gpio/pl061.c | 1 - hw/gpio/sifive_gpio.c | 1 - hw/gpio/stm32l4x5_gpio.c | 1 - hw/hyperv/hv-balloon.c | 2 -- hw/hyperv/syndbg.c | 1 - hw/hyperv/vmbus.c | 2 -- hw/i2c/aspeed_i2c.c | 2 -- hw/i2c/core.c | 1 - hw/i2c/i2c_mux_pca954x.c | 1 - hw/i2c/omap_i2c.c | 1 - hw/i386/amd_iommu.c | 1 - hw/i386/intel_iommu.c | 1 - hw/i386/kvm/clock.c | 1 - hw/i386/kvm/i8254.c | 1 - hw/i386/kvm/ioapic.c | 1 - hw/i386/sgx-epc.c | 1 - hw/i386/vmmouse.c | 1 - hw/i386/vmport.c | 2 -- hw/i386/x86-iommu.c | 1 - hw/i386/xen/xen_pvdevice.c | 1 - hw/ide/ahci-sysbus.c | 1 - hw/ide/cf.c | 1 - hw/ide/cmd646.c | 1 - hw/ide/ide-dev.c | 3 --- hw/ide/isa.c | 1 - hw/ide/macio.c | 1 - hw/ide/mmio.c | 1 - hw/input/pckbd.c | 2 -- hw/input/stellaris_gamepad.c | 1 - hw/input/virtio-input-hid.c | 3 --- hw/input/virtio-input-host.c | 1 - hw/input/virtio-input.c | 1 - hw/intc/apic_common.c | 1 - hw/intc/arm_gic_common.c | 1 - hw/intc/arm_gicv2m.c | 1 - hw/intc/arm_gicv3_common.c | 1 - hw/intc/arm_gicv3_its.c | 1 - hw/intc/arm_gicv3_its_kvm.c | 1 - hw/intc/armv7m_nvic.c | 1 - hw/intc/exynos4210_combiner.c | 1 - hw/intc/exynos4210_gic.c | 1 - hw/intc/goldfish_pic.c | 1 - hw/intc/grlib_irqmp.c | 1 - hw/intc/i8259_common.c | 1 - hw/intc/ioapic.c | 1 - hw/intc/loongarch_extioi.c | 1 - hw/intc/loongarch_pch_msi.c | 1 - hw/intc/loongarch_pch_pic.c | 1 - hw/intc/loongson_ipi_common.c | 1 - hw/intc/m68k_irqc.c | 1 - hw/intc/mips_gic.c | 1 - hw/intc/omap_intc.c | 1 - hw/intc/ompic.c | 1 - hw/intc/openpic.c | 1 - hw/intc/openpic_kvm.c | 1 - hw/intc/pnv_xive.c | 1 - hw/intc/pnv_xive2.c | 1 - hw/intc/ppc-uic.c | 1 - hw/intc/riscv_aclint.c | 2 -- hw/intc/riscv_aplic.c | 1 - hw/intc/riscv_imsic.c | 1 - hw/intc/rx_icu.c | 1 - hw/intc/s390_flic.c | 2 -- hw/intc/sifive_plic.c | 1 - hw/intc/spapr_xive.c | 1 - hw/intc/xics.c | 2 -- hw/intc/xilinx_intc.c | 1 - hw/intc/xive.c | 4 ---- hw/intc/xive2.c | 2 -- hw/intc/xlnx-pmu-iomod-intc.c | 1 - hw/ipack/ipack.c | 1 - hw/ipmi/ipmi.c | 1 - hw/ipmi/ipmi_bmc_extern.c | 1 - hw/ipmi/ipmi_bmc_sim.c | 1 - hw/ipmi/isa_ipmi_bt.c | 1 - hw/ipmi/isa_ipmi_kcs.c | 1 - hw/isa/lpc_ich9.c | 1 - hw/isa/pc87312.c | 1 - hw/isa/piix.c | 1 - hw/m68k/mcf5206.c | 1 - hw/m68k/mcf_intc.c | 1 - hw/m68k/next-cube.c | 1 - hw/m68k/q800-glue.c | 1 - hw/mem/cxl_type3.c | 1 - hw/mem/nvdimm.c | 1 - hw/mem/pc-dimm.c | 1 - hw/mem/sparse-mem.c | 1 - hw/mips/cps.c | 1 - hw/misc/a9scu.c | 1 - hw/misc/allwinner-h3-dramc.c | 1 - hw/misc/allwinner-r40-dramc.c | 1 - hw/misc/allwinner-sid.c | 1 - hw/misc/applesmc.c | 1 - hw/misc/arm11scu.c | 1 - hw/misc/arm_l2x0.c | 1 - hw/misc/arm_sysctl.c | 1 - hw/misc/armsse-cpuid.c | 1 - hw/misc/aspeed_hace.c | 1 - hw/misc/aspeed_i3c.c | 1 - hw/misc/aspeed_lpc.c | 1 - hw/misc/aspeed_sbc.c | 1 - hw/misc/aspeed_scu.c | 1 - hw/misc/aspeed_sdmc.c | 1 - hw/misc/bcm2835_cprman.c | 1 - hw/misc/bcm2835_property.c | 1 - hw/misc/debugexit.c | 1 - hw/misc/eccmemctl.c | 1 - hw/misc/empty_slot.c | 1 - hw/misc/iotkit-secctl.c | 1 - hw/misc/iotkit-sysctl.c | 1 - hw/misc/iotkit-sysinfo.c | 1 - hw/misc/ivshmem.c | 2 -- hw/misc/led.c | 1 - hw/misc/mac_via.c | 1 - hw/misc/macio/cuda.c | 1 - hw/misc/macio/macio.c | 2 -- hw/misc/macio/pmu.c | 1 - hw/misc/mips_cmgcr.c | 1 - hw/misc/mips_cpc.c | 1 - hw/misc/mips_itu.c | 1 - hw/misc/mos6522.c | 1 - hw/misc/mps2-fpgaio.c | 1 - hw/misc/mps2-scc.c | 1 - hw/misc/msf2-sysreg.c | 1 - hw/misc/npcm7xx_gcr.c | 1 - hw/misc/nrf51_rng.c | 1 - hw/misc/pci-testdev.c | 1 - hw/misc/pvpanic-isa.c | 1 - hw/misc/pvpanic-pci.c | 1 - hw/misc/sifive_e_aon.c | 1 - hw/misc/sifive_u_otp.c | 1 - hw/misc/stm32l4x5_rcc.c | 1 - hw/misc/tz-mpc.c | 1 - hw/misc/tz-msc.c | 1 - hw/misc/tz-ppc.c | 1 - hw/misc/unimp.c | 1 - hw/misc/xlnx-versal-cframe-reg.c | 2 -- hw/misc/xlnx-versal-cfu.c | 2 -- hw/misc/xlnx-versal-trng.c | 2 -- hw/misc/xlnx-versal-xramc.c | 1 - hw/misc/zynq_slcr.c | 1 - hw/net/allwinner-sun8i-emac.c | 1 - hw/net/allwinner_emac.c | 1 - hw/net/cadence_gem.c | 1 - hw/net/can/xlnx-versal-canfd.c | 1 - hw/net/can/xlnx-zynqmp-can.c | 1 - hw/net/dp8393x.c | 1 - hw/net/e1000.c | 1 - hw/net/e1000e.c | 1 - hw/net/eepro100.c | 1 - hw/net/fsl_etsec/etsec.c | 1 - hw/net/ftgmac100.c | 2 -- hw/net/igb.c | 1 - hw/net/imx_fec.c | 1 - hw/net/lan9118.c | 1 - hw/net/lance.c | 1 - hw/net/lasi_i82596.c | 1 - hw/net/mcf_fec.c | 1 - hw/net/mipsnet.c | 1 - hw/net/msf2-emac.c | 1 - hw/net/mv88w8618_eth.c | 1 - hw/net/ne2000-isa.c | 1 - hw/net/ne2000-pci.c | 1 - hw/net/npcm7xx_emc.c | 1 - hw/net/npcm_gmac.c | 1 - hw/net/opencores_eth.c | 1 - hw/net/pcnet-pci.c | 1 - hw/net/rocker/rocker.c | 1 - hw/net/rtl8139.c | 1 - hw/net/smc91c111.c | 1 - hw/net/spapr_llan.c | 1 - hw/net/stellaris_enet.c | 1 - hw/net/sungem.c | 1 - hw/net/sunhme.c | 1 - hw/net/tulip.c | 1 - hw/net/virtio-net.c | 1 - hw/net/vmxnet3.c | 1 - hw/net/xen_nic.c | 1 - hw/net/xgmac.c | 1 - hw/net/xilinx_axienet.c | 1 - hw/net/xilinx_ethlite.c | 1 - hw/nubus/nubus-bridge.c | 1 - hw/nubus/nubus-device.c | 1 - hw/nvme/ctrl.c | 1 - hw/nvme/ns.c | 1 - hw/nvme/subsys.c | 1 - hw/nvram/ds1225y.c | 1 - hw/nvram/eeprom_at24c.c | 1 - hw/nvram/fw_cfg.c | 3 --- hw/nvram/mac_nvram.c | 1 - hw/nvram/nrf51_nvm.c | 1 - hw/nvram/spapr_nvram.c | 1 - hw/nvram/xlnx-bbram.c | 1 - hw/nvram/xlnx-efuse.c | 1 - hw/nvram/xlnx-versal-efuse-cache.c | 2 -- hw/nvram/xlnx-versal-efuse-ctrl.c | 2 -- hw/nvram/xlnx-zynqmp-efuse.c | 2 -- hw/pci-bridge/cxl_downstream.c | 1 - hw/pci-bridge/cxl_root_port.c | 1 - hw/pci-bridge/cxl_upstream.c | 1 - hw/pci-bridge/gen_pcie_root_port.c | 1 - hw/pci-bridge/pci_bridge_dev.c | 1 - hw/pci-bridge/pci_expander_bridge.c | 2 -- hw/pci-bridge/pcie_pci_bridge.c | 1 - hw/pci-bridge/pcie_root_port.c | 1 - hw/pci-bridge/xio3130_downstream.c | 1 - hw/pci-host/dino.c | 1 - hw/pci-host/gpex.c | 1 - hw/pci-host/grackle.c | 1 - hw/pci-host/gt64120.c | 1 - hw/pci-host/i440fx.c | 1 - hw/pci-host/mv64361.c | 1 - hw/pci-host/pnv_phb.c | 4 ---- hw/pci-host/pnv_phb3.c | 1 - hw/pci-host/pnv_phb4.c | 1 - hw/pci-host/pnv_phb4_pec.c | 1 - hw/pci-host/ppce500.c | 1 - hw/pci-host/q35.c | 2 -- hw/pci-host/raven.c | 1 - hw/pci-host/sabre.c | 1 - hw/pci-host/uninorth.c | 1 - hw/pci-host/versatile.c | 1 - hw/pci-host/xilinx-pcie.c | 1 - hw/pci/pci.c | 1 - hw/pci/pci_bridge.c | 1 - hw/pci/pci_host.c | 1 - hw/pci/pcie_port.c | 2 -- hw/ppc/pnv.c | 1 - hw/ppc/pnv_adu.c | 1 - hw/ppc/pnv_chiptod.c | 1 - hw/ppc/pnv_core.c | 2 -- hw/ppc/pnv_homer.c | 1 - hw/ppc/pnv_i2c.c | 1 - hw/ppc/pnv_lpc.c | 1 - hw/ppc/pnv_pnor.c | 1 - hw/ppc/pnv_psi.c | 1 - hw/ppc/ppc405_uc.c | 1 - hw/ppc/ppc440_uc.c | 1 - hw/ppc/ppc4xx_devs.c | 2 -- hw/ppc/ppc4xx_sdram.c | 2 -- hw/ppc/prep_systemio.c | 1 - hw/ppc/rs6000_mc.c | 1 - hw/ppc/spapr_cpu_core.c | 1 - hw/ppc/spapr_nvdimm.c | 1 - hw/ppc/spapr_pci.c | 1 - hw/ppc/spapr_rng.c | 1 - hw/ppc/spapr_tpm_proxy.c | 1 - hw/remote/proxy.c | 1 - hw/riscv/opentitan.c | 1 - hw/riscv/riscv-iommu-pci.c | 1 - hw/riscv/riscv-iommu.c | 1 - hw/riscv/riscv_hart.c | 1 - hw/riscv/sifive_u.c | 1 - hw/rtc/allwinner-rtc.c | 1 - hw/rtc/goldfish_rtc.c | 1 - hw/rtc/m48t59-isa.c | 1 - hw/rtc/m48t59.c | 1 - hw/rtc/mc146818rtc.c | 1 - hw/rtc/pl031.c | 1 - hw/rx/rx62n.c | 1 - hw/s390x/ccw-device.c | 1 - hw/s390x/css-bridge.c | 1 - hw/s390x/ipl.c | 1 - hw/s390x/s390-pci-bus.c | 1 - hw/s390x/s390-skeys.c | 1 - hw/s390x/s390-stattrib.c | 1 - hw/s390x/vhost-scsi-ccw.c | 1 - hw/s390x/vhost-user-fs-ccw.c | 1 - hw/s390x/vhost-vsock-ccw.c | 1 - hw/s390x/virtio-ccw-9p.c | 1 - hw/s390x/virtio-ccw-balloon.c | 1 - hw/s390x/virtio-ccw-blk.c | 1 - hw/s390x/virtio-ccw-crypto.c | 1 - hw/s390x/virtio-ccw-gpu.c | 1 - hw/s390x/virtio-ccw-input.c | 1 - hw/s390x/virtio-ccw-net.c | 1 - hw/s390x/virtio-ccw-rng.c | 1 - hw/s390x/virtio-ccw-scsi.c | 1 - hw/s390x/virtio-ccw-serial.c | 1 - hw/scsi/mptsas.c | 1 - hw/scsi/scsi-bus.c | 1 - hw/scsi/scsi-disk.c | 3 --- hw/scsi/scsi-generic.c | 1 - hw/scsi/spapr_vscsi.c | 1 - hw/scsi/vhost-scsi.c | 1 - hw/scsi/vhost-user-scsi.c | 1 - hw/scsi/virtio-scsi.c | 1 - hw/scsi/vmw_pvscsi.c | 1 - hw/sd/allwinner-sdhost.c | 1 - hw/sd/aspeed_sdhci.c | 1 - hw/sd/sd.c | 3 --- hw/sd/sdhci-pci.c | 1 - hw/sd/sdhci.c | 1 - hw/sparc/sun4m_iommu.c | 1 - hw/sparc64/sun4u.c | 2 -- hw/ssi/aspeed_smc.c | 2 -- hw/ssi/ibex_spi_host.c | 1 - hw/ssi/npcm7xx_fiu.c | 1 - hw/ssi/pnv_spi.c | 1 - hw/ssi/sifive_spi.c | 1 - hw/ssi/ssi.c | 1 - hw/ssi/xilinx_spi.c | 1 - hw/ssi/xilinx_spips.c | 2 -- hw/ssi/xlnx-versal-ospi.c | 1 - hw/timer/a9gtimer.c | 1 - hw/timer/allwinner-a10-pit.c | 1 - hw/timer/arm_mptimer.c | 1 - hw/timer/arm_timer.c | 1 - hw/timer/aspeed_timer.c | 1 - hw/timer/avr_timer16.c | 1 - hw/timer/grlib_gptimer.c | 1 - hw/timer/hpet.c | 1 - hw/timer/i8254_common.c | 1 - hw/timer/ibex_timer.c | 1 - hw/timer/mss-timer.c | 1 - hw/timer/nrf51_timer.c | 1 - hw/timer/pxa2xx_timer.c | 1 - hw/timer/renesas_cmt.c | 1 - hw/timer/renesas_tmr.c | 1 - hw/timer/sifive_pwm.c | 1 - hw/timer/slavio_timer.c | 1 - hw/timer/sse-timer.c | 1 - hw/timer/stm32f2xx_timer.c | 1 - hw/timer/xilinx_timer.c | 1 - hw/tpm/tpm_crb.c | 1 - hw/tpm/tpm_spapr.c | 1 - hw/tpm/tpm_tis_i2c.c | 1 - hw/tpm/tpm_tis_isa.c | 1 - hw/tpm/tpm_tis_sysbus.c | 1 - hw/ufs/lu.c | 1 - hw/ufs/ufs.c | 1 - hw/usb/bus.c | 1 - hw/usb/canokey.c | 1 - hw/usb/ccid-card-emulated.c | 1 - hw/usb/ccid-card-passthru.c | 1 - hw/usb/dev-audio.c | 1 - hw/usb/dev-hid.c | 3 --- hw/usb/dev-hub.c | 1 - hw/usb/dev-mtp.c | 1 - hw/usb/dev-network.c | 1 - hw/usb/dev-serial.c | 2 -- hw/usb/dev-smartcard-reader.c | 2 -- hw/usb/dev-storage-classic.c | 1 - hw/usb/dev-uas.c | 1 - hw/usb/hcd-dwc2.c | 1 - hw/usb/hcd-dwc3.c | 1 - hw/usb/hcd-ehci-pci.c | 1 - hw/usb/hcd-ehci-sysbus.c | 1 - hw/usb/hcd-ohci-pci.c | 1 - hw/usb/hcd-ohci-sysbus.c | 1 - hw/usb/hcd-uhci.c | 2 -- hw/usb/hcd-xhci-nec.c | 1 - hw/usb/hcd-xhci-sysbus.c | 1 - hw/usb/hcd-xhci.c | 1 - hw/usb/host-libusb.c | 1 - hw/usb/redirect.c | 1 - hw/usb/u2f-emulated.c | 1 - hw/usb/u2f-passthru.c | 1 - hw/vfio/ap.c | 1 - hw/vfio/ccw.c | 1 - hw/vfio/pci.c | 2 -- hw/vfio/platform.c | 1 - hw/virtio/vdpa-dev.c | 1 - hw/virtio/vhost-scsi-pci.c | 1 - hw/virtio/vhost-user-blk-pci.c | 1 - hw/virtio/vhost-user-device.c | 1 - hw/virtio/vhost-user-fs-pci.c | 1 - hw/virtio/vhost-user-fs.c | 1 - hw/virtio/vhost-user-gpio.c | 1 - hw/virtio/vhost-user-i2c.c | 1 - hw/virtio/vhost-user-input.c | 1 - hw/virtio/vhost-user-rng-pci.c | 1 - hw/virtio/vhost-user-rng.c | 1 - hw/virtio/vhost-user-scmi.c | 1 - hw/virtio/vhost-user-scsi-pci.c | 1 - hw/virtio/vhost-user-snd.c | 1 - hw/virtio/vhost-user-vsock-pci.c | 1 - hw/virtio/vhost-user-vsock.c | 1 - hw/virtio/vhost-vsock-common.c | 1 - hw/virtio/vhost-vsock-pci.c | 1 - hw/virtio/vhost-vsock.c | 1 - hw/virtio/virtio-9p-pci.c | 1 - hw/virtio/virtio-balloon.c | 1 - hw/virtio/virtio-blk-pci.c | 1 - hw/virtio/virtio-crypto-pci.c | 1 - hw/virtio/virtio-crypto.c | 1 - hw/virtio/virtio-input-pci.c | 1 - hw/virtio/virtio-iommu-pci.c | 1 - hw/virtio/virtio-iommu.c | 1 - hw/virtio/virtio-mem.c | 1 - hw/virtio/virtio-mmio.c | 1 - hw/virtio/virtio-net-pci.c | 1 - hw/virtio/virtio-nsm.c | 1 - hw/virtio/virtio-pci.c | 2 -- hw/virtio/virtio-pmem.c | 1 - hw/virtio/virtio-rng-pci.c | 1 - hw/virtio/virtio-rng.c | 1 - hw/virtio/virtio-scsi-pci.c | 1 - hw/virtio/virtio-serial-pci.c | 1 - hw/virtio/virtio.c | 1 - hw/watchdog/sbsa_gwdt.c | 1 - hw/watchdog/wdt_aspeed.c | 1 - hw/watchdog/wdt_imx2.c | 1 - hw/xen/xen-bus.c | 1 - hw/xen/xen_pt.c | 1 - target/arm/cpu.c | 1 - target/avr/cpu.c | 1 - target/hexagon/cpu.c | 1 - target/i386/cpu.c | 2 -- target/microblaze/cpu.c | 1 - target/mips/cpu.c | 1 - target/s390x/cpu.c | 1 - target/sparc/cpu.c | 1 - tests/unit/test-qdev-global-props.c | 1 - 555 files changed, 7 insertions(+), 623 deletions(-) diff --git a/docs/devel/migration/compatibility.rst b/docs/devel/migration/= compatibility.rst index c787f537386..ecb887e3184 100644 --- a/docs/devel/migration/compatibility.rst +++ b/docs/devel/migration/compatibility.rst @@ -401,7 +401,6 @@ the old behaviour or the new behaviour:: DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0), + DEFINE_PROP_BIT("x-pcie-err-unc-mask", PCIDevice, cap_present, + QEMU_PCIE_ERR_UNC_MASK_BITNR, true), - DEFINE_PROP_END_OF_LIST() }; =20 Notice that we enable the feature for new machine types. diff --git a/docs/devel/virtio-backends.rst b/docs/devel/virtio-backends.rst index a6f9df4845a..679d7544b8e 100644 --- a/docs/devel/virtio-backends.rst +++ b/docs/devel/virtio-backends.rst @@ -107,7 +107,6 @@ manually instantiated: VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **err= p) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 5dc46402585..e6ef80b7fd0 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -947,16 +947,16 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState = *bus, DeviceState *dev); * you attempt to add an existing property defined by a parent class. * To modify an inherited property you need to use???? * - * Validate that @props has at least one Property plus the terminator. + * Validate that @props has at least one Property. * Validate that @props is an array, not a pointer, via ARRAY_SIZE. - * Validate that the array is terminated at compile-time (with -O2), - * which requires the array to be const. + * Validate that the array does not have a legacy terminator at compile-ti= me; + * requires -O2 and the array to be const. */ #define device_class_set_props(dc, props) \ do { \ - QEMU_BUILD_BUG_ON(sizeof(props) < 2 * sizeof(Property)); \ - size_t props_count_ =3D ARRAY_SIZE(props) - 1; \ - if ((props)[props_count_].name !=3D NULL) { \ + QEMU_BUILD_BUG_ON(sizeof(props) =3D=3D 0); = \ + size_t props_count_ =3D ARRAY_SIZE(props); \ + if ((props)[props_count_ - 1].name =3D=3D NULL) { = \ qemu_build_not_reached(); \ } \ device_class_set_props_n((dc), (props), props_count_); \ @@ -965,7 +965,7 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *b= us, DeviceState *dev); /** * device_class_set_props_n(): add a set of properties to an device * @dc: the parent DeviceClass all devices inherit - * @props: an array of properties, not terminated by DEFINE_PROP_END_OF_LI= ST. + * @props: an array of properties * @n: ARRAY_SIZE(@props) * * This will add a set of properties to the object. It will fault if diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 26ebd230685..ef3fd7b4ae2 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -171,9 +171,6 @@ extern const PropertyInfo qdev_prop_link; #define DEFINE_PROP_SIZE32(_n, _s, _f, _d) \ DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t) =20 -#define DEFINE_PROP_END_OF_LIST() \ - {} - /* * Set properties between creation and realization. * diff --git a/cpu-target.c b/cpu-target.c index 2ae07a779ea..6af34098b9e 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -201,7 +201,6 @@ static const Property cpu_common_props[] =3D { DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION, MemoryRegion *), #endif - DEFINE_PROP_END_OF_LIST(), }; =20 #ifndef CONFIG_USER_ONLY diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index b764e4cd3db..ef0d845109d 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -246,7 +246,6 @@ static const VMStateDescription vmstate_virtio_9p =3D { static const Property virtio_9p_properties[] =3D { DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag), DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_9p_class_init(ObjectClass *klass, void *data) diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index 5ef5ddccb68..dfa0f371767 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -1016,7 +1016,6 @@ static const Property erst_properties[] =3D { TYPE_MEMORY_BACKEND, HostMemoryBackend *), DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState, default_record_size, ERST_RECORD_SIZE), - DEFINE_PROP_END_OF_LIST(), }; =20 static void erst_class_init(ObjectClass *klass, void *data) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index 8c4706f8cff..cfb14299b68 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -318,7 +318,6 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, Acp= iEventStatusBits ev) =20 static const Property acpi_ged_properties[] =3D { DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_memhp_state =3D { diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 2bfaf5a38d3..cc755b36ebc 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -617,7 +617,6 @@ static const Property piix4_pm_properties[] =3D { DEFINE_PROP_BOOL("smm-enabled", PIIX4PMState, smm_enabled, false), DEFINE_PROP_BOOL("x-not-migrate-acpi-index", PIIX4PMState, not_migrate_acpi_index, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void piix4_pm_class_init(ObjectClass *klass, void *data) diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index 9c2ca85cc7c..af3ec859891 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -216,7 +216,6 @@ static void vmgenid_realize(DeviceState *dev, Error **e= rrp) =20 static const Property vmgenid_device_properties[] =3D { DEFINE_PROP_UUID(VMGENID_GUID, VmGenIdState, guid), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vmgenid_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/adc/aspeed_adc.c b/hw/adc/aspeed_adc.c index f94c6f2be3a..1cc554f1793 100644 --- a/hw/adc/aspeed_adc.c +++ b/hw/adc/aspeed_adc.c @@ -289,7 +289,6 @@ static const VMStateDescription vmstate_aspeed_adc_engi= ne =3D { static const Property aspeed_adc_engine_properties[] =3D { DEFINE_PROP_UINT32("engine-id", AspeedADCEngineState, engine_id, 0), DEFINE_PROP_UINT32("nr-channels", AspeedADCEngineState, nr_channels, 0= ), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_adc_engine_class_init(ObjectClass *klass, void *data) diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c index 1781ff4c0b0..0a83d28605e 100644 --- a/hw/adc/npcm7xx_adc.c +++ b/hw/adc/npcm7xx_adc.c @@ -269,7 +269,6 @@ static const VMStateDescription vmstate_npcm7xx_adc =3D= { =20 static const Property npcm7xx_timer_properties[] =3D { DEFINE_PROP_UINT32("iref", NPCM7xxADCState, iref, NPCM7XX_ADC_DEFAULT_= IREF), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_adc_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index e20f719c9bd..1134606fc24 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -552,7 +552,6 @@ static const Property armv7m_properties[] =3D { DEFINE_PROP_BOOL("dsp", ARMv7MState, dsp, true), DEFINE_PROP_UINT32("mpu-ns-regions", ARMv7MState, mpu_ns_regions, UINT= _MAX), DEFINE_PROP_UINT32("mpu-s-regions", ARMv7MState, mpu_s_regions, UINT_M= AX), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_armv7m =3D { @@ -635,7 +634,6 @@ static const Property bitband_properties[] =3D { DEFINE_PROP_UINT32("base", BitBandState, base, 0), DEFINE_PROP_LINK("source-memory", BitBandState, source_memory, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void bitband_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c index 4221cacd51a..1ddcb26c1ed 100644 --- a/hw/arm/aspeed_soc_common.c +++ b/hw/arm/aspeed_soc_common.c @@ -144,7 +144,6 @@ static const Property aspeed_soc_properties[] =3D { MemoryRegion *), DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_soc_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 48763b03feb..ef1242d0a0e 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -311,7 +311,6 @@ static void fsl_imx25_realize(DeviceState *dev, Error *= *errp) =20 static const Property fsl_imx25_properties[] =3D { DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fsl_imx25_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 236d15bc9cb..fed2dbb46d3 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -483,7 +483,6 @@ static void fsl_imx6_realize(DeviceState *dev, Error **= errp) =20 static const Property fsl_imx6_properties[] =3D { DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fsl_imx6_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index 1e0bbbb5d77..6995746f642 100644 --- a/hw/arm/fsl-imx6ul.c +++ b/hw/arm/fsl-imx6ul.c @@ -725,7 +725,6 @@ static const Property fsl_imx6ul_properties[] =3D { true), DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX6ULState, phy_connected[1= ], true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fsl_imx6ul_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index 0310c15b0cf..55b3b3d3c25 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -743,7 +743,6 @@ static const Property fsl_imx7_properties[] =3D { true), DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX7State, phy_connected[1], true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fsl_imx7_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index ee6c7e0c0d9..64025bac64c 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -696,7 +696,6 @@ DEFINE_MACHINE("integratorcp", integratorcp_machine_ini= t) =20 static const Property core_properties[] =3D { DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void core_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 5d7c3f2e5a0..224530f4da8 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -234,7 +234,6 @@ static const Property m2sxxx_soc_properties[] =3D { /* default divisors in Libero GUI */ DEFINE_PROP_UINT8("apb0div", MSF2State, apb0div, 2), DEFINE_PROP_UINT8("apb1div", MSF2State, apb1div, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void m2sxxx_soc_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c index 2960b63b596..780936493ef 100644 --- a/hw/arm/npcm7xx.c +++ b/hw/arm/npcm7xx.c @@ -813,7 +813,6 @@ static void npcm7xx_realize(DeviceState *dev, Error **e= rrp) static const Property npcm7xx_properties[] =3D { DEFINE_PROP_LINK("dram-mr", NPCM7xxState, dram, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c index 43fac8a8db2..37dd4cf5f40 100644 --- a/hw/arm/nrf51_soc.c +++ b/hw/arm/nrf51_soc.c @@ -214,7 +214,6 @@ static const Property nrf51_soc_properties[] =3D { DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_S= IZE), DEFINE_PROP_UINT32("flash-size", NRF51State, flash_size, NRF51822_FLASH_SIZE), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nrf51_soc_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 6baa9d0fc31..dd74c2e5583 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -938,7 +938,6 @@ static const Property smmu_dev_properties[] =3D { DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0), DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, TYPE_PCI_BUS, PCIBus *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void smmu_base_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 026838f9ace..c0cf5df0f6e 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1985,7 +1985,6 @@ static const Property smmuv3_properties[] =3D { * Defaults to stage 1 */ DEFINE_PROP_STRING("stage", SMMUv3State, stage), - DEFINE_PROP_END_OF_LIST() }; =20 static void smmuv3_instance_init(Object *obj) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 7fc13d96c9b..ea04b2837ff 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -448,7 +448,6 @@ static const Property stellaris_sys_properties[] =3D { DEFINE_PROP_UINT32("dc2", ssys_state, dc2, 0), DEFINE_PROP_UINT32("dc3", ssys_state, dc3, 0), DEFINE_PROP_UINT32("dc4", ssys_state, dc4, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void stellaris_sys_instance_init(Object *obj) diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 4c4ff21e804..f56781519ff 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -1334,7 +1334,6 @@ static const VMStateDescription vmstate_strongarm_uar= t_regs =3D { =20 static const Property strongarm_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", StrongARMUARTState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void strongarm_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 3adbe7b1fbf..3760d101fd6 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -975,7 +975,6 @@ static const Property versal_properties[] =3D { TYPE_CAN_BUS, CanBusState *), DEFINE_PROP_LINK("canbus1", Versal, lpd.iou.canbus[1], TYPE_CAN_BUS, CanBusState *), - DEFINE_PROP_END_OF_LIST() }; =20 static void versal_class_init(ObjectClass *klass, void *data) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 1082c62c30f..6bb4629a5c9 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -867,7 +867,6 @@ static const Property xlnx_zynqmp_props[] =3D { CanBusState *), DEFINE_PROP_LINK("canbus1", XlnxZynqMPState, canbus[1], TYPE_CAN_BUS, CanBusState *), - DEFINE_PROP_END_OF_LIST() }; =20 static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 8033bbbaed4..35533c6bad0 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1326,7 +1326,6 @@ static void ac97_exit(PCIDevice *dev) =20 static const Property ac97_properties[] =3D { DEFINE_AUDIO_PROPERTIES(AC97LinkState, card), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ac97_class_init(ObjectClass *klass, void *data) diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index c1d8faecb49..8c9767b5372 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -301,7 +301,6 @@ static const Property adlib_properties[] =3D { DEFINE_AUDIO_PROPERTIES(AdlibState, card), DEFINE_PROP_UINT32 ("iobase", AdlibState, port, 0x220), DEFINE_PROP_UINT32 ("freq", AdlibState, freq, 44100), - DEFINE_PROP_END_OF_LIST (), }; =20 static void adlib_class_initfn (ObjectClass *klass, void *data) diff --git a/hw/audio/asc.c b/hw/audio/asc.c index 452039418d0..cc205bf063e 100644 --- a/hw/audio/asc.c +++ b/hw/audio/asc.c @@ -698,7 +698,6 @@ static void asc_init(Object *obj) static const Property asc_properties[] =3D { DEFINE_AUDIO_PROPERTIES(ASCState, card), DEFINE_PROP_UINT8("asctype", ASCState, type, ASC_TYPE_ASC), - DEFINE_PROP_END_OF_LIST(), }; =20 static void asc_class_init(ObjectClass *oc, void *data) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index abc38720a36..5a9be80ba3b 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -694,7 +694,6 @@ static const Property cs4231a_properties[] =3D { DEFINE_PROP_UINT32 ("iobase", CSState, port, 0x534), DEFINE_PROP_UINT32 ("irq", CSState, irq, 9), DEFINE_PROP_UINT32 ("dma", CSState, dma, 3), - DEFINE_PROP_END_OF_LIST (), }; =20 static void cs4231a_class_initfn (ObjectClass *klass, void *data) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 6170425a5a1..b5756b97d5e 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -870,7 +870,6 @@ static void es1370_exit(PCIDevice *dev) =20 static const Property es1370_properties[] =3D { DEFINE_AUDIO_PROPERTIES(ES1370State, card), - DEFINE_PROP_END_OF_LIST(), }; =20 static void es1370_class_init (ObjectClass *klass, void *data) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index dd5a5a34414..e718c1183e8 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -296,7 +296,6 @@ static const Property gus_properties[] =3D { DEFINE_PROP_UINT32 ("iobase", GUSState, port, 0x240), DEFINE_PROP_UINT32 ("irq", GUSState, emu.gusirq, 7), DEFINE_PROP_UINT32 ("dma", GUSState, emu.gusdma, 3), - DEFINE_PROP_END_OF_LIST (), }; =20 static void gus_class_initfn (ObjectClass *klass, void *data) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 8bd8f62c485..6f3a8f691bf 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -862,7 +862,6 @@ static const Property hda_audio_properties[] =3D { DEFINE_PROP_UINT32("debug", HDAAudioState, debug, 0), DEFINE_PROP_BOOL("mixer", HDAAudioState, mixer, true), DEFINE_PROP_BOOL("use-timer", HDAAudioState, use_timer, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void hda_audio_init_output(HDACodecDevice *hda, Error **errp) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 3e4a7552287..ec24dfd77aa 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -39,7 +39,6 @@ =20 static const Property hda_props[] =3D { DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1), - DEFINE_PROP_END_OF_LIST() }; =20 static const TypeInfo hda_codec_bus_info =3D { @@ -1219,7 +1218,6 @@ static const Property intel_hda_properties[] =3D { DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0), DEFINE_PROP_ON_OFF_AUTO("msi", IntelHDAState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void intel_hda_class_init(ObjectClass *klass, void *data) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index 7a6b9f52d3f..17be1855474 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -219,7 +219,6 @@ static const Property pcspk_properties[] =3D { DEFINE_AUDIO_PROPERTIES(PCSpkState, card), DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, 0x61), DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pcspk_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c index 6c66a240cb9..f771d725fa6 100644 --- a/hw/audio/pl041.c +++ b/hw/audio/pl041.c @@ -630,7 +630,6 @@ static const Property pl041_device_properties[] =3D { /* Non-compact FIFO depth property */ DEFINE_PROP_UINT32("nc_fifo_depth", PL041State, fifo_depth, DEFAULT_FIFO_DEPTH), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pl041_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 143b9e71e12..0c661b4947b 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1447,7 +1447,6 @@ static const Property sb16_properties[] =3D { DEFINE_PROP_UINT32 ("irq", SB16State, irq, 5), DEFINE_PROP_UINT32 ("dma", SB16State, dma, 1), DEFINE_PROP_UINT32 ("dma16", SB16State, hdma, 5), - DEFINE_PROP_END_OF_LIST (), }; =20 static void sb16_class_initfn (ObjectClass *klass, void *data) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c index e43ddf37f3c..4e115e011e8 100644 --- a/hw/audio/via-ac97.c +++ b/hw/audio/via-ac97.c @@ -461,7 +461,6 @@ static void via_ac97_exit(PCIDevice *dev) =20 static const Property via_ac97_properties[] =3D { DEFINE_AUDIO_PROPERTIES(ViaAC97State, card), - DEFINE_PROP_END_OF_LIST(), }; =20 static void via_ac97_class_init(ObjectClass *klass, void *data) diff --git a/hw/audio/virtio-snd-pci.c b/hw/audio/virtio-snd-pci.c index b762d7e81ee..74d93f4e9c9 100644 --- a/hw/audio/virtio-snd-pci.c +++ b/hw/audio/virtio-snd-pci.c @@ -31,7 +31,6 @@ static const Property virtio_snd_pci_properties[] =3D { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_snd_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index e2b112e0593..7e8ab74ceb4 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -85,7 +85,6 @@ static const Property virtio_snd_properties[] =3D { VIRTIO_SOUND_STREAM_DEFAULT), DEFINE_PROP_UINT32("chmaps", VirtIOSound, snd_conf.chmaps, VIRTIO_SOUND_CHMAP_DEFAULT), - DEFINE_PROP_END_OF_LIST(), }; =20 static void diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c index 19e7755060c..8d381dbc658 100644 --- a/hw/audio/wm8750.c +++ b/hw/audio/wm8750.c @@ -708,7 +708,6 @@ void wm8750_set_bclk_in(void *opaque, int new_hz) =20 static const Property wm8750_properties[] =3D { DEFINE_AUDIO_PROPERTIES(WM8750State, card), - DEFINE_PROP_END_OF_LIST(), }; =20 static void wm8750_class_init(ObjectClass *klass, void *data) diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index ce630ec572f..981f34219f4 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -358,7 +358,6 @@ static void atmega_realize(DeviceState *dev, Error **er= rp) static const Property atmega_props[] =3D { DEFINE_PROP_UINT64("xtal-frequency-hz", AtmegaMcuState, xtal_freq_hz, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void atmega_class_init(ObjectClass *oc, void *data) diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index 2b9f667fe44..e71be8ab2cd 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -296,7 +296,6 @@ static const Property isa_fdc_properties[] =3D { DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback, FLOPPY_DRIVE_TYPE_288, qdev_prop_fdc_drive_type, FloppyDriveType), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isabus_fdc_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c index f17e04b138b..381b492aec9 100644 --- a/hw/block/fdc-sysbus.c +++ b/hw/block/fdc-sysbus.c @@ -206,7 +206,6 @@ static const Property sysbus_fdc_properties[] =3D { DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback, FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type, FloppyDriveType), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sysbus_fdc_class_init(ObjectClass *klass, void *data) @@ -230,7 +229,6 @@ static const Property sun4m_fdc_properties[] =3D { DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback, FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type, FloppyDriveType), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sun4m_fdc_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 57d68448063..d81b7a2a73b 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -460,7 +460,6 @@ static const Property floppy_drive_properties[] =3D { DEFINE_PROP_SIGNED("drive-type", FloppyDrive, type, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), - DEFINE_PROP_END_OF_LIST(), }; =20 static void floppy_drive_realize(DeviceState *qdev, Error **errp) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index ca97365926b..8b5f148796d 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -1729,7 +1729,6 @@ static const Property m25p80_properties[] =3D { DEFINE_PROP_UINT8("spansion-cr3nv", Flash, spansion_cr3nv, 0x2), DEFINE_PROP_UINT8("spansion-cr4nv", Flash, spansion_cr4nv, 0x10), DEFINE_PROP_DRIVE("drive", Flash, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static int m25p80_pre_load(void *opaque) diff --git a/hw/block/nand.c b/hw/block/nand.c index b6e6bfac236..35a91a870bf 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -449,7 +449,6 @@ static const Property nand_properties[] =3D { DEFINE_PROP_UINT8("manufacturer_id", NANDFlashState, manf_id, 0), DEFINE_PROP_UINT8("chip_id", NANDFlashState, chip_id, 0), DEFINE_PROP_DRIVE("drive", NANDFlashState, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nand_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 20f4fc67a03..06db20da606 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -932,7 +932,6 @@ static const Property pflash_cfi01_properties[] =3D { DEFINE_PROP_STRING("name", PFlashCFI01, name), DEFINE_PROP_BOOL("old-multiple-chip-handling", PFlashCFI01, old_multiple_chip_handling, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pflash_cfi01_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index c82002d665e..559fac8ce8c 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -959,7 +959,6 @@ static const Property pflash_cfi02_properties[] =3D { DEFINE_PROP_UINT16("unlock-addr0", PFlashCFI02, unlock_addr0, 0), DEFINE_PROP_UINT16("unlock-addr1", PFlashCFI02, unlock_addr1, 0), DEFINE_PROP_STRING("name", PFlashCFI02, name), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pflash_cfi02_unrealize(DeviceState *dev) diff --git a/hw/block/swim.c b/hw/block/swim.c index c336d83bdc1..4a7f8d13f7f 100644 --- a/hw/block/swim.c +++ b/hw/block/swim.c @@ -169,7 +169,6 @@ static const BlockDevOps swim_block_ops =3D { static const Property swim_drive_properties[] =3D { DEFINE_PROP_INT32("unit", SWIMDrive, unit, -1), DEFINE_BLOCK_PROPERTIES(SWIMDrive, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void swim_drive_realize(DeviceState *qdev, Error **errp) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index f3ac0071080..d13c597d7eb 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -581,7 +581,6 @@ static const Property vhost_user_blk_properties[] =3D { VIRTIO_BLK_F_DISCARD, true), DEFINE_PROP_BIT64("write-zeroes", VHostUserBlk, parent_obj.host_featur= es, VIRTIO_BLK_F_WRITE_ZEROES, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_blk_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 9ca60fbc070..5bcb77ed200 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -2014,7 +2014,6 @@ static const Property virtio_blk_properties[] =3D { conf.max_write_zeroes_sectors, BDRV_REQUEST_MAX_SEC= TORS), DEFINE_PROP_BOOL("x-enable-wce-if-config-wce", VirtIOBlock, conf.x_enable_wce_if_config_wce, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_blk_class_init(ObjectClass *klass, void *data) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 0c0817f4987..56a67136604 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -674,7 +674,6 @@ static const Property xen_block_props[] =3D { props.max_ring_page_order, 4), DEFINE_PROP_LINK("iothread", XenBlockDevice, props.iothread, TYPE_IOTHREAD, IOThread *), - DEFINE_PROP_END_OF_LIST() }; =20 static void xen_block_class_init(ObjectClass *class, void *data) diff --git a/hw/char/avr_usart.c b/hw/char/avr_usart.c index 3421576e459..e8012cae3ad 100644 --- a/hw/char/avr_usart.c +++ b/hw/char/avr_usart.c @@ -261,7 +261,6 @@ static const MemoryRegionOps avr_usart_ops =3D { =20 static const Property avr_usart_properties[] =3D { DEFINE_PROP_CHR("chardev", AVRUsartState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void avr_usart_pr(void *opaque, int irq, int level) diff --git a/hw/char/bcm2835_aux.c b/hw/char/bcm2835_aux.c index 30285c97b0f..73ad5934067 100644 --- a/hw/char/bcm2835_aux.c +++ b/hw/char/bcm2835_aux.c @@ -292,7 +292,6 @@ static void bcm2835_aux_realize(DeviceState *dev, Error= **errp) =20 static const Property bcm2835_aux_props[] =3D { DEFINE_PROP_CHR("chardev", BCM2835AuxState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void bcm2835_aux_class_init(ObjectClass *oc, void *data) diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 2e778f7a9cd..ebd846a083b 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -619,7 +619,6 @@ static const VMStateDescription vmstate_cadence_uart = =3D { =20 static const Property cadence_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", CadenceUARTState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cadence_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/cmsdk-apb-uart.c b/hw/char/cmsdk-apb-uart.c index e37e14e0f2d..0506500215f 100644 --- a/hw/char/cmsdk-apb-uart.c +++ b/hw/char/cmsdk-apb-uart.c @@ -380,7 +380,6 @@ static const VMStateDescription cmsdk_apb_uart_vmstate = =3D { static const Property cmsdk_apb_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", CMSDKAPBUART, chr), DEFINE_PROP_UINT32("pclk-frq", CMSDKAPBUART, pclk_frq, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cmsdk_apb_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c index c0f16e9bd64..1bc3bf85fea 100644 --- a/hw/char/debugcon.c +++ b/hw/char/debugcon.c @@ -118,7 +118,6 @@ static const Property debugcon_isa_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISADebugconState, iobase, 0xe9), DEFINE_PROP_CHR("chardev", ISADebugconState, state.chr), DEFINE_PROP_UINT32("readback", ISADebugconState, state.readback, 0xe9), - DEFINE_PROP_END_OF_LIST(), }; =20 static void debugcon_isa_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index 03beba11adb..b0b0714e0f7 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -174,7 +174,6 @@ static const VMStateDescription vmstate_digic_uart =3D { =20 static const Property digic_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", DigicUartState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void digic_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/escc.c b/hw/char/escc.c index 08bc65ef2cc..a5fdd8f6986 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -1099,7 +1099,6 @@ static const Property escc_properties[] =3D { DEFINE_PROP_CHR("chrB", ESCCState, chn[0].chr), DEFINE_PROP_CHR("chrA", ESCCState, chn[1].chr), DEFINE_PROP_STRING("chnA-sunkbd-layout", ESCCState, chn[1].sunkbd_layo= ut), - DEFINE_PROP_END_OF_LIST(), }; =20 static void escc_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index c2836ff8fd8..a1a9a12cafe 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -709,7 +709,6 @@ static const Property exynos4210_uart_properties[] =3D { DEFINE_PROP_UINT32("channel", Exynos4210UartState, channel, 0), DEFINE_PROP_UINT32("rx-size", Exynos4210UartState, rx.size, 16), DEFINE_PROP_UINT32("tx-size", Exynos4210UartState, tx.size, 16), - DEFINE_PROP_END_OF_LIST(), }; =20 static void exynos4210_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c index 68e261236ec..701eb988933 100644 --- a/hw/char/goldfish_tty.c +++ b/hw/char/goldfish_tty.c @@ -243,7 +243,6 @@ static const VMStateDescription vmstate_goldfish_tty = =3D { =20 static const Property goldfish_tty_properties[] =3D { DEFINE_PROP_CHR("chardev", GoldfishTTYState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void goldfish_tty_instance_init(Object *obj) diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index caae88d77d5..db6bcdad41b 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -279,7 +279,6 @@ static void grlib_apbuart_reset(DeviceState *d) =20 static const Property grlib_apbuart_properties[] =3D { DEFINE_PROP_CHR("chrdev", UART, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void grlib_apbuart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c index b1bdb2ad152..392375ad551 100644 --- a/hw/char/ibex_uart.c +++ b/hw/char/ibex_uart.c @@ -510,7 +510,6 @@ static const VMStateDescription vmstate_ibex_uart =3D { =20 static const Property ibex_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", IbexUartState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ibex_uart_init(Object *obj) diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index 6376f2cadc3..12705a1337f 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -440,7 +440,6 @@ static void imx_serial_init(Object *obj) =20 static const Property imx_serial_properties[] =3D { DEFINE_PROP_CHR("chardev", IMXSerialState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void imx_serial_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c index fb8cb6c2b71..d1e5f6dad2e 100644 --- a/hw/char/ipoctal232.c +++ b/hw/char/ipoctal232.c @@ -567,7 +567,6 @@ static const Property ipoctal_properties[] =3D { DEFINE_PROP_CHR("chardev5", IPOctalState, ch[5].dev), DEFINE_PROP_CHR("chardev6", IPOctalState, ch[6].dev), DEFINE_PROP_CHR("chardev7", IPOctalState, ch[7].dev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ipoctal_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c index c044536d5d1..980a12fcb7d 100644 --- a/hw/char/mcf_uart.c +++ b/hw/char/mcf_uart.c @@ -314,7 +314,6 @@ static void mcf_uart_realize(DeviceState *dev, Error **= errp) =20 static const Property mcf_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", mcf_uart_state, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mcf_uart_class_init(ObjectClass *oc, void *data) diff --git a/hw/char/nrf51_uart.c b/hw/char/nrf51_uart.c index b164c70f52c..82a61ee95f2 100644 --- a/hw/char/nrf51_uart.c +++ b/hw/char/nrf51_uart.c @@ -306,7 +306,6 @@ static const VMStateDescription nrf51_uart_vmstate =3D { =20 static const Property nrf51_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", NRF51UARTState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nrf51_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/parallel.c b/hw/char/parallel.c index 15191698f5f..df31ce47220 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -608,7 +608,6 @@ static const Property parallel_isa_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISAParallelState, iobase, -1), DEFINE_PROP_UINT32("irq", ISAParallelState, isairq, 7), DEFINE_PROP_CHR("chardev", ISAParallelState, state.chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void parallel_isa_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 5fbee5e6c5b..06ce851044d 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -606,7 +606,6 @@ static const VMStateDescription vmstate_pl011 =3D { static const Property pl011_properties[] =3D { DEFINE_PROP_CHR("chardev", PL011State, chr), DEFINE_PROP_BOOL("migrate-clk", PL011State, migrate_clk, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pl011_init(Object *obj) diff --git a/hw/char/renesas_sci.c b/hw/char/renesas_sci.c index 516b48648b9..ea944949320 100644 --- a/hw/char/renesas_sci.c +++ b/hw/char/renesas_sci.c @@ -322,7 +322,6 @@ static const VMStateDescription vmstate_rsci =3D { static const Property rsci_properties[] =3D { DEFINE_PROP_UINT64("input-freq", RSCIState, input_freq, 0), DEFINE_PROP_CHR("chardev", RSCIState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rsci_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 536b2834717..ddb9a726d5a 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -337,7 +337,6 @@ static const Property console_properties[] =3D { DEFINE_PROP_CHR("chardev", SCLPConsoleLM, chr), DEFINE_PROP_UINT32("write_errors", SCLPConsoleLM, write_errors, 0), DEFINE_PROP_BOOL("echo", SCLPConsoleLM, echo, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void console_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index a90b892d1dd..01233b933d8 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -253,7 +253,6 @@ static void console_reset(DeviceState *dev) =20 static const Property console_properties[] =3D { DEFINE_PROP_CHR("chardev", SCLPConsole, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void console_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c index 2cf50eb0bbb..f44959c769c 100644 --- a/hw/char/serial-isa.c +++ b/hw/char/serial-isa.c @@ -117,7 +117,6 @@ static const Property serial_isa_properties[] =3D { DEFINE_PROP_UINT32("index", ISASerialState, index, -1), DEFINE_PROP_UINT32("iobase", ISASerialState, iobase, -1), DEFINE_PROP_UINT32("irq", ISASerialState, isairq, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void serial_isa_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/char/serial-mm.c b/hw/char/serial-mm.c index 8f51f1d3b8e..6338e7c0ba8 100644 --- a/hw/char/serial-mm.c +++ b/hw/char/serial-mm.c @@ -132,7 +132,6 @@ static const Property serial_mm_properties[] =3D { */ DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0), DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_EN= DIAN), - DEFINE_PROP_END_OF_LIST(), }; =20 static void serial_mm_class_init(ObjectClass *oc, void *data) diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c index c2f20d8e74e..7578e863cfe 100644 --- a/hw/char/serial-pci-multi.c +++ b/hw/char/serial-pci-multi.c @@ -136,7 +136,6 @@ static const Property multi_2x_serial_pci_properties[] = =3D { DEFINE_PROP_CHR("chardev1", PCIMultiSerialState, state[0].chr), DEFINE_PROP_CHR("chardev2", PCIMultiSerialState, state[1].chr), DEFINE_PROP_UINT8("prog_if", PCIMultiSerialState, prog_if, 0x02), - DEFINE_PROP_END_OF_LIST(), }; =20 static const Property multi_4x_serial_pci_properties[] =3D { @@ -145,7 +144,6 @@ static const Property multi_4x_serial_pci_properties[] = =3D { DEFINE_PROP_CHR("chardev3", PCIMultiSerialState, state[2].chr), DEFINE_PROP_CHR("chardev4", PCIMultiSerialState, state[3].chr), DEFINE_PROP_UINT8("prog_if", PCIMultiSerialState, prog_if, 0x02), - DEFINE_PROP_END_OF_LIST(), }; =20 static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *dat= a) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index 2f487a3a799..6659cef5d4b 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -83,7 +83,6 @@ static const VMStateDescription vmstate_pci_serial =3D { =20 static const Property serial_pci_properties[] =3D { DEFINE_PROP_UINT8("prog_if", PCISerialState, prog_if, 0x02), - DEFINE_PROP_END_OF_LIST(), }; =20 static void serial_pci_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/char/serial.c b/hw/char/serial.c index 85dba02ace4..81b346a5ab7 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -968,7 +968,6 @@ static const Property serial_properties[] =3D { DEFINE_PROP_CHR("chardev", SerialState, chr), DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200), DEFINE_PROP_BOOL("wakeup", SerialState, wakeup, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void serial_class_init(ObjectClass *klass, void* data) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 2ab7197aee7..247aeb071ac 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -450,7 +450,6 @@ static void sh_serial_init(Object *obj) static const Property sh_serial_properties[] =3D { DEFINE_PROP_CHR("chardev", SHSerialState, chr), DEFINE_PROP_UINT8("features", SHSerialState, feat, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void sh_serial_class_init(ObjectClass *oc, void *data) diff --git a/hw/char/shakti_uart.c b/hw/char/shakti_uart.c index 6e56754ca6a..09975d9d349 100644 --- a/hw/char/shakti_uart.c +++ b/hw/char/shakti_uart.c @@ -159,7 +159,6 @@ static void shakti_uart_instance_init(Object *obj) =20 static const Property shakti_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", ShaktiUartState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void shakti_uart_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index 97e4be37c07..4bc5767284b 100644 --- a/hw/char/sifive_uart.c +++ b/hw/char/sifive_uart.c @@ -253,7 +253,6 @@ static int sifive_uart_be_change(void *opaque) =20 static const Property sifive_uart_properties[] =3D { DEFINE_PROP_CHR("chardev", SiFiveUARTState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_uart_init(Object *obj) diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index cd91dad7090..6451d010ac7 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -166,7 +166,6 @@ void spapr_vty_create(SpaprVioBus *bus, Chardev *charde= v) static const Property spapr_vty_properties[] =3D { DEFINE_SPAPR_PROPERTIES(SpaprVioVty, sdev), DEFINE_PROP_CHR("chardev", SpaprVioVty, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_spapr_vty =3D { diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index 4a3c30eddba..ebcc510f4ea 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -201,7 +201,6 @@ static const MemoryRegionOps stm32f2xx_usart_ops =3D { =20 static const Property stm32f2xx_usart_properties[] =3D { DEFINE_PROP_CHR("chardev", STM32F2XXUsartState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stm32f2xx_usart_init(Object *obj) diff --git a/hw/char/stm32l4x5_usart.c b/hw/char/stm32l4x5_usart.c index 360e79cc3f4..bcc310bd97b 100644 --- a/hw/char/stm32l4x5_usart.c +++ b/hw/char/stm32l4x5_usart.c @@ -536,7 +536,6 @@ static const MemoryRegionOps stm32l4x5_usart_base_ops = =3D { =20 static const Property stm32l4x5_usart_base_properties[] =3D { DEFINE_PROP_CHR("chardev", Stm32l4x5UsartBaseState, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stm32l4x5_usart_base_init(Object *obj) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index c2aafda0ce5..04ee26dcbd3 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -285,7 +285,6 @@ static int write_payload_3270(EmulatedCcw3270Device *de= v, uint8_t cmd) =20 static const Property terminal_properties[] =3D { DEFINE_PROP_CHR("chardev", Terminal3270, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription terminal3270_vmstate =3D { diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index f58292e2bb3..aa6d611a475 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -276,7 +276,6 @@ static const TypeInfo virtconsole_info =3D { =20 static const Property virtserialport_properties[] =3D { DEFINE_PROP_CHR("chardev", VirtConsole, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtserialport_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 1e631bcb2b3..b6d2743a9c6 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -838,7 +838,6 @@ static void virtser_bus_dev_print(Monitor *mon, DeviceS= tate *qdev, int indent); static const Property virtser_props[] =3D { DEFINE_PROP_UINT32("nr", VirtIOSerialPort, id, VIRTIO_CONSOLE_BAD_ID), DEFINE_PROP_STRING("name", VirtIOSerialPort, name), - DEFINE_PROP_END_OF_LIST() }; =20 static void virtser_bus_class_init(ObjectClass *klass, void *data) @@ -1158,7 +1157,6 @@ static const Property virtio_serial_properties[] =3D { 31), DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features, VIRTIO_CONSOLE_F_EMERG_WRITE, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_serial_class_init(ObjectClass *klass, void *data) diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index c20c1b4b84e..96e7d5940d2 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -490,7 +490,6 @@ static char *xen_console_get_frontend_path(XenDevice *x= endev, Error **errp) static const Property xen_console_properties[] =3D { DEFINE_PROP_CHR("chardev", XenConsole, chr), DEFINE_PROP_INT32("idx", XenConsole, dev, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xen_console_class_init(ObjectClass *class, void *data) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index ad772262178..56955e0d74a 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -178,7 +178,6 @@ static const MemoryRegionOps uart_ops =3D { =20 static const Property xilinx_uartlite_properties[] =3D { DEFINE_PROP_CHR("chardev", XilinxUARTLite, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void uart_rx(void *opaque, const uint8_t *buf, int size) diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c index c1cddecf604..67f20089950 100644 --- a/hw/core/generic-loader.c +++ b/hw/core/generic-loader.c @@ -187,7 +187,6 @@ static const Property generic_loader_props[] =3D { DEFINE_PROP_UINT32("cpu-num", GenericLoaderState, cpu_num, CPU_NONE), DEFINE_PROP_BOOL("force-raw", GenericLoaderState, force_raw, false), DEFINE_PROP_STRING("file", GenericLoaderState, file), - DEFINE_PROP_END_OF_LIST(), }; =20 static void generic_loader_class_init(ObjectClass *klass, void *data) diff --git a/hw/core/guest-loader.c b/hw/core/guest-loader.c index 74af00cee70..57315e5cef7 100644 --- a/hw/core/guest-loader.c +++ b/hw/core/guest-loader.c @@ -116,7 +116,6 @@ static const Property guest_loader_props[] =3D { DEFINE_PROP_STRING("kernel", GuestLoaderState, kernel), DEFINE_PROP_STRING("bootargs", GuestLoaderState, args), DEFINE_PROP_STRING("initrd", GuestLoaderState, initrd), - DEFINE_PROP_END_OF_LIST(), }; =20 static void guest_loader_class_init(ObjectClass *klass, void *data) diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c index fc52796f543..4d0d3cabf1e 100644 --- a/hw/core/or-irq.c +++ b/hw/core/or-irq.c @@ -117,7 +117,6 @@ static const VMStateDescription vmstate_or_irq =3D { =20 static const Property or_irq_properties[] =3D { DEFINE_PROP_UINT16("num-lines", OrIRQState, num_lines, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void or_irq_class_init(ObjectClass *klass, void *data) diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c index a29c9c6e594..1d00c4d36d0 100644 --- a/hw/core/platform-bus.c +++ b/hw/core/platform-bus.c @@ -207,7 +207,6 @@ static void platform_bus_realize(DeviceState *dev, Erro= r **errp) static const Property platform_bus_properties[] =3D { DEFINE_PROP_UINT32("num_irqs", PlatformBusDevice, num_irqs, 0), DEFINE_PROP_UINT32("mmio_size", PlatformBusDevice, mmio_size, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void platform_bus_class_init(ObjectClass *klass, void *data) diff --git a/hw/core/split-irq.c b/hw/core/split-irq.c index 40fc7e2e773..fc12274811b 100644 --- a/hw/core/split-irq.c +++ b/hw/core/split-irq.c @@ -61,7 +61,6 @@ static void split_irq_realize(DeviceState *dev, Error **e= rrp) =20 static const Property split_irq_properties[] =3D { DEFINE_PROP_UINT16("num-lines", SplitIRQ, num_lines, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void split_irq_class_init(ObjectClass *klass, void *data) diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c index 5346b8b6c6e..bad44836f7e 100644 --- a/hw/cpu/a15mpcore.c +++ b/hw/cpu/a15mpcore.c @@ -153,7 +153,6 @@ static const Property a15mp_priv_properties[] =3D { * Other boards may differ and should set this property appropriately. */ DEFINE_PROP_UINT32("num-irq", A15MPPrivState, num_irq, 160), - DEFINE_PROP_END_OF_LIST(), }; =20 static void a15mp_priv_class_init(ObjectClass *klass, void *data) diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c index c3fdfb92e11..9671585b5f9 100644 --- a/hw/cpu/a9mpcore.c +++ b/hw/cpu/a9mpcore.c @@ -167,7 +167,6 @@ static const Property a9mp_priv_properties[] =3D { * Other boards may differ and should set this property appropriately. */ DEFINE_PROP_UINT32("num-irq", A9MPPrivState, num_irq, 96), - DEFINE_PROP_END_OF_LIST(), }; =20 static void a9mp_priv_class_init(ObjectClass *klass, void *data) diff --git a/hw/cpu/arm11mpcore.c b/hw/cpu/arm11mpcore.c index 193fc182ab6..94861a06d94 100644 --- a/hw/cpu/arm11mpcore.c +++ b/hw/cpu/arm11mpcore.c @@ -142,7 +142,6 @@ static const Property mpcore_priv_properties[] =3D { * has more IRQ lines than the kernel expects. */ DEFINE_PROP_UINT32("num-irq", ARM11MPCorePriveState, num_irq, 64), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mpcore_priv_class_init(ObjectClass *klass, void *data) diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c index 8e43621b5c7..9da5221f88b 100644 --- a/hw/cpu/cluster.c +++ b/hw/cpu/cluster.c @@ -27,7 +27,6 @@ =20 static const Property cpu_cluster_properties[] =3D { DEFINE_PROP_UINT32("cluster-id", CPUClusterState, cluster_id, 0), - DEFINE_PROP_END_OF_LIST() }; =20 typedef struct CallbackData { diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c index 9a0ff1df864..4268735e3a5 100644 --- a/hw/cpu/realview_mpcore.c +++ b/hw/cpu/realview_mpcore.c @@ -110,7 +110,6 @@ static void mpcore_rirq_init(Object *obj) =20 static const Property mpcore_rirq_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mpcore_rirq_class_init(ObjectClass *klass, void *data) diff --git a/hw/cxl/switch-mailbox-cci.c b/hw/cxl/switch-mailbox-cci.c index 3fde0f8aaee..65cdac6cc13 100644 --- a/hw/cxl/switch-mailbox-cci.c +++ b/hw/cxl/switch-mailbox-cci.c @@ -68,7 +68,6 @@ static void cswmbcci_exit(PCIDevice *pci_dev) static const Property cxl_switch_cci_props[] =3D { DEFINE_PROP_LINK("target", CSWMBCCIDev, target, TYPE_CXL_USP, PCIDevice *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cswmbcci_class_init(ObjectClass *oc, void *data) diff --git a/hw/display/artist.c b/hw/display/artist.c index 49deed328d9..8b719b11edb 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1478,7 +1478,6 @@ static const Property artist_properties[] =3D { DEFINE_PROP_UINT16("width", ARTISTState, width, 1280), DEFINE_PROP_UINT16("height", ARTISTState, height, 1024), DEFINE_PROP_UINT16("depth", ARTISTState, depth, 8), - DEFINE_PROP_END_OF_LIST(), }; =20 static void artist_reset(DeviceState *qdev) diff --git a/hw/display/ati.c b/hw/display/ati.c index e24e092bbc5..864fa4fc2ce 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -1047,7 +1047,6 @@ static const Property ati_vga_properties[] =3D { DEFINE_PROP_BOOL("guest_hwcursor", ATIVGAState, cursor_guest_mode, fal= se), /* this is a debug option, prefer PROP_UINT over PROP_BIT for simplici= ty */ DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, DEFAULT_X_PIXMA= N), - DEFINE_PROP_END_OF_LIST() }; =20 static void ati_vga_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c index 2539fcc8ab8..a5bded5156a 100644 --- a/hw/display/bcm2835_fb.c +++ b/hw/display/bcm2835_fb.c @@ -440,7 +440,6 @@ static const Property bcm2835_fb_props[] =3D { initial_config.pixo, 1), /* 1=3DRGB, 0=3DBGR */ DEFINE_PROP_UINT32("alpha", BCM2835FBState, initial_config.alpha, 2), /* alpha ignored */ - DEFINE_PROP_END_OF_LIST() }; =20 static void bcm2835_fb_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 9a3263aa016..086f7a0f06c 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -349,7 +349,6 @@ static const Property bochs_display_properties[] =3D { DEFINE_PROP_SIZE("vgamem", BochsDisplayState, vgamem, 16 * MiB), DEFINE_PROP_BOOL("edid", BochsDisplayState, enable_edid, true), DEFINE_EDID_PROPERTIES(BochsDisplayState, edid_info), - DEFINE_PROP_END_OF_LIST(), }; =20 static void bochs_display_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 75b3312c245..3f971d875f8 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -366,7 +366,6 @@ static const Property cg3_properties[] =3D { DEFINE_PROP_UINT16("width", CG3State, width, -1), DEFINE_PROP_UINT16("height", CG3State, height, -1), DEFINE_PROP_UINT16("depth", CG3State, depth, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cg3_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 198ed9ed9be..47ca6a77541 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -2989,7 +2989,6 @@ static const Property pci_vga_cirrus_properties[] =3D= { cirrus_vga.enable_blitter, true), DEFINE_PROP_BOOL("global-vmstate", struct PCICirrusVGAState, cirrus_vga.vga.global_vmstate, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cirrus_vga_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c index d0d134470fa..60b7fd20f1e 100644 --- a/hw/display/cirrus_vga_isa.c +++ b/hw/display/cirrus_vga_isa.c @@ -74,7 +74,6 @@ static const Property isa_cirrus_vga_properties[] =3D { cirrus_vga.vga.vram_size_mb, 4), DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState, cirrus_vga.enable_blitter, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 4f097a172c3..04c864a3084 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1928,7 +1928,6 @@ static const GraphicHwOps exynos4210_fimd_ops =3D { static const Property exynos4210_fimd_properties[] =3D { DEFINE_PROP_LINK("framebuffer-memory", Exynos4210fimdState, fbmem, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void exynos4210_fimd_init(Object *obj) diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index a7533c69082..30b5ea67f26 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -514,7 +514,6 @@ static void g364fb_sysbus_reset(DeviceState *d) =20 static const Property g364fb_sysbus_properties[] =3D { DEFINE_PROP_UINT32("vram_size", G364SysBusState, g364.vram_size, 8 * M= iB), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_g364fb_sysbus =3D { diff --git a/hw/display/i2c-ddc.c b/hw/display/i2c-ddc.c index a2d1f2b044b..d8ab9eee405 100644 --- a/hw/display/i2c-ddc.c +++ b/hw/display/i2c-ddc.c @@ -97,7 +97,6 @@ static const VMStateDescription vmstate_i2c_ddc =3D { =20 static const Property i2c_ddc_properties[] =3D { DEFINE_EDID_PROPERTIES(I2CDDCState, edid_info), - DEFINE_PROP_END_OF_LIST(), }; =20 static void i2c_ddc_class_init(ObjectClass *oc, void *data) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index 977901bfdd0..e83fc863be5 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -764,7 +764,6 @@ static const Property macfb_sysbus_properties[] =3D { DEFINE_PROP_UINT8("depth", MacfbSysBusState, macfb.depth, 8), DEFINE_PROP_UINT8("display", MacfbSysBusState, macfb.type, MACFB_DISPLAY_VGA), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_macfb_sysbus =3D { @@ -783,7 +782,6 @@ static const Property macfb_nubus_properties[] =3D { DEFINE_PROP_UINT8("depth", MacfbNubusState, macfb.depth, 8), DEFINE_PROP_UINT8("display", MacfbNubusState, macfb.type, MACFB_DISPLAY_VGA), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_macfb_nubus =3D { diff --git a/hw/display/pl110.c b/hw/display/pl110.c index eca00b42794..4d4f477b943 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -538,7 +538,6 @@ static const GraphicHwOps pl110_gfx_ops =3D { static const Property pl110_properties[] =3D { DEFINE_PROP_LINK("framebuffer-memory", PL110State, fbmem, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pl110_realize(DeviceState *dev, Error **errp) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 949949d374b..f3b1be7ebfa 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2475,7 +2475,6 @@ static const Property qxl_properties[] =3D { DEFINE_PROP_UINT32("xres", PCIQXLDevice, xres, 0), DEFINE_PROP_UINT32("yres", PCIQXLDevice, yres, 0), DEFINE_PROP_BOOL("global-vmstate", PCIQXLDevice, vga.global_vmstat= e, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void qxl_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c index e677f44be68..6c35028965d 100644 --- a/hw/display/ramfb-standalone.c +++ b/hw/display/ramfb-standalone.c @@ -62,7 +62,6 @@ static const VMStateDescription ramfb_dev_vmstate =3D { =20 static const Property ramfb_properties[] =3D { DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ramfb_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 446b648f1a4..09edcf86f8e 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -2058,7 +2058,6 @@ static const Property sm501_sysbus_properties[] =3D { DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0), /* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity = */ DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFA= ULT_X_PIXMAN), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sm501_reset_sysbus(DeviceState *dev) @@ -2146,7 +2145,6 @@ static void sm501_realize_pci(PCIDevice *dev, Error *= *errp) static const Property sm501_pci_properties[] =3D { DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB), DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, DEFAULT= _X_PIXMAN), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sm501_reset_pci(DeviceState *dev) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 3eb0a91ff9c..2cfc1e8f01d 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -884,7 +884,6 @@ static const Property tcx_properties[] =3D { DEFINE_PROP_UINT16("width", TCXState, width, -1), DEFINE_PROP_UINT16("height", TCXState, height, -1), DEFINE_PROP_UINT16("depth", TCXState, depth, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tcx_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index a6cbf771031..2920628f780 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -90,7 +90,6 @@ static void vga_isa_realizefn(DeviceState *dev, Error **e= rrp) =20 static const Property vga_isa_properties[] =3D { DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vga_isa_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c index b759efdde75..1e0c2dbf748 100644 --- a/hw/display/vga-mmio.c +++ b/hw/display/vga-mmio.c @@ -114,7 +114,6 @@ static void vga_mmio_realizefn(DeviceState *dev, Error = **errp) static const Property vga_mmio_properties[] =3D { DEFINE_PROP_UINT8("it_shift", VGAMmioState, it_shift, 0), DEFINE_PROP_UINT32("vgamem_mb", VGAMmioState, vga.vram_size_mb, 8), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vga_mmio_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 3145c448f59..dd084c20b16 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -339,7 +339,6 @@ static const Property vga_pci_properties[] =3D { PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_EDID, true), DEFINE_EDID_PROPERTIES(PCIVGAState, edid_info), DEFINE_PROP_BOOL("global-vmstate", PCIVGAState, vga.global_vmstate, fa= lse), - DEFINE_PROP_END_OF_LIST(), }; =20 static const Property secondary_pci_properties[] =3D { @@ -349,7 +348,6 @@ static const Property secondary_pci_properties[] =3D { DEFINE_PROP_BIT("edid", PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_EDID, true), DEFINE_EDID_PROPERTIES(PCIVGAState, edid_info), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vga_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index a36eddcb12f..12d5c37ee50 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -647,7 +647,6 @@ static struct vhost_dev *vhost_user_gpu_get_vhost(VirtI= ODevice *vdev) =20 static const Property vhost_user_gpu_properties[] =3D { VIRTIO_GPU_BASE_PROPERTIES(VhostUserGPU, parent_obj.conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index 6f31149e1ee..c6609ddb1bf 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -159,7 +159,6 @@ static const Property virtio_gpu_gl_properties[] =3D { VIRTIO_GPU_FLAG_STATS_ENABLED, false), DEFINE_PROP_BIT("venus", VirtIOGPU, parent_obj.conf.flags, VIRTIO_GPU_FLAG_VENUS_ENABLED, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_gpu_gl_device_unrealize(DeviceState *qdev) diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index 89d27c9d85c..6d789701a3c 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -23,7 +23,6 @@ =20 static const Property virtio_gpu_pci_base_properties[] =3D { DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_gpu_pci_base_realize(VirtIOPCIProxy *vpci_dev, Error **= errp) diff --git a/hw/display/virtio-gpu-rutabaga.c b/hw/display/virtio-gpu-rutab= aga.c index f6486acddae..f6eb29472e8 100644 --- a/hw/display/virtio-gpu-rutabaga.c +++ b/hw/display/virtio-gpu-rutabaga.c @@ -1108,7 +1108,6 @@ static const Property virtio_gpu_rutabaga_properties[= ] =3D { DEFINE_PROP_STRING("wayland-socket-path", VirtIOGPURutabaga, wayland_socket_path), DEFINE_PROP_STRING("wsi", VirtIOGPURutabaga, wsi), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_gpu_rutabaga_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 82741d19e56..c2a74a8d990 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1682,7 +1682,6 @@ static const Property virtio_gpu_properties[] =3D { VIRTIO_GPU_FLAG_BLOB_ENABLED, false), DEFINE_PROP_SIZE("hostmem", VirtIOGPU, parent_obj.conf.hostmem, 0), DEFINE_PROP_UINT8("x-scanout-vmstate-version", VirtIOGPU, scanout_vmst= ate_version, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_gpu_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 532e4c62d57..fefbdb61e17 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -211,7 +211,6 @@ static void virtio_vga_set_big_endian_fb(Object *obj, b= ool value, Error **errp) =20 static const Property virtio_vga_base_properties[] =3D { DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_vga_base_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index f49bbf393a1..2dd661e3c13 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1337,7 +1337,6 @@ static const Property vga_vmware_properties[] =3D { chip.vga.vram_size_mb, 16), DEFINE_PROP_BOOL("global-vmstate", struct pci_vmsvga_state_s, chip.vga.global_vmstate, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vmsvga_class_init(ObjectClass *klass, void *data) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 7838f28bcad..1272da0133a 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1389,7 +1389,6 @@ static void xlnx_dp_reset(DeviceState *dev) =20 static const Property xlnx_dp_device_properties[] =3D { DEFINE_AUDIO_PROPERTIES(XlnxDPState, aud_card), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xlnx_dp_class_init(ObjectClass *oc, void *data) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 032afedde20..9652d47adcd 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -141,7 +141,6 @@ static void i82374_realize(DeviceState *dev, Error **er= rp) =20 static const Property i82374_properties[] =3D { DEFINE_PROP_UINT32("iobase", I82374State, iobase, 0x400), - DEFINE_PROP_END_OF_LIST() }; =20 static void i82374_class_init(ObjectClass *klass, void *data) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 8b041773930..74c38d2ee84 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -590,7 +590,6 @@ static const Property i8257_properties[] =3D { DEFINE_PROP_INT32("page-base", I8257State, page_base, 0x80), DEFINE_PROP_INT32("pageh-base", I8257State, pageh_base, 0x480), DEFINE_PROP_INT32("dshift", I8257State, dshift, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void i8257_class_init(ObjectClass *klass, void *data) diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c index 3f392822ed0..8a9b073b249 100644 --- a/hw/dma/pl080.c +++ b/hw/dma/pl080.c @@ -411,7 +411,6 @@ static void pl081_init(Object *obj) static const Property pl080_properties[] =3D { DEFINE_PROP_LINK("downstream", PL080State, downstream, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pl080_class_init(ObjectClass *oc, void *data) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index d5a0a1caa20..ffef9ebb6fb 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -1669,8 +1669,6 @@ static const Property pl330_properties[] =3D { =20 DEFINE_PROP_LINK("memory", PL330State, mem_mr, TYPE_MEMORY_REGION, MemoryRegion *), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void pl330_class_init(ObjectClass *klass, void *data) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index f09452d0b52..4bae52a3017 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -619,7 +619,6 @@ static const Property axidma_properties[] =3D { tx_control_dev, TYPE_STREAM_SINK, StreamSink *), DEFINE_PROP_LINK("dma", XilinxAXIDMA, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void axidma_class_init(ObjectClass *klass, void *data) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 1a63d5f3b28..bb27cb2e644 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -814,7 +814,6 @@ static const Property zdma_props[] =3D { DEFINE_PROP_UINT32("bus-width", XlnxZDMA, cfg.bus_width, 64), DEFINE_PROP_LINK("dma", XlnxZDMA, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void zdma_class_init(ObjectClass *klass, void *data) diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c index d78dc6444bd..f46485a42cb 100644 --- a/hw/dma/xlnx_csu_dma.c +++ b/hw/dma/xlnx_csu_dma.c @@ -710,7 +710,6 @@ static const Property xlnx_csu_dma_properties[] =3D { TYPE_STREAM_SINK, StreamSink *), DEFINE_PROP_LINK("dma", XlnxCSUDMA, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xlnx_csu_dma_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c index 919d53701f9..898f80f8c83 100644 --- a/hw/gpio/imx_gpio.c +++ b/hw/gpio/imx_gpio.c @@ -294,7 +294,6 @@ static const Property imx_gpio_properties[] =3D { DEFINE_PROP_BOOL("has-edge-sel", IMXGPIOState, has_edge_sel, true), DEFINE_PROP_BOOL("has-upper-pin-irq", IMXGPIOState, has_upper_pin_irq, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void imx_gpio_reset(DeviceState *dev) diff --git a/hw/gpio/npcm7xx_gpio.c b/hw/gpio/npcm7xx_gpio.c index db6792b2ad9..23e67424c9f 100644 --- a/hw/gpio/npcm7xx_gpio.c +++ b/hw/gpio/npcm7xx_gpio.c @@ -395,7 +395,6 @@ static const Property npcm7xx_gpio_properties[] =3D { DEFINE_PROP_UINT32("reset-osrc", NPCM7xxGPIOState, reset_osrc, 0), /* Bit n set =3D> pin n has high drive strength by default. */ DEFINE_PROP_UINT32("reset-odsc", NPCM7xxGPIOState, reset_odsc, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_gpio_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index 03ee9e47c68..8a9f14ba152 100644 --- a/hw/gpio/omap_gpio.c +++ b/hw/gpio/omap_gpio.c @@ -227,7 +227,6 @@ void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk c= lk) =20 static const Property omap_gpio_properties[] =3D { DEFINE_PROP_INT32("mpu_model", Omap1GpioState, mpu_model, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void omap_gpio_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c index 427419d218f..1ac0cf6c464 100644 --- a/hw/gpio/pca9552.c +++ b/hw/gpio/pca9552.c @@ -430,7 +430,6 @@ static void pca955x_realize(DeviceState *dev, Error **e= rrp) =20 static const Property pca955x_properties[] =3D { DEFINE_PROP_STRING("description", PCA955xState, description), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pca955x_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/pca9554.c b/hw/gpio/pca9554.c index e8b0458aac4..fe03bb4b5e2 100644 --- a/hw/gpio/pca9554.c +++ b/hw/gpio/pca9554.c @@ -293,7 +293,6 @@ static void pca9554_realize(DeviceState *dev, Error **e= rrp) =20 static const Property pca9554_properties[] =3D { DEFINE_PROP_STRING("description", PCA9554State, description), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pca9554_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 9b8ca6de320..60ce4a7f628 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -565,7 +565,6 @@ static void pl061_realize(DeviceState *dev, Error **err= p) static const Property pl061_props[] =3D { DEFINE_PROP_UINT32("pullups", PL061State, pullups, 0xff), DEFINE_PROP_UINT32("pulldowns", PL061State, pulldowns, 0x0), - DEFINE_PROP_END_OF_LIST() }; =20 static void pl061_class_init(ObjectClass *klass, void *data) diff --git a/hw/gpio/sifive_gpio.c b/hw/gpio/sifive_gpio.c index 5603f0c2357..0d5206ae6b5 100644 --- a/hw/gpio/sifive_gpio.c +++ b/hw/gpio/sifive_gpio.c @@ -351,7 +351,6 @@ static const VMStateDescription vmstate_sifive_gpio =3D= { =20 static const Property sifive_gpio_properties[] =3D { DEFINE_PROP_UINT32("ngpio", SIFIVEGPIOState, ngpio, SIFIVE_GPIO_PINS), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_gpio_realize(DeviceState *dev, Error **errp) diff --git a/hw/gpio/stm32l4x5_gpio.c b/hw/gpio/stm32l4x5_gpio.c index d1394f3f55d..f69fc1db4f5 100644 --- a/hw/gpio/stm32l4x5_gpio.c +++ b/hw/gpio/stm32l4x5_gpio.c @@ -452,7 +452,6 @@ static const Property stm32l4x5_gpio_properties[] =3D { DEFINE_PROP_UINT32("mode-reset", Stm32l4x5GpioState, moder_reset, 0), DEFINE_PROP_UINT32("ospeed-reset", Stm32l4x5GpioState, ospeedr_reset, = 0), DEFINE_PROP_UINT32("pupd-reset", Stm32l4x5GpioState, pupdr_reset, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stm32l4x5_gpio_class_init(ObjectClass *klass, void *data) diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 74897b1604f..c0bf5284295 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -1741,8 +1741,6 @@ static const Property hv_balloon_properties[] =3D { DEFINE_PROP_LINK(HV_BALLOON_MEMDEV_PROP, HvBalloon, hostmem, TYPE_MEMORY_BACKEND, HostMemoryBackend *), DEFINE_PROP_UINT64(HV_BALLOON_ADDR_PROP, HvBalloon, addr, 0), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void hv_balloon_class_init(ObjectClass *klass, void *data) diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c index 0193addd424..d3e39170772 100644 --- a/hw/hyperv/syndbg.c +++ b/hw/hyperv/syndbg.c @@ -370,7 +370,6 @@ static const Property hv_syndbg_properties[] =3D { DEFINE_PROP_STRING("host_ip", HvSynDbg, host_ip), DEFINE_PROP_UINT16("host_port", HvSynDbg, host_port, 50000), DEFINE_PROP_BOOL("use_hcalls", HvSynDbg, use_hcalls, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void hv_syndbg_class_init(ObjectClass *klass, void *data) diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c index 3d1f4d14e84..12a7dc43128 100644 --- a/hw/hyperv/vmbus.c +++ b/hw/hyperv/vmbus.c @@ -2348,7 +2348,6 @@ static void vmbus_dev_unrealize(DeviceState *dev) =20 static const Property vmbus_dev_props[] =3D { DEFINE_PROP_UUID("instanceid", VMBusDevice, instanceid), - DEFINE_PROP_END_OF_LIST() }; =20 =20 @@ -2655,7 +2654,6 @@ static const VMStateDescription vmstate_vmbus_bridge = =3D { =20 static const Property vmbus_bridge_props[] =3D { DEFINE_PROP_UINT8("irq", VMBusBridge, irq, 7), - DEFINE_PROP_END_OF_LIST() }; =20 static void vmbus_bridge_class_init(ObjectClass *klass, void *data) diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c index 2ea68c3090d..a8fbb9f44a1 100644 --- a/hw/i2c/aspeed_i2c.c +++ b/hw/i2c/aspeed_i2c.c @@ -1261,7 +1261,6 @@ static void aspeed_i2c_realize(DeviceState *dev, Erro= r **errp) static const Property aspeed_i2c_properties[] =3D { DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_i2c_class_init(ObjectClass *klass, void *data) @@ -1450,7 +1449,6 @@ static const Property aspeed_i2c_bus_properties[] =3D= { DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0), DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I= 2C, AspeedI2CState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_i2c_bus_class_init(ObjectClass *klass, void *data) diff --git a/hw/i2c/core.c b/hw/i2c/core.c index 4118d3db506..26bb18514a9 100644 --- a/hw/i2c/core.c +++ b/hw/i2c/core.c @@ -20,7 +20,6 @@ =20 static const Property i2c_props[] =3D { DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const TypeInfo i2c_bus_info =3D { diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c index 80c570fd102..779cc4e66ed 100644 --- a/hw/i2c/i2c_mux_pca954x.c +++ b/hw/i2c/i2c_mux_pca954x.c @@ -213,7 +213,6 @@ static void pca954x_init(Object *obj) =20 static const Property pca954x_props[] =3D { DEFINE_PROP_STRING("name", Pca954xState, name), - DEFINE_PROP_END_OF_LIST() }; =20 static void pca954x_class_init(ObjectClass *klass, void *data) diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c index 172df135f57..a641db23480 100644 --- a/hw/i2c/omap_i2c.c +++ b/hw/i2c/omap_i2c.c @@ -513,7 +513,6 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk) =20 static const Property omap_i2c_properties[] =3D { DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void omap_i2c_class_init(ObjectClass *klass, void *data) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index ca3e62a2446..be522b5d7dc 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1670,7 +1670,6 @@ static void amdvi_sysbus_realize(DeviceState *dev, Er= ror **errp) =20 static const Property amdvi_properties[] =3D { DEFINE_PROP_BOOL("xtsup", AMDVIState, xtsup, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_amdvi_sysbus =3D { diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index a5b268342fc..f81f34dafa2 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3418,7 +3418,6 @@ static const Property vtd_properties[] =3D { DEFINE_PROP_BOOL("dma-drain", IntelIOMMUState, dma_drain, true), DEFINE_PROP_BOOL("dma-translation", IntelIOMMUState, dma_translation, = true), DEFINE_PROP_BOOL("stale-tm", IntelIOMMUState, stale_tm, false), - DEFINE_PROP_END_OF_LIST(), }; =20 /* Read IRTE entry with specific index */ diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 71150ed2e0a..f7b49bd9f79 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -308,7 +308,6 @@ static const VMStateDescription kvmclock_vmsd =3D { static const Property kvmclock_properties[] =3D { DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState, mach_use_reliable_get_clock, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void kvmclock_class_init(ObjectClass *klass, void *data) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 2933d3f4581..da5eb600529 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -290,7 +290,6 @@ static void kvm_pit_realizefn(DeviceState *dev, Error *= *errp) static const Property kvm_pit_properties[] =3D { DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState, lost_tick_policy, LOST_TICK_POLICY_DELAY), - DEFINE_PROP_END_OF_LIST(), }; =20 static void kvm_pit_class_init(ObjectClass *klass, void *data) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 217ff43b982..73b31df6ab9 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -135,7 +135,6 @@ static void kvm_ioapic_realize(DeviceState *dev, Error = **errp) =20 static const Property kvm_ioapic_properties[] =3D { DEFINE_PROP_UINT32("gsi_base", KVMIOAPICState, kvm_gsi_base, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void kvm_ioapic_class_init(ObjectClass *klass, void *data) diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c index c232e825e02..875e1c5c33b 100644 --- a/hw/i386/sgx-epc.c +++ b/hw/i386/sgx-epc.c @@ -24,7 +24,6 @@ static const Property sgx_epc_properties[] =3D { DEFINE_PROP_UINT32(SGX_EPC_NUMA_NODE_PROP, SGXEPCDevice, node, 0), DEFINE_PROP_LINK(SGX_EPC_MEMDEV_PROP, SGXEPCDevice, hostmem, TYPE_MEMORY_BACKEND_EPC, HostMemoryBackendEpc *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sgx_epc_get_size(Object *obj, Visitor *v, const char *name, diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index da9c35c1ec2..3e07d125128 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -319,7 +319,6 @@ static void vmmouse_realizefn(DeviceState *dev, Error *= *errp) =20 static const Property vmmouse_properties[] =3D { DEFINE_PROP_LINK("i8042", VMMouseState, i8042, TYPE_I8042, ISAKBDState= *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vmmouse_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index cab6e720898..2096686b640 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -284,8 +284,6 @@ static const Property vmport_properties[] =3D { * 5 - ACE 1.x (Deprecated) */ DEFINE_PROP_UINT8("vmware-vmx-type", VMPortState, vmware_vmx_type, 2), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void vmport_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c index 155f6262ea1..e5ec60eae7e 100644 --- a/hw/i386/x86-iommu.c +++ b/hw/i386/x86-iommu.c @@ -130,7 +130,6 @@ static const Property x86_iommu_properties[] =3D { intr_supported, ON_OFF_AUTO_AUTO), DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false), DEFINE_PROP_BOOL("pt", X86IOMMUState, pt_supported, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void x86_iommu_class_init(ObjectClass *klass, void *data) diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c index e71483e6e33..9453da97bd9 100644 --- a/hw/i386/xen/xen_pvdevice.c +++ b/hw/i386/xen/xen_pvdevice.c @@ -120,7 +120,6 @@ static const Property xen_pv_props[] =3D { DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, 0xffff), DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01), DEFINE_PROP_UINT32("size", XenPVDevice, size, 0x400000), - DEFINE_PROP_END_OF_LIST() }; =20 static void xen_pv_class_init(ObjectClass *klass, void *data) diff --git a/hw/ide/ahci-sysbus.c b/hw/ide/ahci-sysbus.c index 2432039290b..03a5bd42d07 100644 --- a/hw/ide/ahci-sysbus.c +++ b/hw/ide/ahci-sysbus.c @@ -64,7 +64,6 @@ static void sysbus_ahci_realize(DeviceState *dev, Error *= *errp) =20 static const Property sysbus_ahci_properties[] =3D { DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sysbus_ahci_class_init(ObjectClass *klass, void *data) diff --git a/hw/ide/cf.c b/hw/ide/cf.c index 190914f5133..cfb4394f80d 100644 --- a/hw/ide/cf.c +++ b/hw/ide/cf.c @@ -29,7 +29,6 @@ static const Property ide_cf_properties[] =3D { DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf), DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans", IDEDrive, dev.chs_trans, BIOS_ATA_TRANSLATION_AUTO), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ide_cf_class_init(ObjectClass *klass, void *data) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 942f6c470c8..bcc3f344fc0 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -315,7 +315,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev) =20 static const Property cmd646_ide_properties[] =3D { DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cmd646_ide_class_init(ObjectClass *klass, void *data) diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c index cc92531f1ce..789056c5dc7 100644 --- a/hw/ide/ide-dev.c +++ b/hw/ide/ide-dev.c @@ -32,7 +32,6 @@ static const Property ide_props[] =3D { DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1), DEFINE_PROP_BOOL("win2k-install-hack", IDEDevice, win2k_install_hack, = false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ide_qdev_realize(DeviceState *qdev, Error **errp) @@ -197,7 +196,6 @@ static const Property ide_hd_properties[] =3D { DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans", IDEDrive, dev.chs_trans, BIOS_ATA_TRANSLATION_AUTO), DEFINE_PROP_UINT16("rotation_rate", IDEDrive, dev.rotation_rate, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ide_hd_class_init(ObjectClass *klass, void *data) @@ -220,7 +218,6 @@ static const TypeInfo ide_hd_info =3D { =20 static const Property ide_cd_properties[] =3D { DEFINE_IDE_DEV_PROPERTIES(), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ide_cd_class_init(ObjectClass *klass, void *data) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index a0a7e4837c2..9a3c2d522c1 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -105,7 +105,6 @@ static const Property isa_ide_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0), DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6), DEFINE_PROP_UINT32("irq", ISAIDEState, irqnum, 14), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isa_ide_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 25f8403e80f..ecaab77862f 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -462,7 +462,6 @@ static void macio_ide_initfn(Object *obj) static const Property macio_ide_properties[] =3D { DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0), DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void macio_ide_class_init(ObjectClass *oc, void *data) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 43ab66f3478..a1b0fd23de4 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -143,7 +143,6 @@ static void mmio_ide_initfn(Object *obj) =20 static const Property mmio_ide_properties[] =3D { DEFINE_PROP_UINT32("shift", MMIOIDEState, shift, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void mmio_ide_class_init(ObjectClass *oc, void *data) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 24a133fd252..16ac82e34d0 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -738,7 +738,6 @@ static void i8042_mmio_init(Object *obj) static const Property i8042_mmio_properties[] =3D { DEFINE_PROP_UINT64("mask", MMIOKBDState, kbd.mask, UINT64_MAX), DEFINE_PROP_UINT32("size", MMIOKBDState, size, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_kbd_mmio =3D { @@ -938,7 +937,6 @@ static const Property i8042_properties[] =3D { DEFINE_PROP_BOOL("kbd-throttle", ISAKBDState, kbd_throttle, false), DEFINE_PROP_UINT8("kbd-irq", ISAKBDState, kbd_irq, 1), DEFINE_PROP_UINT8("mouse-irq", ISAKBDState, mouse_irq, 12), - DEFINE_PROP_END_OF_LIST(), }; =20 static void i8042_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/input/stellaris_gamepad.c b/hw/input/stellaris_gamepad.c index b1cc6931896..98382a0e153 100644 --- a/hw/input/stellaris_gamepad.c +++ b/hw/input/stellaris_gamepad.c @@ -80,7 +80,6 @@ static void stellaris_gamepad_reset_enter(Object *obj, Re= setType type) static const Property stellaris_gamepad_properties[] =3D { DEFINE_PROP_ARRAY("keycodes", StellarisGamepad, num_buttons, keycodes, qdev_prop_uint32, uint32_t), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stellaris_gamepad_class_init(ObjectClass *klass, void *data) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 73963855089..812faaef8fe 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -240,7 +240,6 @@ static void virtio_input_hid_handle_status(VirtIOInput = *vinput, static const Property virtio_input_hid_properties[] =3D { DEFINE_PROP_STRING("display", VirtIOInputHID, display), DEFINE_PROP_UINT32("head", VirtIOInputHID, head, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_input_hid_class_init(ObjectClass *klass, void *data) @@ -382,7 +381,6 @@ static struct virtio_input_config virtio_mouse_config_v= 2[] =3D { =20 static const Property virtio_mouse_properties[] =3D { DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_mouse_class_init(ObjectClass *klass, void *data) @@ -507,7 +505,6 @@ static struct virtio_input_config virtio_tablet_config_= v2[] =3D { =20 static const Property virtio_tablet_properties[] =3D { DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_tablet_class_init(ObjectClass *klass, void *data) diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c index 2be2c633abc..8bfb17f3c43 100644 --- a/hw/input/virtio-input-host.c +++ b/hw/input/virtio-input-host.c @@ -223,7 +223,6 @@ static const VMStateDescription vmstate_virtio_input_ho= st =3D { =20 static const Property virtio_input_host_properties[] =3D { DEFINE_PROP_STRING("evdev", VirtIOInputHost, evdev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_input_host_class_init(ObjectClass *klass, void *data) diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c index edcd94dedb6..1394d99c6b4 100644 --- a/hw/input/virtio-input.c +++ b/hw/input/virtio-input.c @@ -302,7 +302,6 @@ static const VMStateDescription vmstate_virtio_input = =3D { =20 static const Property virtio_input_properties[] =3D { DEFINE_PROP_STRING("serial", VirtIOInput, serial), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_input_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 8be9f22de82..de8074d474f 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -414,7 +414,6 @@ static const Property apic_properties_common[] =3D { true), DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState, legacy_instanc= e_id, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void apic_common_get_id(Object *obj, Visitor *v, const char *name, diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index e961cd91565..50c516f2f2e 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -360,7 +360,6 @@ static const Property arm_gic_common_properties[] =3D { /* True if the GIC should implement the virtualization extensions */ DEFINE_PROP_BOOL("has-virtualization-extensions", GICState, virt_extn,= 0), DEFINE_PROP_UINT32("num-priority-bits", GICState, n_prio_bits, 8), - DEFINE_PROP_END_OF_LIST(), }; =20 static void arm_gic_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c index ffa830b433c..ae389fe5842 100644 --- a/hw/intc/arm_gicv2m.c +++ b/hw/intc/arm_gicv2m.c @@ -173,7 +173,6 @@ static void gicv2m_init(Object *obj) static const Property gicv2m_properties[] =3D { DEFINE_PROP_UINT32("base-spi", ARMGICv2mState, base_spi, 0), DEFINE_PROP_UINT32("num-spi", ARMGICv2mState, num_spi, 64), - DEFINE_PROP_END_OF_LIST(), }; =20 static void gicv2m_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index a8ec615a3fe..53e7a251b0e 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -621,7 +621,6 @@ static const Property arm_gicv3_common_properties[] =3D= { redist_region_count, qdev_prop_uint32, uint32_t), DEFINE_PROP_LINK("sysmem", GICv3State, dma, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void arm_gicv3_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c index f50b1814eaf..2388a96799f 100644 --- a/hw/intc/arm_gicv3_its.c +++ b/hw/intc/arm_gicv3_its.c @@ -2005,7 +2005,6 @@ static void gicv3_its_post_load(GICv3ITSState *s) static const Property gicv3_its_props[] =3D { DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "arm-gicv3", GICv3State *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void gicv3_its_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 68a6144add8..3d9150a5c29 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_kvm.c @@ -237,7 +237,6 @@ static void kvm_arm_its_reset_hold(Object *obj, ResetTy= pe type) static const Property kvm_arm_its_props[] =3D { DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "kvm-arm-gicv3", GICv3State *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void kvm_arm_its_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 6e2803b1234..a30f31833a9 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -2577,7 +2577,6 @@ static const Property props_nvic[] =3D { * to use a reasonable default. */ DEFINE_PROP_UINT8("num-prio-bits", NVICState, num_prio_bits, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void armv7m_nvic_reset(DeviceState *dev) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 221dfa912a3..6ddbcd4c6df 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -327,7 +327,6 @@ static void exynos4210_combiner_init(Object *obj) =20 static const Property exynos4210_combiner_properties[] =3D { DEFINE_PROP_UINT32("external", Exynos4210CombinerState, external, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void exynos4210_combiner_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index e1b956d990c..01a53936d3a 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -113,7 +113,6 @@ static void exynos4210_gic_realize(DeviceState *dev, Er= ror **errp) =20 static const Property exynos4210_gic_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", Exynos4210GicState, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void exynos4210_gic_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/goldfish_pic.c b/hw/intc/goldfish_pic.c index f5343c9d2f8..aa5162c18fd 100644 --- a/hw/intc/goldfish_pic.c +++ b/hw/intc/goldfish_pic.c @@ -183,7 +183,6 @@ static void goldfish_pic_instance_init(Object *obj) =20 static const Property goldfish_pic_properties[] =3D { DEFINE_PROP_UINT8("index", GoldfishPICState, idx, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void goldfish_pic_class_init(ObjectClass *oc, void *data) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index bf53251ea25..95cdb411d2c 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -378,7 +378,6 @@ static void grlib_irqmp_realize(DeviceState *dev, Error= **errp) =20 static const Property grlib_irqmp_properties[] =3D { DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void grlib_irqmp_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index c3174f4fdc5..c77ff683bb8 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -198,7 +198,6 @@ static const Property pic_properties_common[] =3D { DEFINE_PROP_UINT32("elcr_addr", PICCommonState, elcr_addr, -1), DEFINE_PROP_UINT8("elcr_mask", PICCommonState, elcr_mask, -1), DEFINE_PROP_BIT("master", PICCommonState, master, 0, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pic_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 6d566165b02..bfc8cb7ece0 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -478,7 +478,6 @@ static void ioapic_unrealize(DeviceState *dev) =20 static const Property ioapic_properties[] =3D { DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DE= F), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ioapic_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c index dd91f893612..be7d3997fd2 100644 --- a/hw/intc/loongarch_extioi.c +++ b/hw/intc/loongarch_extioi.c @@ -427,7 +427,6 @@ static const Property extioi_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1), DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, featu= res, EXTIOI_HAS_VIRT_EXTENSION, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void loongarch_extioi_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/loongarch_pch_msi.c b/hw/intc/loongarch_pch_msi.c index e2eca306606..66b5c1e660e 100644 --- a/hw/intc/loongarch_pch_msi.c +++ b/hw/intc/loongarch_pch_msi.c @@ -86,7 +86,6 @@ static void loongarch_pch_msi_init(Object *obj) static const Property loongarch_msi_properties[] =3D { DEFINE_PROP_UINT32("msi_irq_base", LoongArchPCHMSI, irq_base, 0), DEFINE_PROP_UINT32("msi_irq_num", LoongArchPCHMSI, irq_num, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void loongarch_pch_msi_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c index 6a87b1aab73..dc93c90b3c7 100644 --- a/hw/intc/loongarch_pch_pic.c +++ b/hw/intc/loongarch_pch_pic.c @@ -413,7 +413,6 @@ static void loongarch_pch_pic_init(Object *obj) =20 static const Property loongarch_pch_pic_properties[] =3D { DEFINE_PROP_UINT32("pch_pic_irq_num", LoongArchPCHPIC, irq_num, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_loongarch_pch_pic =3D { diff --git a/hw/intc/loongson_ipi_common.c b/hw/intc/loongson_ipi_common.c index d3f894a5bd3..9a081565f51 100644 --- a/hw/intc/loongson_ipi_common.c +++ b/hw/intc/loongson_ipi_common.c @@ -317,7 +317,6 @@ static const VMStateDescription vmstate_loongson_ipi_co= mmon =3D { =20 static const Property ipi_common_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", LoongsonIPICommonState, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void loongson_ipi_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/m68k_irqc.c b/hw/intc/m68k_irqc.c index b5d10ab1f66..a82b80f5c6f 100644 --- a/hw/intc/m68k_irqc.c +++ b/hw/intc/m68k_irqc.c @@ -88,7 +88,6 @@ static const VMStateDescription vmstate_m68k_irqc =3D { static const Property m68k_irqc_properties[] =3D { DEFINE_PROP_LINK("m68k-cpu", M68KIRQCState, cpu, TYPE_M68K_CPU, ArchCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void m68k_irqc_class_init(ObjectClass *oc, void *data) diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 996db095c38..3f50eac38a1 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -441,7 +441,6 @@ static void mips_gic_realize(DeviceState *dev, Error **= errp) static const Property mips_gic_properties[] =3D { DEFINE_PROP_UINT32("num-vp", MIPSGICState, num_vps, 1), DEFINE_PROP_UINT32("num-irq", MIPSGICState, num_irq, 256), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mips_gic_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c index 28606f102b4..095a3d504f4 100644 --- a/hw/intc/omap_intc.c +++ b/hw/intc/omap_intc.c @@ -377,7 +377,6 @@ void omap_intc_set_fclk(OMAPIntcState *intc, omap_clk c= lk) =20 static const Property omap_intc_properties[] =3D { DEFINE_PROP_UINT32("size", OMAPIntcState, size, 0x100), - DEFINE_PROP_END_OF_LIST(), }; =20 static void omap_intc_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 8ee1bd64bd1..42af4567c66 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -130,7 +130,6 @@ static void or1k_ompic_realize(DeviceState *dev, Error = **errp) =20 static const Property or1k_ompic_properties[] =3D { DEFINE_PROP_UINT32("num-cpus", OR1KOMPICState, num_cpus, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_or1k_ompic_cpu =3D { diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 2257ae2ee78..78a82d0d30a 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -1609,7 +1609,6 @@ static void openpic_realize(DeviceState *dev, Error *= *errp) static const Property openpic_properties[] =3D { DEFINE_PROP_UINT32("model", OpenPICState, model, OPENPIC_MODEL_FSL_MPI= C_20), DEFINE_PROP_UINT32("nb_cpus", OpenPICState, nb_cpus, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void openpic_class_init(ObjectClass *oc, void *data) diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index 135fe8301af..3f5d7e58860 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -265,7 +265,6 @@ int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *= cs) static const Property kvm_openpic_properties[] =3D { DEFINE_PROP_UINT32("model", KVMOpenPICState, model, OPENPIC_MODEL_FSL_MPIC_20), - DEFINE_PROP_END_OF_LIST(), }; =20 static void kvm_openpic_class_init(ObjectClass *oc, void *data) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 581659839b2..fc5b5a97892 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -2066,7 +2066,6 @@ static const Property pnv_xive_properties[] =3D { DEFINE_PROP_UINT64("tm-bar", PnvXive, tm_base, 0), /* The PnvChip id identifies the XIVE interrupt controller. */ DEFINE_PROP_LINK("chip", PnvXive, chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_xive_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 5dd305453ae..ff36d4d03f9 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2366,7 +2366,6 @@ static const Property pnv_xive2_properties[] =3D { DEFINE_PROP_UINT64("config", PnvXive2, config, PNV_XIVE2_CONFIGURATION), DEFINE_PROP_LINK("chip", PnvXive2, chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_xive2_instance_init(Object *obj) diff --git a/hw/intc/ppc-uic.c b/hw/intc/ppc-uic.c index d683413a83e..7de4bf9885c 100644 --- a/hw/intc/ppc-uic.c +++ b/hw/intc/ppc-uic.c @@ -262,7 +262,6 @@ static void ppc_uic_realize(DeviceState *dev, Error **e= rrp) static const Property ppc_uic_properties[] =3D { DEFINE_PROP_UINT32("dcr-base", PPCUIC, dcr_base, 0xc0), DEFINE_PROP_BOOL("use-vectors", PPCUIC, use_vectors, true), - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription ppc_uic_vmstate =3D { diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c index db195fb1ff1..db374a7c2d2 100644 --- a/hw/intc/riscv_aclint.c +++ b/hw/intc/riscv_aclint.c @@ -274,7 +274,6 @@ static const Property riscv_aclint_mtimer_properties[] = =3D { aperture_size, RISCV_ACLINT_DEFAULT_MTIMER_SIZE), DEFINE_PROP_UINT32("timebase-freq", RISCVAclintMTimerState, timebase_freq, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void riscv_aclint_mtimer_realize(DeviceState *dev, Error **errp) @@ -466,7 +465,6 @@ static const Property riscv_aclint_swi_properties[] =3D= { DEFINE_PROP_UINT32("hartid-base", RISCVAclintSwiState, hartid_base, 0), DEFINE_PROP_UINT32("num-harts", RISCVAclintSwiState, num_harts, 1), DEFINE_PROP_UINT32("sswi", RISCVAclintSwiState, sswi, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void riscv_aclint_swi_realize(DeviceState *dev, Error **errp) diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c index 353eec81360..e160816d265 100644 --- a/hw/intc/riscv_aplic.c +++ b/hw/intc/riscv_aplic.c @@ -912,7 +912,6 @@ static const Property riscv_aplic_properties[] =3D { DEFINE_PROP_UINT32("num-irqs", RISCVAPLICState, num_irqs, 0), DEFINE_PROP_BOOL("msimode", RISCVAPLICState, msimode, 0), DEFINE_PROP_BOOL("mmode", RISCVAPLICState, mmode, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_riscv_aplic =3D { diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c index adc36151b4c..64b0da6d20a 100644 --- a/hw/intc/riscv_imsic.c +++ b/hw/intc/riscv_imsic.c @@ -393,7 +393,6 @@ static const Property riscv_imsic_properties[] =3D { DEFINE_PROP_UINT32("hartid", RISCVIMSICState, hartid, 0), DEFINE_PROP_UINT32("num-pages", RISCVIMSICState, num_pages, 0), DEFINE_PROP_UINT32("num-irqs", RISCVIMSICState, num_irqs, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_riscv_imsic =3D { diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c index dfe11ade200..ca13c5fb37b 100644 --- a/hw/intc/rx_icu.c +++ b/hw/intc/rx_icu.c @@ -366,7 +366,6 @@ static const Property rxicu_properties[] =3D { qdev_prop_uint8, uint8_t), DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense, qdev_prop_uint8, uint8_t), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rxicu_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index 2963bd5bd68..3f3fa939d37 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -448,7 +448,6 @@ static void qemu_s390_flic_instance_init(Object *obj) static const Property qemu_s390_flic_properties[] =3D { DEFINE_PROP_BOOL("migrate-all-state", QEMUS390FLICState, migrate_all_state, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void qemu_s390_flic_class_init(ObjectClass *oc, void *data) @@ -476,7 +475,6 @@ static const Property s390_flic_common_properties[] =3D= { adapter_routes_max_batch, ADAPTER_ROUTES_MAX_GSI), DEFINE_PROP_BOOL("migration-enabled", S390FLICState, migration_enabled, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void s390_flic_common_realize(DeviceState *dev, Error **errp) diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c index 49895be803d..52946fb7bd9 100644 --- a/hw/intc/sifive_plic.c +++ b/hw/intc/sifive_plic.c @@ -444,7 +444,6 @@ static const Property sifive_plic_properties[] =3D { DEFINE_PROP_UINT32("context-base", SiFivePLICState, context_base, 0), DEFINE_PROP_UINT32("context-stride", SiFivePLICState, context_stride, = 0), DEFINE_PROP_UINT32("aperture-size", SiFivePLICState, aperture_size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_plic_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 09f643d633a..897029a65a2 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -633,7 +633,6 @@ static const Property spapr_xive_properties[] =3D { DEFINE_PROP_UINT64("vc-base", SpaprXive, vc_base, SPAPR_XIVE_VC_BASE), DEFINE_PROP_UINT64("tm-base", SpaprXive, tm_base, SPAPR_XIVE_TM_BASE), DEFINE_PROP_UINT8("hv-prio", SpaprXive, hv_prio, 7), - DEFINE_PROP_END_OF_LIST(), }; =20 static int spapr_xive_cpu_intc_create(SpaprInterruptController *intc, diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 81bbfdd84b2..8852b68f876 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -348,7 +348,6 @@ static const Property icp_properties[] =3D { DEFINE_PROP_LINK(ICP_PROP_XICS, ICPState, xics, TYPE_XICS_FABRIC, XICSFabric *), DEFINE_PROP_LINK(ICP_PROP_CPU, ICPState, cs, TYPE_CPU, CPUState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void icp_class_init(ObjectClass *klass, void *data) @@ -680,7 +679,6 @@ static const Property ics_properties[] =3D { DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0), DEFINE_PROP_LINK(ICS_PROP_XICS, ICSState, xics, TYPE_XICS_FABRIC, XICSFabric *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ics_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 3e860ab582a..d99cf567aeb 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -178,7 +178,6 @@ static void xilinx_intc_init(Object *obj) =20 static const Property xilinx_intc_properties[] =3D { DEFINE_PROP_UINT32("kind-of-intr", XpsIntc, c_kind_of_intr, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_intc_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 308e5743bdb..3cf8780b8a2 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -931,7 +931,6 @@ static const Property xive_tctx_properties[] =3D { DEFINE_PROP_LINK("cpu", XiveTCTX, cs, TYPE_CPU, CPUState *), DEFINE_PROP_LINK("presenter", XiveTCTX, xptr, TYPE_XIVE_PRESENTER, XivePresenter *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive_tctx_class_init(ObjectClass *klass, void *data) @@ -1414,7 +1413,6 @@ static const Property xive_source_properties[] =3D { DEFINE_PROP_UINT8("reset-pq", XiveSource, reset_pq, XIVE_ESB_OFF), DEFINE_PROP_LINK("xive", XiveSource, xive, TYPE_XIVE_NOTIFIER, XiveNotifier *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive_source_class_init(ObjectClass *klass, void *data) @@ -2005,7 +2003,6 @@ void xive_router_notify(XiveNotifier *xn, uint32_t li= sn, bool pq_checked) static const Property xive_router_properties[] =3D { DEFINE_PROP_LINK("xive-fabric", XiveRouter, xfb, TYPE_XIVE_FABRIC, XiveFabric *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive_router_class_init(ObjectClass *klass, void *data) @@ -2175,7 +2172,6 @@ static const Property xive_end_source_properties[] = =3D { DEFINE_PROP_UINT32("shift", XiveENDSource, esb_shift, XIVE_ESB_64K), DEFINE_PROP_LINK("xive", XiveENDSource, xrtr, TYPE_XIVE_ROUTER, XiveRouter *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive_end_source_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 3233d3f14e0..07a90c900fc 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -1031,7 +1031,6 @@ void xive2_router_notify(XiveNotifier *xn, uint32_t l= isn, bool pq_checked) static const Property xive2_router_properties[] =3D { DEFINE_PROP_LINK("xive-fabric", Xive2Router, xfb, TYPE_XIVE_FABRIC, XiveFabric *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive2_router_class_init(ObjectClass *klass, void *data) @@ -1247,7 +1246,6 @@ static const Property xive2_end_source_properties[] = =3D { DEFINE_PROP_UINT32("shift", Xive2EndSource, esb_shift, XIVE_ESB_64K), DEFINE_PROP_LINK("xive", Xive2EndSource, xrtr, TYPE_XIVE2_ROUTER, Xive2Router *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xive2_end_source_class_init(ObjectClass *klass, void *data) diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c index 21b9c836581..ccdab244b3a 100644 --- a/hw/intc/xlnx-pmu-iomod-intc.c +++ b/hw/intc/xlnx-pmu-iomod-intc.c @@ -478,7 +478,6 @@ static const Property xlnx_pmu_io_intc_properties[] =3D= { DEFINE_PROP_UINT32("intc-intr-size", XlnxPMUIOIntc, cfg.intr_size, 0), DEFINE_PROP_UINT32("intc-level-edge", XlnxPMUIOIntc, cfg.level_edge, 0= ), DEFINE_PROP_UINT32("intc-positive", XlnxPMUIOIntc, cfg.positive, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xlnx_pmu_io_intc_realize(DeviceState *dev, Error **errp) diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c index 7ffc4ffe6fa..ed75f791832 100644 --- a/hw/ipack/ipack.c +++ b/hw/ipack/ipack.c @@ -75,7 +75,6 @@ static void ipack_device_unrealize(DeviceState *dev) =20 static const Property ipack_device_props[] =3D { DEFINE_PROP_INT32("slot", IPackDevice, slot, -1), - DEFINE_PROP_END_OF_LIST() }; =20 static void ipack_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/ipmi/ipmi.c b/hw/ipmi/ipmi.c index 850b3bc4630..047bb90be9b 100644 --- a/hw/ipmi/ipmi.c +++ b/hw/ipmi/ipmi.c @@ -110,7 +110,6 @@ void ipmi_bmc_find_and_link(Object *obj, Object **bmc) =20 static const Property ipmi_bmc_properties[] =3D { DEFINE_PROP_UINT8("slave_addr", IPMIBmc, slave_addr, 0x20), - DEFINE_PROP_END_OF_LIST(), }; =20 static void bmc_class_init(ObjectClass *oc, void *data) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index cfec1da87c6..d015500254a 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -517,7 +517,6 @@ static void ipmi_bmc_extern_finalize(Object *obj) =20 static const Property ipmi_bmc_extern_properties[] =3D { DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 8a55893e89b..eb2eecd46ad 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bmc_sim.c @@ -2203,7 +2203,6 @@ static const Property ipmi_sim_properties[] =3D { DEFINE_PROP_UINT32("mfg_id", IPMIBmcSim, mfg_id, 0), DEFINE_PROP_UINT16("product_id", IPMIBmcSim, product_id, 0), DEFINE_PROP_UUID_NODEFAULT("guid", IPMIBmcSim, uuid), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ipmi_sim_class_init(ObjectClass *oc, void *data) diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c index 16062abb311..a1b66d5ee82 100644 --- a/hw/ipmi/isa_ipmi_bt.c +++ b/hw/ipmi/isa_ipmi_bt.c @@ -138,7 +138,6 @@ static void *isa_ipmi_bt_get_backend_data(IPMIInterface= *ii) static const Property ipmi_isa_properties[] =3D { DEFINE_PROP_UINT32("ioport", ISAIPMIBTDevice, bt.io_base, 0xe4), DEFINE_PROP_INT32("irq", ISAIPMIBTDevice, isairq, 5), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data) diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c index 7e7a37659ef..d9ebdd5371f 100644 --- a/hw/ipmi/isa_ipmi_kcs.c +++ b/hw/ipmi/isa_ipmi_kcs.c @@ -145,7 +145,6 @@ static void *isa_ipmi_kcs_get_backend_data(IPMIInterfac= e *ii) static const Property ipmi_isa_properties[] =3D { DEFINE_PROP_UINT32("ioport", ISAIPMIKCSDevice, kcs.io_base, 0xca2), DEFINE_PROP_INT32("irq", ISAIPMIKCSDevice, isairq, 5), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 378244aa8fc..0f94378a1d6 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -840,7 +840,6 @@ static const Property ich9_lpc_properties[] =3D { pm.swsmi_timer_enabled, true), DEFINE_PROP_BOOL("x-smi-periodic-timer", ICH9LPCState, pm.periodic_timer_enabled, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index 7bb2af817dc..5f5868442ab 100644 --- a/hw/isa/pc87312.c +++ b/hw/isa/pc87312.c @@ -330,7 +330,6 @@ static const VMStateDescription vmstate_pc87312 =3D { static const Property pc87312_properties[] =3D { DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398), DEFINE_PROP_UINT8("config", PC87312State, config, 1), - DEFINE_PROP_END_OF_LIST() }; =20 static void pc87312_class_init(ObjectClass *klass, void *data) diff --git a/hw/isa/piix.c b/hw/isa/piix.c index 8ec9c63b8a0..eabf2567318 100644 --- a/hw/isa/piix.c +++ b/hw/isa/piix.c @@ -415,7 +415,6 @@ static const Property pci_piix_props[] =3D { DEFINE_PROP_BOOL("has-pit", PIIXState, has_pit, true), DEFINE_PROP_BOOL("has-usb", PIIXState, has_usb, true), DEFINE_PROP_BOOL("smm-enabled", PIIXState, smm_enabled, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pci_piix_class_init(ObjectClass *klass, void *data) diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c index 45e5f746009..395c49fea76 100644 --- a/hw/m68k/mcf5206.c +++ b/hw/m68k/mcf5206.c @@ -603,7 +603,6 @@ static void mcf5206_mbar_realize(DeviceState *dev, Erro= r **errp) static const Property mcf5206_mbar_properties[] =3D { DEFINE_PROP_LINK("m68k-cpu", m5206_mbar_state, cpu, TYPE_M68K_CPU, M68kCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mcf5206_mbar_class_init(ObjectClass *oc, void *data) diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c index c24b0b715d6..008626f8130 100644 --- a/hw/m68k/mcf_intc.c +++ b/hw/m68k/mcf_intc.c @@ -180,7 +180,6 @@ static void mcf_intc_instance_init(Object *obj) static const Property mcf_intc_properties[] =3D { DEFINE_PROP_LINK("m68k-cpu", mcf_intc_state, cpu, TYPE_M68K_CPU, M68kCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mcf_intc_class_init(ObjectClass *oc, void *data) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index a37ce008740..e4fb5013de0 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -916,7 +916,6 @@ static void next_pc_realize(DeviceState *dev, Error **e= rrp) */ static const Property next_pc_properties[] =3D { DEFINE_PROP_LINK("cpu", NeXTPC, cpu, TYPE_M68K_CPU, M68kCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription next_rtc_vmstate =3D { diff --git a/hw/m68k/q800-glue.c b/hw/m68k/q800-glue.c index 0d8cb8b1cb7..168665b3829 100644 --- a/hw/m68k/q800-glue.c +++ b/hw/m68k/q800-glue.c @@ -205,7 +205,6 @@ static const VMStateDescription vmstate_glue =3D { */ static const Property glue_properties[] =3D { DEFINE_PROP_LINK("cpu", GLUEState, cpu, TYPE_M68K_CPU, M68kCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void glue_finalize(Object *obj) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 12205c4d320..b553c7d6469 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem/cxl_type3.c @@ -1234,7 +1234,6 @@ static const Property ct3_props[] =3D { speed, PCIE_LINK_SPEED_32), DEFINE_PROP_PCIE_LINK_WIDTH("x-width", CXLType3Dev, width, PCIE_LINK_WIDTH_16), - DEFINE_PROP_END_OF_LIST(), }; =20 static uint64_t get_lsa_size(CXLType3Dev *ct3d) diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index 10506d52e4c..51362cfe92b 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -248,7 +248,6 @@ static void nvdimm_write_label_data(NVDIMMDevice *nvdim= m, const void *buf, =20 static const Property nvdimm_properties[] =3D { DEFINE_PROP_BOOL(NVDIMM_UNARMED_PROP, NVDIMMDevice, unarmed, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nvdimm_class_init(ObjectClass *oc, void *data) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 49c5f9fd44a..dca3db7a36f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -157,7 +157,6 @@ static const Property pc_dimm_properties[] =3D { PC_DIMM_UNASSIGNED_SLOT), DEFINE_PROP_LINK(PC_DIMM_MEMDEV_PROP, PCDIMMDevice, hostmem, TYPE_MEMORY_BACKEND, HostMemoryBackend *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pc_dimm_get_size(Object *obj, Visitor *v, const char *name, diff --git a/hw/mem/sparse-mem.c b/hw/mem/sparse-mem.c index 8d681adfc0b..375d7286848 100644 --- a/hw/mem/sparse-mem.c +++ b/hw/mem/sparse-mem.c @@ -103,7 +103,6 @@ static const Property sparse_mem_properties[] =3D { DEFINE_PROP_UINT64("length", SparseMemState, length, UINT64_MAX), /* Max amount of actual memory that can be used to back the sparse mem= ory */ DEFINE_PROP_UINT64("maxsize", SparseMemState, maxsize, 10 * MiB), - DEFINE_PROP_END_OF_LIST(), }; =20 MemoryRegion *sparse_mem_init(uint64_t addr, uint64_t length) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 1a2208666cc..f8c17f3f2b9 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -171,7 +171,6 @@ static const Property mips_cps_properties[] =3D { DEFINE_PROP_UINT32("num-irq", MIPSCPSState, num_irq, 256), DEFINE_PROP_STRING("cpu-type", MIPSCPSState, cpu_type), DEFINE_PROP_BOOL("cpu-big-endian", MIPSCPSState, cpu_is_bigendian, fal= se), - DEFINE_PROP_END_OF_LIST() }; =20 static void mips_cps_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c index e2d73edde88..088d4adb0d5 100644 --- a/hw/misc/a9scu.c +++ b/hw/misc/a9scu.c @@ -125,7 +125,6 @@ static const VMStateDescription vmstate_a9_scu =3D { =20 static const Property a9_scu_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", A9SCUState, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void a9_scu_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c index 247bf62c43c..13bba26d0e4 100644 --- a/hw/misc/allwinner-h3-dramc.c +++ b/hw/misc/allwinner-h3-dramc.c @@ -317,7 +317,6 @@ static void allwinner_h3_dramc_init(Object *obj) static const Property allwinner_h3_dramc_properties[] =3D { DEFINE_PROP_UINT64("ram-addr", AwH3DramCtlState, ram_addr, 0x0), DEFINE_PROP_UINT32("ram-size", AwH3DramCtlState, ram_size, 256 * MiB), - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription allwinner_h3_dramc_vmstate =3D { diff --git a/hw/misc/allwinner-r40-dramc.c b/hw/misc/allwinner-r40-dramc.c index a51284ff91f..97c3664e3a3 100644 --- a/hw/misc/allwinner-r40-dramc.c +++ b/hw/misc/allwinner-r40-dramc.c @@ -467,7 +467,6 @@ static void allwinner_r40_dramc_init(Object *obj) static const Property allwinner_r40_dramc_properties[] =3D { DEFINE_PROP_UINT64("ram-addr", AwR40DramCtlState, ram_addr, 0x0), DEFINE_PROP_UINT32("ram-size", AwR40DramCtlState, ram_size, 256), /* M= iB */ - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription allwinner_r40_dramc_vmstate =3D { diff --git a/hw/misc/allwinner-sid.c b/hw/misc/allwinner-sid.c index 3a09dca1119..042b747f30b 100644 --- a/hw/misc/allwinner-sid.c +++ b/hw/misc/allwinner-sid.c @@ -129,7 +129,6 @@ static void allwinner_sid_init(Object *obj) =20 static const Property allwinner_sid_properties[] =3D { DEFINE_PROP_UUID_NODEFAULT("identifier", AwSidState, identifier), - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription allwinner_sid_vmstate =3D { diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 9d0e273e336..97ea842d60c 100644 --- a/hw/misc/applesmc.c +++ b/hw/misc/applesmc.c @@ -354,7 +354,6 @@ static const Property applesmc_isa_properties[] =3D { DEFINE_PROP_UINT32(APPLESMC_PROP_IO_BASE, AppleSMCState, iobase, APPLESMC_DEFAULT_IOBASE), DEFINE_PROP_STRING("osk", AppleSMCState, osk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void build_applesmc_aml(AcpiDevAmlIf *adev, Aml *scope) diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c index 37feed9da73..02493cec31b 100644 --- a/hw/misc/arm11scu.c +++ b/hw/misc/arm11scu.c @@ -77,7 +77,6 @@ static void arm11_scu_init(Object *obj) =20 static const Property arm11_scu_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", ARM11SCUState, num_cpu, 1), - DEFINE_PROP_END_OF_LIST() }; =20 static void arm11_scu_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c index 9c209f13b03..39b4642da7d 100644 --- a/hw/misc/arm_l2x0.c +++ b/hw/misc/arm_l2x0.c @@ -175,7 +175,6 @@ static void l2x0_priv_init(Object *obj) =20 static const Property l2x0_properties[] =3D { DEFINE_PROP_UINT32("cache-type", L2x0State, cache_type, 0x1c100100), - DEFINE_PROP_END_OF_LIST(), }; =20 static void l2x0_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c index 69e379fa107..1c25d51b968 100644 --- a/hw/misc/arm_sysctl.c +++ b/hw/misc/arm_sysctl.c @@ -632,7 +632,6 @@ static const Property arm_sysctl_properties[] =3D { /* Daughterboard clock reset values (as reported via SYS_CFG) */ DEFINE_PROP_ARRAY("db-clock", arm_sysctl_state, db_num_clocks, db_clock_reset, qdev_prop_uint32, uint32_t), - DEFINE_PROP_END_OF_LIST(), }; =20 static void arm_sysctl_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/armsse-cpuid.c b/hw/misc/armsse-cpuid.c index b05bcdcabc4..58cb37333f0 100644 --- a/hw/misc/armsse-cpuid.c +++ b/hw/misc/armsse-cpuid.c @@ -94,7 +94,6 @@ static const MemoryRegionOps armsse_cpuid_ops =3D { =20 static const Property armsse_cpuid_props[] =3D { DEFINE_PROP_UINT32("CPUID", ARMSSECPUID, cpuid, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void armsse_cpuid_init(Object *obj) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index 5cefbadf9a0..e3f7df2e862 100644 --- a/hw/misc/aspeed_hace.c +++ b/hw/misc/aspeed_hace.c @@ -439,7 +439,6 @@ static void aspeed_hace_realize(DeviceState *dev, Error= **errp) static const Property aspeed_hace_properties[] =3D { DEFINE_PROP_LINK("dram", AspeedHACEState, dram_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 =20 diff --git a/hw/misc/aspeed_i3c.c b/hw/misc/aspeed_i3c.c index 7f5a3898644..ab39c6435b5 100644 --- a/hw/misc/aspeed_i3c.c +++ b/hw/misc/aspeed_i3c.c @@ -325,7 +325,6 @@ static void aspeed_i3c_realize(DeviceState *dev, Error = **errp) =20 static const Property aspeed_i3c_device_properties[] =3D { DEFINE_PROP_UINT8("device-id", AspeedI3CDevice, id, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_i3c_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/aspeed_lpc.c b/hw/misc/aspeed_lpc.c index bb9066b0f07..228d250dc03 100644 --- a/hw/misc/aspeed_lpc.c +++ b/hw/misc/aspeed_lpc.c @@ -456,7 +456,6 @@ static const VMStateDescription vmstate_aspeed_lpc =3D { =20 static const Property aspeed_lpc_properties[] =3D { DEFINE_PROP_UINT32("hicr7", AspeedLPCState, hicr7, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_lpc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c index b97cf51fa19..e4a6bd15818 100644 --- a/hw/misc/aspeed_sbc.c +++ b/hw/misc/aspeed_sbc.c @@ -139,7 +139,6 @@ static const VMStateDescription vmstate_aspeed_sbc =3D { static const Property aspeed_sbc_properties[] =3D { DEFINE_PROP_BOOL("emmc-abr", AspeedSBCState, emmc_abr, 0), DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_setting= s, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_sbc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index ac33b8d6cbd..bac1441b061 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -607,7 +607,6 @@ static const Property aspeed_scu_properties[] =3D { DEFINE_PROP_UINT32("hw-strap1", AspeedSCUState, hw_strap1, 0), DEFINE_PROP_UINT32("hw-strap2", AspeedSCUState, hw_strap2, 0), DEFINE_PROP_UINT32("hw-prot-key", AspeedSCUState, hw_prot_key, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_scu_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 4980080f741..f359640a9a5 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -297,7 +297,6 @@ static const VMStateDescription vmstate_aspeed_sdmc =3D= { static const Property aspeed_sdmc_properties[] =3D { DEFINE_PROP_UINT64("max-ram-size", AspeedSDMCState, max_ram_size, 0), DEFINE_PROP_BOOL("unlocked", AspeedSDMCState, unlocked, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_sdmc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/bcm2835_cprman.c b/hw/misc/bcm2835_cprman.c index 1a20cd0bc8a..aa14cd931f5 100644 --- a/hw/misc/bcm2835_cprman.c +++ b/hw/misc/bcm2835_cprman.c @@ -780,7 +780,6 @@ static const VMStateDescription cprman_vmstate =3D { =20 static const Property cprman_properties[] =3D { DEFINE_PROP_UINT32("xosc-freq-hz", BCM2835CprmanState, xosc_freq, 1920= 0000), - DEFINE_PROP_END_OF_LIST() }; =20 static void cprman_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index 09a6f2c6e3e..fde66cd590d 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -554,7 +554,6 @@ static void bcm2835_property_realize(DeviceState *dev, = Error **errp) static const Property bcm2835_property_props[] =3D { DEFINE_PROP_UINT32("board-rev", BCM2835PropertyState, board_rev, 0), DEFINE_PROP_STRING("command-line", BCM2835PropertyState, command_line), - DEFINE_PROP_END_OF_LIST() }; =20 static void bcm2835_property_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c index 639a8cc3e3e..260537bba3c 100644 --- a/hw/misc/debugexit.c +++ b/hw/misc/debugexit.c @@ -59,7 +59,6 @@ static void debug_exit_realizefn(DeviceState *d, Error **= errp) static const Property debug_exit_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISADebugExitState, iobase, 0x501), DEFINE_PROP_UINT32("iosize", ISADebugExitState, iosize, 0x02), - DEFINE_PROP_END_OF_LIST(), }; =20 static void debug_exit_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/misc/eccmemctl.c b/hw/misc/eccmemctl.c index 4fc88bd4e57..d7452c4cc8a 100644 --- a/hw/misc/eccmemctl.c +++ b/hw/misc/eccmemctl.c @@ -327,7 +327,6 @@ static void ecc_realize(DeviceState *dev, Error **errp) =20 static const Property ecc_properties[] =3D { DEFINE_PROP_UINT32("version", ECCState, version, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ecc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/empty_slot.c b/hw/misc/empty_slot.c index 79572c5be03..221ea7cb54d 100644 --- a/hw/misc/empty_slot.c +++ b/hw/misc/empty_slot.c @@ -82,7 +82,6 @@ static void empty_slot_realize(DeviceState *dev, Error **= errp) static const Property empty_slot_properties[] =3D { DEFINE_PROP_UINT64("size", EmptySlot, size, 0), DEFINE_PROP_STRING("name", EmptySlot, name), - DEFINE_PROP_END_OF_LIST(), }; =20 static void empty_slot_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/iotkit-secctl.c b/hw/misc/iotkit-secctl.c index abb6a963cae..04ced3559c2 100644 --- a/hw/misc/iotkit-secctl.c +++ b/hw/misc/iotkit-secctl.c @@ -816,7 +816,6 @@ static const VMStateDescription iotkit_secctl_vmstate = =3D { =20 static const Property iotkit_secctl_props[] =3D { DEFINE_PROP_UINT32("sse-version", IoTKitSecCtl, sse_version, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void iotkit_secctl_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/iotkit-sysctl.c b/hw/misc/iotkit-sysctl.c index 23b49d7dff3..57ffdc3d025 100644 --- a/hw/misc/iotkit-sysctl.c +++ b/hw/misc/iotkit-sysctl.c @@ -842,7 +842,6 @@ static const Property iotkit_sysctl_props[] =3D { 0x10000000), DEFINE_PROP_UINT32("INITSVTOR1_RST", IoTKitSysCtl, initsvtor1_rst, 0x10000000), - DEFINE_PROP_END_OF_LIST() }; =20 static void iotkit_sysctl_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/iotkit-sysinfo.c b/hw/misc/iotkit-sysinfo.c index 7d4eea6bfbf..75260f7fabb 100644 --- a/hw/misc/iotkit-sysinfo.c +++ b/hw/misc/iotkit-sysinfo.c @@ -136,7 +136,6 @@ static const Property iotkit_sysinfo_props[] =3D { DEFINE_PROP_UINT32("SYS_CONFIG", IoTKitSysInfo, sys_config, 0), DEFINE_PROP_UINT32("sse-version", IoTKitSysInfo, sse_version, 0), DEFINE_PROP_UINT32("IIDR", IoTKitSysInfo, iidr, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void iotkit_sysinfo_init(Object *obj) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 6d735ec29fe..8f9e1f2fc63 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -1026,7 +1026,6 @@ static const Property ivshmem_plain_properties[] =3D { DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OF= F), DEFINE_PROP_LINK("memdev", IVShmemState, hostmem, TYPE_MEMORY_BACKEND, HostMemoryBackend *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ivshmem_plain_realize(PCIDevice *dev, Error **errp) @@ -1083,7 +1082,6 @@ static const Property ivshmem_doorbell_properties[] = =3D { DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD, true), DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OF= F), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ivshmem_doorbell_init(Object *obj) diff --git a/hw/misc/led.c b/hw/misc/led.c index 76efdbc3f16..9364d9945ec 100644 --- a/hw/misc/led.c +++ b/hw/misc/led.c @@ -105,7 +105,6 @@ static const Property led_properties[] =3D { DEFINE_PROP_STRING("color", LEDState, color), DEFINE_PROP_STRING("description", LEDState, description), DEFINE_PROP_BOOL("gpio-active-high", LEDState, gpio_active_high, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void led_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index a376a2b8a02..5d16bff12cb 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -1324,7 +1324,6 @@ static const VMStateDescription vmstate_q800_via1 =3D= { =20 static const Property mos6522_q800_via1_properties[] =3D { DEFINE_PROP_DRIVE("drive", MOS6522Q800VIA1State, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mos6522_q800_via1_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index cfc8afd1dc2..270adcb0cdc 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -556,7 +556,6 @@ static void cuda_init(Object *obj) =20 static const Property cuda_properties[] =3D { DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void cuda_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 7e3d5aa977e..194b152effe 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -408,7 +408,6 @@ static const VMStateDescription vmstate_macio_newworld = =3D { static const Property macio_newworld_properties[] =3D { DEFINE_PROP_BOOL("has-pmu", NewWorldMacIOState, has_pmu, false), DEFINE_PROP_BOOL("has-adb", NewWorldMacIOState, has_adb, false), - DEFINE_PROP_END_OF_LIST() }; =20 static void macio_newworld_class_init(ObjectClass *oc, void *data) @@ -424,7 +423,6 @@ static void macio_newworld_class_init(ObjectClass *oc, = void *data) =20 static const Property macio_properties[] =3D { DEFINE_PROP_UINT64("frequency", MacIOState, frequency, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void macio_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 64bf44f67f6..47ebb8e8c0f 100644 --- a/hw/misc/macio/pmu.c +++ b/hw/misc/macio/pmu.c @@ -762,7 +762,6 @@ static void pmu_init(Object *obj) =20 static const Property pmu_properties[] =3D { DEFINE_PROP_BOOL("has-adb", PMUState, has_adb, true), - DEFINE_PROP_END_OF_LIST() }; =20 static void pmu_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c index 80ca224f76c..95f19912b46 100644 --- a/hw/misc/mips_cmgcr.c +++ b/hw/misc/mips_cmgcr.c @@ -219,7 +219,6 @@ static const Property mips_gcr_properties[] =3D { MemoryRegion *), DEFINE_PROP_LINK("cpc", MIPSGCRState, cpc_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mips_gcr_realize(DeviceState *dev, Error **errp) diff --git a/hw/misc/mips_cpc.c b/hw/misc/mips_cpc.c index 86ff0f7ad89..772b8c0017d 100644 --- a/hw/misc/mips_cpc.c +++ b/hw/misc/mips_cpc.c @@ -166,7 +166,6 @@ static const VMStateDescription vmstate_mips_cpc =3D { static const Property mips_cpc_properties[] =3D { DEFINE_PROP_UINT32("num-vp", MIPSCPCState, num_vp, 0x1), DEFINE_PROP_UINT64("vp-start-running", MIPSCPCState, vp_start_running,= 0x1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mips_cpc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index d84a7dbf152..2d126ebaf85 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -538,7 +538,6 @@ static const Property mips_itu_properties[] =3D { ITC_FIFO_NUM_MAX), DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores, ITC_SEMAPH_NUM_MAX), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mips_itu_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c index 0225a5869bf..0b8f6a4cb4c 100644 --- a/hw/misc/mos6522.c +++ b/hw/misc/mos6522.c @@ -698,7 +698,6 @@ static void mos6522_finalize(Object *obj) =20 static const Property mos6522_properties[] =3D { DEFINE_PROP_UINT64("frequency", MOS6522State, frequency, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void mos6522_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/mps2-fpgaio.c b/hw/misc/mps2-fpgaio.c index 2e8d1c721c1..d07568248d6 100644 --- a/hw/misc/mps2-fpgaio.c +++ b/hw/misc/mps2-fpgaio.c @@ -326,7 +326,6 @@ static const Property mps2_fpgaio_properties[] =3D { DEFINE_PROP_UINT32("num-leds", MPS2FPGAIO, num_leds, 2), DEFINE_PROP_BOOL("has-switches", MPS2FPGAIO, has_switches, false), DEFINE_PROP_BOOL("has-dbgctrl", MPS2FPGAIO, has_dbgctrl, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mps2_fpgaio_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c index f378b755714..5f8d6bca43b 100644 --- a/hw/misc/mps2-scc.c +++ b/hw/misc/mps2-scc.c @@ -472,7 +472,6 @@ static const Property mps2_scc_properties[] =3D { */ DEFINE_PROP_ARRAY("oscclk", MPS2SCC, num_oscclk, oscclk_reset, qdev_prop_uint32, uint32_t), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mps2_scc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/msf2-sysreg.c b/hw/misc/msf2-sysreg.c index 0d7a713c766..20009adbd95 100644 --- a/hw/misc/msf2-sysreg.c +++ b/hw/misc/msf2-sysreg.c @@ -122,7 +122,6 @@ static const Property msf2_sysreg_properties[] =3D { /* default divisors in Libero GUI */ DEFINE_PROP_UINT8("apb0divisor", MSF2SysregState, apb0div, 2), DEFINE_PROP_UINT8("apb1divisor", MSF2SysregState, apb1div, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void msf2_sysreg_realize(DeviceState *dev, Error **errp) diff --git a/hw/misc/npcm7xx_gcr.c b/hw/misc/npcm7xx_gcr.c index 17aeaf22cbd..07464a4dc93 100644 --- a/hw/misc/npcm7xx_gcr.c +++ b/hw/misc/npcm7xx_gcr.c @@ -232,7 +232,6 @@ static const VMStateDescription vmstate_npcm7xx_gcr =3D= { static const Property npcm7xx_gcr_properties[] =3D { DEFINE_PROP_UINT32("disabled-modules", NPCM7xxGCRState, reset_mdlr, 0), DEFINE_PROP_UINT32("power-on-straps", NPCM7xxGCRState, reset_pwron, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_gcr_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/nrf51_rng.c b/hw/misc/nrf51_rng.c index 2b550a6bcab..1e67acdf234 100644 --- a/hw/misc/nrf51_rng.c +++ b/hw/misc/nrf51_rng.c @@ -224,7 +224,6 @@ static const Property nrf51_rng_properties[] =3D { period_unfiltered_us, 167), DEFINE_PROP_UINT16("period_filtered_us", NRF51RNGState, period_filtered_us, 660), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_rng =3D { diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c index 7927397a23a..ca6a3884310 100644 --- a/hw/misc/pci-testdev.c +++ b/hw/misc/pci-testdev.c @@ -321,7 +321,6 @@ static void qdev_pci_testdev_reset(DeviceState *dev) =20 static const Property pci_testdev_properties[] =3D { DEFINE_PROP_SIZE("membar", PCITestDevState, membar_size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pci_testdev_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c index 824a2e4528c..f9a3156a5c0 100644 --- a/hw/misc/pvpanic-isa.c +++ b/hw/misc/pvpanic-isa.c @@ -102,7 +102,6 @@ static const Property pvpanic_isa_properties[] =3D { DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505= ), DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events, PVPANIC_EVENTS), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pvpanic_isa_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c index 1c3eafc1377..967842359f0 100644 --- a/hw/misc/pvpanic-pci.c +++ b/hw/misc/pvpanic-pci.c @@ -56,7 +56,6 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error *= *errp) static const Property pvpanic_pci_properties[] =3D { DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events, PVPANIC_EVENTS), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pvpanic_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/sifive_e_aon.c b/hw/misc/sifive_e_aon.c index c48429b1315..165e41dfc3d 100644 --- a/hw/misc/sifive_e_aon.c +++ b/hw/misc/sifive_e_aon.c @@ -292,7 +292,6 @@ static void sifive_e_aon_init(Object *obj) static const Property sifive_e_aon_properties[] =3D { DEFINE_PROP_UINT64("wdogclk-frequency", SiFiveEAONState, wdogclk_freq, SIFIVE_E_LFCLK_DEFAULT_FREQ), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_e_aon_class_init(ObjectClass *oc, void *data) diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c index 32cd8e8dfbd..955134af0d0 100644 --- a/hw/misc/sifive_u_otp.c +++ b/hw/misc/sifive_u_otp.c @@ -197,7 +197,6 @@ static const MemoryRegionOps sifive_u_otp_ops =3D { static const Property sifive_u_otp_properties[] =3D { DEFINE_PROP_UINT32("serial", SiFiveUOTPState, serial, 0), DEFINE_PROP_DRIVE("drive", SiFiveUOTPState, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_u_otp_realize(DeviceState *dev, Error **errp) diff --git a/hw/misc/stm32l4x5_rcc.c b/hw/misc/stm32l4x5_rcc.c index b61241d1954..fd8466dff34 100644 --- a/hw/misc/stm32l4x5_rcc.c +++ b/hw/misc/stm32l4x5_rcc.c @@ -1433,7 +1433,6 @@ static const Property stm32l4x5_rcc_properties[] =3D { sai1_extclk_frequency, 0), DEFINE_PROP_UINT64("sai2_extclk_frequency", Stm32l4x5RccState, sai2_extclk_frequency, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stm32l4x5_rcc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/tz-mpc.c b/hw/misc/tz-mpc.c index b06eb9f119f..6d827d21dc2 100644 --- a/hw/misc/tz-mpc.c +++ b/hw/misc/tz-mpc.c @@ -590,7 +590,6 @@ static const VMStateDescription tz_mpc_vmstate =3D { static const Property tz_mpc_properties[] =3D { DEFINE_PROP_LINK("downstream", TZMPC, downstream, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tz_mpc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/tz-msc.c b/hw/misc/tz-msc.c index 96413a502da..505df4e1902 100644 --- a/hw/misc/tz-msc.c +++ b/hw/misc/tz-msc.c @@ -283,7 +283,6 @@ static const Property tz_msc_properties[] =3D { TYPE_MEMORY_REGION, MemoryRegion *), DEFINE_PROP_LINK("idau", TZMSC, idau, TYPE_IDAU_INTERFACE, IDAUInterface *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tz_msc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/tz-ppc.c b/hw/misc/tz-ppc.c index 1943d8d165a..1daa54c5e69 100644 --- a/hw/misc/tz-ppc.c +++ b/hw/misc/tz-ppc.c @@ -323,7 +323,6 @@ static const Property tz_ppc_properties[] =3D { DEFINE_PORT(13), DEFINE_PORT(14), DEFINE_PORT(15), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tz_ppc_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index 62e1153627f..257282a3a9d 100644 --- a/hw/misc/unimp.c +++ b/hw/misc/unimp.c @@ -73,7 +73,6 @@ static void unimp_realize(DeviceState *dev, Error **errp) static const Property unimp_properties[] =3D { DEFINE_PROP_UINT64("size", UnimplementedDeviceState, size, 0), DEFINE_PROP_STRING("name", UnimplementedDeviceState, name), - DEFINE_PROP_END_OF_LIST(), }; =20 static void unimp_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/xlnx-versal-cframe-reg.c b/hw/misc/xlnx-versal-cframe-= reg.c index 8281a9bafff..8db0f7e6589 100644 --- a/hw/misc/xlnx-versal-cframe-reg.c +++ b/hw/misc/xlnx-versal-cframe-reg.c @@ -737,7 +737,6 @@ static const Property cframe_regs_props[] =3D { cfg.blktype_num_frames[5], 0), DEFINE_PROP_UINT32("blktype6-frames", XlnxVersalCFrameReg, cfg.blktype_num_frames[6], 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cframe_bcast_reg_init(Object *obj) @@ -802,7 +801,6 @@ static const Property cframe_bcast_regs_props[] =3D { TYPE_XLNX_CFI_IF, XlnxCfiIf *), DEFINE_PROP_LINK("cframe14", XlnxVersalCFrameBcastReg, cfg.cframe[14], TYPE_XLNX_CFI_IF, XlnxCfiIf *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void cframe_reg_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/xlnx-versal-cfu.c b/hw/misc/xlnx-versal-cfu.c index 7cfdabdb8e1..26d06e2557d 100644 --- a/hw/misc/xlnx-versal-cfu.c +++ b/hw/misc/xlnx-versal-cfu.c @@ -457,13 +457,11 @@ static const Property cfu_props[] =3D { TYPE_XLNX_CFI_IF, XlnxCfiIf *), DEFINE_PROP_LINK("cframe14", XlnxVersalCFUAPB, cfg.cframe[14], TYPE_XLNX_CFI_IF, XlnxCfiIf *), - DEFINE_PROP_END_OF_LIST(), }; =20 static const Property cfu_sfr_props[] =3D { DEFINE_PROP_LINK("cfu", XlnxVersalCFUSFR, cfg.cfu, TYPE_XLNX_VERSAL_CFU_APB, XlnxVersalCFUAPB *), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_cfu_apb =3D { diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c index 2f6af4f6800..0419f648b7a 100644 --- a/hw/misc/xlnx-versal-trng.c +++ b/hw/misc/xlnx-versal-trng.c @@ -666,8 +666,6 @@ static const Property trng_props[] =3D { DEFINE_PROP_UINT32("hw-version", XlnxVersalTRng, hw_version, 0x0200), DEFINE_PROP("fips-fault-events", XlnxVersalTRng, forced_faults, trng_prop_fault_events, uint32_t), - - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_trng =3D { diff --git a/hw/misc/xlnx-versal-xramc.c b/hw/misc/xlnx-versal-xramc.c index a06b9fbc05a..d1e76be027c 100644 --- a/hw/misc/xlnx-versal-xramc.c +++ b/hw/misc/xlnx-versal-xramc.c @@ -220,7 +220,6 @@ static const VMStateDescription vmstate_xram_ctrl =3D { =20 static const Property xram_ctrl_properties[] =3D { DEFINE_PROP_UINT64("size", XlnxXramCtrl, cfg.size, 1 * MiB), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xram_ctrl_class_init(ObjectClass *klass, void *data) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index ffa14ecb84f..f4fa3b18405 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -625,7 +625,6 @@ static const VMStateDescription vmstate_zynq_slcr =3D { =20 static const Property zynq_slcr_props[] =3D { DEFINE_PROP_UINT8("boot-mode", ZynqSLCRState, boot_mode, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void zynq_slcr_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c index 3f03060bf57..314a28af6df 100644 --- a/hw/net/allwinner-sun8i-emac.c +++ b/hw/net/allwinner-sun8i-emac.c @@ -834,7 +834,6 @@ static const Property allwinner_sun8i_emac_properties[]= =3D { DEFINE_PROP_UINT8("phy-addr", AwSun8iEmacState, mii_phy_addr, 0), DEFINE_PROP_LINK("dma-memory", AwSun8iEmacState, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static int allwinner_sun8i_emac_post_load(void *opaque, int version_id) diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c index 39c10426cfe..3eb9e09dc5c 100644 --- a/hw/net/allwinner_emac.c +++ b/hw/net/allwinner_emac.c @@ -465,7 +465,6 @@ static void aw_emac_realize(DeviceState *dev, Error **e= rrp) static const Property aw_emac_properties[] =3D { DEFINE_NIC_PROPERTIES(AwEmacState, conf), DEFINE_PROP_UINT8("phy-addr", AwEmacState, phy_addr, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_mii =3D { diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 3fce01315fe..0282bd1d7fc 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -1799,7 +1799,6 @@ static const Property gem_properties[] =3D { jumbo_max_len, 10240), DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void gem_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c index 97fa46c4b3b..dc242e92155 100644 --- a/hw/net/can/xlnx-versal-canfd.c +++ b/hw/net/can/xlnx-versal-canfd.c @@ -2052,7 +2052,6 @@ static const Property canfd_core_properties[] =3D { CANFD_DEFAULT_CLOCK), DEFINE_PROP_LINK("canfdbus", XlnxVersalCANFDState, canfdbus, TYPE_CAN_= BUS, CanBusState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void canfd_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c index 61c104c18b5..9fbdeea368f 100644 --- a/hw/net/can/xlnx-zynqmp-can.c +++ b/hw/net/can/xlnx-zynqmp-can.c @@ -1174,7 +1174,6 @@ static const Property xlnx_zynqmp_can_properties[] = =3D { CAN_DEFAULT_CLOCK), DEFINE_PROP_LINK("canbus", XlnxZynqMPCANState, canbus, TYPE_CAN_BUS, CanBusState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xlnx_zynqmp_can_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index e3ca11991b4..c80ddb12e38 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -937,7 +937,6 @@ static const Property dp8393x_properties[] =3D { TYPE_MEMORY_REGION, MemoryRegion *), DEFINE_PROP_UINT8("it_shift", dp8393xState, it_shift, 0), DEFINE_PROP_BOOL("big_endian", dp8393xState, big_endian, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void dp8393x_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index ef0af31751a..7348d396323 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1685,7 +1685,6 @@ static const Property e1000_properties[] =3D { compat_flags, E1000_FLAG_TSO_BIT, true), DEFINE_PROP_BIT("init-vet", E1000State, compat_flags, E1000_FLAG_VET_BIT, true), - DEFINE_PROP_END_OF_LIST(), }; =20 typedef struct E1000Info { diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index e2b7576f678..544a39eae96 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -672,7 +672,6 @@ static const Property e1000e_properties[] =3D { e1000e_prop_subsys, uint16_t), DEFINE_PROP_BOOL("init-vet", E1000EState, init_vet, true), DEFINE_PROP_BOOL("migrate-timadj", E1000EState, timadj, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void e1000e_class_init(ObjectClass *class, void *data) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index b8cb8d5cf10..5801cb06351 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -2060,7 +2060,6 @@ static E100PCIDeviceInfo *eepro100_get_class(EEPRO100= State *s) =20 static const Property e100_properties[] =3D { DEFINE_NIC_PROPERTIES(EEPRO100State, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void eepro100_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 764be2c6a25..781b9003954 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -416,7 +416,6 @@ static void etsec_instance_init(Object *obj) =20 static const Property etsec_properties[] =3D { DEFINE_NIC_PROPERTIES(eTSEC, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void etsec_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 4adc7fb10c4..40a13d16677 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -1258,7 +1258,6 @@ static const Property ftgmac100_properties[] =3D { DEFINE_PROP_BOOL("aspeed", FTGMAC100State, aspeed, false), DEFINE_NIC_PROPERTIES(FTGMAC100State, conf), DEFINE_PROP_BOOL("dma64", FTGMAC100State, dma64, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ftgmac100_class_init(ObjectClass *klass, void *data) @@ -1418,7 +1417,6 @@ static const VMStateDescription vmstate_aspeed_mii = =3D { static const Property aspeed_mii_properties[] =3D { DEFINE_PROP_LINK("nic", AspeedMiiState, nic, TYPE_FTGMAC100, FTGMAC100State *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_mii_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/igb.c b/hw/net/igb.c index ad0f748d822..ae973f40d6f 100644 --- a/hw/net/igb.c +++ b/hw/net/igb.c @@ -594,7 +594,6 @@ static const VMStateDescription igb_vmstate =3D { static const Property igb_properties[] =3D { DEFINE_NIC_PROPERTIES(IGBState, conf), DEFINE_PROP_BOOL("x-pcie-flr-init", IGBState, has_flr, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void igb_class_init(ObjectClass *class, void *data) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 9b649684772..e0342d93634 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -1229,7 +1229,6 @@ static const Property imx_eth_properties[] =3D { DEFINE_PROP_BOOL("phy-connected", IMXFECState, phy_connected, true), DEFINE_PROP_LINK("phy-consumer", IMXFECState, phy_consumer, TYPE_IMX_F= EC, IMXFECState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void imx_eth_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 237e9b97d59..afee68c7db6 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -1307,7 +1307,6 @@ static void lan9118_realize(DeviceState *dev, Error *= *errp) static const Property lan9118_properties[] =3D { DEFINE_NIC_PROPERTIES(lan9118_state, conf), DEFINE_PROP_UINT32("mode_16bit", lan9118_state, mode_16bit, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void lan9118_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/lance.c b/hw/net/lance.c index 9ed9c94cff6..a0945e1c881 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -141,7 +141,6 @@ static const Property lance_properties[] =3D { DEFINE_PROP_LINK("dma", SysBusPCNetState, state.dma_opaque, TYPE_DEVICE, DeviceState *), DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void lance_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c index 248e3841dba..95f56311d9b 100644 --- a/hw/net/lasi_i82596.c +++ b/hw/net/lasi_i82596.c @@ -160,7 +160,6 @@ static void lasi_82596_instance_init(Object *obj) =20 static const Property lasi_82596_properties[] =3D { DEFINE_NIC_PROPERTIES(SysBusI82596State, state.conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void lasi_82596_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c index 55bad4c0697..d5572a81d3f 100644 --- a/hw/net/mcf_fec.c +++ b/hw/net/mcf_fec.c @@ -662,7 +662,6 @@ static void mcf_fec_instance_init(Object *obj) =20 static const Property mcf_fec_properties[] =3D { DEFINE_NIC_PROPERTIES(mcf_fec_state, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mcf_fec_class_init(ObjectClass *oc, void *data) diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c index c9ef1beb7b3..8852b6f3a12 100644 --- a/hw/net/mipsnet.c +++ b/hw/net/mipsnet.c @@ -268,7 +268,6 @@ static void mipsnet_sysbus_reset(DeviceState *dev) =20 static const Property mipsnet_properties[] =3D { DEFINE_NIC_PROPERTIES(MIPSnetState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mipsnet_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c index 8d9015f962b..80f75f19ddf 100644 --- a/hw/net/msf2-emac.c +++ b/hw/net/msf2-emac.c @@ -550,7 +550,6 @@ static const Property msf2_emac_properties[] =3D { DEFINE_PROP_LINK("ahb-bus", MSF2EmacState, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), DEFINE_NIC_PROPERTIES(MSF2EmacState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_msf2_emac =3D { diff --git a/hw/net/mv88w8618_eth.c b/hw/net/mv88w8618_eth.c index ccb11512dba..a1f51f7ade0 100644 --- a/hw/net/mv88w8618_eth.c +++ b/hw/net/mv88w8618_eth.c @@ -375,7 +375,6 @@ static const Property mv88w8618_eth_properties[] =3D { DEFINE_NIC_PROPERTIES(mv88w8618_eth_state, conf), DEFINE_PROP_LINK("dma-memory", mv88w8618_eth_state, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mv88w8618_eth_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index 1cd070d4199..c445f2a2223 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -83,7 +83,6 @@ static const Property ne2000_isa_properties[] =3D { DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300), DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9), DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c), - DEFINE_PROP_END_OF_LIST(), }; =20 static void isa_ne2000_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/net/ne2000-pci.c b/hw/net/ne2000-pci.c index 12fa579d228..929e9a19308 100644 --- a/hw/net/ne2000-pci.c +++ b/hw/net/ne2000-pci.c @@ -98,7 +98,6 @@ static void ne2000_instance_init(Object *obj) =20 static const Property ne2000_properties[] =3D { DEFINE_NIC_PROPERTIES(PCINE2000State, ne2000.c), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ne2000_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/npcm7xx_emc.c b/hw/net/npcm7xx_emc.c index f06e908d044..cc38080c7d4 100644 --- a/hw/net/npcm7xx_emc.c +++ b/hw/net/npcm7xx_emc.c @@ -847,7 +847,6 @@ static const VMStateDescription vmstate_npcm7xx_emc =3D= { =20 static const Property npcm7xx_emc_properties[] =3D { DEFINE_NIC_PROPERTIES(NPCM7xxEMCState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_emc_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c index 1db29307d7a..6d7f8398b65 100644 --- a/hw/net/npcm_gmac.c +++ b/hw/net/npcm_gmac.c @@ -914,7 +914,6 @@ static const VMStateDescription vmstate_npcm_gmac =3D { =20 static const Property npcm_gmac_properties[] =3D { DEFINE_NIC_PROPERTIES(NPCMGMACState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm_gmac_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c index 003b452bc9b..54daab7b04c 100644 --- a/hw/net/opencores_eth.c +++ b/hw/net/opencores_eth.c @@ -745,7 +745,6 @@ static void qdev_open_eth_reset(DeviceState *dev) =20 static const Property open_eth_properties[] =3D { DEFINE_NIC_PROPERTIES(OpenEthState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void open_eth_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 83ba8cd9493..b8e9ff95e88 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -254,7 +254,6 @@ static void pcnet_instance_init(Object *obj) =20 static const Property pcnet_properties[] =3D { DEFINE_NIC_PROPERTIES(PCIPCNetState, state.conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pcnet_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index efc20396aa4..aa5d87fbc5a 100644 --- a/hw/net/rocker/rocker.c +++ b/hw/net/rocker/rocker.c @@ -1468,7 +1468,6 @@ static const Property rocker_properties[] =3D { switch_id, 0), DEFINE_PROP_ARRAY("ports", Rocker, fp_ports, fp_ports_peers, qdev_prop_netdev, NICPeers), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription rocker_vmsd =3D { diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 064a73b6b49..3245aa1f1d8 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3412,7 +3412,6 @@ static void rtl8139_instance_init(Object *obj) =20 static const Property rtl8139_properties[] =3D { DEFINE_NIC_PROPERTIES(RTL8139State, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rtl8139_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index a853c30fa20..b18d5c23c39 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -790,7 +790,6 @@ static void smc91c111_realize(DeviceState *dev, Error *= *errp) =20 static const Property smc91c111_properties[] =3D { DEFINE_NIC_PROPERTIES(smc91c111_state, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void smc91c111_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index d381c041db3..da98a7ec3ea 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -791,7 +791,6 @@ static const Property spapr_vlan_properties[] =3D { DEFINE_NIC_PROPERTIES(SpaprVioVlan, nicconf), DEFINE_PROP_BIT("use-rx-buffer-pools", SpaprVioVlan, compat_flags, SPAPRVLAN_FLAG_RX_BUF_POOLS_BIT, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static bool spapr_vlan_rx_buffer_pools_needed(void *opaque) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 4af1afa7337..a420732d48f 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -499,7 +499,6 @@ static void stellaris_enet_realize(DeviceState *dev, Er= ror **errp) =20 static const Property stellaris_enet_properties[] =3D { DEFINE_NIC_PROPERTIES(stellaris_enet_state, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stellaris_enet_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/sungem.c b/hw/net/sungem.c index bcc7a18382c..e1c672acd3a 100644 --- a/hw/net/sungem.c +++ b/hw/net/sungem.c @@ -1427,7 +1427,6 @@ static const Property sungem_properties[] =3D { * override. */ DEFINE_PROP_UINT32("phy_addr", SunGEMState, phy_addr, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_sungem =3D { diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c index 86f472fcbe7..539e0d5e463 100644 --- a/hw/net/sunhme.c +++ b/hw/net/sunhme.c @@ -179,7 +179,6 @@ struct SunHMEState { =20 static const Property sunhme_properties[] =3D { DEFINE_NIC_PROPERTIES(SunHMEState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sunhme_reset_tx(SunHMEState *s) diff --git a/hw/net/tulip.c b/hw/net/tulip.c index f35b58a88c2..d753dc790d3 100644 --- a/hw/net/tulip.c +++ b/hw/net/tulip.c @@ -1009,7 +1009,6 @@ static void tulip_instance_init(Object *obj) =20 static const Property tulip_properties[] =3D { DEFINE_NIC_PROPERTIES(TULIPState, c), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tulip_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 4fd1f9accab..e2d3d188045 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -4057,7 +4057,6 @@ static const Property virtio_net_properties[] =3D { VIRTIO_NET_F_GUEST_USO6, true), DEFINE_PROP_BIT64("host_uso", VirtIONet, host_features, VIRTIO_NET_F_HOST_USO, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_net_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index f69547cad5e..4c77d69b78e 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2477,7 +2477,6 @@ static const Property vmxnet3_properties[] =3D { VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vmxnet3_realize(DeviceState *qdev, Error **errp) diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c index 5a5259150a1..97ebd9fa307 100644 --- a/hw/net/xen_nic.c +++ b/hw/net/xen_nic.c @@ -558,7 +558,6 @@ static void xen_netdev_unrealize(XenDevice *xendev) static const Property xen_netdev_properties[] =3D { DEFINE_NIC_PROPERTIES(XenNetDev, conf), DEFINE_PROP_INT32("idx", XenNetDev, dev, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xen_netdev_class_init(ObjectClass *class, void *data) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 6e0f96f4858..e3cc4c60ebd 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -416,7 +416,6 @@ static void xgmac_enet_realize(DeviceState *dev, Error = **errp) =20 static const Property xgmac_properties[] =3D { DEFINE_NIC_PROPERTIES(XgmacState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xgmac_enet_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index 9d0c618e2f8..457952af196 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@ -1005,7 +1005,6 @@ static const Property xilinx_enet_properties[] =3D { tx_data_dev, TYPE_STREAM_SINK, StreamSink *), DEFINE_PROP_LINK("axistream-control-connected", XilinxAXIEnet, tx_control_dev, TYPE_STREAM_SINK, StreamSink *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_enet_class_init(ObjectClass *klass, void *data) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 9413731d20d..f3eb2af1934 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -255,7 +255,6 @@ static const Property xilinx_ethlite_properties[] =3D { DEFINE_PROP_UINT32("tx-ping-pong", struct xlx_ethlite, c_tx_pingpong, = 1), DEFINE_PROP_UINT32("rx-ping-pong", struct xlx_ethlite, c_rx_pingpong, = 1), DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_ethlite_class_init(ObjectClass *klass, void *data) diff --git a/hw/nubus/nubus-bridge.c b/hw/nubus/nubus-bridge.c index 83893e5a463..8fe43627237 100644 --- a/hw/nubus/nubus-bridge.c +++ b/hw/nubus/nubus-bridge.c @@ -26,7 +26,6 @@ static void nubus_bridge_init(Object *obj) static const Property nubus_bridge_properties[] =3D { DEFINE_PROP_UINT16("slot-available-mask", NubusBridge, bus.slot_available_mask, 0xffff), - DEFINE_PROP_END_OF_LIST() }; =20 static void nubus_bridge_class_init(ObjectClass *klass, void *data) diff --git a/hw/nubus/nubus-device.c b/hw/nubus/nubus-device.c index 7cafc134272..6755c3dc438 100644 --- a/hw/nubus/nubus-device.c +++ b/hw/nubus/nubus-device.c @@ -110,7 +110,6 @@ static void nubus_device_realize(DeviceState *dev, Erro= r **errp) static const Property nubus_device_properties[] =3D { DEFINE_PROP_INT32("slot", NubusDevice, slot, -1), DEFINE_PROP_STRING("romfile", NubusDevice, romfile), - DEFINE_PROP_END_OF_LIST() }; =20 static void nubus_device_class_init(ObjectClass *oc, void *data) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 33a3062466e..d9c8dace1e1 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -8965,7 +8965,6 @@ static const Property nvme_props[] =3D { DEFINE_PROP_BOOL("atomic.dn", NvmeCtrl, params.atomic_dn, 0), DEFINE_PROP_UINT16("atomic.awun", NvmeCtrl, params.atomic_awun, 0), DEFINE_PROP_UINT16("atomic.awupf", NvmeCtrl, params.atomic_awupf, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nvme_get_smart_warning(Object *obj, Visitor *v, const char *na= me, diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 192b80f18db..0a7881b21f3 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -834,7 +834,6 @@ static const Property nvme_ns_props[] =3D { DEFINE_PROP_BOOL("eui64-default", NvmeNamespace, params.eui64_default, false), DEFINE_PROP_STRING("fdp.ruhs", NvmeNamespace, params.fdp.ruhs), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nvme_ns_class_init(ObjectClass *oc, void *data) diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c index 3171c3888c2..2ae56f12a59 100644 --- a/hw/nvme/subsys.c +++ b/hw/nvme/subsys.c @@ -223,7 +223,6 @@ static const Property nvme_subsystem_props[] =3D { NVME_DEFAULT_RU_SIZE), DEFINE_PROP_UINT32("fdp.nrg", NvmeSubsystem, params.fdp.nrg, 1), DEFINE_PROP_UINT16("fdp.nruh", NvmeSubsystem, params.fdp.nruh, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nvme_subsys_class_init(ObjectClass *oc, void *data) diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c index 19bf8d2091b..6b2aa8c7d26 100644 --- a/hw/nvram/ds1225y.c +++ b/hw/nvram/ds1225y.c @@ -145,7 +145,6 @@ static void nvram_sysbus_realize(DeviceState *dev, Erro= r **errp) static const Property nvram_sysbus_properties[] =3D { DEFINE_PROP_UINT32("size", SysBusNvRamState, nvram.chip_size, 0x2000), DEFINE_PROP_STRING("filename", SysBusNvRamState, nvram.filename), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nvram_sysbus_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c index 669920b2b92..5f525d37e47 100644 --- a/hw/nvram/eeprom_at24c.c +++ b/hw/nvram/eeprom_at24c.c @@ -239,7 +239,6 @@ static const Property at24c_eeprom_props[] =3D { DEFINE_PROP_UINT8("address-size", EEPROMState, asize, 0), DEFINE_PROP_BOOL("writable", EEPROMState, writable, true), DEFINE_PROP_DRIVE("drive", EEPROMState, blk), - DEFINE_PROP_END_OF_LIST() }; =20 static diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 7461d99ff2e..327d623d8d6 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1084,7 +1084,6 @@ static void fw_cfg_machine_ready(struct Notifier *n, = void *data) =20 static const Property fw_cfg_properties[] =3D { DEFINE_PROP_BOOL("acpi-mr-restore", FWCfgState, acpi_mr_restore, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fw_cfg_common_realize(DeviceState *dev, Error **errp) @@ -1278,7 +1277,6 @@ static const Property fw_cfg_io_properties[] =3D { true), DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots, FW_CFG_FILE_SLOTS_DFLT), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fw_cfg_io_realize(DeviceState *dev, Error **errp) @@ -1328,7 +1326,6 @@ static const Property fw_cfg_mem_properties[] =3D { true), DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slot= s, FW_CFG_FILE_SLOTS_DFLT), - DEFINE_PROP_END_OF_LIST(), }; =20 static void fw_cfg_mem_realize(DeviceState *dev, Error **errp) diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c index d62ad719c84..db42817e1f9 100644 --- a/hw/nvram/mac_nvram.c +++ b/hw/nvram/mac_nvram.c @@ -138,7 +138,6 @@ static const Property macio_nvram_properties[] =3D { DEFINE_PROP_UINT32("size", MacIONVRAMState, size, 0), DEFINE_PROP_UINT32("it_shift", MacIONVRAMState, it_shift, 0), DEFINE_PROP_DRIVE("drive", MacIONVRAMState, blk), - DEFINE_PROP_END_OF_LIST() }; =20 static void macio_nvram_class_init(ObjectClass *oc, void *data) diff --git a/hw/nvram/nrf51_nvm.c b/hw/nvram/nrf51_nvm.c index 236049462bf..2ed40788582 100644 --- a/hw/nvram/nrf51_nvm.c +++ b/hw/nvram/nrf51_nvm.c @@ -356,7 +356,6 @@ static void nrf51_nvm_reset(DeviceState *dev) =20 static const Property nrf51_nvm_properties[] =3D { DEFINE_PROP_UINT32("flash-size", NRF51NVMState, flash_size, 0x40000), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_nvm =3D { diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c index 2251ff2f4c8..1230884f526 100644 --- a/hw/nvram/spapr_nvram.c +++ b/hw/nvram/spapr_nvram.c @@ -255,7 +255,6 @@ static const VMStateDescription vmstate_spapr_nvram =3D= { static const Property spapr_nvram_properties[] =3D { DEFINE_SPAPR_PROPERTIES(SpaprNvram, sdev), DEFINE_PROP_DRIVE("drive", SpaprNvram, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void spapr_nvram_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c index 4fa528f0480..d3f238fc837 100644 --- a/hw/nvram/xlnx-bbram.c +++ b/hw/nvram/xlnx-bbram.c @@ -523,7 +523,6 @@ static const VMStateDescription vmstate_bbram_ctrl =3D { static const Property bbram_ctrl_props[] =3D { DEFINE_PROP("drive", XlnxBBRam, blk, bbram_prop_drive, BlockBackend *), DEFINE_PROP_UINT32("crc-zpads", XlnxBBRam, crc_zpads, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void bbram_ctrl_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c index 5dae9e8e9a0..f1787d0db57 100644 --- a/hw/nvram/xlnx-efuse.c +++ b/hw/nvram/xlnx-efuse.c @@ -272,7 +272,6 @@ static const Property efuse_properties[] =3D { DEFINE_PROP_BOOL("init-factory-tbits", XlnxEFuse, init_tbits, true), DEFINE_PROP_ARRAY("read-only", XlnxEFuse, ro_bits_cnt, ro_bits, qdev_prop_uint32, uint32_t), - DEFINE_PROP_END_OF_LIST(), }; =20 static void efuse_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/xlnx-versal-efuse-cache.c b/hw/nvram/xlnx-versal-efus= e-cache.c index 1aea27afd3c..2fb599422ca 100644 --- a/hw/nvram/xlnx-versal-efuse-cache.c +++ b/hw/nvram/xlnx-versal-efuse-cache.c @@ -87,8 +87,6 @@ static const Property efuse_cache_props[] =3D { DEFINE_PROP_LINK("efuse", XlnxVersalEFuseCache, efuse, TYPE_XLNX_EFUSE, XlnxEFuse *), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void efuse_cache_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse= -ctrl.c index 599aa126fb3..3246eb3ca6e 100644 --- a/hw/nvram/xlnx-versal-efuse-ctrl.c +++ b/hw/nvram/xlnx-versal-efuse-ctrl.c @@ -750,8 +750,6 @@ static const Property efuse_ctrl_props[] =3D { DEFINE_PROP_ARRAY("pg0-lock", XlnxVersalEFuseCtrl, extra_pg0_lock_n16, extra_pg0_lock_spec, qdev_prop_uint16, uint16_t), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void efuse_ctrl_class_init(ObjectClass *klass, void *data) diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c index af531879056..15024daf4fc 100644 --- a/hw/nvram/xlnx-zynqmp-efuse.c +++ b/hw/nvram/xlnx-zynqmp-efuse.c @@ -837,8 +837,6 @@ static const Property zynqmp_efuse_props[] =3D { DEFINE_PROP_LINK("efuse", XlnxZynqMPEFuse, efuse, TYPE_XLNX_EFUSE, XlnxEFuse *), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void zynqmp_efuse_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-bridge/cxl_downstream.c b/hw/pci-bridge/cxl_downstream.c index cfe50e60e9f..e337f1ac501 100644 --- a/hw/pci-bridge/cxl_downstream.c +++ b/hw/pci-bridge/cxl_downstream.c @@ -217,7 +217,6 @@ static const Property cxl_dsp_props[] =3D { speed, PCIE_LINK_SPEED_64), DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, width, PCIE_LINK_WIDTH_16), - DEFINE_PROP_END_OF_LIST() }; =20 static void cxl_dsp_class_init(ObjectClass *oc, void *data) diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_port.c index 5824ba3c750..c0037f2cfbf 100644 --- a/hw/pci-bridge/cxl_root_port.c +++ b/hw/pci-bridge/cxl_root_port.c @@ -211,7 +211,6 @@ static const Property gen_rp_props[] =3D { speed, PCIE_LINK_SPEED_64), DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, width, PCIE_LINK_WIDTH_32), - DEFINE_PROP_END_OF_LIST() }; =20 static void cxl_rp_dvsec_write_config(PCIDevice *dev, uint32_t addr, diff --git a/hw/pci-bridge/cxl_upstream.c b/hw/pci-bridge/cxl_upstream.c index ef94aa36543..28b109c49af 100644 --- a/hw/pci-bridge/cxl_upstream.c +++ b/hw/pci-bridge/cxl_upstream.c @@ -369,7 +369,6 @@ static const Property cxl_upstream_props[] =3D { speed, PCIE_LINK_SPEED_32), DEFINE_PROP_PCIE_LINK_WIDTH("x-width", CXLUpstreamPort, width, PCIE_LINK_WIDTH_16), - DEFINE_PROP_END_OF_LIST() }; =20 static void cxl_upstream_class_init(ObjectClass *oc, void *data) diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_ro= ot_port.c index c319ca82638..3c0b41ef1a5 100644 --- a/hw/pci-bridge/gen_pcie_root_port.c +++ b/hw/pci-bridge/gen_pcie_root_port.c @@ -145,7 +145,6 @@ static const Property gen_rp_props[] =3D { speed, PCIE_LINK_SPEED_16), DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, width, PCIE_LINK_WIDTH_32), - DEFINE_PROP_END_OF_LIST() }; =20 static void gen_rp_dev_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 35a37e056a7..0a91a8ae6c4 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -186,7 +186,6 @@ static const Property pci_bridge_dev_properties[] =3D { res_reserve.mem_pref_32, -1), DEFINE_PROP_SIZE("pref64-reserve", PCIBridgeDev, res_reserve.mem_pref_64, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static bool pci_device_shpc_present(void *opaque, int version_id) diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expand= er_bridge.c index 01997c1ab3b..af4591a9c39 100644 --- a/hw/pci-bridge/pci_expander_bridge.c +++ b/hw/pci-bridge/pci_expander_bridge.c @@ -425,7 +425,6 @@ static const Property pxb_dev_properties[] =3D { DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0), DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNE= D), DEFINE_PROP_BOOL("bypass_iommu", PXBDev, bypass_iommu, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pxb_dev_class_init(ObjectClass *klass, void *data) @@ -509,7 +508,6 @@ static void pxb_cxl_dev_realize(PCIDevice *dev, Error *= *errp) =20 static const Property pxb_cxl_dev_properties[] =3D { DEFINE_PROP_BOOL("hdm_for_passthrough", PXBCXLDev, hdm_for_passthrough= , false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pxb_cxl_dev_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridg= e.c index 8834ff3dbfe..fd4514a595c 100644 --- a/hw/pci-bridge/pcie_pci_bridge.c +++ b/hw/pci-bridge/pcie_pci_bridge.c @@ -126,7 +126,6 @@ static void pcie_pci_bridge_write_config(PCIDevice *d, =20 static const Property pcie_pci_bridge_dev_properties[] =3D { DEFINE_PROP_ON_OFF_AUTO("msi", PCIEPCIBridge, msi, ON_OFF_AUTO_AUT= O), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription pcie_pci_bridge_dev_vmstate =3D { diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c index a7f87a1bc48..dd40b366bfa 100644 --- a/hw/pci-bridge/pcie_root_port.c +++ b/hw/pci-bridge/pcie_root_port.c @@ -152,7 +152,6 @@ static const Property rp_props[] =3D { DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present, QEMU_PCIE_SLTCAP_PCP_BITNR, true), DEFINE_PROP_BOOL("disable-acs", PCIESlot, disable_acs, false), - DEFINE_PROP_END_OF_LIST() }; =20 static void rp_instance_post_init(Object *obj) diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_dow= nstream.c index 92e5fb72ecd..d4e94f26571 100644 --- a/hw/pci-bridge/xio3130_downstream.c +++ b/hw/pci-bridge/xio3130_downstream.c @@ -137,7 +137,6 @@ static void xio3130_downstream_exitfn(PCIDevice *d) static const Property xio3130_downstream_props[] =3D { DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present, QEMU_PCIE_SLTCAP_PCP_BITNR, true), - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription vmstate_xio3130_downstream =3D { diff --git a/hw/pci-host/dino.c b/hw/pci-host/dino.c index ead9893f213..58fdbf7bc90 100644 --- a/hw/pci-host/dino.c +++ b/hw/pci-host/dino.c @@ -495,7 +495,6 @@ static void dino_pcihost_init(Object *obj) static const Property dino_pcihost_properties[] =3D { DEFINE_PROP_LINK("memory-as", DinoState, memory_as, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void dino_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c index 8a955ca1305..c6aa8e87a22 100644 --- a/hw/pci-host/gpex.c +++ b/hw/pci-host/gpex.c @@ -166,7 +166,6 @@ static const Property gpex_host_properties[] =3D { gpex_cfg.mmio64.base, 0), DEFINE_PROP_SIZE(PCI_HOST_ABOVE_4G_MMIO_SIZE, GPEXHost, gpex_cfg.mmio64.size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void gpex_host_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index d64de737744..84e5ee8c6ef 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c @@ -131,7 +131,6 @@ static char *grackle_ofw_unit_address(const SysBusDevic= e *dev) =20 static const Property grackle_properties[] =3D { DEFINE_PROP_UINT32("ofw-addr", GrackleState, ofw_addr, -1), - DEFINE_PROP_END_OF_LIST() }; =20 static void grackle_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/gt64120.c b/hw/pci-host/gt64120.c index 3c73ebe83ff..d5c13a89b68 100644 --- a/hw/pci-host/gt64120.c +++ b/hw/pci-host/gt64120.c @@ -1277,7 +1277,6 @@ static const TypeInfo gt64120_pci_info =3D { static const Property gt64120_properties[] =3D { DEFINE_PROP_BOOL("cpu-little-endian", GT64120State, cpu_little_endian, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void gt64120_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 40780fbc525..1e69691c6d1 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -362,7 +362,6 @@ static const Property i440fx_props[] =3D { above_4g_mem_size, 0), DEFINE_PROP_BOOL("x-pci-hole64-fix", I440FXState, pci_hole64_fix, true= ), DEFINE_PROP_STRING(I440FX_HOST_PROP_PCI_TYPE, I440FXState, pci_type), - DEFINE_PROP_END_OF_LIST(), }; =20 static void i440fx_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c index 2518d5abe6b..9c41c155fb4 100644 --- a/hw/pci-host/mv64361.c +++ b/hw/pci-host/mv64361.c @@ -100,7 +100,6 @@ static void mv64361_pcihost_realize(DeviceState *dev, E= rror **errp) =20 static const Property mv64361_pcihost_props[] =3D { DEFINE_PROP_UINT8("index", MV64361PCIState, index, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void mv64361_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-host/pnv_phb.c index 888f0786a07..97cfb52119d 100644 --- a/hw/pci-host/pnv_phb.c +++ b/hw/pci-host/pnv_phb.c @@ -192,8 +192,6 @@ static const Property pnv_phb_properties[] =3D { =20 DEFINE_PROP_LINK("pec", PnvPHB, pec, TYPE_PNV_PHB4_PEC, PnvPhb4PecState *), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_phb_class_init(ObjectClass *klass, void *data) @@ -304,8 +302,6 @@ static void pnv_phb_root_port_realize(DeviceState *dev,= Error **errp) =20 static const Property pnv_phb_root_port_properties[] =3D { DEFINE_PROP_UINT32("version", PnvPHBRootPort, version, 0), - - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_phb_root_port_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c index 529b33b5a2a..cd178f7eaf3 100644 --- a/hw/pci-host/pnv_phb3.c +++ b/hw/pci-host/pnv_phb3.c @@ -1095,7 +1095,6 @@ static const Property pnv_phb3_properties[] =3D { DEFINE_PROP_UINT32("chip-id", PnvPHB3, chip_id, 0), DEFINE_PROP_LINK("chip", PnvPHB3, chip, TYPE_PNV_CHIP, PnvChip *), DEFINE_PROP_LINK("phb-base", PnvPHB3, phb_base, TYPE_PNV_PHB, PnvPHB *= ), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_phb3_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 482fe25803c..178c73f519b 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -1694,7 +1694,6 @@ static const Property pnv_phb4_properties[] =3D { DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC, PnvPhb4PecState *), DEFINE_PROP_LINK("phb-base", PnvPHB4, phb_base, TYPE_PNV_PHB, PnvPHB *= ), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_phb4_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c index f8975403d33..e4d33fa0606 100644 --- a/hw/pci-host/pnv_phb4_pec.c +++ b/hw/pci-host/pnv_phb4_pec.c @@ -288,7 +288,6 @@ static const Property pnv_pec_properties[] =3D { DEFINE_PROP_UINT32("chip-id", PnvPhb4PecState, chip_id, 0), DEFINE_PROP_LINK("chip", PnvPhb4PecState, chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static uint32_t pnv_pec_xscom_pci_base(PnvPhb4PecState *pec) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 54071fc125a..345ce4c5262 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -510,7 +510,6 @@ static void e500_host_bridge_class_init(ObjectClass *kl= ass, void *data) static const Property pcihost_properties[] =3D { DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11), DEFINE_PROP_UINT32("first_pin_irq", PPCE500PCIState, first_pin_irq, 0x= 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void e500_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index af0b77ea1e6..06be3d77cb9 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -182,7 +182,6 @@ static const Property q35_host_props[] =3D { DEFINE_PROP_BOOL(PCI_HOST_PROP_SMM_RANGES, Q35PCIHost, mch.has_smm_ranges, true), DEFINE_PROP_BOOL("x-pci-hole64-fix", Q35PCIHost, pci_hole64_fix, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void q35_host_class_init(ObjectClass *klass, void *data) @@ -666,7 +665,6 @@ static const Property mch_props[] =3D { DEFINE_PROP_UINT16("extended-tseg-mbytes", MCHPCIState, ext_tseg_mbyte= s, 16), DEFINE_PROP_BOOL("smbase-smram", MCHPCIState, has_smram_at_smbase, tru= e), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mch_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index b0a4a669f59..918a3237a9e 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -429,7 +429,6 @@ static const Property raven_pcihost_properties[] =3D { /* Temporary workaround until legacy prep machine is removed */ DEFINE_PROP_BOOL("is-legacy-prep", PREPPCIState, is_legacy_prep, false), - DEFINE_PROP_END_OF_LIST() }; =20 static void raven_pcihost_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c index 623afed6447..56f057a63f1 100644 --- a/hw/pci-host/sabre.c +++ b/hw/pci-host/sabre.c @@ -495,7 +495,6 @@ static char *sabre_ofw_unit_address(const SysBusDevice = *dev) static const Property sabre_properties[] =3D { DEFINE_PROP_UINT64("special-base", SabreState, special_base, 0), DEFINE_PROP_UINT64("mem-base", SabreState, mem_base, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sabre_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index bd670cfa9db..37e2461bbbf 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -425,7 +425,6 @@ static const TypeInfo unin_internal_pci_host_info =3D { =20 static const Property pci_unin_main_pci_host_props[] =3D { DEFINE_PROP_UINT32("ofw-addr", UNINHostState, ofw_addr, -1), - DEFINE_PROP_END_OF_LIST() }; =20 static void pci_unin_main_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index 5d596406916..c3fbf4cbf94 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -501,7 +501,6 @@ static const TypeInfo versatile_pci_host_info =3D { static const Property pci_vpb_properties[] =3D { DEFINE_PROP_UINT8("broken-irq-mapping", PCIVPBState, irq_mapping_prop, PCI_VPB_IRQMAP_ASSUME_OK), - DEFINE_PROP_END_OF_LIST() }; =20 static void pci_vpb_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c index 848403970bc..18688485f48 100644 --- a/hw/pci-host/xilinx-pcie.c +++ b/hw/pci-host/xilinx-pcie.c @@ -163,7 +163,6 @@ static const Property xilinx_pcie_host_props[] =3D { DEFINE_PROP_SIZE("mmio_base", XilinxPCIEHost, mmio_base, 0), DEFINE_PROP_SIZE("mmio_size", XilinxPCIEHost, mmio_size, 1 * MiB), DEFINE_PROP_BOOL("link_up", XilinxPCIEHost, link_up, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_pcie_host_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 90248481b18..714208aa986 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -104,7 +104,6 @@ static const Property pci_props[] =3D { DEFINE_PROP_BIT("x-pcie-ext-tag", PCIDevice, cap_present, QEMU_PCIE_EXT_TAG_BITNR, true), { .name =3D "busnr", .info =3D &prop_pci_busnr }, - DEFINE_PROP_END_OF_LIST() }; =20 static const VMStateDescription vmstate_pcibus =3D { diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index dd4fd3674f5..aee4dd7d1f6 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -480,7 +480,6 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, in= t cap_offset, static const Property pci_bridge_properties[] =3D { DEFINE_PROP_BOOL("x-pci-express-writeable-slt-bug", PCIBridge, pcie_writeable_slt_bug, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pci_bridge_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c index 321e7be709c..4510890dfc1 100644 --- a/hw/pci/pci_host.c +++ b/hw/pci/pci_host.c @@ -244,7 +244,6 @@ static const Property pci_host_properties_common[] =3D { DEFINE_PROP_BOOL("x-config-reg-migration-enabled", PCIHostState, mig_enabled, true), DEFINE_PROP_BOOL(PCI_HOST_BYPASS_IOMMU, PCIHostState, bypass_iommu, fa= lse), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pci_host_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c index bac2822e988..c73db30e989 100644 --- a/hw/pci/pcie_port.c +++ b/hw/pci/pcie_port.c @@ -116,7 +116,6 @@ static const Property pcie_port_props[] =3D { DEFINE_PROP_UINT16("aer_log_max", PCIEPort, parent_obj.parent_obj.exp.aer_log.log_max, PCIE_AER_LOG_MAX_DEFAULT), - DEFINE_PROP_END_OF_LIST() }; =20 static void pcie_port_class_init(ObjectClass *oc, void *data) @@ -210,7 +209,6 @@ static const Property pcie_slot_props[] =3D { DEFINE_PROP_BOOL("hotplug", PCIESlot, hotplug, true), DEFINE_PROP_BOOL("x-do-not-expose-native-hotplug-cap", PCIESlot, hide_native_hotplug_cap, false), - DEFINE_PROP_END_OF_LIST() }; =20 static void pcie_slot_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index b90a052ce0d..770516d7e52 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -2431,7 +2431,6 @@ static const Property pnv_chip_properties[] =3D { DEFINE_PROP_UINT32("nr-threads", PnvChip, nr_threads, 1), DEFINE_PROP_BOOL("big-core", PnvChip, big_core, false), DEFINE_PROP_BOOL("lpar-per-core", PnvChip, lpar_per_core, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_chip_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_adu.c b/hw/ppc/pnv_adu.c index 646736f7e98..d09a167466b 100644 --- a/hw/ppc/pnv_adu.c +++ b/hw/ppc/pnv_adu.c @@ -187,7 +187,6 @@ static void pnv_adu_realize(DeviceState *dev, Error **e= rrp) =20 static const Property pnv_adu_properties[] =3D { DEFINE_PROP_LINK("lpc", PnvADU, lpc, TYPE_PNV_LPC, PnvLpcController *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_adu_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_chiptod.c b/hw/ppc/pnv_chiptod.c index 840ef23128d..011822ea1d5 100644 --- a/hw/ppc/pnv_chiptod.c +++ b/hw/ppc/pnv_chiptod.c @@ -454,7 +454,6 @@ static const Property pnv_chiptod_properties[] =3D { DEFINE_PROP_BOOL("primary", PnvChipTOD, primary, false), DEFINE_PROP_BOOL("secondary", PnvChipTOD, secondary, false), DEFINE_PROP_LINK("chip", PnvChipTOD , chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_chiptod_power9_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index 22864c92f38..a5ebd392e17 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -443,7 +443,6 @@ static const Property pnv_core_properties[] =3D { false), DEFINE_PROP_BOOL("lpar-per-core", PnvCore, lpar_per_core, false), DEFINE_PROP_LINK("chip", PnvCore, chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_core_power8_class_init(ObjectClass *oc, void *data) @@ -695,7 +694,6 @@ static void pnv_quad_power10_realize(DeviceState *dev, = Error **errp) =20 static const Property pnv_quad_properties[] =3D { DEFINE_PROP_UINT32("quad-id", PnvQuad, quad_id, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_quad_power9_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c index b1f83e2cf27..11c8da8bed0 100644 --- a/hw/ppc/pnv_homer.c +++ b/hw/ppc/pnv_homer.c @@ -414,7 +414,6 @@ static void pnv_homer_realize(DeviceState *dev, Error *= *errp) =20 static const Property pnv_homer_properties[] =3D { DEFINE_PROP_LINK("chip", PnvHomer, chip, TYPE_PNV_CHIP, PnvChip *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_homer_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c index 4bd61abeed9..13f16906dc4 100644 --- a/hw/ppc/pnv_i2c.c +++ b/hw/ppc/pnv_i2c.c @@ -547,7 +547,6 @@ static const Property pnv_i2c_properties[] =3D { DEFINE_PROP_LINK("chip", PnvI2C, chip, TYPE_PNV_CHIP, PnvChip *), DEFINE_PROP_UINT32("engine", PnvI2C, engine, 1), DEFINE_PROP_UINT32("num-busses", PnvI2C, num_busses, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_i2c_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c index 4d471671630..0480a60f3f7 100644 --- a/hw/ppc/pnv_lpc.c +++ b/hw/ppc/pnv_lpc.c @@ -830,7 +830,6 @@ static void pnv_lpc_realize(DeviceState *dev, Error **e= rrp) =20 static const Property pnv_lpc_properties[] =3D { DEFINE_PROP_BOOL("psi-serirq", PnvLpcController, psi_has_serirq, false= ), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_lpc_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c index eed6d326505..5bb755df76d 100644 --- a/hw/ppc/pnv_pnor.c +++ b/hw/ppc/pnv_pnor.c @@ -115,7 +115,6 @@ static void pnv_pnor_realize(DeviceState *dev, Error **= errp) static const Property pnv_pnor_properties[] =3D { DEFINE_PROP_INT64("size", PnvPnor, size, 128 * MiB), DEFINE_PROP_DRIVE("drive", PnvPnor, blk), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_pnor_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index e7d6ceee99e..cd5021c4f55 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -555,7 +555,6 @@ static int pnv_psi_dt_xscom(PnvXScomInterface *dev, voi= d *fdt, int xscom_offset) static const Property pnv_psi_properties[] =3D { DEFINE_PROP_UINT64("bar", PnvPsi, bar, 0), DEFINE_PROP_UINT64("fsp-bar", PnvPsi, fsp_bar, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_psi_power8_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c index 801f97811f5..f8c9cec9ceb 100644 --- a/hw/ppc/ppc405_uc.c +++ b/hw/ppc/ppc405_uc.c @@ -967,7 +967,6 @@ static void ppc405_cpc_realize(DeviceState *dev, Error = **errp) =20 static const Property ppc405_cpc_properties[] =3D { DEFINE_PROP_UINT32("sys-clk", Ppc405CpcState, sysclk, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc405_cpc_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 05a5ef6f773..0d6f8d8a04a 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -1025,7 +1025,6 @@ static const Property ppc460ex_pcie_props[] =3D { DEFINE_PROP_INT32("dcrn-base", PPC460EXPCIEState, dcrn_base, -1), DEFINE_PROP_LINK("cpu", PPC460EXPCIEState, cpu, TYPE_POWERPC_CPU, PowerPCCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc460ex_pcie_class_init(ObjectClass *klass, void *data) diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index 530a392f2a0..9ce97775109 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -234,7 +234,6 @@ static void ppc4xx_mal_finalize(Object *obj) static const Property ppc4xx_mal_properties[] =3D { DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0), DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc4xx_mal_class_init(ObjectClass *oc, void *data) @@ -542,7 +541,6 @@ bool ppc4xx_dcr_realize(Ppc4xxDcrDeviceState *dev, Powe= rPCCPU *cpu, static const Property ppc4xx_dcr_properties[] =3D { DEFINE_PROP_LINK("cpu", Ppc4xxDcrDeviceState, cpu, TYPE_POWERPC_CPU, PowerPCCPU *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc4xx_dcr_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c index 6cfb07a11fd..562bff8d53e 100644 --- a/hw/ppc/ppc4xx_sdram.c +++ b/hw/ppc/ppc4xx_sdram.c @@ -429,7 +429,6 @@ static const Property ppc4xx_sdram_ddr_props[] =3D { DEFINE_PROP_LINK("dram", Ppc4xxSdramDdrState, dram_mr, TYPE_MEMORY_REG= ION, MemoryRegion *), DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdrState, nbanks, 4), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc4xx_sdram_ddr_class_init(ObjectClass *oc, void *data) @@ -714,7 +713,6 @@ static const Property ppc4xx_sdram_ddr2_props[] =3D { DEFINE_PROP_LINK("dram", Ppc4xxSdramDdr2State, dram_mr, TYPE_MEMORY_RE= GION, MemoryRegion *), DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdr2State, nbanks, 4), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ppc4xx_sdram_ddr2_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c index ca475c69f45..6e2ae98625c 100644 --- a/hw/ppc/prep_systemio.c +++ b/hw/ppc/prep_systemio.c @@ -288,7 +288,6 @@ static const VMStateDescription vmstate_prep_systemio = =3D { static const Property prep_systemio_properties[] =3D { DEFINE_PROP_UINT8("ibm-planar-id", PrepSystemIoState, ibm_planar_id, 0= ), DEFINE_PROP_UINT8("equipment", PrepSystemIoState, equipment, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void prep_systemio_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c index bee9bc62d46..0e5d53b8b69 100644 --- a/hw/ppc/rs6000_mc.c +++ b/hw/ppc/rs6000_mc.c @@ -210,7 +210,6 @@ static const VMStateDescription vmstate_rs6000mc =3D { static const Property rs6000mc_properties[] =3D { DEFINE_PROP_UINT32("ram-size", RS6000MCState, ram_size, 0), DEFINE_PROP_BOOL("auto-configure", RS6000MCState, autoconfigure, true), - DEFINE_PROP_END_OF_LIST() }; =20 static void rs6000mc_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 88d743a3c3f..559dd918e13 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -363,7 +363,6 @@ static void spapr_cpu_core_realize(DeviceState *dev, Er= ror **errp) =20 static const Property spapr_cpu_core_properties[] =3D { DEFINE_PROP_INT32("node-id", SpaprCpuCore, node_id, CPU_UNSET_NUMA_NOD= E_ID), - DEFINE_PROP_END_OF_LIST() }; =20 static void spapr_cpu_core_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c index 8bcce4146a5..6f875d73b25 100644 --- a/hw/ppc/spapr_nvdimm.c +++ b/hw/ppc/spapr_nvdimm.c @@ -887,7 +887,6 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm) #ifdef CONFIG_LIBPMEM static const Property spapr_nvdimm_properties[] =3D { DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, fa= lse), - DEFINE_PROP_END_OF_LIST(), }; #endif =20 diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 3edff528ca1..0dcbd5900cc 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2055,7 +2055,6 @@ static const Property spapr_phb_properties[] =3D { pcie_ecs, true), DEFINE_PROP_BOOL("pre-5.1-associativity", SpaprPhbState, pre_5_1_assoc, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_spapr_pci_lsi =3D { diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 51c3a54d45d..6935f00832d 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -134,7 +134,6 @@ static const Property spapr_rng_properties[] =3D { DEFINE_PROP_BOOL("use-kvm", SpaprRngState, use_kvm, false), DEFINE_PROP_LINK("rng", SpaprRngState, backend, TYPE_RNG_BACKEND, RngBackend *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void spapr_rng_class_init(ObjectClass *oc, void *data) diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c index 37521b88cbb..2a17a5108bd 100644 --- a/hw/ppc/spapr_tpm_proxy.c +++ b/hw/ppc/spapr_tpm_proxy.c @@ -147,7 +147,6 @@ static void spapr_tpm_proxy_unrealize(DeviceState *d) =20 static const Property spapr_tpm_proxy_properties[] =3D { DEFINE_PROP_STRING("host-path", SpaprTpmProxy, host_path), - DEFINE_PROP_END_OF_LIST(), }; =20 static void spapr_tpm_proxy_class_init(ObjectClass *k, void *data) diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c index 6f84fdd3faf..ee9a22bba36 100644 --- a/hw/remote/proxy.c +++ b/hw/remote/proxy.c @@ -193,7 +193,6 @@ static void pci_proxy_write_config(PCIDevice *d, uint32= _t addr, uint32_t val, =20 static const Property proxy_properties[] =3D { DEFINE_PROP_STRING("fd", PCIProxyDev, fd), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pci_proxy_dev_class_init(ObjectClass *klass, void *data) diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index 8ce85ea9f73..bc26b5313a6 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -308,7 +308,6 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_s= oc, Error **errp) =20 static const Property lowrisc_ibex_soc_props[] =3D { DEFINE_PROP_UINT32("resetvec", LowRISCIbexSoCState, resetvec, 0x200004= 00), - DEFINE_PROP_END_OF_LIST() }; =20 static void lowrisc_ibex_soc_class_init(ObjectClass *oc, void *data) diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c index a695314bbeb..257a5faa5f6 100644 --- a/hw/riscv/riscv-iommu-pci.c +++ b/hw/riscv/riscv-iommu-pci.c @@ -163,7 +163,6 @@ static const Property riscv_iommu_pci_properties[] =3D { DEFINE_PROP_UINT16("device-id", RISCVIOMMUStatePci, device_id, PCI_DEVICE_ID_REDHAT_RISCV_IOMMU), DEFINE_PROP_UINT8("revision", RISCVIOMMUStatePci, revision, 0x01), - DEFINE_PROP_END_OF_LIST(), }; =20 static void riscv_iommu_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index 07fed36986c..41f3e6cf7cf 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -2248,7 +2248,6 @@ static const Property riscv_iommu_properties[] =3D { DEFINE_PROP_BOOL("g-stage", RISCVIOMMUState, enable_g_stage, TRUE), DEFINE_PROP_LINK("downstream-mr", RISCVIOMMUState, target_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void riscv_iommu_class_init(ObjectClass *klass, void* data) diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c index 0df454772fa..74b91ac60ca 100644 --- a/hw/riscv/riscv_hart.c +++ b/hw/riscv/riscv_hart.c @@ -33,7 +33,6 @@ static const Property riscv_harts_props[] =3D { DEFINE_PROP_STRING("cpu-type", RISCVHartArrayState, cpu_type), DEFINE_PROP_UINT64("resetvec", RISCVHartArrayState, resetvec, DEFAULT_RSTVEC), - DEFINE_PROP_END_OF_LIST(), }; =20 static void riscv_harts_cpu_reset(void *opaque) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 124ffd48424..f5c01dbbd00 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -939,7 +939,6 @@ static void sifive_u_soc_realize(DeviceState *dev, Erro= r **errp) static const Property sifive_u_soc_props[] =3D { DEFINE_PROP_UINT32("serial", SiFiveUSoCState, serial, OTP_SERIAL), DEFINE_PROP_STRING("cpu-type", SiFiveUSoCState, cpu_type), - DEFINE_PROP_END_OF_LIST() }; =20 static void sifive_u_soc_class_init(ObjectClass *oc, void *data) diff --git a/hw/rtc/allwinner-rtc.c b/hw/rtc/allwinner-rtc.c index 838db721362..b56098b0a98 100644 --- a/hw/rtc/allwinner-rtc.c +++ b/hw/rtc/allwinner-rtc.c @@ -313,7 +313,6 @@ static const VMStateDescription allwinner_rtc_vmstate = =3D { =20 static const Property allwinner_rtc_properties[] =3D { DEFINE_PROP_INT32("base-year", AwRtcState, base_year, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void allwinner_rtc_class_init(ObjectClass *klass, void *data) diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c index 389f192efa4..cd11bf8208f 100644 --- a/hw/rtc/goldfish_rtc.c +++ b/hw/rtc/goldfish_rtc.c @@ -289,7 +289,6 @@ static void goldfish_rtc_realize(DeviceState *d, Error = **errp) static const Property goldfish_rtc_properties[] =3D { DEFINE_PROP_BOOL("big-endian", GoldfishRTCState, big_endian, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void goldfish_rtc_class_init(ObjectClass *klass, void *data) diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index 51f80d27ef3..38bc8dcf100 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -81,7 +81,6 @@ static const Property m48t59_isa_properties[] =3D { DEFINE_PROP_INT32("base-year", M48txxISAState, state.base_year, 0), DEFINE_PROP_UINT32("iobase", M48txxISAState, io_base, 0x74), DEFINE_PROP_UINT8("irq", M48txxISAState, isairq, 8), - DEFINE_PROP_END_OF_LIST(), }; =20 static void m48t59_reset_isa(DeviceState *d) diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index 5a2c7b4abdd..57c17e51336 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -620,7 +620,6 @@ static void m48txx_sysbus_toggle_lock(Nvram *obj, int l= ock) =20 static const Property m48t59_sysbus_properties[] =3D { DEFINE_PROP_INT32("base-year", M48txxSysBusState, state.base_year, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void m48txx_sysbus_class_init(ObjectClass *klass, void *data) diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index 973ed9914d0..37f247fce88 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -966,7 +966,6 @@ static const Property mc146818rtc_properties[] =3D { DEFINE_PROP_UINT8("irq", MC146818RtcState, isairq, RTC_ISA_IRQ), DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", MC146818RtcState, lost_tick_policy, LOST_TICK_POLICY_DISCARD), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rtc_reset_enter(Object *obj, ResetType type) diff --git a/hw/rtc/pl031.c b/hw/rtc/pl031.c index 1dc8e6e00ff..32ce5bbb99f 100644 --- a/hw/rtc/pl031.c +++ b/hw/rtc/pl031.c @@ -330,7 +330,6 @@ static const Property pl031_properties[] =3D { */ DEFINE_PROP_BOOL("migrate-tick-offset", PL031State, migrate_tick_offset, true), - DEFINE_PROP_END_OF_LIST() }; =20 static void pl031_class_init(ObjectClass *klass, void *data) diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index dfa27bc94ef..da1a1cc00ed 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -262,7 +262,6 @@ static const Property rx62n_properties[] =3D { MemoryRegion *), DEFINE_PROP_BOOL("load-kernel", RX62NState, kernel, false), DEFINE_PROP_UINT32("xtal-frequency-hz", RX62NState, xtal_freq_hz, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rx62n_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index 0d10c3ed552..494faebb5a8 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -85,7 +85,6 @@ static const Property ccw_device_properties[] =3D { DEFINE_PROP_CSS_DEV_ID("devno", CcwDevice, devno), DEFINE_PROP_CSS_DEV_ID_RO("dev_id", CcwDevice, dev_id), DEFINE_PROP_CSS_DEV_ID_RO("subch_id", CcwDevice, subch_id), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ccw_device_reset_hold(Object *obj, ResetType type) diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c index 860a04a7da2..04ab1f6402c 100644 --- a/hw/s390x/css-bridge.c +++ b/hw/s390x/css-bridge.c @@ -123,7 +123,6 @@ VirtualCssBus *virtual_css_bus_init(void) static const Property virtual_css_bridge_properties[] =3D { DEFINE_PROP_BOOL("css_dev_path", VirtualCssBridge, css_dev_path, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static bool prop_get_true(Object *obj, Error **errp) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 88a97f00854..0344c02ecec 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -299,7 +299,6 @@ static const Property s390_ipl_properties[] =3D { DEFINE_PROP_BOOL("enforce_bios", S390IPLState, enforce_bios, false), DEFINE_PROP_BOOL("iplbext_migration", S390IPLState, iplbext_migration, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void s390_ipl_set_boot_menu(S390IPLState *ipl) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 22e6be67aff..5fbbf41a3db 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -1488,7 +1488,6 @@ static const Property s390_pci_device_properties[] = =3D { DEFINE_PROP_BOOL("interpret", S390PCIBusDevice, interp, true), DEFINE_PROP_BOOL("forwarding-assist", S390PCIBusDevice, forwarding_ass= ist, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription s390_pci_device_vmstate =3D { diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 6d0a47ed731..4409e62b6a5 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -477,7 +477,6 @@ static void s390_skeys_realize(DeviceState *dev, Error = **errp) =20 static const Property s390_skeys_props[] =3D { DEFINE_PROP_BOOL("migration-enabled", S390SKeysState, migration_enable= d, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void s390_skeys_class_init(ObjectClass *oc, void *data) diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 6c69c01e1f1..8e07acbddc9 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -362,7 +362,6 @@ static void s390_stattrib_realize(DeviceState *dev, Err= or **errp) =20 static const Property s390_stattrib_props[] =3D { DEFINE_PROP_BOOL("migration-enabled", S390StAttribState, migration_ena= bled, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void s390_stattrib_class_init(ObjectClass *oc, void *data) diff --git a/hw/s390x/vhost-scsi-ccw.c b/hw/s390x/vhost-scsi-ccw.c index 0be0f8a82c4..e6bf0c55bc2 100644 --- a/hw/s390x/vhost-scsi-ccw.c +++ b/hw/s390x/vhost-scsi-ccw.c @@ -44,7 +44,6 @@ static void vhost_ccw_scsi_instance_init(Object *obj) static const Property vhost_ccw_scsi_properties[] =3D { DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/vhost-user-fs-ccw.c b/hw/s390x/vhost-user-fs-ccw.c index 934378aaec4..6a9654d77b4 100644 --- a/hw/s390x/vhost-user-fs-ccw.c +++ b/hw/s390x/vhost-user-fs-ccw.c @@ -28,7 +28,6 @@ static const Property vhost_user_fs_ccw_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_fs_ccw_realize(VirtioCcwDevice *ccw_dev, Error **er= rp) diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c index 3ba4008b4b6..875ccf3485e 100644 --- a/hw/s390x/vhost-vsock-ccw.c +++ b/hw/s390x/vhost-vsock-ccw.c @@ -25,7 +25,6 @@ struct VHostVSockCCWState { static const Property vhost_vsock_ccw_properties[] =3D { DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_vsock_ccw_realize(VirtioCcwDevice *ccw_dev, Error **errp) diff --git a/hw/s390x/virtio-ccw-9p.c b/hw/s390x/virtio-ccw-9p.c index c10b084d408..287ae2ba767 100644 --- a/hw/s390x/virtio-ccw-9p.c +++ b/hw/s390x/virtio-ccw-9p.c @@ -46,7 +46,6 @@ static const Property virtio_ccw_9p_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-balloon.c b/hw/s390x/virtio-ccw-balloon.c index bbbed494b3f..1180efaf6d5 100644 --- a/hw/s390x/virtio-ccw-balloon.c +++ b/hw/s390x/virtio-ccw-balloon.c @@ -51,7 +51,6 @@ static const Property virtio_ccw_balloon_properties[] =3D= { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-blk.c b/hw/s390x/virtio-ccw-blk.c index 31828512346..db9d442ffb5 100644 --- a/hw/s390x/virtio-ccw-blk.c +++ b/hw/s390x/virtio-ccw-blk.c @@ -49,7 +49,6 @@ static const Property virtio_ccw_blk_properties[] =3D { DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), DEFINE_PROP_CCW_LOADPARM("loadparm", CcwDevice, loadparm), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-crypto.c b/hw/s390x/virtio-ccw-crypto.c index b4cd7605c95..b693f87c70e 100644 --- a/hw/s390x/virtio-ccw-crypto.c +++ b/hw/s390x/virtio-ccw-crypto.c @@ -49,7 +49,6 @@ static const Property virtio_ccw_crypto_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index c44dc2d3559..a6b14c25d97 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -47,7 +47,6 @@ static const Property virtio_ccw_gpu_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-input.c b/hw/s390x/virtio-ccw-input.c index 040a9e04a9f..6ca10d58eeb 100644 --- a/hw/s390x/virtio-ccw-input.c +++ b/hw/s390x/virtio-ccw-input.c @@ -48,7 +48,6 @@ static const Property virtio_ccw_input_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_input_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-net.c b/hw/s390x/virtio-ccw-net.c index c41d347034e..80a5581baf8 100644 --- a/hw/s390x/virtio-ccw-net.c +++ b/hw/s390x/virtio-ccw-net.c @@ -52,7 +52,6 @@ static const Property virtio_ccw_net_properties[] =3D { DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), DEFINE_PROP_CCW_LOADPARM("loadparm", CcwDevice, loadparm), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_net_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-rng.c b/hw/s390x/virtio-ccw-rng.c index c9a15c4eb68..ccd124ee917 100644 --- a/hw/s390x/virtio-ccw-rng.c +++ b/hw/s390x/virtio-ccw-rng.c @@ -48,7 +48,6 @@ static const Property virtio_ccw_rng_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-scsi.c b/hw/s390x/virtio-ccw-scsi.c index bec9a735188..bfcea3cfe78 100644 --- a/hw/s390x/virtio-ccw-scsi.c +++ b/hw/s390x/virtio-ccw-scsi.c @@ -58,7 +58,6 @@ static const Property virtio_ccw_scsi_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data) diff --git a/hw/s390x/virtio-ccw-serial.c b/hw/s390x/virtio-ccw-serial.c index 037d4f9db1c..59743d1e256 100644 --- a/hw/s390x/virtio-ccw-serial.c +++ b/hw/s390x/virtio-ccw-serial.c @@ -58,7 +58,6 @@ static const Property virtio_ccw_serial_properties[] =3D { VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data) diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index a06113d9083..de628ae89b1 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -1414,7 +1414,6 @@ static const Property mptsas_properties[] =3D { DEFINE_PROP_UINT64("sas_address", MPTSASState, sas_addr, 0), /* TODO: test MSI support under Windows */ DEFINE_PROP_ON_OFF_AUTO("msi", MPTSASState, msi, ON_OFF_AUTO_AUTO), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mptsas1068_class_init(ObjectClass *oc, void *data) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 2f1678d51e7..181720b7a8c 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1947,7 +1947,6 @@ static const Property scsi_props[] =3D { DEFINE_PROP_UINT32("channel", SCSIDevice, channel, 0), DEFINE_PROP_UINT32("scsi-id", SCSIDevice, id, -1), DEFINE_PROP_UINT32("lun", SCSIDevice, lun, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void scsi_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index a47b80907f1..16351b49883 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -3227,7 +3227,6 @@ static const Property scsi_hd_properties[] =3D { quirks, SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPL= E, 0), DEFINE_BLOCK_CHS_PROPERTIES(SCSIDiskState, qdev.conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_scsi_disk_state =3D { @@ -3285,7 +3284,6 @@ static const Property scsi_cd_properties[] =3D { 0), DEFINE_PROP_BIT("quirk_mode_page_truncated", SCSIDiskState, quirks, SCSI_DISK_QUIRK_MODE_PAGE_TRUNCATED, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void scsi_cd_class_initfn(ObjectClass *klass, void *data) @@ -3323,7 +3321,6 @@ static const Property scsi_block_properties[] =3D { -1), DEFINE_PROP_UINT32("io_timeout", SCSIDiskState, qdev.io_timeout, DEFAULT_IO_TIMEOUT), - DEFINE_PROP_END_OF_LIST(), }; =20 static void scsi_block_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index d7ae7549d06..0290a196ccd 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -777,7 +777,6 @@ static const Property scsi_generic_properties[] =3D { DEFINE_PROP_BOOL("share-rw", SCSIDevice, conf.share_rw, false), DEFINE_PROP_UINT32("io_timeout", SCSIDevice, io_timeout, DEFAULT_IO_TIMEOUT), - DEFINE_PROP_END_OF_LIST(), }; =20 static int scsi_generic_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index 7c55e4d40f2..6962194eaac 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -1252,7 +1252,6 @@ static int spapr_vscsi_devnode(SpaprVioDevice *dev, v= oid *fdt, int node_off) =20 static const Property spapr_vscsi_properties[] =3D { DEFINE_SPAPR_PROPERTIES(VSCSIState, vdev), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_spapr_vscsi =3D { diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index effb8dab1f0..9f760663a00 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -362,7 +362,6 @@ static const Property vhost_scsi_properties[] =3D { DEFINE_PROP_BOOL("migratable", VHostSCSICommon, migratable, false), DEFINE_PROP_BOOL("worker_per_virtqueue", VirtIOSCSICommon, conf.worker_per_virtqueue, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_scsi_class_init(ObjectClass *klass, void *data) diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index d5265c57bce..689bc6c13ec 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -360,7 +360,6 @@ static const Property vhost_user_scsi_properties[] =3D { DEFINE_PROP_BIT64("t10_pi", VHostSCSICommon, host_features, VIRTIO_SCSI_F_T10_PI, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_scsi_reset(VirtIODevice *vdev) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index c0a4f1a6208..eb70a7a46e5 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -1302,7 +1302,6 @@ static const Property virtio_scsi_properties[] =3D { VIRTIO_SCSI_F_CHANGE, true= ), DEFINE_PROP_LINK("iothread", VirtIOSCSI, parent_obj.conf.iothread, TYPE_IOTHREAD, IOThread *), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_virtio_scsi =3D { diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 46cec531cc2..f07e377cb88 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1302,7 +1302,6 @@ static const Property pvscsi_properties[] =3D { PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pvscsi_realize(DeviceState *qdev, Error **errp) diff --git a/hw/sd/allwinner-sdhost.c b/hw/sd/allwinner-sdhost.c index be39ec2e71a..0b235bccfd2 100644 --- a/hw/sd/allwinner-sdhost.c +++ b/hw/sd/allwinner-sdhost.c @@ -811,7 +811,6 @@ static const VMStateDescription vmstate_allwinner_sdhos= t =3D { static const Property allwinner_sdhost_properties[] =3D { DEFINE_PROP_LINK("dma-memory", AwSdHostState, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void allwinner_sdhost_init(Object *obj) diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c index 99703f18429..12cbbae5e77 100644 --- a/hw/sd/aspeed_sdhci.c +++ b/hw/sd/aspeed_sdhci.c @@ -206,7 +206,6 @@ static const VMStateDescription vmstate_aspeed_sdhci = =3D { =20 static const Property aspeed_sdhci_properties[] =3D { DEFINE_PROP_UINT8("num-slots", AspeedSDHCIState, num_slots, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_sdhci_class_init(ObjectClass *classp, void *data) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index b994ef581e6..779bac6631f 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2800,19 +2800,16 @@ static void emmc_realize(DeviceState *dev, Error **= errp) =20 static const Property sdmmc_common_properties[] =3D { DEFINE_PROP_DRIVE("drive", SDState, blk), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property sd_properties[] =3D { DEFINE_PROP_UINT8("spec_version", SDState, spec_version, SD_PHY_SPECv3_01_VERS), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property emmc_properties[] =3D { DEFINE_PROP_UINT64("boot-partition-size", SDState, boot_part_size, 0), DEFINE_PROP_UINT8("boot-config", SDState, boot_config, 0x0), - DEFINE_PROP_END_OF_LIST() }; =20 static void sdmmc_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c index 83892a7a152..5268c0dee50 100644 --- a/hw/sd/sdhci-pci.c +++ b/hw/sd/sdhci-pci.c @@ -24,7 +24,6 @@ =20 static const Property sdhci_pci_properties[] =3D { DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sdhci_pci_realize(PCIDevice *dev, Error **errp) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index e697ee05b38..64a936fcf06 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1550,7 +1550,6 @@ static const Property sdhci_sysbus_properties[] =3D { false), DEFINE_PROP_LINK("dma", SDHCIState, dma_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sdhci_sysbus_init(Object *obj) diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 3d6fcdf5760..8c1fc82534f 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -370,7 +370,6 @@ static void iommu_init(Object *obj) =20 static const Property iommu_properties[] =3D { DEFINE_PROP_UINT32("version", IOMMUState, version, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void iommu_class_init(ObjectClass *klass, void *data) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 05b8c7369e2..b6f65e8d2fe 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -377,7 +377,6 @@ static void ebus_realize(PCIDevice *pci_dev, Error **er= rp) static const Property ebus_properties[] =3D { DEFINE_PROP_UINT64("console-serial-base", EbusState, console_serial_base, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ebus_class_init(ObjectClass *klass, void *data) @@ -529,7 +528,6 @@ static void ram_init(hwaddr addr, ram_addr_t RAM_size) =20 static const Property ram_properties[] =3D { DEFINE_PROP_UINT64("size", RamDevice, size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ram_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index bbdd4e47869..faef1a8e5b8 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -1292,7 +1292,6 @@ static const Property aspeed_smc_properties[] =3D { DEFINE_PROP_UINT64("dram-base", AspeedSMCState, dram_base, 0), DEFINE_PROP_LINK("dram", AspeedSMCState, dram_mr, TYPE_MEMORY_REGION, MemoryRegion *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_smc_class_init(ObjectClass *klass, void *data) @@ -1340,7 +1339,6 @@ static const Property aspeed_smc_flash_properties[] = =3D { DEFINE_PROP_UINT8("cs", AspeedSMCFlash, cs, 0), DEFINE_PROP_LINK("controller", AspeedSMCFlash, controller, TYPE_ASPEED= _SMC, AspeedSMCState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_smc_flash_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/ibex_spi_host.c b/hw/ssi/ibex_spi_host.c index 60a0b17b628..46c7b633c26 100644 --- a/hw/ssi/ibex_spi_host.c +++ b/hw/ssi/ibex_spi_host.c @@ -563,7 +563,6 @@ static const MemoryRegionOps ibex_spi_ops =3D { =20 static const Property ibex_spi_properties[] =3D { DEFINE_PROP_UINT32("num_cs", IbexSPIHostState, num_cs, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_ibex =3D { diff --git a/hw/ssi/npcm7xx_fiu.c b/hw/ssi/npcm7xx_fiu.c index fdd3ad2fdc7..21fc4890383 100644 --- a/hw/ssi/npcm7xx_fiu.c +++ b/hw/ssi/npcm7xx_fiu.c @@ -543,7 +543,6 @@ static const VMStateDescription vmstate_npcm7xx_fiu =3D= { =20 static const Property npcm7xx_fiu_properties[] =3D { DEFINE_PROP_INT32("cs-count", NPCM7xxFIUState, cs_count, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void npcm7xx_fiu_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index 4ca9c469a4b..15e25bd1be3 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -1198,7 +1198,6 @@ static const MemoryRegionOps pnv_spi_xscom_ops =3D { static const Property pnv_spi_properties[] =3D { DEFINE_PROP_UINT32("spic_num", PnvSpi, spic_num, 0), DEFINE_PROP_UINT8("transfer_len", PnvSpi, transfer_len, 4), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pnv_spi_realize(DeviceState *dev, Error **errp) diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c index 74587477793..76f8654f412 100644 --- a/hw/ssi/sifive_spi.c +++ b/hw/ssi/sifive_spi.c @@ -330,7 +330,6 @@ static void sifive_spi_realize(DeviceState *dev, Error = **errp) =20 static const Property sifive_spi_properties[] =3D { DEFINE_PROP_UINT32("num-cs", SiFiveSPIState, num_cs, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_spi_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c index cab0014c3f0..872c4e8036e 100644 --- a/hw/ssi/ssi.c +++ b/hw/ssi/ssi.c @@ -110,7 +110,6 @@ static void ssi_peripheral_realize(DeviceState *dev, Er= ror **errp) =20 static const Property ssi_peripheral_properties[] =3D { DEFINE_PROP_UINT8("cs", SSIPeripheral, cs_index, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ssi_peripheral_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c index 588c1ec071c..fd1ff12eb1d 100644 --- a/hw/ssi/xilinx_spi.c +++ b/hw/ssi/xilinx_spi.c @@ -363,7 +363,6 @@ static const VMStateDescription vmstate_xilinx_spi =3D { =20 static const Property xilinx_spi_properties[] =3D { DEFINE_PROP_UINT8("num-ss-bits", XilinxSPI, num_cs, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_spi_class_init(ObjectClass *klass, void *data) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index f72cb3cbc87..984c1780872 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -1422,14 +1422,12 @@ static const VMStateDescription vmstate_xlnx_zynqmp= _qspips =3D { =20 static const Property xilinx_zynqmp_qspips_properties[] =3D { DEFINE_PROP_UINT32("dma-burst-size", XlnxZynqMPQSPIPS, dma_burst_size,= 64), - DEFINE_PROP_END_OF_LIST(), }; =20 static const Property xilinx_spips_properties[] =3D { DEFINE_PROP_UINT8("num-busses", XilinxSPIPS, num_busses, 1), DEFINE_PROP_UINT8("num-ss-bits", XilinxSPIPS, num_cs, 4), DEFINE_PROP_UINT8("num-txrx-bytes", XilinxSPIPS, num_txrx_bytes, 1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_qspips_class_init(ObjectClass *klass, void * data) diff --git a/hw/ssi/xlnx-versal-ospi.c b/hw/ssi/xlnx-versal-ospi.c index e51abe9de2c..9e96c9b69af 100644 --- a/hw/ssi/xlnx-versal-ospi.c +++ b/hw/ssi/xlnx-versal-ospi.c @@ -1829,7 +1829,6 @@ static const Property xlnx_versal_ospi_properties[] = =3D { DEFINE_PROP_BOOL("dac-with-indac", XlnxVersalOspi, dac_with_indac, fal= se), DEFINE_PROP_BOOL("indac-write-disabled", XlnxVersalOspi, ind_write_disabled, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xlnx_versal_ospi_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c index c0a91bab0c8..0c4eef2636a 100644 --- a/hw/timer/a9gtimer.c +++ b/hw/timer/a9gtimer.c @@ -375,7 +375,6 @@ static const VMStateDescription vmstate_a9_gtimer =3D { =20 static const Property a9_gtimer_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", A9GTimerState, num_cpu, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void a9_gtimer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c index 2904ccfb423..ddaf2128c2d 100644 --- a/hw/timer/allwinner-a10-pit.c +++ b/hw/timer/allwinner-a10-pit.c @@ -193,7 +193,6 @@ static const Property a10_pit_properties[] =3D { DEFINE_PROP_UINT32("clk1-freq", AwA10PITState, clk_freq[1], 0), DEFINE_PROP_UINT32("clk2-freq", AwA10PITState, clk_freq[2], 0), DEFINE_PROP_UINT32("clk3-freq", AwA10PITState, clk_freq[3], 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_a10_pit =3D { diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c index 6244a7a84f3..803dad1e8a6 100644 --- a/hw/timer/arm_mptimer.c +++ b/hw/timer/arm_mptimer.c @@ -302,7 +302,6 @@ static const VMStateDescription vmstate_arm_mptimer =3D= { =20 static const Property arm_mptimer_properties[] =3D { DEFINE_PROP_UINT32("num-cpu", ARMMPTimerState, num_cpu, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static void arm_mptimer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c index dfa034296c0..1213b77aa09 100644 --- a/hw/timer/arm_timer.c +++ b/hw/timer/arm_timer.c @@ -390,7 +390,6 @@ static const TypeInfo icp_pit_info =3D { static const Property sp804_properties[] =3D { DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000), DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sp804_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c index 4c16b5016e0..4868651ad48 100644 --- a/hw/timer/aspeed_timer.c +++ b/hw/timer/aspeed_timer.c @@ -677,7 +677,6 @@ static const VMStateDescription vmstate_aspeed_timer_st= ate =3D { static const Property aspeed_timer_properties[] =3D { DEFINE_PROP_LINK("scu", AspeedTimerCtrlState, scu, TYPE_ASPEED_SCU, AspeedSCUState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/avr_timer16.c b/hw/timer/avr_timer16.c index 2e3ce83c431..96baf9cf605 100644 --- a/hw/timer/avr_timer16.c +++ b/hw/timer/avr_timer16.c @@ -546,7 +546,6 @@ static const Property avr_timer16_properties[] =3D { DEFINE_PROP_UINT8("id", struct AVRTimer16State, id, 0), DEFINE_PROP_UINT64("cpu-frequency-hz", struct AVRTimer16State, cpu_freq_hz, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void avr_timer16_pr(void *opaque, int irq, int level) diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c index a7428ed938c..f0802b6eb6d 100644 --- a/hw/timer/grlib_gptimer.c +++ b/hw/timer/grlib_gptimer.c @@ -407,7 +407,6 @@ static const Property grlib_gptimer_properties[] =3D { DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz, 40000000), DEFINE_PROP_UINT32("irq-line", GPTimerUnit, irq_line, 8), DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void grlib_gptimer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 46886c379ed..2a45410c0da 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -750,7 +750,6 @@ static const Property hpet_device_properties[] =3D { DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false), DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0), DEFINE_PROP_BOOL("hpet-offset-saved", HPETState, hpet_offset_saved, tr= ue), - DEFINE_PROP_END_OF_LIST(), }; =20 static void hpet_device_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c index 953c1e11eb3..29105afcc33 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c @@ -240,7 +240,6 @@ static const VMStateDescription vmstate_pit_common =3D { =20 static const Property pit_common_properties[] =3D { DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pit_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/ibex_timer.c b/hw/timer/ibex_timer.c index fba4466a898..3ebc8700973 100644 --- a/hw/timer/ibex_timer.c +++ b/hw/timer/ibex_timer.c @@ -265,7 +265,6 @@ static const VMStateDescription vmstate_ibex_timer =3D { =20 static const Property ibex_timer_properties[] =3D { DEFINE_PROP_UINT32("timebase-freq", IbexTimerState, timebase_freq, 100= 00), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ibex_timer_init(Object *obj) diff --git a/hw/timer/mss-timer.c b/hw/timer/mss-timer.c index e5c5cd6a84e..594da64eae6 100644 --- a/hw/timer/mss-timer.c +++ b/hw/timer/mss-timer.c @@ -283,7 +283,6 @@ static const Property mss_timer_properties[] =3D { /* Libero GUI shows 100Mhz as default for clocks */ DEFINE_PROP_UINT32("clock-frequency", MSSTimerState, freq_hz, 100 * 1000000), - DEFINE_PROP_END_OF_LIST(), }; =20 static void mss_timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/nrf51_timer.c b/hw/timer/nrf51_timer.c index 48fccec1bfc..11ad8b575e4 100644 --- a/hw/timer/nrf51_timer.c +++ b/hw/timer/nrf51_timer.c @@ -381,7 +381,6 @@ static const VMStateDescription vmstate_nrf51_timer =3D= { =20 static const Property nrf51_timer_properties[] =3D { DEFINE_PROP_UINT8("id", NRF51TimerState, id, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nrf51_timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index 345145bfa80..6ec3fa54dd8 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -553,7 +553,6 @@ static const Property pxa25x_timer_dev_properties[] =3D= { DEFINE_PROP_UINT32("freq", PXA2xxTimerInfo, freq, PXA25X_FREQ), DEFINE_PROP_BIT("tm4", PXA2xxTimerInfo, flags, PXA2XX_TIMER_HAVE_TM4, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/renesas_cmt.c b/hw/timer/renesas_cmt.c index 6d451fa86b3..93e7f58cc20 100644 --- a/hw/timer/renesas_cmt.c +++ b/hw/timer/renesas_cmt.c @@ -255,7 +255,6 @@ static const VMStateDescription vmstate_rcmt =3D { =20 static const Property rcmt_properties[] =3D { DEFINE_PROP_UINT64("input-freq", RCMTState, input_freq, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rcmt_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c index 890f803cf8f..884349c2cc2 100644 --- a/hw/timer/renesas_tmr.c +++ b/hw/timer/renesas_tmr.c @@ -465,7 +465,6 @@ static const VMStateDescription vmstate_rtmr =3D { =20 static const Property rtmr_properties[] =3D { DEFINE_PROP_UINT64("input-freq", RTMRState, input_freq, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void rtmr_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/sifive_pwm.c b/hw/timer/sifive_pwm.c index 042c89c67a9..fc796e9bc30 100644 --- a/hw/timer/sifive_pwm.c +++ b/hw/timer/sifive_pwm.c @@ -408,7 +408,6 @@ static const Property sifive_pwm_properties[] =3D { /* 0.5Ghz per spec after FSBL */ DEFINE_PROP_UINT64("clock-frequency", struct SiFivePwmState, freq_hz, 500000000ULL), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sifive_pwm_init(Object *obj) diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c index 32991f44363..65b24e4f06b 100644 --- a/hw/timer/slavio_timer.c +++ b/hw/timer/slavio_timer.c @@ -422,7 +422,6 @@ static void slavio_timer_init(Object *obj) =20 static const Property slavio_timer_properties[] =3D { DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void slavio_timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/sse-timer.c b/hw/timer/sse-timer.c index 6b7a67941c4..e106739ea9c 100644 --- a/hw/timer/sse-timer.c +++ b/hw/timer/sse-timer.c @@ -442,7 +442,6 @@ static const VMStateDescription sse_timer_vmstate =3D { =20 static const Property sse_timer_properties[] =3D { DEFINE_PROP_LINK("counter", SSETimer, counter, TYPE_SSE_COUNTER, SSECo= unter *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void sse_timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index d9d745cd76f..4707190d6a2 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -301,7 +301,6 @@ static const VMStateDescription vmstate_stm32f2xx_timer= =3D { static const Property stm32f2xx_timer_properties[] =3D { DEFINE_PROP_UINT64("clock-frequency", struct STM32F2XXTimerState, freq_hz, 1000000000), - DEFINE_PROP_END_OF_LIST(), }; =20 static void stm32f2xx_timer_init(Object *obj) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 7fe3e83baa5..4955fe1b01b 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -245,7 +245,6 @@ static void xilinx_timer_init(Object *obj) static const Property xilinx_timer_properties[] =3D { DEFINE_PROP_UINT32("clock-frequency", XpsTimerState, freq_hz, 62 * 100= 0000), DEFINE_PROP_UINT8("one-timer-only", XpsTimerState, one_timer_only, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xilinx_timer_class_init(ObjectClass *klass, void *data) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 2bf6e7ffe96..e652679a1fc 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -229,7 +229,6 @@ static const VMStateDescription vmstate_tpm_crb =3D { static const Property tpm_crb_properties[] =3D { DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe), DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tpm_crb_reset(void *dev) diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index e15b67dd45e..797fd8b290e 100644 --- a/hw/tpm/tpm_spapr.c +++ b/hw/tpm/tpm_spapr.c @@ -367,7 +367,6 @@ static const VMStateDescription vmstate_spapr_vtpm =3D { static const Property tpm_spapr_properties[] =3D { DEFINE_SPAPR_PROPERTIES(SpaprTpmState, vdev), DEFINE_PROP_TPMBE("tpmdev", SpaprTpmState, be_driver), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tpm_spapr_realizefn(SpaprVioDevice *dev, Error **errp) diff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c index b27af230cdc..504328e3b0d 100644 --- a/hw/tpm/tpm_tis_i2c.c +++ b/hw/tpm/tpm_tis_i2c.c @@ -493,7 +493,6 @@ static int tpm_tis_i2c_send(I2CSlave *i2c, uint8_t data) =20 static const Property tpm_tis_i2c_properties[] =3D { DEFINE_PROP_TPMBE("tpmdev", TPMStateI2C, state.be_driver), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tpm_tis_i2c_realizefn(DeviceState *dev, Error **errp) diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index 9b2160972a9..876cb02cb51 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -95,7 +95,6 @@ static const Property tpm_tis_isa_properties[] =3D { DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver), DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tpm_tis_isa_initfn(Object *obj) diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 88c1f1e4788..ee0bfe9538e 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -93,7 +93,6 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) static const Property tpm_tis_sysbus_properties[] =3D { DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver), - DEFINE_PROP_END_OF_LIST(), }; =20 static void tpm_tis_sysbus_initfn(Object *obj) diff --git a/hw/ufs/lu.c b/hw/ufs/lu.c index 74ff52ad096..4100ea28e29 100644 --- a/hw/ufs/lu.c +++ b/hw/ufs/lu.c @@ -277,7 +277,6 @@ static UfsReqResult ufs_process_scsi_cmd(UfsLu *lu, Ufs= Request *req) static const Property ufs_lu_props[] =3D { DEFINE_PROP_DRIVE("drive", UfsLu, conf.blk), DEFINE_PROP_UINT8("lun", UfsLu, lun, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static bool ufs_add_lu(UfsHc *u, UfsLu *lu, Error **errp) diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index fe77158439d..8d26d137918 100644 --- a/hw/ufs/ufs.c +++ b/hw/ufs/ufs.c @@ -1758,7 +1758,6 @@ static const Property ufs_props[] =3D { DEFINE_PROP_UINT8("nutmrs", UfsHc, params.nutmrs, 8), DEFINE_PROP_BOOL("mcq", UfsHc, params.mcq, false), DEFINE_PROP_UINT8("mcq-maxq", UfsHc, params.mcq_maxq, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription ufs_vmstate =3D { diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 80e6a928202..7e4ff36fed2 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -24,7 +24,6 @@ static const Property usb_props[] =3D { DEFINE_PROP_BIT("msos-desc", USBDevice, flags, USB_DEV_FLAG_MSOS_DESC_ENABLE, true), DEFINE_PROP_STRING("pcap", USBDevice, pcap_filename), - DEFINE_PROP_END_OF_LIST() }; =20 static void usb_bus_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 7cb600e3c86..fae212f0530 100644 --- a/hw/usb/canokey.c +++ b/hw/usb/canokey.c @@ -298,7 +298,6 @@ static void canokey_unrealize(USBDevice *base) =20 static const Property canokey_properties[] =3D { DEFINE_PROP_STRING("file", CanoKeyState, file), - DEFINE_PROP_END_OF_LIST(), }; =20 static void canokey_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index dd58333943b..b1e330f21d7 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -589,7 +589,6 @@ static const Property emulated_card_properties[] =3D { DEFINE_PROP_STRING("cert3", EmulatedState, cert3), DEFINE_PROP_STRING("db", EmulatedState, db), DEFINE_PROP_UINT8("debug", EmulatedState, debug, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void emulated_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index f97dcf767f5..bf81485f876 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -391,7 +391,6 @@ static const VMStateDescription passthru_vmstate =3D { static const Property passthru_card_properties[] =3D { DEFINE_PROP_CHR("chardev", PassthruState, cs), DEFINE_PROP_UINT8("debug", PassthruState, debug, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void passthru_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 6007f16d30b..40f031252a7 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -995,7 +995,6 @@ static const Property usb_audio_properties[] =3D { DEFINE_PROP_UINT32("debug", USBAudioState, debug, 0), DEFINE_PROP_UINT32("buffer", USBAudioState, buffer_user, 0), DEFINE_PROP_BOOL("multi", USBAudioState, multi, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_audio_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index d83f67b9849..accdd460e3b 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -797,7 +797,6 @@ static const Property usb_tablet_properties[] =3D { DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2), DEFINE_PROP_STRING("display", USBHIDState, display), DEFINE_PROP_UINT32("head", USBHIDState, head, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_tablet_class_initfn(ObjectClass *klass, void *data) @@ -820,7 +819,6 @@ static const TypeInfo usb_tablet_info =3D { =20 static const Property usb_mouse_properties[] =3D { DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_mouse_class_initfn(ObjectClass *klass, void *data) @@ -844,7 +842,6 @@ static const TypeInfo usb_mouse_info =3D { static const Property usb_keyboard_properties[] =3D { DEFINE_PROP_UINT32("usb_version", USBHIDState, usb_version, 2), DEFINE_PROP_STRING("display", USBHIDState, display), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_keyboard_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 317ca0b0811..3880e2aca8e 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -668,7 +668,6 @@ static const VMStateDescription vmstate_usb_hub =3D { static const Property usb_hub_properties[] =3D { DEFINE_PROP_UINT32("ports", USBHubState, num_ports, 8), DEFINE_PROP_BOOL("port-power", USBHubState, port_power, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_hub_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 7994727e5ea..326c92a43d0 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -2082,7 +2082,6 @@ static const Property mtp_properties[] =3D { DEFINE_PROP_STRING("rootdir", MTPState, root), DEFINE_PROP_STRING("desc", MTPState, desc), DEFINE_PROP_BOOL("readonly", MTPState, readonly, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_mtp_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 6c4f5776d48..81863105acf 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -1409,7 +1409,6 @@ static const VMStateDescription vmstate_usb_net =3D { =20 static const Property net_properties[] =3D { DEFINE_NIC_PROPERTIES(USBNetState, conf), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_net_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 0c3e9160ec3..a0821db902f 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -637,7 +637,6 @@ static const VMStateDescription vmstate_usb_serial =3D { static const Property serial_properties[] =3D { DEFINE_PROP_CHR("chardev", USBSerialState, cs), DEFINE_PROP_BOOL("always-plugged", USBSerialState, always_plugged, fal= se), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_serial_dev_class_init(ObjectClass *klass, void *data) @@ -679,7 +678,6 @@ static const TypeInfo serial_info =3D { =20 static const Property braille_properties[] =3D { DEFINE_PROP_CHR("chardev", USBSerialState, cs), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_braille_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index c3c02f0aad1..73deb3ce839 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1173,7 +1173,6 @@ static Answer *ccid_peek_next_answer(USBCCIDState *s) =20 static const Property ccid_props[] =3D { DEFINE_PROP_UINT32("slot", struct CCIDCardState, slot, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const TypeInfo ccid_bus_info =3D { @@ -1433,7 +1432,6 @@ static const VMStateDescription ccid_vmstate =3D { =20 static const Property ccid_properties[] =3D { DEFINE_PROP_UINT8("debug", USBCCIDState, debug, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ccid_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-storage-classic.c b/hw/usb/dev-storage-classic.c index ca037ba96f9..818f58db2fa 100644 --- a/hw/usb/dev-storage-classic.c +++ b/hw/usb/dev-storage-classic.c @@ -72,7 +72,6 @@ static const Property msd_properties[] =3D { DEFINE_BLOCK_ERROR_PROPERTIES(MSDState, conf), DEFINE_PROP_BOOL("removable", MSDState, removable, false), DEFINE_PROP_BOOL("commandlog", MSDState, commandlog, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_msd_class_storage_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 57e8d200514..44e30013d73 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -955,7 +955,6 @@ static const VMStateDescription vmstate_usb_uas =3D { =20 static const Property uas_properties[] =3D { DEFINE_PROP_UINT32("log-scsi-req", UASDevice, requestlog, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_uas_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 6a10f3e9cd8..e8152719f8e 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -1450,7 +1450,6 @@ const VMStateDescription vmstate_dwc2_state =3D { =20 static const Property dwc2_usb_properties[] =3D { DEFINE_PROP_UINT32("usb_version", DWC2State, usb_version, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void dwc2_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/hcd-dwc3.c b/hw/usb/hcd-dwc3.c index ff970bd9891..9ce9ba0b046 100644 --- a/hw/usb/hcd-dwc3.c +++ b/hw/usb/hcd-dwc3.c @@ -659,7 +659,6 @@ static const VMStateDescription vmstate_usb_dwc3 =3D { static const Property usb_dwc3_properties[] =3D { DEFINE_PROP_UINT32("DWC_USB3_USERID", USBDWC3, cfg.dwc_usb3_user, 0x12345678), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_dwc3_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index 374f25c5ede..d410c38a8a2 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -137,7 +137,6 @@ static void usb_ehci_pci_write_config(PCIDevice *dev, u= int32_t addr, =20 static const Property ehci_pci_properties[] =3D { DEFINE_PROP_UINT32("maxframes", EHCIPCIState, ehci.maxframes, 128), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_ehci_pci =3D { diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index f4e08aab89c..768c3dd797f 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -34,7 +34,6 @@ static const Property ehci_sysbus_properties[] =3D { DEFINE_PROP_UINT32("maxframes", EHCISysBusState, ehci.maxframes, 128), DEFINE_PROP_BOOL("companion-enable", EHCISysBusState, ehci.companion_e= nable, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_ehci_sysbus_realize(DeviceState *dev, Error **errp) diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index 459644cc1bb..b3684a2ef6b 100644 --- a/hw/usb/hcd-ohci-pci.c +++ b/hw/usb/hcd-ohci-pci.c @@ -113,7 +113,6 @@ static const Property ohci_pci_properties[] =3D { DEFINE_PROP_STRING("masterbus", OHCIPCIState, masterbus), DEFINE_PROP_UINT32("num-ports", OHCIPCIState, num_ports, 3), DEFINE_PROP_UINT32("firstport", OHCIPCIState, firstport, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_ohci =3D { diff --git a/hw/usb/hcd-ohci-sysbus.c b/hw/usb/hcd-ohci-sysbus.c index 81cf2e558d1..15311949b39 100644 --- a/hw/usb/hcd-ohci-sysbus.c +++ b/hw/usb/hcd-ohci-sysbus.c @@ -62,7 +62,6 @@ static const Property ohci_sysbus_properties[] =3D { DEFINE_PROP_UINT32("num-ports", OHCISysBusState, num_ports, 3), DEFINE_PROP_UINT32("firstport", OHCISysBusState, firstport, 0), DEFINE_PROP_DMAADDR("dma-offset", OHCISysBusState, dma_offset, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void ohci_sysbus_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 245352c2317..142f24f2ea0 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1232,12 +1232,10 @@ static const Property uhci_properties_companion[] = =3D { DEFINE_PROP_UINT32("firstport", UHCIState, firstport, 0), DEFINE_PROP_UINT32("bandwidth", UHCIState, frame_bandwidth, 1280), DEFINE_PROP_UINT32("maxframes", UHCIState, maxframes, 128), - DEFINE_PROP_END_OF_LIST(), }; static const Property uhci_properties_standalone[] =3D { DEFINE_PROP_UINT32("bandwidth", UHCIState, frame_bandwidth, 1280), DEFINE_PROP_UINT32("maxframes", UHCIState, maxframes, 128), - DEFINE_PROP_END_OF_LIST(), }; =20 static void uhci_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index f06e7403e2d..b1df95b52a5 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,7 +41,6 @@ static const Property nec_xhci_properties[] =3D { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), - DEFINE_PROP_END_OF_LIST(), }; =20 static void nec_xhci_instance_init(Object *obj) diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c index f4dbad7cc69..ce433223963 100644 --- a/hw/usb/hcd-xhci-sysbus.c +++ b/hw/usb/hcd-xhci-sysbus.c @@ -85,7 +85,6 @@ void xhci_sysbus_build_aml(Aml *scope, uint32_t mmio, uns= igned int irq) static const Property xhci_sysbus_props[] =3D { DEFINE_PROP_UINT32("intrs", XHCISysbusState, xhci.numintrs, XHCI_MAXIN= TRS), DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSL= OTS), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_xhci_sysbus =3D { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 3c5006f4254..3719c0f190d 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3612,7 +3612,6 @@ static const Property xhci_properties[] =3D { DEFINE_PROP_UINT32("p3", XHCIState, numports_3, 4), DEFINE_PROP_LINK("host", XHCIState, hostOpaque, TYPE_DEVICE, DeviceState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xhci_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 85d33b51bab..0c753f5cc51 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1779,7 +1779,6 @@ static const Property usb_host_dev_properties[] =3D { USB_HOST_OPT_PIPELINE, true), DEFINE_PROP_BOOL("suppress-remote-wake", USBHostDevice, suppress_remote_wake, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usb_host_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index f72a612d5a2..96fb9638092 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2580,7 +2580,6 @@ static const Property usbredir_properties[] =3D { DEFINE_PROP_BOOL("streams", USBRedirDevice, enable_streams, true), DEFINE_PROP_BOOL("suppress-remote-wake", USBRedirDevice, suppress_remote_wake, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void usbredir_class_initfn(ObjectClass *klass, void *data) diff --git a/hw/usb/u2f-emulated.c b/hw/usb/u2f-emulated.c index df86ce97fca..e1dd19ee92b 100644 --- a/hw/usb/u2f-emulated.c +++ b/hw/usb/u2f-emulated.c @@ -375,7 +375,6 @@ static const Property u2f_emulated_properties[] =3D { DEFINE_PROP_STRING("privkey", U2FEmulatedState, privkey), DEFINE_PROP_STRING("entropy", U2FEmulatedState, entropy), DEFINE_PROP_STRING("counter", U2FEmulatedState, counter), - DEFINE_PROP_END_OF_LIST(), }; =20 static void u2f_emulated_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/u2f-passthru.c b/hw/usb/u2f-passthru.c index ec4f6165d8e..8df5215a1fa 100644 --- a/hw/usb/u2f-passthru.c +++ b/hw/usb/u2f-passthru.c @@ -518,7 +518,6 @@ static const VMStateDescription u2f_passthru_vmstate = =3D { =20 static const Property u2f_passthru_properties[] =3D { DEFINE_PROP_STRING("hidraw", U2FPassthruState, hidraw), - DEFINE_PROP_END_OF_LIST(), }; =20 static void u2f_passthru_class_init(ObjectClass *klass, void *data) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 2e6ea2dd931..529aad6332c 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -197,7 +197,6 @@ static const Property vfio_ap_properties[] =3D { DEFINE_PROP_LINK("iommufd", VFIOAPDevice, vdev.iommufd, TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *), #endif - DEFINE_PROP_END_OF_LIST(), }; =20 static void vfio_ap_reset(DeviceState *dev) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index b96ab27e129..bac56e8dd9a 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -663,7 +663,6 @@ static const Property vfio_ccw_properties[] =3D { TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *), #endif DEFINE_PROP_CCW_LOADPARM("loadparm", CcwDevice, loadparm), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vfio_ccw_vmstate =3D { diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 93aca850e31..0c5621da360 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3409,7 +3409,6 @@ static const Property vfio_pci_dev_properties[] =3D { TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *), #endif DEFINE_PROP_BOOL("skip-vsc-check", VFIOPCIDevice, skip_vsc_check, true= ), - DEFINE_PROP_END_OF_LIST(), }; =20 #ifdef CONFIG_IOMMUFD @@ -3455,7 +3454,6 @@ static const Property vfio_pci_dev_nohotplug_properti= es[] =3D { DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false), DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrat= e, ON_OFF_AUTO_AUTO), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, void *da= ta) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 766e8a86efd..7bc52a6f56c 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -640,7 +640,6 @@ static const Property vfio_platform_dev_properties[] = =3D { DEFINE_PROP_LINK("iommufd", VFIOPlatformDevice, vbasedev.iommufd, TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *), #endif - DEFINE_PROP_END_OF_LIST(), }; =20 static void vfio_platform_instance_init(Object *obj) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 61849b3b0e1..d7b6af03f62 100644 --- a/hw/virtio/vdpa-dev.c +++ b/hw/virtio/vdpa-dev.c @@ -340,7 +340,6 @@ static void vhost_vdpa_device_set_status(VirtIODevice *= vdev, uint8_t status) static const Property vhost_vdpa_device_properties[] =3D { DEFINE_PROP_STRING("vhostdev", VhostVdpaDevice, vhostdev), DEFINE_PROP_UINT16("queue-size", VhostVdpaDevice, queue_size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static const VMStateDescription vmstate_vhost_vdpa_device =3D { diff --git a/hw/virtio/vhost-scsi-pci.c b/hw/virtio/vhost-scsi-pci.c index 7536b37f184..3778f6131ef 100644 --- a/hw/virtio/vhost-scsi-pci.c +++ b/hw/virtio/vhost-scsi-pci.c @@ -41,7 +41,6 @@ struct VHostSCSIPCI { static const Property vhost_scsi_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/vhost-user-blk-pci.c b/hw/virtio/vhost-user-blk-pci.c index 99f14720234..1767ef2c9c9 100644 --- a/hw/virtio/vhost-user-blk-pci.c +++ b/hw/virtio/vhost-user-blk-pci.c @@ -47,7 +47,6 @@ static const Property vhost_user_blk_pci_properties[] =3D= { DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **e= rrp) diff --git a/hw/virtio/vhost-user-device.c b/hw/virtio/vhost-user-device.c index 3222b67bd9d..86eba138b4e 100644 --- a/hw/virtio/vhost-user-device.c +++ b/hw/virtio/vhost-user-device.c @@ -35,7 +35,6 @@ static const Property vud_properties[] =3D { DEFINE_PROP_UINT32("vq_size", VHostUserBase, vq_size, 64), DEFINE_PROP_UINT32("num_vqs", VHostUserBase, num_vqs, 1), DEFINE_PROP_UINT32("config_size", VHostUserBase, config_size, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vud_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/vhost-user-fs-pci.c b/hw/virtio/vhost-user-fs-pci.c index 9ba6c406550..116eaab9071 100644 --- a/hw/virtio/vhost-user-fs-pci.c +++ b/hw/virtio/vhost-user-fs-pci.c @@ -32,7 +32,6 @@ DECLARE_INSTANCE_CHECKER(VHostUserFSPCI, VHOST_USER_FS_PC= I, static const Property vhost_user_fs_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_fs_pci_realize(VirtIOPCIProxy *vpci_dev, Error **er= rp) diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index c0462329a58..f8714b56600 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -409,7 +409,6 @@ static const Property vuf_properties[] =3D { DEFINE_PROP_UINT16("num-request-queues", VHostUserFS, conf.num_request_queues, 1), DEFINE_PROP_UINT16("queue-size", VHostUserFS, conf.queue_size, 128), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vuf_instance_init(Object *obj) diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index c997c66d80b..4a08814904d 100644 --- a/hw/virtio/vhost-user-gpio.c +++ b/hw/virtio/vhost-user-gpio.c @@ -16,7 +16,6 @@ =20 static const Property vgpio_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vgpio_realize(DeviceState *dev, Error **errp) diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c index b0a5cbf3eab..1c7cde503c3 100644 --- a/hw/virtio/vhost-user-i2c.c +++ b/hw/virtio/vhost-user-i2c.c @@ -16,7 +16,6 @@ =20 static const Property vi2c_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vi2c_realize(DeviceState *dev, Error **errp) diff --git a/hw/virtio/vhost-user-input.c b/hw/virtio/vhost-user-input.c index c57cc461bb1..917405329f2 100644 --- a/hw/virtio/vhost-user-input.c +++ b/hw/virtio/vhost-user-input.c @@ -9,7 +9,6 @@ =20 static const Property vinput_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vinput_realize(DeviceState *dev, Error **errp) diff --git a/hw/virtio/vhost-user-rng-pci.c b/hw/virtio/vhost-user-rng-pci.c index 0016ee74ce8..a4e690148d6 100644 --- a/hw/virtio/vhost-user-rng-pci.c +++ b/hw/virtio/vhost-user-rng-pci.c @@ -26,7 +26,6 @@ DECLARE_INSTANCE_CHECKER(VHostUserRNGPCI, VHOST_USER_RNG_= PCI, static const Property vhost_user_rng_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **e= rrp) diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c index c9985b5fadd..5aa432e5e1a 100644 --- a/hw/virtio/vhost-user-rng.c +++ b/hw/virtio/vhost-user-rng.c @@ -22,7 +22,6 @@ static const VMStateDescription vu_rng_vmstate =3D { =20 static const Property vrng_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vu_rng_base_realize(DeviceState *dev, Error **errp) diff --git a/hw/virtio/vhost-user-scmi.c b/hw/virtio/vhost-user-scmi.c index a15e6916efa..410a936ca74 100644 --- a/hw/virtio/vhost-user-scmi.c +++ b/hw/virtio/vhost-user-scmi.c @@ -279,7 +279,6 @@ static const VMStateDescription vu_scmi_vmstate =3D { =20 static const Property vu_scmi_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserSCMI, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vu_scmi_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/vhost-user-scsi-pci.c b/hw/virtio/vhost-user-scsi-pc= i.c index b2f6451f483..34e1a701b1a 100644 --- a/hw/virtio/vhost-user-scsi-pci.c +++ b/hw/virtio/vhost-user-scsi-pci.c @@ -47,7 +47,6 @@ struct VHostUserSCSIPCI { static const Property vhost_user_scsi_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **= errp) diff --git a/hw/virtio/vhost-user-snd.c b/hw/virtio/vhost-user-snd.c index 8810a9f6998..8610370af80 100644 --- a/hw/virtio/vhost-user-snd.c +++ b/hw/virtio/vhost-user-snd.c @@ -23,7 +23,6 @@ static const VMStateDescription vu_snd_vmstate =3D { =20 static const Property vsnd_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vu_snd_base_realize(DeviceState *dev, Error **errp) diff --git a/hw/virtio/vhost-user-vsock-pci.c b/hw/virtio/vhost-user-vsock-= pci.c index 529d967059f..f730a05e781 100644 --- a/hw/virtio/vhost-user-vsock-pci.c +++ b/hw/virtio/vhost-user-vsock-pci.c @@ -33,7 +33,6 @@ struct VHostUserVSockPCI { =20 static const Property vhost_user_vsock_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_user_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error *= *errp) diff --git a/hw/virtio/vhost-user-vsock.c b/hw/virtio/vhost-user-vsock.c index 97885bfeab7..293273080b4 100644 --- a/hw/virtio/vhost-user-vsock.c +++ b/hw/virtio/vhost-user-vsock.c @@ -150,7 +150,6 @@ static void vuv_device_unrealize(DeviceState *dev) =20 static const Property vuv_properties[] =3D { DEFINE_PROP_CHR("chardev", VHostUserVSock, conf.chardev), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vuv_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index cb2253c39fa..9ac587d20c1 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -288,7 +288,6 @@ static struct vhost_dev *vhost_vsock_common_get_vhost(V= irtIODevice *vdev) static const Property vhost_vsock_common_properties[] =3D { DEFINE_PROP_ON_OFF_AUTO("seqpacket", VHostVSockCommon, seqpacket, ON_OFF_AUTO_AUTO), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_vsock_common_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c index 1d9abd02bd9..6c618ee9083 100644 --- a/hw/virtio/vhost-vsock-pci.c +++ b/hw/virtio/vhost-vsock-pci.c @@ -37,7 +37,6 @@ struct VHostVSockPCI { =20 static const Property vhost_vsock_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c index ce80e84494b..940b30fa27c 100644 --- a/hw/virtio/vhost-vsock.c +++ b/hw/virtio/vhost-vsock.c @@ -208,7 +208,6 @@ static void vhost_vsock_device_unrealize(DeviceState *d= ev) static const Property vhost_vsock_properties[] =3D { DEFINE_PROP_UINT64("guest-cid", VHostVSock, conf.guest_cid, 0), DEFINE_PROP_STRING("vhostfd", VHostVSock, conf.vhostfd), - DEFINE_PROP_END_OF_LIST(), }; =20 static void vhost_vsock_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-9p-pci.c b/hw/virtio/virtio-9p-pci.c index b33faf2fbbc..aa1dce8f284 100644 --- a/hw/virtio/virtio-9p-pci.c +++ b/hw/virtio/virtio-9p-pci.c @@ -47,7 +47,6 @@ static const Property virtio_9p_pci_properties[] =3D { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_9p_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index ab2ee304756..ec4aa945f2e 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -1032,7 +1032,6 @@ static const Property virtio_balloon_properties[] =3D= { qemu_4_0_config_size, false), DEFINE_PROP_LINK("iothread", VirtIOBalloon, iothread, TYPE_IOTHREAD, IOThread *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_balloon_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-blk-pci.c b/hw/virtio/virtio-blk-pci.c index abdcc11b2eb..fc06cec6566 100644 --- a/hw/virtio/virtio-blk-pci.c +++ b/hw/virtio/virtio-blk-pci.c @@ -44,7 +44,6 @@ static const Property virtio_blk_pci_properties[] =3D { VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c index 23c85fe5864..8699481375d 100644 --- a/hw/virtio/virtio-crypto-pci.c +++ b/hw/virtio/virtio-crypto-pci.c @@ -41,7 +41,6 @@ static const Property virtio_crypto_pci_properties[] =3D { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_crypto_pci_realize(VirtIOPCIProxy *vpci_dev, Error **er= rp) diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index 9ae0b02598b..617163f127d 100644 --- a/hw/virtio/virtio-crypto.c +++ b/hw/virtio/virtio-crypto.c @@ -1131,7 +1131,6 @@ static const VMStateDescription vmstate_virtio_crypto= =3D { static const Property virtio_crypto_properties[] =3D { DEFINE_PROP_LINK("cryptodev", VirtIOCrypto, conf.cryptodev, TYPE_CRYPTODEV_BACKEND, CryptoDevBackend *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_crypto_get_config(VirtIODevice *vdev, uint8_t *config) diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c index 55c0b0555b0..9e3c1067776 100644 --- a/hw/virtio/virtio-input-pci.c +++ b/hw/virtio/virtio-input-pci.c @@ -39,7 +39,6 @@ struct VirtIOInputHIDPCI { =20 static const Property virtio_input_pci_properties[] =3D { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_input_pci_realize(VirtIOPCIProxy *vpci_dev, Error **err= p) diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c index 92adf636842..97e03ce803b 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -39,7 +39,6 @@ static const Property virtio_iommu_pci_properties[] =3D { DEFINE_PROP_ARRAY("reserved-regions", VirtIOIOMMUPCI, vdev.nr_prop_resv_regions, vdev.prop_resv_regions, qdev_prop_reserved_region, ReservedRegion), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **err= p) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 576ad8383f8..0988d212092 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -1662,7 +1662,6 @@ static const Property virtio_iommu_properties[] =3D { DEFINE_PROP_GRANULE_MODE("granule", VirtIOIOMMU, granule_mode, GRANULE_MODE_HOST), DEFINE_PROP_UINT8("aw-bits", VirtIOIOMMU, aw_bits, 64), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_iommu_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 3f6f46fad77..317d056eba7 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -1694,7 +1694,6 @@ static const Property virtio_mem_properties[] =3D { early_migration, true), DEFINE_PROP_BOOL(VIRTIO_MEM_DYNAMIC_MEMSLOTS_PROP, VirtIOMEM, dynamic_memslots, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static uint64_t virtio_mem_rdm_get_min_granularity(const RamDiscardManager= *rdm, diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 49d9fe8f302..27d2f4b3b08 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@ -757,7 +757,6 @@ static const Property virtio_mmio_properties[] =3D { DEFINE_PROP_BOOL("force-legacy", VirtIOMMIOProxy, legacy, true), DEFINE_PROP_BIT("ioeventfd", VirtIOMMIOProxy, flags, VIRTIO_IOMMIO_FLAG_USE_IOEVENTFD_BIT, true), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_mmio_realizefn(DeviceState *d, Error **errp) diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c index e86094ae221..e18953ad674 100644 --- a/hw/virtio/virtio-net-pci.c +++ b/hw/virtio/virtio-net-pci.c @@ -43,7 +43,6 @@ static const Property virtio_net_properties[] =3D { VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_net_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/virtio-nsm.c b/hw/virtio/virtio-nsm.c index 685c5483610..098e1aeac6e 100644 --- a/hw/virtio/virtio-nsm.c +++ b/hw/virtio/virtio-nsm.c @@ -1707,7 +1707,6 @@ static const VMStateDescription vmstate_virtio_nsm = =3D { =20 static const Property virtio_nsm_properties[] =3D { DEFINE_PROP_STRING("module-id", VirtIONSM, module_id), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_nsm_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index de41cb5ef22..cb61adc659f 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2378,7 +2378,6 @@ static const Property virtio_pci_properties[] =3D { VIRTIO_PCI_FLAG_INIT_FLR_BIT, true), DEFINE_PROP_BIT("aer", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_AER_BIT, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp) @@ -2435,7 +2434,6 @@ static const Property virtio_pci_generic_properties[]= =3D { DEFINE_PROP_ON_OFF_AUTO("disable-legacy", VirtIOPCIProxy, disable_lega= cy, ON_OFF_AUTO_AUTO), DEFINE_PROP_BOOL("disable-modern", VirtIOPCIProxy, disable_modern, fal= se), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_pci_base_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c index f6f3b5ddaf5..9759023ab37 100644 --- a/hw/virtio/virtio-pmem.c +++ b/hw/virtio/virtio-pmem.c @@ -159,7 +159,6 @@ static const Property virtio_pmem_properties[] =3D { DEFINE_PROP_UINT64(VIRTIO_PMEM_ADDR_PROP, VirtIOPMEM, start, 0), DEFINE_PROP_LINK(VIRTIO_PMEM_MEMDEV_PROP, VirtIOPMEM, memdev, TYPE_MEMORY_BACKEND, HostMemoryBackend *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_pmem_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c index 398f4322370..a94ff767b2d 100644 --- a/hw/virtio/virtio-rng-pci.c +++ b/hw/virtio/virtio-rng-pci.c @@ -37,7 +37,6 @@ static const Property virtio_rng_properties[] =3D { VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 13a1a0b236a..0660e872f7c 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -258,7 +258,6 @@ static const Property virtio_rng_properties[] =3D { DEFINE_PROP_UINT64("max-bytes", VirtIORNG, conf.max_bytes, INT64_MAX), DEFINE_PROP_UINT32("period", VirtIORNG, conf.period_ms, 1 << 16), DEFINE_PROP_LINK("rng", VirtIORNG, conf.rng, TYPE_RNG_BACKEND, RngBack= end *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_rng_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio-scsi-pci.c b/hw/virtio/virtio-scsi-pci.c index 733b5756db1..d44fd2fffbe 100644 --- a/hw/virtio/virtio-scsi-pci.c +++ b/hw/virtio/virtio-scsi-pci.c @@ -40,7 +40,6 @@ static const Property virtio_scsi_pci_properties[] =3D { VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) diff --git a/hw/virtio/virtio-serial-pci.c b/hw/virtio/virtio-serial-pci.c index bda643ec546..b5b77eb2661 100644 --- a/hw/virtio/virtio-serial-pci.c +++ b/hw/virtio/virtio-serial-pci.c @@ -74,7 +74,6 @@ static const Property virtio_serial_pci_properties[] =3D { VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0), - DEFINE_PROP_END_OF_LIST(), }; =20 static void virtio_serial_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 7fcdb55ba49..b871295b949 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -4018,7 +4018,6 @@ static const Property virtio_properties[] =3D { DEFINE_PROP_BOOL("use-disabled-flag", VirtIODevice, use_disabled_flag,= true), DEFINE_PROP_BOOL("x-disable-legacy-check", VirtIODevice, disable_legacy_check, false), - DEFINE_PROP_END_OF_LIST(), }; =20 static int virtio_device_start_ioeventfd_impl(VirtIODevice *vdev) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c index 2e25d4b4e9a..6b6fc31f227 100644 --- a/hw/watchdog/sbsa_gwdt.c +++ b/hw/watchdog/sbsa_gwdt.c @@ -270,7 +270,6 @@ static const Property wdt_sbsa_gwdt_props[] =3D { */ DEFINE_PROP_UINT64("clock-frequency", struct SBSA_GWDTState, freq, 62500000), - DEFINE_PROP_END_OF_LIST(), }; =20 static void wdt_sbsa_gwdt_class_init(ObjectClass *klass, void *data) diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c index c95877e5c73..78dedb065eb 100644 --- a/hw/watchdog/wdt_aspeed.c +++ b/hw/watchdog/wdt_aspeed.c @@ -291,7 +291,6 @@ static void aspeed_wdt_realize(DeviceState *dev, Error = **errp) static const Property aspeed_wdt_properties[] =3D { DEFINE_PROP_LINK("scu", AspeedWDTState, scu, TYPE_ASPEED_SCU, AspeedSCUState *), - DEFINE_PROP_END_OF_LIST(), }; =20 static void aspeed_wdt_class_init(ObjectClass *klass, void *data) diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c index 61fbd91ee4f..878e5098b67 100644 --- a/hw/watchdog/wdt_imx2.c +++ b/hw/watchdog/wdt_imx2.c @@ -284,7 +284,6 @@ static void imx2_wdt_realize(DeviceState *dev, Error **= errp) static const Property imx2_wdt_properties[] =3D { DEFINE_PROP_BOOL("pretimeout-support", IMX2WdtState, pretimeout_suppor= t, false), - DEFINE_PROP_END_OF_LIST() }; =20 static void imx2_wdt_class_init(ObjectClass *klass, void *data) diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 0d7defb8cd3..2007ec08923 100644 --- a/hw/xen/xen-bus.c +++ b/hw/xen/xen-bus.c @@ -1095,7 +1095,6 @@ unrealize: static const Property xen_device_props[] =3D { DEFINE_PROP_UINT16("frontend-id", XenDevice, frontend_id, DOMID_INVALID), - DEFINE_PROP_END_OF_LIST() }; =20 static void xen_device_class_init(ObjectClass *class, void *data) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 557aa98be41..e2bd4c7d411 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -934,7 +934,6 @@ static void xen_pt_unregister_device(PCIDevice *d) static const Property xen_pci_passthrough_properties[] =3D { DEFINE_PROP_PCI_HOST_DEVADDR("hostaddr", XenPCIPassthroughState, hosta= ddr), DEFINE_PROP_BOOL("permissive", XenPCIPassthroughState, permissive, fal= se), - DEFINE_PROP_END_OF_LIST(), }; =20 static void xen_pci_passthrough_instance_init(Object *obj) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1afa07511e3..0e882c474ec 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2652,7 +2652,6 @@ static const Property arm_cpu_properties[] =3D { DEFINE_PROP_INT32("core-count", ARMCPU, core_count, -1), /* True to default to the backward-compat old CNTFRQ rather than 1Ghz = */ DEFINE_PROP_BOOL("backcompat-cntfrq", ARMCPU, backcompat_cntfrq, false= ), - DEFINE_PROP_END_OF_LIST() }; =20 static const gchar *arm_gdb_arch_name(CPUState *cs) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index a7529a1b3d9..64dc15655b7 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -151,7 +151,6 @@ static void avr_cpu_initfn(Object *obj) =20 static const Property avr_cpu_properties[] =3D { DEFINE_PROP_UINT32("init-sp", AVRCPU, init_sp, 0), - DEFINE_PROP_END_OF_LIST() }; =20 static ObjectClass *avr_cpu_class_by_name(const char *cpu_model) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index a70007245e4..8c89a8ce311 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -53,7 +53,6 @@ static const Property hexagon_cpu_properties[] =3D { DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjus= t, 0, qdev_prop_uint32, target_ulong), DEFINE_PROP_BOOL("short-circuit", HexagonCPU, short_circuit, true), - DEFINE_PROP_END_OF_LIST() }; =20 const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS] =3D { diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 52533994592..c28adee34f7 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5387,7 +5387,6 @@ static X86CPUVersion x86_cpu_model_resolve_version(co= nst X86CPUModel *model) static const Property max_x86_cpu_properties[] =3D { DEFINE_PROP_BOOL("migratable", X86CPU, migratable, true), DEFINE_PROP_BOOL("host-cache-info", X86CPU, cache_info_passthrough, fa= lse), - DEFINE_PROP_END_OF_LIST() }; =20 static void max_x86_cpu_realize(DeviceState *dev, Error **errp) @@ -8548,7 +8547,6 @@ static const Property x86_cpu_properties[] =3D { DEFINE_PROP_BOOL("x-intel-pt-auto-level", X86CPU, intel_pt_auto_level, true), DEFINE_PROP_BOOL("x-l1-cache-per-thread", X86CPU, l1_cache_per_core, t= rue), - DEFINE_PROP_END_OF_LIST() }; =20 #ifndef CONFIG_USER_ONLY diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 0e41e39c0e2..83554f62d36 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -403,7 +403,6 @@ static const Property mb_properties[] =3D { /* * End of properties reserved by Xilinx DTS conversion tool. */ - DEFINE_PROP_END_OF_LIST(), }; =20 static ObjectClass *mb_cpu_class_by_name(const char *cpu_model) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 02c0e1b0f9b..aa3d905e708 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -541,7 +541,6 @@ static const struct SysemuCPUOps mips_sysemu_ops =3D { =20 static const Property mips_cpu_properties[] =3D { DEFINE_PROP_BOOL("big-endian", MIPSCPU, is_big_endian, TARGET_BIG_ENDI= AN), - DEFINE_PROP_END_OF_LIST(), }; =20 #ifdef CONFIG_TCG diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 263f9e84ed6..9b367ed2d55 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -318,7 +318,6 @@ static const Property s390x_cpu_properties[] =3D { DEFINE_PROP_BOOL("dedicated", S390CPU, env.dedicated, false), DEFINE_PROP_CPUS390ENTITLEMENT("entitlement", S390CPU, env.entitlement, S390_CPU_ENTITLEMENT_AUTO), - DEFINE_PROP_END_OF_LIST() }; #endif =20 diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 8f494c286ae..a65a6466a7e 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -917,7 +917,6 @@ static const Property sparc_cpu_properties[] =3D { DEFINE_PROP_UINT32("mmu-version", SPARCCPU, env.def.mmu_version, 0), DEFINE_PROP("nwindows", SPARCCPU, env.def.nwindows, qdev_prop_nwindows, uint32_t), - DEFINE_PROP_END_OF_LIST() }; =20 #ifndef CONFIG_USER_ONLY diff --git a/tests/unit/test-qdev-global-props.c b/tests/unit/test-qdev-glo= bal-props.c index 1eb95d2429b..de7a572e680 100644 --- a/tests/unit/test-qdev-global-props.c +++ b/tests/unit/test-qdev-global-props.c @@ -49,7 +49,6 @@ struct MyType { static const Property static_props[] =3D { DEFINE_PROP_UINT32("prop1", MyType, prop1, PROP_DEFAULT), DEFINE_PROP_UINT32("prop2", MyType, prop2, PROP_DEFAULT), - DEFINE_PROP_END_OF_LIST() }; =20 static void static_prop_class_init(ObjectClass *oc, void *data) --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597497; cv=none; d=zohomail.com; s=zohoarc; b=By9JH+MIO0UZ5iWOD97CZ7MZB9LLkTDe/6uq5I2xmkuml+2CCOSSacllWC5PAIPrz1QCJwfZKPC8yMpNXeqFPbHSOHFI7lMtnNtLOJMEmcERx7QOWyuvLTND+edRsMBzeJlSShGi7uvOwp5C0kmZuK9TFJi7FpIwPbQMqCUICC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597497; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YGo68GKQt2yaNvuhV+blTkjMLtUKgFZE8YyZBqUmje8=; b=Ux0QuiMjFsofHWgz2ADGCOCu2KwDZRGEk9PlizAZN+pak4d1wLwg5447VeLdpk+ruUnuldCebXr2LNnUHsIY2AUpjezBba24/3ZS+m2v0smSRl7KA8Az1kO0GAd5pUPZN71WwPVgqIivhAwddCoayq68bWu7gpXoGEVJZHVpHMU= 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 1734597497691265.538269033883; Thu, 19 Dec 2024 00:38:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByE-0004p5-IQ; Thu, 19 Dec 2024 03:33:22 -0500 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 1tOByD-0004lk-Ei for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByB-0005B4-Ub for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:21 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453--XHByr-7M7OP7N9HlQ6hgQ-1; Thu, 19 Dec 2024 03:33:17 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385e00ebb16so221742f8f.3 for ; Thu, 19 Dec 2024 00:33:17 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c832c45sm981633f8f.32.2024.12.19.00.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YGo68GKQt2yaNvuhV+blTkjMLtUKgFZE8YyZBqUmje8=; b=fuxeoYQGo1ddxNSCGfI1JYMfGua9hHS1zTTHJ9ZP7Ax2uPkMbvCDL9npf0F+R+Lro0petg 3/MVwHohAMitFTC7izQDMeeEvK5DDWdSkSJ3r8yqzXZjI84Kf00gAylD3u0yR+qQh0NP73 Sw7vsUlU9bIaf5mAf8b8BsG+rxDKb9g= X-MC-Unique: -XHByr-7M7OP7N9HlQ6hgQ-1 X-Mimecast-MFC-AGG-ID: -XHByr-7M7OP7N9HlQ6hgQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597194; x=1735201994; 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=YGo68GKQt2yaNvuhV+blTkjMLtUKgFZE8YyZBqUmje8=; b=rvGT0iyg4ukiS4qk+XCLl8b3u9i45x3vyY/9EWH8ae8kZQzEkpZneRiWQ3zKgYlXEw PStu+5HR5qStC9Vuxbay/azXjBdsjRWiXc/t5JuG/02tqHar06Cda0XkMz0/4gtia5c+ gDdMCB8GRCa+6bwj4eGkgnunUYbHMAjKAPpfDZYlEw5AIZ6Kj874P1TYwWFPB7/cSviD rnpfUgAwblkHbTAvymExR9QcAou5TW82ojFv0sToiA6rXrDFbt0GbmjNYXpLxlTxxb3/ QBPe4iFDb8Y+bSCbfJL9VPoqr2bksnE8Ga2tiymCAmqRFtQZWmQnAlViBIzZmtIEeQZ/ NR4g== X-Gm-Message-State: AOJu0YwmbVqJ2ckz8N5B8c+xkO0olriVFcMVTQolZPPleAr9g1gT3P5g H0n3IA8bVJxJtWLm8PzkbbwWB1u54jRibnITP2Iz0eC54/g42yaxUAZ3h9lrJDMrT6idR6oljKr NfVOO1yT6Cu9BS+9q5lcwiyJIPRPRp4dj6wRXQVa8n9JL3n85Kihv2knHK8s6/IXAx8k/Kdez17 RpBAEddGTcePWErTBs1wKiEk/f9KhtLl0qKSTo X-Gm-Gg: ASbGncvWOs7xtPyD5gVTPoNsVVKlfJLd8y8971leQ8iTIbVdPelNsjOKez/PU5V/loS im5UkSi0Xj2DziFZZXhyEjxt740CTlfWZ3lQOzqs/Tuhsof/Bd93bRqk1qm/0G0V+jXt11x5E/k 9mAqQyrZBEzmMMVd5C5SbBROFZrDANqgqjgp3Sq9zMWxm4MJUL5LSOUj2Ra/Ca7JXgYmwhBqgny T6XYHvurrLFcukBV1EB7Cgu5r5GMdOobdxbTYkhdPK38VhDlM5EOm3DEdaA X-Received: by 2002:a05:6000:1449:b0:385:f3fb:46aa with SMTP id ffacd0b85a97d-38a19b373d5mr2230036f8f.43.1734597193173; Thu, 19 Dec 2024 00:33:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF458w2rB/jba9OyVCFQhwtp9itQ68U5m2QOZTBBkDc9Ocstmd+dCO3/cDDsx33va0UzLJuAQ== X-Received: by 2002:a05:6000:1449:b0:385:f3fb:46aa with SMTP id ffacd0b85a97d-38a19b373d5mr2229996f8f.43.1734597192734; Thu, 19 Dec 2024 00:33:12 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 21/41] include/hw/qdev-properties: Shrink struct Property Date: Thu, 19 Dec 2024 09:32:08 +0100 Message-ID: <20241219083228.363430-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597500050116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Before, via pahole: arm32, a 32-bit host which aligns uint64_t: struct Property { const char * name; /* 0 4 */ const PropertyInfo * info; /* 4 4 */ ptrdiff_t offset; /* 8 4 */ uint8_t bitnr; /* 12 1 */ /* XXX 3 bytes hole, try to pack */ uint64_t bitmask; /* 16 8 */ _Bool set_default; /* 24 1 */ /* XXX 7 bytes hole, try to pack */ union { int64_t i; /* 32 8 */ uint64_t u; /* 32 8 */ } defval; /* 32 8 */ int arrayoffset; /* 40 4 */ const PropertyInfo * arrayinfo; /* 44 4 */ int arrayfieldsize; /* 48 4 */ const char * link_type; /* 52 4 */ /* size: 56, cachelines: 1, members: 11 */ /* sum members: 46, holes: 2, sum holes: 10 */ }; arm64, an arbitrary 64-bit host: struct Property { const char * name; /* 0 8 */ const PropertyInfo * info; /* 8 8 */ ptrdiff_t offset; /* 16 8 */ uint8_t bitnr; /* 24 1 */ /* XXX 7 bytes hole, try to pack */ uint64_t bitmask; /* 32 8 */ _Bool set_default; /* 40 1 */ /* XXX 7 bytes hole, try to pack */ union { int64_t i; /* 48 8 */ uint64_t u; /* 48 8 */ } defval; /* 48 8 */ int arrayoffset; /* 56 4 */ /* XXX 4 bytes hole, try to pack */ const PropertyInfo * arrayinfo; /* 64 8 */ int arrayfieldsize; /* 72 4 */ /* XXX 4 bytes hole, try to pack */ const char * link_type; /* 80 8 */ /* size: 88, cachelines: 2, members: 11 */ /* sum members: 66, holes: 4, sum holes: 22 */ }; Afterward there are no holes in either structure. For arm32, size 48, padding 2, saved 8 bytes. For arm64, size 72, padding 6, saved 16 bytes. Saves 20k from qemu-system-aarch64 on a 64-bit host. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-22-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index ef3fd7b4ae2..3680cd239fb 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -16,17 +16,17 @@ struct Property { const char *name; const PropertyInfo *info; ptrdiff_t offset; - uint8_t bitnr; + const char *link_type; uint64_t bitmask; - bool set_default; union { int64_t i; uint64_t u; } defval; - int arrayoffset; const PropertyInfo *arrayinfo; + int arrayoffset; int arrayfieldsize; - const char *link_type; + uint8_t bitnr; + bool set_default; }; =20 struct PropertyInfo { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597505; cv=none; d=zohomail.com; s=zohoarc; b=H3T8Uv98pNiYntSMxBkR7UezkwkHZRjlZOhCHrJr8s6JrsSAtFA4Gmg41I1hwvdaKtpkkwMMibzBhBHIgpzKwTg7PcV8XGkoDO+UX8JKWnBXuFBP20ry0U3ea7iE6kremvCoqF4+7OeORcyl7J5o6OqfF+JbVuVs8j917ZpVAPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597505; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mbyntGtYpHsSrSs698oFtn5IEUzoH+5caUeaY/RmSYI=; b=fqvqMYIe21NSPhy16KTp0oMiom1tQBdKnnT3CCBleh4DVlrPd6nXKFOfgaXtzL+Xqc2FJb/SK+8AqVGZ63QMfkIfbjg/ggYTnLKJAZi8YAgAUXGAWnYhLaqSb0X9FntniTbLFv2cpXj+XQ7qdVQt1g05Yh02xDqFVKpWmKnmh6M= 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 1734597505287859.584695893653; Thu, 19 Dec 2024 00:38:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByE-0004p7-Iz; Thu, 19 Dec 2024 03:33:22 -0500 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 1tOByC-0004lQ-Up for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByB-0005Ay-5G for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:20 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-210-R8F32i5KPSWwhYb6OTf-mA-1; Thu, 19 Dec 2024 03:33:16 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4362b9c15d8so2896555e9.3 for ; Thu, 19 Dec 2024 00:33:16 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b1e8sm45823375e9.30.2024.12.19.00.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mbyntGtYpHsSrSs698oFtn5IEUzoH+5caUeaY/RmSYI=; b=M/HAknR3EraJuKrgVKMPvqYAc1Za5nkBWLCOcw6AsXOY0SZbwjvsPjDRp46souN53gWALv j68vNgb8viWOufweJofgmcCcefH6Nn7Fuh6TP7URkB3h1W+YXXsvnLjuHduw/waaXys3b+ /ITSqCuEfPiqPGApJybgcTPDX/fiCkQ= X-MC-Unique: R8F32i5KPSWwhYb6OTf-mA-1 X-Mimecast-MFC-AGG-ID: R8F32i5KPSWwhYb6OTf-mA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597194; x=1735201994; 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=mbyntGtYpHsSrSs698oFtn5IEUzoH+5caUeaY/RmSYI=; b=pohGNA9tRHv0ZNDlhxE7nSeD8NSG9EkgWnSdrWyXLzv8yq60UiHalG9gWV5Ln64+7O rEFCBdTMCvLFdbrT2g2ymOcVHeQIYrAlBVhir9sfiAxOpU8oTiXUi5sIUlqv14Aac5KU ABA0RmHumrMQFfCKVZcuXvCbsBZ16bxtn5jsCNnk5vz2DsgvIAIMwtOy9WjmYJpUW2NE aoArdrQl6GpP6FWfe9f2ilV/ZwIM/KE2kgqhR0S8pOr3NtXO96pu7JvnDgSIeZcXinsO UZc9UUg8foUECMXHj73ouS+MRu6q/scz3ersKM+CMBm7RpM1QPEuBpjiOigFVDLfNF12 krJw== X-Gm-Message-State: AOJu0YxkNeIFNnZ9S1LYbxMT8VDB1Ady6hB3zWmf7J/I5DpPe+EgHRpW ACWaI6lP99OYa1Ic5a/au7km1EDrzv8fzQSSlboDI1Si+Td2w+kkMax1VKm7iGXcIiTvlhmK7gu hKQfB80cigma9kGgY8mRYv4bThkEI0vugT14MUMnAq693xTfC/1sIsCjc2fD1dWrqWZZdPsicPi 8IQWKofAV79RSbuwK6An5dEpufNcutdlSHwFvW X-Gm-Gg: ASbGncs/ME7nyg1y+4xuiaViJjhdZEbyo+HvxSMJh4cSUP0+I9NZw9Jeh7wRxpdoa83 iCl9bvqxG+mtXlMzhcSHH255UnJvHAyw/fGCaVesackTXKwcoPUUQ4pKBSNdgvudKElIg2UdKUi udQvBqouGFJjK5CIWmYUL3U2oOnr5GNC5S1Vuvqa8K+QF0sN8sikseAZ+TUzkXhtPLDspbPyY6Z r2OOpkInxP/WMWZcVaAUL9kfkQpwlUHydNsn2kDDdPGd8juT7G1lHrXaGgU X-Received: by 2002:a05:600c:4f15:b0:436:30e4:4590 with SMTP id 5b1f17b1804b1-4365540cd9emr48113235e9.32.1734597194271; Thu, 19 Dec 2024 00:33:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWfazPnguJEwALqI+CCvmNXE2Rq8USpfKvrbXr66pIPLzYS2ZIJCMUpdLvYDfsmgf+UZaPNQ== X-Received: by 2002:a05:600c:4f15:b0:436:30e4:4590 with SMTP id 5b1f17b1804b1-4365540cd9emr48112955e9.32.1734597193831; Thu, 19 Dec 2024 00:33:13 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 22/41] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr Date: Thu, 19 Dec 2024 09:32:09 +0100 Message-ID: <20241219083228.363430-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597506025116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-23-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 3680cd239fb..447767688b6 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -201,7 +201,7 @@ void qdev_prop_set_enum(DeviceState *dev, const char *n= ame, int value); /* Takes ownership of @values */ void qdev_prop_set_array(DeviceState *dev, const char *name, QList *values= ); =20 -void *object_field_prop_ptr(Object *obj, Property *prop); +void *object_field_prop_ptr(Object *obj, const Property *prop); =20 void qdev_prop_register_global(GlobalProperty *prop); const GlobalProperty *qdev_find_global_prop(Object *obj, diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index a3d49e20202..61929b2865a 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -51,7 +51,7 @@ void qdev_prop_allow_set_link_before_realize(const Object= *obj, } } =20 -void *object_field_prop_ptr(Object *obj, Property *prop) +void *object_field_prop_ptr(Object *obj, const Property *prop) { void *ptr =3D obj; ptr +=3D prop->offset; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597227; cv=none; d=zohomail.com; s=zohoarc; b=QU5WbVVXAGqEJIVBWvppJj6ZH5N89Hw/c3YTYVIjg0dQc+0r5sjpB2O5q2C0uyb+f/v734Aqg51rzE8r2XjlN/usvlBUP46urJJcnh4IrpJrQX2U7M+gJjtE3B02IHHTNQJhJE91iWPJuVVmjC32hX6IHDbqQ6sGxwTGGoyBUxY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597227; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; b=eg7ZSMk9yU+6htuFXXDnn7nTN3zsaEeZQspAn1PTEYs6EnIa2QEpfMGwrm6KV+pdWR0DrtLgMu9DAhFbWQerAprkfmpLCY84mCiFVyn97U7vmy3LccnByKcu2Gno/W+tTOrNOphcVL4cIIsHxnzFBMQimzFKJtR2XT7Rkfp83Bo= 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 1734597227901910.7600765481483; Thu, 19 Dec 2024 00:33:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByJ-00059k-Nt; Thu, 19 Dec 2024 03:33:27 -0500 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 1tOByG-0004zj-RH for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByF-0005Bt-7k for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:24 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-263-7lPD2bOZNzqfbRve80DOkw-1; Thu, 19 Dec 2024 03:33:20 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-436289a570eso4202735e9.0 for ; Thu, 19 Dec 2024 00:33:20 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c828e7asm986991f8f.21.2024.12.19.00.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; b=dHoNFIlOLrD6VJlkMVd2l7XQiqCLp7VRkLNTp533cPe2IXSjU3LUuEXJkYkwOhNJwIs2Ax MVzUDQ/0GBqFqLzNfZQPd9OzKTeDXH3DoH6EBVF2fRZYjDJsL7KNf8fr15PeFKHNfH51xi 2GArAyrOz8myu4yutliHLie7dJeVM0E= X-MC-Unique: 7lPD2bOZNzqfbRve80DOkw-1 X-Mimecast-MFC-AGG-ID: 7lPD2bOZNzqfbRve80DOkw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597199; x=1735201999; 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=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; b=PHW4BjhMypvM/sTSrfkkvsfuELEVLIDHD2sEI2hv/rkgNX0pjQL7tRFAad/vsqFIjb tpub3XdWK3/dgSP606shxSDK+bAMU9rAqSnNGxzeplMObHpUuKqlglH8vgnnPUFdMx75 V6259ut2a/1HR6sWQ5QhABsoS4bqqwP8fym0hsmjdUXBEsWOYizHn5s2X+cCeALrcO1J cj488bhO8g2EpooNN2on/KEhhlxjncAt5hPDhTibVHbgnjUB39SY4ADFyOqaIPwJ9kaf yzqDg9GozUhO0fopNbLF1SU1M+T9Zp5xk8JpgJDAEtepk1Ofl3apBghv7+iMGNGo5whi 8yUQ== X-Gm-Message-State: AOJu0YziB2cF4/BE3JGh2KUmjmrf1tIdf9Vy2yEUm0KovJgpvxF1km4f gjZzRN0C0sNND03CHm2+BQ6R6VhMxxcJG7VgLGJl/FjMxGt9zYWtzLhhxoYM/bCAZEKozycNFmR gFm2C81fZntmp10r/G8A8Nwq83ilfAV80Upz+lxAsh0rWaDoA/03t6bk7jfItHkioJRITocfxBy NNC8pgQ8guX/CeJhQ2c8+17N97jGcHJ2JlLLB0 X-Gm-Gg: ASbGnctuF+JDRVWG2IlIUwLtyQgKSb7GZb/i5W5kgFN3qgCGf8VWzEn+85XEDJlG6OB KqxybXUrT7NK0vYZ5BgQGlbwDROLSBs44NMB5S7BXg0J9HAiIbqx3w+5pIBR7SVu0CjwBM9aSzr 7lisLNO+3t07XWM6hPfGDACxXizTvZquxKWBMc5js8XYEBZqb1ZPiXCD6+OvyHWcX7+2YRDY8wS UuHRVZeGGhRjgQEqGwEK+0vht8qTYHpEvQmnYoR6+3WC6pToAWL48Me3jy6 X-Received: by 2002:a5d:6da1:0:b0:388:c75d:be97 with SMTP id ffacd0b85a97d-38a19af8799mr2341174f8f.11.1734597199199; Thu, 19 Dec 2024 00:33:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyOEAzzbAZB7fZ7XYd/3ZVSXNKlsaiYFHZyTUHlIqM5M3NCaIhdrEGs4TeDStthbDaktxzLw== X-Received: by 2002:a5d:6da1:0:b0:388:c75d:be97 with SMTP id ffacd0b85a97d-38a19af8799mr2341148f8f.11.1734597198765; Thu, 19 Dec 2024 00:33:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print Date: Thu, 19 Dec 2024 09:32:10 +0100 Message-ID: <20241219083228.363430-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597229030116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson There is exactly one instance of this method: print_pci_devfn. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-24-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties-system.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 447767688b6..bf27375a3cc 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -34,7 +34,7 @@ struct PropertyInfo { const char *description; const QEnumLookup *enum_table; bool realized_set_allowed; /* allow setting property on realized devic= e */ - int (*print)(Object *obj, Property *prop, char *dest, size_t len); + int (*print)(Object *obj, const Property *prop, char *dest, size_t len= ); void (*set_default_value)(ObjectProperty *op, const Property *prop); ObjectProperty *(*create)(ObjectClass *oc, const char *name, const Property *prop); diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-sys= tem.c index 22ea1ed3583..1034e9b5809 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -869,7 +869,7 @@ out: visit_end_alternate(v, (void **) &alt); } =20 -static int print_pci_devfn(Object *obj, Property *prop, char *dest, +static int print_pci_devfn(Object *obj, const Property *prop, char *dest, size_t len) { int32_t *ptr =3D object_field_prop_ptr(obj, prop); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597284; cv=none; d=zohomail.com; s=zohoarc; b=HOhYwqnvfsccrvuEkpwBu9MXdaxvVWNAe3oUwDIWQ8U/L1EcjgPvBaGent6xsYLwxzke9RtG6/yVtLj4x2YCgqwKsFm+pZfMES6mZNt/pdQ35OCeAP8Gx9ETdckayeglhxC8yNSHNkug2wrOCG72lct8EGuDlEBErj1IBz6im14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597284; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aHBhwWJYWLCM+IT8fIYvlM911wPuFL5jw1R80OYjRAo=; b=BnbnUfUv9kFoMbS4EVYZts/+PI+yp0qLalFsXNibd7zh3pNewoyYVYsiYxesOD71BLc+1yS/Z5dousGoA14L0eqsk59lQwN94IFjx4tdVICTHTBbJDVKAbnXGkGJRTmC6tHbrRkV2u6f9yonUOhFjvOEinfd1D3oNRZOYpd8quQ= 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 1734597284837941.771065592458; Thu, 19 Dec 2024 00:34:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByN-0005R4-5B; Thu, 19 Dec 2024 03:33:31 -0500 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 1tOByL-0005Fq-7j for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByH-0005CV-Tk for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:28 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-340-3-FxsmsAO2iDIvM88rkGEg-1; Thu, 19 Dec 2024 03:33:24 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-385dc37cb3eso295656f8f.0 for ; Thu, 19 Dec 2024 00:33:23 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea423sm11344415e9.2.2024.12.19.00.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aHBhwWJYWLCM+IT8fIYvlM911wPuFL5jw1R80OYjRAo=; b=CahL8/DY+NCRcDnf0xOOxnTg5ehmTzbE/NYQTaHrw0kKZnu+huIzDCD9vpGDUeAcYAzO0O XDMQ+nc/LUVQm+c2eL8z9Hu5KQAeTYuz4LPct5O+2X1HqKfeGe3Ijm9WpqfPf87uESQTi8 QqNwbl1CalAXNZj6k0VKiC4Ubi5x22A= X-MC-Unique: 3-FxsmsAO2iDIvM88rkGEg-1 X-Mimecast-MFC-AGG-ID: 3-FxsmsAO2iDIvM88rkGEg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597201; x=1735202001; 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=aHBhwWJYWLCM+IT8fIYvlM911wPuFL5jw1R80OYjRAo=; b=TnQFNZJEvt9Tqz9Ok2ZI/9wnU6EjnW94iuWQXLXUaw6M245sLO3GfT1Ge1albLe9r1 DyOymHeII2yHnMNG/qpvb5AP5LAzrNd2szXWjjj7PstuRoNMQkcEnXohv8ZwfW1s0FkI J5Ian2DzqT/nSkA6Qyn9ghAuVEWko+LQ3JsECfl5COaCqCMpBdtmR4wObX5Tf9A2zX0R MicayCk6SpVslBXa6ddS2iCzhjzfBs94RdE31FtLG2QkLIDcNdyWRGa655b++mlmylR8 raDzHCOtcE4gK5rJoOIq3rsSIBxvE9JiGOKopvpq871eixMJq8od5vIBLIR+iJe3PLxl VsZA== X-Gm-Message-State: AOJu0YxXbSLNIYOJccLPKkd1ITUTmbASjKJd/qpUcpQ8dPPaX3ons/Kh fWswp1y4pSKxMalxlU7hkcTtABpPOEpCChoeGVDdg5TQi3LE4oJcT58mX4jcF3wyxY3EavmC7f2 yclhJzuqTCxowhJ3nR0/o+V5n4hC2hD4/YZMDXLVgp7ZojifZMCURXwLW6VvaP+GC+61sLjCvcP 2zKCHfPpCody1Y75lUeROWc30ycTCboeWFZ1yv X-Gm-Gg: ASbGncsn7tD2kxM0WaYdBaMF8gNhGtElnHsta/0KhhZGopUMksNBd3q4TcVhTzoG0F6 wTJBxFA65sRaB3rcydNlu6VCXyUqj6a0CUhNxyWXsLbUlhTV2o26GFzSehHjsdJL7SkuceyXfr7 +Msu6YZr0xb0l7RGPrNfIm/zcLecSe2IgSK5D0Pf2wIhlOdkZCiLnpu0KanUU+oUWB3Z5ozKcOT cUsAnICva/QedoCp6wFAPW77O3aAQb04/BzBH2UXSZxumAupj9yBkI7xLrA X-Received: by 2002:a5d:64e7:0:b0:385:e0d6:fb6e with SMTP id ffacd0b85a97d-388e4d8dd78mr4888520f8f.37.1734597201187; Thu, 19 Dec 2024 00:33:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfQu5P3fhr0xWGkdS4xbN5P7MhztBfQr4NoU/LdwvR0ikeOgNFyq5z48Sv6jrUBQebNcvx0g== X-Received: by 2002:a5d:64e7:0:b0:385:e0d6:fb6e with SMTP id ffacd0b85a97d-388e4d8dd78mr4888485f8f.37.1734597200526; Thu, 19 Dec 2024 00:33:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 24/41] Constify all opaque Property pointers Date: Thu, 19 Dec 2024 09:32:11 +0100 Message-ID: <20241219083228.363430-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597285466116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson s/ Property [*]/ const Property */ Basically all of these only feed object_field_prop_ptr, which now takes a const pointer itself. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-25-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- backends/tpm/tpm_util.c | 4 +- hw/block/xen-block.c | 4 +- hw/core/qdev-properties-system.c | 48 ++++++++++---------- hw/core/qdev-properties.c | 78 ++++++++++++++++---------------- hw/misc/xlnx-versal-trng.c | 2 +- hw/nvme/nguid.c | 4 +- hw/s390x/css.c | 4 +- hw/s390x/s390-pci-bus.c | 4 +- hw/vfio/pci-quirks.c | 4 +- 9 files changed, 76 insertions(+), 76 deletions(-) diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index cf138551df1..485982b17b6 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -46,7 +46,7 @@ static void get_tpm(Object *obj, Visitor *v, const char *= name, void *opaque, static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaqu= e, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; TPMBackend *s, **be =3D object_field_prop_ptr(obj, prop); char *str; =20 @@ -66,7 +66,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *= name, void *opaque, =20 static void release_tpm(Object *obj, const char *name, void *opaque) { - Property *prop =3D opaque; + const Property *prop =3D opaque; TPMBackend **be =3D object_field_prop_ptr(obj, prop); =20 if (*be) { diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 56a67136604..ec3413f116a 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -485,7 +485,7 @@ static char *disk_to_vbd_name(unsigned int disk) static void xen_block_get_vdev(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; XenBlockVdev *vdev =3D object_field_prop_ptr(obj, prop); char *str; =20 @@ -545,7 +545,7 @@ static int vbd_name_to_disk(const char *name, const cha= r **endp, static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; XenBlockVdev *vdev =3D object_field_prop_ptr(obj, prop); char *str, *p; const char *end; diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-sys= tem.c index 1034e9b5809..1bae1352766 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -90,7 +90,7 @@ bool qdev_prop_sanitize_s390x_loadparm(uint8_t *loadparm,= const char *str, static void get_drive(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; void **ptr =3D object_field_prop_ptr(obj, prop); const char *value; char *p; @@ -116,7 +116,7 @@ static void set_drive_helper(Object *obj, Visitor *v, c= onst char *name, void *opaque, bool iothread, Error **errp) { DeviceState *dev =3D DEVICE(obj); - Property *prop =3D opaque; + const Property *prop =3D opaque; void **ptr =3D object_field_prop_ptr(obj, prop); char *str; BlockBackend *blk; @@ -225,7 +225,7 @@ static void set_drive_iothread(Object *obj, Visitor *v,= const char *name, static void release_drive(Object *obj, const char *name, void *opaque) { DeviceState *dev =3D DEVICE(obj); - Property *prop =3D opaque; + const Property *prop =3D opaque; BlockBackend **ptr =3D object_field_prop_ptr(obj, prop); =20 if (*ptr) { @@ -269,7 +269,7 @@ static void set_chr(Object *obj, Visitor *v, const char= *name, void *opaque, Error **errp) { ERRP_GUARD(); - Property *prop =3D opaque; + const Property *prop =3D opaque; CharBackend *be =3D object_field_prop_ptr(obj, prop); Chardev *s; char *str; @@ -305,7 +305,7 @@ static void set_chr(Object *obj, Visitor *v, const char= *name, void *opaque, =20 static void release_chr(Object *obj, const char *name, void *opaque) { - Property *prop =3D opaque; + const Property *prop =3D opaque; CharBackend *be =3D object_field_prop_ptr(obj, prop); =20 qemu_chr_fe_deinit(be, false); @@ -329,7 +329,7 @@ const PropertyInfo qdev_prop_chr =3D { static void get_mac(Object *obj, Visitor *v, const char *name, void *opaqu= e, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; MACAddr *mac =3D object_field_prop_ptr(obj, prop); char buffer[2 * 6 + 5 + 1]; char *p =3D buffer; @@ -344,7 +344,7 @@ static void get_mac(Object *obj, Visitor *v, const char= *name, void *opaque, static void set_mac(Object *obj, Visitor *v, const char *name, void *opaqu= e, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; MACAddr *mac =3D object_field_prop_ptr(obj, prop); int i, pos; char *str; @@ -406,7 +406,7 @@ void qdev_prop_set_macaddr(DeviceState *dev, const char= *name, static void get_netdev(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; NICPeers *peers_ptr =3D object_field_prop_ptr(obj, prop); char *p =3D g_strdup(peers_ptr->ncs[0] ? peers_ptr->ncs[0]->name : ""); =20 @@ -417,7 +417,7 @@ static void get_netdev(Object *obj, Visitor *v, const c= har *name, static void set_netdev(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; NICPeers *peers_ptr =3D object_field_prop_ptr(obj, prop); NetClientState **ncs =3D peers_ptr->ncs; NetClientState *peers[MAX_QUEUE_NUM]; @@ -485,7 +485,7 @@ const PropertyInfo qdev_prop_netdev =3D { static void get_audiodev(Object *obj, Visitor *v, const char* name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; QEMUSoundCard *card =3D object_field_prop_ptr(obj, prop); char *p =3D g_strdup(audio_get_id(card)); =20 @@ -496,7 +496,7 @@ static void get_audiodev(Object *obj, Visitor *v, const= char* name, static void set_audiodev(Object *obj, Visitor *v, const char* name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; QEMUSoundCard *card =3D object_field_prop_ptr(obj, prop); AudioState *state; g_autofree char *str =3D NULL; @@ -578,7 +578,7 @@ static void qdev_propinfo_set_losttickpolicy(Object *ob= j, Visitor *v, const char *name, void *opaqu= e, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int *ptr =3D object_field_prop_ptr(obj, prop); int value; =20 @@ -614,7 +614,7 @@ const PropertyInfo qdev_prop_losttickpolicy =3D { static void set_blocksize(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); uint64_t value; =20 @@ -737,7 +737,7 @@ const PropertyInfo qdev_prop_zero_page_detection =3D { static void get_reserved_region(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; ReservedRegion *rr =3D object_field_prop_ptr(obj, prop); char buffer[64]; char *p =3D buffer; @@ -753,7 +753,7 @@ static void get_reserved_region(Object *obj, Visitor *v= , const char *name, static void set_reserved_region(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; ReservedRegion *rr =3D object_field_prop_ptr(obj, prop); const char *endptr; uint64_t lob, upb; @@ -815,7 +815,7 @@ const PropertyInfo qdev_prop_reserved_region =3D { static void set_pci_devfn(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; g_autofree GenericAlternate *alt; int32_t value, *ptr =3D object_field_prop_ptr(obj, prop); unsigned int slot, fn, n; @@ -895,7 +895,7 @@ const PropertyInfo qdev_prop_pci_devfn =3D { static void get_pci_host_devaddr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIHostDeviceAddress *addr =3D object_field_prop_ptr(obj, prop); char buffer[] =3D "ffff:ff:ff.f"; char *p =3D buffer; @@ -921,7 +921,7 @@ static void get_pci_host_devaddr(Object *obj, Visitor *= v, const char *name, static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIHostDeviceAddress *addr =3D object_field_prop_ptr(obj, prop); char *str, *p; char *e; @@ -1011,7 +1011,7 @@ const PropertyInfo qdev_prop_off_auto_pcibar =3D { static void get_prop_pcielinkspeed(Object *obj, Visitor *v, const char *na= me, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIExpLinkSpeed *p =3D object_field_prop_ptr(obj, prop); int speed; =20 @@ -1045,7 +1045,7 @@ static void get_prop_pcielinkspeed(Object *obj, Visit= or *v, const char *name, static void set_prop_pcielinkspeed(Object *obj, Visitor *v, const char *na= me, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIExpLinkSpeed *p =3D object_field_prop_ptr(obj, prop); int speed; =20 @@ -1093,7 +1093,7 @@ const PropertyInfo qdev_prop_pcie_link_speed =3D { static void get_prop_pcielinkwidth(Object *obj, Visitor *v, const char *na= me, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIExpLinkWidth *p =3D object_field_prop_ptr(obj, prop); int width; =20 @@ -1130,7 +1130,7 @@ static void get_prop_pcielinkwidth(Object *obj, Visit= or *v, const char *name, static void set_prop_pcielinkwidth(Object *obj, Visitor *v, const char *na= me, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; PCIExpLinkWidth *p =3D object_field_prop_ptr(obj, prop); int width; =20 @@ -1181,7 +1181,7 @@ const PropertyInfo qdev_prop_pcie_link_width =3D { static void get_uuid(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; QemuUUID *uuid =3D object_field_prop_ptr(obj, prop); char buffer[UUID_STR_LEN]; char *p =3D buffer; @@ -1196,7 +1196,7 @@ static void get_uuid(Object *obj, Visitor *v, const c= har *name, void *opaque, static void set_uuid(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; QemuUUID *uuid =3D object_field_prop_ptr(obj, prop); char *str; =20 diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 61929b2865a..434a76f5036 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -61,7 +61,7 @@ void *object_field_prop_ptr(Object *obj, const Property *= prop) static void field_prop_get(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; return prop->info->get(obj, v, name, opaque, errp); } =20 @@ -78,7 +78,7 @@ static ObjectPropertyAccessor *field_prop_getter(const Pr= opertyInfo *info) static void field_prop_set(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; =20 if (!qdev_prop_allow_set(obj, name, prop->info, errp)) { return; @@ -100,7 +100,7 @@ static ObjectPropertyAccessor *field_prop_setter(const = PropertyInfo *info) void qdev_propinfo_get_enum(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_enum(v, name, ptr, prop->info->enum_table, errp); @@ -109,7 +109,7 @@ void qdev_propinfo_get_enum(Object *obj, Visitor *v, co= nst char *name, void qdev_propinfo_set_enum(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_enum(v, name, ptr, prop->info->enum_table, errp); @@ -131,13 +131,13 @@ const PropertyInfo qdev_prop_enum =3D { =20 /* Bit */ =20 -static uint32_t qdev_get_prop_mask(Property *prop) +static uint32_t qdev_get_prop_mask(const Property *prop) { assert(prop->info =3D=3D &qdev_prop_bit); return 0x1 << prop->bitnr; } =20 -static void bit_prop_set(Object *obj, Property *props, bool val) +static void bit_prop_set(Object *obj, const Property *props, bool val) { uint32_t *p =3D object_field_prop_ptr(obj, props); uint32_t mask =3D qdev_get_prop_mask(props); @@ -151,7 +151,7 @@ static void bit_prop_set(Object *obj, Property *props, = bool val) static void prop_get_bit(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *p =3D object_field_prop_ptr(obj, prop); bool value =3D (*p & qdev_get_prop_mask(prop)) !=3D 0; =20 @@ -161,7 +161,7 @@ static void prop_get_bit(Object *obj, Visitor *v, const= char *name, static void prop_set_bit(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; bool value; =20 if (!visit_type_bool(v, name, &value, errp)) { @@ -185,13 +185,13 @@ const PropertyInfo qdev_prop_bit =3D { =20 /* Bit64 */ =20 -static uint64_t qdev_get_prop_mask64(Property *prop) +static uint64_t qdev_get_prop_mask64(const Property *prop) { assert(prop->info =3D=3D &qdev_prop_bit64); return 0x1ull << prop->bitnr; } =20 -static void bit64_prop_set(Object *obj, Property *props, bool val) +static void bit64_prop_set(Object *obj, const Property *props, bool val) { uint64_t *p =3D object_field_prop_ptr(obj, props); uint64_t mask =3D qdev_get_prop_mask64(props); @@ -205,7 +205,7 @@ static void bit64_prop_set(Object *obj, Property *props= , bool val) static void prop_get_bit64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *p =3D object_field_prop_ptr(obj, prop); bool value =3D (*p & qdev_get_prop_mask64(prop)) !=3D 0; =20 @@ -215,7 +215,7 @@ static void prop_get_bit64(Object *obj, Visitor *v, con= st char *name, static void prop_set_bit64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; bool value; =20 if (!visit_type_bool(v, name, &value, errp)) { @@ -237,7 +237,7 @@ const PropertyInfo qdev_prop_bit64 =3D { static void get_bool(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; bool *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_bool(v, name, ptr, errp); @@ -246,7 +246,7 @@ static void get_bool(Object *obj, Visitor *v, const cha= r *name, void *opaque, static void set_bool(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; bool *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_bool(v, name, ptr, errp); @@ -264,7 +264,7 @@ const PropertyInfo qdev_prop_bool =3D { static void get_uint8(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint8_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint8(v, name, ptr, errp); @@ -273,7 +273,7 @@ static void get_uint8(Object *obj, Visitor *v, const ch= ar *name, void *opaque, static void set_uint8(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint8_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint8(v, name, ptr, errp); @@ -303,7 +303,7 @@ const PropertyInfo qdev_prop_uint8 =3D { static void get_uint16(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint16_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint16(v, name, ptr, errp); @@ -312,7 +312,7 @@ static void get_uint16(Object *obj, Visitor *v, const c= har *name, static void set_uint16(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint16_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint16(v, name, ptr, errp); @@ -330,7 +330,7 @@ const PropertyInfo qdev_prop_uint16 =3D { static void get_uint32(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint32(v, name, ptr, errp); @@ -339,7 +339,7 @@ static void get_uint32(Object *obj, Visitor *v, const c= har *name, static void set_uint32(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint32(v, name, ptr, errp); @@ -348,7 +348,7 @@ static void set_uint32(Object *obj, Visitor *v, const c= har *name, void qdev_propinfo_get_int32(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_int32(v, name, ptr, errp); @@ -357,7 +357,7 @@ void qdev_propinfo_get_int32(Object *obj, Visitor *v, c= onst char *name, static void set_int32(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_int32(v, name, ptr, errp); @@ -382,7 +382,7 @@ const PropertyInfo qdev_prop_int32 =3D { static void get_uint64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint64(v, name, ptr, errp); @@ -391,7 +391,7 @@ static void get_uint64(Object *obj, Visitor *v, const c= har *name, static void set_uint64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint64(v, name, ptr, errp); @@ -400,7 +400,7 @@ static void set_uint64(Object *obj, Visitor *v, const c= har *name, static void get_int64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_int64(v, name, ptr, errp); @@ -409,7 +409,7 @@ static void get_int64(Object *obj, Visitor *v, const ch= ar *name, static void set_int64(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; int64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_int64(v, name, ptr, errp); @@ -432,7 +432,7 @@ const PropertyInfo qdev_prop_int64 =3D { static void set_uint64_checkmask(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint64(v, name, ptr, errp); @@ -452,14 +452,14 @@ const PropertyInfo qdev_prop_uint64_checkmask =3D { =20 static void release_string(Object *obj, const char *name, void *opaque) { - Property *prop =3D opaque; + const Property *prop =3D opaque; g_free(*(char **)object_field_prop_ptr(obj, prop)); } =20 static void get_string(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; char **ptr =3D object_field_prop_ptr(obj, prop); =20 if (!*ptr) { @@ -473,7 +473,7 @@ static void get_string(Object *obj, Visitor *v, const c= har *name, static void set_string(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; char **ptr =3D object_field_prop_ptr(obj, prop); char *str; =20 @@ -507,7 +507,7 @@ const PropertyInfo qdev_prop_on_off_auto =3D { void qdev_propinfo_get_size32(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); uint64_t value =3D *ptr; =20 @@ -517,7 +517,7 @@ void qdev_propinfo_get_size32(Object *obj, Visitor *v, = const char *name, static void set_size32(Object *obj, Visitor *v, const char *name, void *op= aque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); uint64_t value; =20 @@ -557,7 +557,7 @@ struct ArrayElementList { * specific element of the array. Arrays are backed by an uint32_t length = field * and an element array. @elem points at an element in this element array. */ -static Property array_elem_prop(Object *obj, Property *parent_prop, +static Property array_elem_prop(Object *obj, const Property *parent_prop, const char *name, char *elem) { return (Property) { @@ -582,7 +582,7 @@ static Property array_elem_prop(Object *obj, Property *= parent_prop, */ static void release_prop_array(Object *obj, const char *name, void *opaque) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *alenptr =3D object_field_prop_ptr(obj, prop); void **arrayptr =3D (void *)obj + prop->arrayoffset; char *elem =3D *arrayptr; @@ -609,7 +609,7 @@ static void set_prop_array(Object *obj, Visitor *v, con= st char *name, void *opaque, Error **errp) { ERRP_GUARD(); - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *alenptr =3D object_field_prop_ptr(obj, prop); void **arrayptr =3D (void *)obj + prop->arrayoffset; ArrayElementList *list, *elem, *next; @@ -685,7 +685,7 @@ static void get_prop_array(Object *obj, Visitor *v, con= st char *name, void *opaque, Error **errp) { ERRP_GUARD(); - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *alenptr =3D object_field_prop_ptr(obj, prop); void **arrayptr =3D (void *)obj + prop->arrayoffset; char *elemptr =3D *arrayptr; @@ -928,7 +928,7 @@ void qdev_prop_set_globals(DeviceState *dev) static void get_size(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_size(v, name, ptr, errp); @@ -937,7 +937,7 @@ static void get_size(Object *obj, Visitor *v, const cha= r *name, void *opaque, static void set_size(Object *obj, Visitor *v, const char *name, void *opaq= ue, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint64_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_size(v, name, ptr, errp); @@ -1020,7 +1020,7 @@ static void qdev_get_legacy_property(Object *obj, Vis= itor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; =20 char buffer[1024]; char *ptr =3D buffer; diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c index 0419f648b7a..dbd9b58a4ec 100644 --- a/hw/misc/xlnx-versal-trng.c +++ b/hw/misc/xlnx-versal-trng.c @@ -641,7 +641,7 @@ static void trng_prop_fault_event_set(Object *obj, Visi= tor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *events =3D object_field_prop_ptr(obj, prop); =20 if (!visit_type_uint32(v, name, events, errp)) { diff --git a/hw/nvme/nguid.c b/hw/nvme/nguid.c index 829832bd9f4..be63cb75e16 100644 --- a/hw/nvme/nguid.c +++ b/hw/nvme/nguid.c @@ -149,7 +149,7 @@ static void nvme_nguid_stringify(const NvmeNGUID *nguid= , char *out) static void get_nguid(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; NvmeNGUID *nguid =3D object_field_prop_ptr(obj, prop); char buffer[NGUID_STR_LEN]; char *p =3D buffer; @@ -162,7 +162,7 @@ static void get_nguid(Object *obj, Visitor *v, const ch= ar *name, void *opaque, static void set_nguid(Object *obj, Visitor *v, const char *name, void *opa= que, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; NvmeNGUID *nguid =3D object_field_prop_ptr(obj, prop); char *str; =20 diff --git a/hw/s390x/css.c b/hw/s390x/css.c index b2d5327dbf4..4e27b2961b8 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -2463,7 +2463,7 @@ void css_reset(void) static void get_css_devid(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; CssDevId *dev_id =3D object_field_prop_ptr(obj, prop); char buffer[] =3D "xx.x.xxxx"; char *p =3D buffer; @@ -2492,7 +2492,7 @@ static void get_css_devid(Object *obj, Visitor *v, co= nst char *name, static void set_css_devid(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; CssDevId *dev_id =3D object_field_prop_ptr(obj, prop); char *str; int num, n1, n2; diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 5fbbf41a3db..94b1a5f6398 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -1453,7 +1453,7 @@ static void s390_pci_device_reset(DeviceState *dev) static void s390_pci_get_fid(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint32(v, name, ptr, errp); @@ -1463,7 +1463,7 @@ static void s390_pci_set_fid(Object *obj, Visitor *v,= const char *name, void *opaque, Error **errp) { S390PCIBusDevice *zpci =3D S390_PCI_DEVICE(obj); - Property *prop =3D opaque; + const Property *prop =3D opaque; uint32_t *ptr =3D object_field_prop_ptr(obj, prop); =20 if (!visit_type_uint32(v, name, ptr, errp)) { diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index d37f722cce0..c8e60475d51 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1499,7 +1499,7 @@ static void get_nv_gpudirect_clique_id(Object *obj, V= isitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint8_t *ptr =3D object_field_prop_ptr(obj, prop); =20 visit_type_uint8(v, name, ptr, errp); @@ -1509,7 +1509,7 @@ static void set_nv_gpudirect_clique_id(Object *obj, V= isitor *v, const char *name, void *opaque, Error **errp) { - Property *prop =3D opaque; + const Property *prop =3D opaque; uint8_t value, *ptr =3D object_field_prop_ptr(obj, prop); =20 if (!visit_type_uint8(v, name, &value, errp)) { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597487; cv=none; d=zohomail.com; s=zohoarc; b=c3Atiz9c402lV5SGZNjuibF/IqCxQ2LyCwF4hkG6M2BXoxyZJFYRMFf1PLf1yJVZSaphQPpt3a0hxi9l+UHuDZV7qz+4bJ12kdb7bn+cplYt4nPMyILyWfP2AMbaGa/8f035T6hJCc60s5dUuX28CxM5XfP+LYH2miJFLuVCckQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597487; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=b57K8ft544UoM6GCsiUjVHuM32CJVDdNlM86iQYtbsk=; b=FUX87m2WclV0e72imgRWBloui7h/2zbgLhJCxT7J0uzP3wjJl5esh1UbSMXpkJcbzTvKJQqzKy4VGnOZt6UrRFbinz012iOMuZ3eynTQE6nFLPOE6U/bbWtyx+YOAYY1sLATeClvF4B+T2QqY/z6QHCf/3QlC0+fzzSdRQw5/ak= 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 1734597487549910.5187357774406; Thu, 19 Dec 2024 00:38:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByO-0005Yk-Rt; Thu, 19 Dec 2024 03:33:32 -0500 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 1tOByL-0005KC-Lt for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByI-0005Cf-EI for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:29 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-466-VPyAlxKXOEyD9lCJqWjPfg-1; Thu, 19 Dec 2024 03:33:24 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4361b090d23so2998825e9.0 for ; Thu, 19 Dec 2024 00:33:24 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c515sm11222895e9.30.2024.12.19.00.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b57K8ft544UoM6GCsiUjVHuM32CJVDdNlM86iQYtbsk=; b=NJWJK2tB9vmUUO2naBIx1l33YLkgvfpLBo6cOHFCMf8+OeyASgLN7qqXVTSXwvsgRRqTRr LYs8eIMSfN9k6hy82Ev9oQa2ZQdw7FUp7My6plH0o6YpUVaXq4B/9g0o5DvXEWxBVdfIl+ Eam7dHlMN4mgztIfvC06pC3WcpjEjVM= X-MC-Unique: VPyAlxKXOEyD9lCJqWjPfg-1 X-Mimecast-MFC-AGG-ID: VPyAlxKXOEyD9lCJqWjPfg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597203; x=1735202003; 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=b57K8ft544UoM6GCsiUjVHuM32CJVDdNlM86iQYtbsk=; b=tvDhHvilaHA+o1A7aKgT5Q3NRuHFQ4UHs/JgpuoNuAZFVFn5ndHIp+3myk6TGw9+hN 80o3i0tJ9RfNpR45L0xvVEsH/uX28LkCF7/xL9RnBR5sxuyeiW9HpjxN4Po0EGTdmJCE RjXZn+Fai5HA+24pM8JNvdQ8frw+1np/osEHYvXa9WJ24G4MKY8aGTA/Lgzo7JYUsfrA xgMm7h58bjfDkqiolHnueDohkm6sGbvr47WrqYwtL/GbXInDdmJ4t9LlDpWHECVadUCA c7dmBPMB4O0LWknMVUA7+1qrYBdYJJCtfhjaEP2b6NfMb4jedm0ZOxsJluGqkt1r3atk fPbg== X-Gm-Message-State: AOJu0YzWDOwbJnbnVPoEpj3EZjr9tNHWb+tlTLEuhBgq4UySUP9xsc/m Tsu7xtTM0BzCexyzlEQV5bJu51K5oYtuQnp6za7AZXb5pWDQHW5zH9UIxesUMNsLbPAhTIsxy5F 3DPlCoFPEd8DtsVBTgH9avcSAwtwoMoLHktBHnTGNUw55t/xUxX15Z15GXy6RkHsKF4hRAiU9GX vw6k77I0pJjHTaAHde12X1Yej5BvJkLf0Sgogl X-Gm-Gg: ASbGncvH2Bjv2Ei1Gd4HcOyQFj6ivJAV07tI4a7fnR6rs5sFFj5ivQTbww9eqRaCY5v 1zyiWTKd3F0M+VIHSVnrUXrOcX1aaif9UxN+M/2Iw1YxMB/iBhzBpqgE8OSzARxzuSSlaS3RLkM CB6cWH/Y3QBzjWWrFYRIVLfC5cFWX1Li+IbuWw5kHzU8KZsW8dhn2OuLg0XbnK8E+xAQ5Ad5n0g EcgODFY/qXQGbhh9zlJlxlna5YUtBgzMFezHQgKhozWoHJLxZ3wRAHXDBzi X-Received: by 2002:a05:600c:3b88:b0:434:a315:19c with SMTP id 5b1f17b1804b1-4365c77e436mr20928235e9.3.1734597202542; Thu, 19 Dec 2024 00:33:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNm4V+wCPC8C8YlTwEY3j1RvRU4QPiJVvIqVqepXMFPBRnP5BomYS5hLq+nyO10IQ07ZDN7Q== X-Received: by 2002:a05:600c:3b88:b0:434:a315:19c with SMTP id 5b1f17b1804b1-4365c77e436mr20927685e9.3.1734597201851; Thu, 19 Dec 2024 00:33:21 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<> Date: Thu, 19 Dec 2024 09:32:12 +0100 Message-ID: <20241219083228.363430-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597488170116600 Content-Type: text/plain; charset="utf-8" Parameterize the implementation of ClassInitImpl so that it is possible to call up the chain of implementations, one superclass at a time starting at ClassInitImpl. In order to avoid having to implement (for example) ClassInitImpl, also remove the dummy PL011Class and PL011LuminaryClass structs and specify the same ObjectType::Class as the superclass. In the future this default behavior can be handled by a procedural macro, by looking at the first field in the struct. Note that the new trait is safe: the calls are started by rust_class_init<>(), which is not public and can convert the class pointer to a Rust reference. Since CLASS_BASE_INIT applies to the type that is being defined, and only to it, move it to ObjectImpl. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 19 +---- rust/qemu-api/src/definitions.rs | 111 ++++++++++++++++++++++++------ rust/qemu-api/src/device_class.rs | 50 +++++--------- rust/qemu-api/src/sysbus.rs | 18 ++++- rust/qemu-api/tests/tests.rs | 9 +-- 5 files changed, 127 insertions(+), 80 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 3e29442a625..d9e9f35f456 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -13,7 +13,6 @@ c_str, definitions::ObjectImpl, device_class::DeviceImpl, - impl_device_class, irq::InterruptSource, prelude::*, }; @@ -108,7 +107,7 @@ pub struct PL011State { } =20 unsafe impl ObjectType for PL011State { - type Class =3D PL011Class; + type Class =3D ::Class; const TYPE_NAME: &'static CStr =3D crate::TYPE_PL011; } =20 @@ -118,11 +117,6 @@ impl ObjectImpl for PL011State { const INSTANCE_INIT: Option =3D Some(Self::init); } =20 -#[repr(C)] -pub struct PL011Class { - _inner: [u8; 0], -} - impl DeviceImpl for PL011State { fn properties() -> &'static [Property] { &device_class::PL011_PROPERTIES @@ -134,8 +128,6 @@ fn vmsd() -> Option<&'static VMStateDescription> { const RESET: Option =3D Some(Self::reset); } =20 -impl_device_class!(PL011State); - impl PL011State { /// Initializes a pre-allocated, unitialized instance of `PL011State`. /// @@ -627,11 +619,6 @@ pub struct PL011Luminary { parent_obj: PL011State, } =20 -#[repr(C)] -pub struct PL011LuminaryClass { - _inner: [u8; 0], -} - impl PL011Luminary { /// Initializes a pre-allocated, unitialized instance of `PL011Luminar= y`. /// @@ -646,7 +633,7 @@ unsafe fn init(&mut self) { } =20 unsafe impl ObjectType for PL011Luminary { - type Class =3D PL011LuminaryClass; + type Class =3D ::Class; const TYPE_NAME: &'static CStr =3D crate::TYPE_PL011_LUMINARY; } =20 @@ -657,5 +644,3 @@ impl ObjectImpl for PL011Luminary { } =20 impl DeviceImpl for PL011Luminary {} - -impl_device_class!(PL011Luminary); diff --git a/rust/qemu-api/src/definitions.rs b/rust/qemu-api/src/definitio= ns.rs index df91a2e31a9..13f8f6fd2a9 100644 --- a/rust/qemu-api/src/definitions.rs +++ b/rust/qemu-api/src/definitions.rs @@ -26,6 +26,16 @@ T::INSTANCE_POST_INIT.unwrap()(unsafe { &mut *obj.cast::() }) } =20 +unsafe extern "C" fn rust_class_init>( + klass: *mut ObjectClass, + _data: *mut c_void, +) { + // SAFETY: klass is a T::Class, since rust_class_init + // is called from QOM core as the class_init function + // for class T + T::class_init(unsafe { &mut *klass.cast::() }) +} + /// Trait exposed by all structs corresponding to QOM objects. /// /// # Safety @@ -50,7 +60,8 @@ /// - likewise, the first field of the `Class` must be of the class struct /// corresponding to the superclass, which is `ObjectImpl::ParentType::C= lass`. pub unsafe trait ObjectType: Sized { - /// The QOM class object corresponding to this struct. Not used yet. + /// The QOM class object corresponding to this struct. This is used + /// to automatically generate a `class_init` method. type Class; =20 /// The name of the type, which can be passed to `object_new()` to @@ -59,7 +70,7 @@ pub unsafe trait ObjectType: Sized { } =20 /// Trait a type must implement to be registered with QEMU. -pub trait ObjectImpl: ObjectType + ClassInitImpl { +pub trait ObjectImpl: ObjectType + ClassInitImpl { /// The parent of the type. This should match the first field of /// the struct that implements `ObjectImpl`: type ParentType: ObjectType; @@ -80,6 +91,15 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { /// `INSTANCE_INIT` functions have been called. const INSTANCE_POST_INIT: Option =3D None; =20 + /// Called on descendent classes after all parent class initialization + /// has occurred, but before the class itself is initialized. This + /// is only useful if a class is not a leaf, and can be used to undo + /// the effects of copying the contents of the parent's class struct + /// to the descendants. + const CLASS_BASE_INIT: Option< + unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void), + > =3D None; + const TYPE_INFO: TypeInfo =3D TypeInfo { name: Self::TYPE_NAME.as_ptr(), parent: Self::ParentType::TYPE_NAME.as_ptr(), @@ -96,37 +116,86 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { instance_finalize: Self::INSTANCE_FINALIZE, abstract_: Self::ABSTRACT, class_size: core::mem::size_of::(), - class_init: ::CLASS_INIT, - class_base_init: ::CLASS_BASE_INIT, + class_init: Some(rust_class_init::), + class_base_init: Self::CLASS_BASE_INIT, class_data: core::ptr::null_mut(), interfaces: core::ptr::null_mut(), }; } =20 -/// Trait used to fill in a class struct. +/// Internal trait used to automatically fill in a class struct. /// /// Each QOM class that has virtual methods describes them in a /// _class struct_. Class structs include a parent field corresponding /// to the vtable of the parent class, all the way up to [`ObjectClass`]. -/// Each QOM type has one such class struct. +/// Each QOM type has one such class struct; this trait takes care of +/// initializing the `T` part of the class struct, for the type that +/// implements the trait. /// -/// The Rust implementation of methods will usually come from a trait -/// like [`ObjectImpl`] or [`DeviceImpl`](crate::device_class::DeviceImpl). -pub trait ClassInitImpl { - /// Function that is called after all parent class initialization - /// has occurred. On entry, the virtual method pointers are set to +/// Each struct will implement this trait with `T` equal to each +/// superclass. For example, a device should implement at least +/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>`. +/// Such implementations are made in one of two ways. +/// +/// For most superclasses, `ClassInitImpl` is provided by the `qemu-api` +/// crate itself. The Rust implementation of methods will come from a +/// trait like [`ObjectImpl`] or +/// [`DeviceImpl`](crate::device_class::DeviceImpl), and `ClassInitImpl` is +/// provided by blanket implementations that operate on all implementors o= f the +/// `*Impl`* trait. For example: +/// +/// ```ignore +/// impl ClassInitImpl for T +/// where +/// T: DeviceImpl, +/// ``` +/// +/// The other case is when manual implementation of the trait is needed. +/// This covers the following cases: +/// +/// * if a class implements a QOM interface, the Rust code _has_ to define= its +/// own class struct `FooClass` and implement `ClassInitImpl`. +/// `ClassInitImpl`'s `class_init` method will then forward to +/// multiple other `class_init`s, for the interfaces as well as the +/// superclass. (Note that there is no Rust example yet for using interf= aces). +/// +/// * for classes implemented outside the ``qemu-api`` crate, it's not pos= sible +/// to add blanket implementations like the above one, due to orphan rul= es. In +/// that case, the easiest solution is to implement +/// `ClassInitImpl` for each subclass and not have a +/// `YourSuperclassImpl` trait at all. +/// +/// ```ignore +/// impl ClassInitImpl for YourSubclass { +/// fn class_init(klass: &mut YourSuperclass) { +/// klass.some_method =3D Some(Self::some_method); +/// >::class_init(&mut kl= ass.parent_class); +/// } +/// } +/// ``` +/// +/// While this method incurs a small amount of code duplication, +/// it is generally limited to the recursive call on the last line. +/// This is because classes defined in Rust do not need the same +/// glue code that is needed when the classes are defined in C code. +/// You may consider using a macro if you have many subclasses. +pub trait ClassInitImpl { + /// Initialize `klass` to point to the virtual method implementations + /// for `Self`. On entry, the virtual method pointers are set to /// the default values coming from the parent classes; the function /// can change them to override virtual methods of a parent class. - const CLASS_INIT: Option; - - /// Called on descendent classes after all parent class initialization - /// has occurred, but before the class itself is initialized. This - /// is only useful if a class is not a leaf, and can be used to undo - /// the effects of copying the contents of the parent's class struct - /// to the descendants. - const CLASS_BASE_INIT: Option< - unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void), - >; + /// + /// The virtual method implementations usually come from another + /// trait, for example [`DeviceImpl`](crate::device_class::DeviceImpl) + /// when `T` is [`DeviceClass`](crate::bindings::DeviceClass). + /// + /// On entry, `klass`'s parent class is initialized, while the other f= ields + /// are all zero; it is therefore assumed that all fields in `T` can be + /// zeroed, otherwise it would not be possible to provide the class as= a + /// `&mut T`. TODO: add a bound of [`Zeroable`](crate::zeroable::Zero= able) + /// to T; this is more easily done once Zeroable does not require a ma= nual + /// implementation (Rust 1.75.0). + fn class_init(klass: &mut T); } =20 #[macro_export] diff --git a/rust/qemu-api/src/device_class.rs b/rust/qemu-api/src/device_c= lass.rs index c98f0b2c7da..dcec5488291 100644 --- a/rust/qemu-api/src/device_class.rs +++ b/rust/qemu-api/src/device_class.rs @@ -2,10 +2,11 @@ // Author(s): Manos Pitsidianakis // SPDX-License-Identifier: GPL-2.0-or-later =20 -use std::{ffi::CStr, os::raw::c_void}; +use std::ffi::CStr; =20 use crate::{ - bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Propert= y, VMStateDescription}, + bindings::{self, DeviceClass, DeviceState, Error, Property, VMStateDes= cription}, + definitions::ClassInitImpl, prelude::*, }; =20 @@ -44,7 +45,7 @@ fn vmsd() -> Option<&'static VMStateDescription> { /// # Safety /// /// This function is only called through the QOM machinery and -/// the `impl_device_class!` macro. +/// used by the `ClassInitImpl` trait. /// We expect the FFI user of this function to pass a valid pointer that /// can be downcasted to type `T`. We also expect the device is /// readable/writeable from one thread at any time. @@ -65,48 +66,31 @@ fn vmsd() -> Option<&'static VMStateDescription> { T::RESET.unwrap()(unsafe { &mut *state }); } =20 -/// # Safety -/// -/// We expect the FFI user of this function to pass a valid pointer that -/// can be downcasted to type `DeviceClass`, because `T` implements -/// `DeviceImpl`. -pub unsafe extern "C" fn rust_device_class_init( - klass: *mut ObjectClass, - _: *mut c_void, -) { - let mut dc =3D ::core::ptr::NonNull::new(klass.cast::()).= unwrap(); - unsafe { - let dc =3D dc.as_mut(); +impl ClassInitImpl for T +where + T: DeviceImpl, +{ + fn class_init(dc: &mut DeviceClass) { if ::REALIZE.is_some() { dc.realize =3D Some(rust_realize_fn::); } if ::RESET.is_some() { - bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn= ::)); + unsafe { + bindings::device_class_set_legacy_reset(dc, Some(rust_rese= t_fn::)); + } } if let Some(vmsd) =3D ::vmsd() { dc.vmsd =3D vmsd; } let prop =3D ::properties(); if !prop.is_empty() { - bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len= ()); + unsafe { + bindings::device_class_set_props_n(dc, prop.as_ptr(), prop= .len()); + } } } } =20 -#[macro_export] -macro_rules! impl_device_class { - ($type:ty) =3D> { - impl $crate::definitions::ClassInitImpl for $type { - const CLASS_INIT: Option< - unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut := :std::os::raw::c_void), - > =3D Some($crate::device_class::rust_device_class_init::<$typ= e>); - const CLASS_BASE_INIT: Option< - unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut := :std::os::raw::c_void), - > =3D None; - } - }; -} - #[macro_export] macro_rules! define_property { ($name:expr, $state:ty, $field:ident, $prop:expr, $type:ty, default = =3D $defval:expr$(,)*) =3D> { @@ -148,8 +132,8 @@ macro_rules! declare_properties { }; } =20 -unsafe impl ObjectType for bindings::DeviceState { - type Class =3D bindings::DeviceClass; +unsafe impl ObjectType for DeviceState { + type Class =3D DeviceClass; const TYPE_NAME: &'static CStr =3D unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_DEVICE= ) }; } diff --git a/rust/qemu-api/src/sysbus.rs b/rust/qemu-api/src/sysbus.rs index 5ee068541cf..5d15b317405 100644 --- a/rust/qemu-api/src/sysbus.rs +++ b/rust/qemu-api/src/sysbus.rs @@ -6,7 +6,13 @@ =20 pub use bindings::{SysBusDevice, SysBusDeviceClass}; =20 -use crate::{bindings, cell::bql_locked, irq::InterruptSource, prelude::*}; +use crate::{ + bindings::{self, DeviceClass}, + cell::bql_locked, + definitions::ClassInitImpl, + irq::InterruptSource, + prelude::*, +}; =20 unsafe impl ObjectType for SysBusDevice { type Class =3D SysBusDeviceClass; @@ -14,6 +20,16 @@ unsafe impl ObjectType for SysBusDevice { unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_SYS_BU= S_DEVICE) }; } =20 +// TODO: add SysBusDeviceImpl +impl ClassInitImpl for T +where + T: ClassInitImpl, +{ + fn class_init(sdc: &mut SysBusDeviceClass) { + >::class_init(&mut sdc.parent_clas= s); + } +} + impl SysBusDevice { /// Return `self` cast to a mutable pointer, for use in calls to C cod= e. const fn as_mut_ptr(&self) -> *mut SysBusDevice { diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 278efe967fe..ed3a555e76d 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -26,11 +26,6 @@ pub struct DummyState { pub migrate_clock: bool, } =20 - #[repr(C)] - pub struct DummyClass { - pub _parent: DeviceClass, - } - declare_properties! { DUMMY_PROPERTIES, define_property!( @@ -43,7 +38,7 @@ pub struct DummyClass { } =20 unsafe impl ObjectType for DummyState { - type Class =3D DummyClass; + type Class =3D ::Class; const TYPE_NAME: &'static CStr =3D c_str!("dummy"); } =20 @@ -61,8 +56,6 @@ fn vmsd() -> Option<&'static VMStateDescription> { } } =20 - impl_device_class!(DummyState); - unsafe { module_call_init(module_init_type::MODULE_INIT_QOM); object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast()); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597353; cv=none; d=zohomail.com; s=zohoarc; b=CjNihm/M4CW8Hsx7C29nFGn1ojO5ve+sYWVZ/1RbvWu7sBHquFHbVMWUl9dHmJ4n2a5K+D9vInCqzbTI3QFKNYrZm7nDmD1BaGPQk1XtlZlxetX67GmDXfYJlJZwiS7ikwhEqgkCP9PT4VYicTVDgDfayoNVvWmF8TzWVcFaCNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597353; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dmCTcKk0IFYVFevoPCPLYpGDtVOutqk1v2s9a09H49U=; b=FEcmBibnLUOpNCeIJWL7F6GIi9UY4mkpi1QOZxPVrZzi1fLF9aMcgGZmfbCdLTJFiTIAoK09F8tW0rPKd6pUEJM/dq1INHjRRDigGrRq6IF29W+MMkOd5mhrnU0+IcV/yR7UfMCpUSLqbXUKfG1QjUYAHvKk9tDn37liqu1fRw0= 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 1734597352943674.480532048517; Thu, 19 Dec 2024 00:35:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByO-0005YP-Pg; Thu, 19 Dec 2024 03:33:32 -0500 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 1tOByN-0005Ug-UK for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByM-0005Cv-A3 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:31 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-k22PXFs0OEuf_w6hipjBOQ-1; Thu, 19 Dec 2024 03:33:27 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-436219070b4so2727985e9.1 for ; Thu, 19 Dec 2024 00:33:27 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c832e31sm989066f8f.33.2024.12.19.00.33.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dmCTcKk0IFYVFevoPCPLYpGDtVOutqk1v2s9a09H49U=; b=NE6eYlRWabZm/kT6dsflDiSQEycxcETHerFa6ZS5c5IdVTRrHnbjo8VIoAeGUUATc+c3m2 E4+SQ+KaQ0GKsHOj4wOVNpOU4S5uS6cfjbLcOLyg6jGBNtZLt8vtNrty+mMocxkzodaGIc y/UpOAP+sy4WllP3XS8TrQlSULz3+m8= X-MC-Unique: k22PXFs0OEuf_w6hipjBOQ-1 X-Mimecast-MFC-AGG-ID: k22PXFs0OEuf_w6hipjBOQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597205; x=1735202005; 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=dmCTcKk0IFYVFevoPCPLYpGDtVOutqk1v2s9a09H49U=; b=az4Yxa5IwHy0gKriOXqbBuxZbEcjR3QqhwKWjwyqMxxiQrO3mwmvRmhe/XgwSqBOYo I4MLhUINkYoaUxbxpL1+dcPqheCkmkEOpyFgYHJS40b6pP449MMlrWFz9+gFi4jzuHnR vq6gcRrDSyNu8gA70mxcyEbxLNn4vSAGDRiC5P6sxz2z9hM+B0d7V8RzAlFaeG94NZgp 3D8dOkjsWhfntpJwtznrj3u0TVqyDS7pytlsxTLD2WEeFgS1H5IqD9A3Gp72UWNydw+w mK5vzY03YW0PZ+jroUINYnDPrUc4Cd0rNFqaYxKSDUTSO/pesSJqmCtvaKx1r/hDSlrJ cQvw== X-Gm-Message-State: AOJu0Yz++O4VIT1sMSPQ2a8BMVLZYRM9cSWA3hC1SnOLuL1UYWvuHbw1 seWGnH+pXrVBqCtf0tlJhWK0TbTqBSTYQS8BRujspq+2etHgwc2pJZemcfpeOqwVcJxBrzV9NoD xWez+AsnzhHAr7M8pyn47/Anl1Yx2CWP3WH6nJBPBikFALH8spAbQkWoUlQyPU24ohT4FoHd/A7 DUmSIWbAOdJ/2pVHm1dmC0/ktXOM3MBIrT7pco X-Gm-Gg: ASbGncvZnNvWgLNvQvSRDem+65Y84xRLiIwn08mOyaKY9rTMVRG3TqwPBw3/UN0ksxG ejVWgiskD2k5q1Twowp+3hfKJwIzeAPWyBJHiPEg5SNAnwzQQrr3+YzAfUs7oi6U9V7JHyScTqY XWm9oENB3JDwGoDFAa3bmJyot+7xkpBBh1b+TwWSqu9WHp0ezmR27d93X1KBNTKHcZQ8H0PZVOb R3nFAQaYRkpmC0g+WR0dLCmPdr3lgw6Cbgk5PBeUb2bsvrE6DAv7IFO2eu3 X-Received: by 2002:a05:600c:3b1f:b0:434:fae4:1630 with SMTP id 5b1f17b1804b1-4365542e00emr40793555e9.28.1734597205360; Thu, 19 Dec 2024 00:33:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJ8TrS9ch95GAYe/BMmEpDJPSe8TzGbg5Kd7MtTtOTCKn0bmbqknbCWj+egPz7Z69MgKjRpQ== X-Received: by 2002:a05:600c:3b1f:b0:434:fae4:1630 with SMTP id 5b1f17b1804b1-4365542e00emr40793255e9.28.1734597204886; Thu, 19 Dec 2024 00:33:24 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 26/41] rust: qom: add possibility of overriding unparent Date: Thu, 19 Dec 2024 09:32:13 +0100 Message-ID: <20241219083228.363430-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597353584116600 Content-Type: text/plain; charset="utf-8" Add a blanket definition of ClassInitImpl that thunks ObjectImpl::UNPARENT and overrides it in ObjectClass if it is not None. ClassInitImpl can now call its superclass's ClassInitImpl, so that the C and Rust hierarchies match more closely. This is mostly done as an example of implementing the metaclass hierarchy under ClassInitImpl. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/definitions.rs | 44 ++++++++++++++++++++++++++++--- rust/qemu-api/src/device_class.rs | 6 +++-- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/rust/qemu-api/src/definitions.rs b/rust/qemu-api/src/definitio= ns.rs index 13f8f6fd2a9..a2481c1fe70 100644 --- a/rust/qemu-api/src/definitions.rs +++ b/rust/qemu-api/src/definitions.rs @@ -6,7 +6,7 @@ =20 use std::{ffi::CStr, os::raw::c_void}; =20 -use crate::bindings::{Object, ObjectClass, TypeInfo}; +use crate::bindings::{self, Object, ObjectClass, TypeInfo}; =20 unsafe extern "C" fn rust_instance_init(obj: *mut Object) { // SAFETY: obj is an instance of T, since rust_instance_init @@ -121,6 +121,9 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { class_data: core::ptr::null_mut(), interfaces: core::ptr::null_mut(), }; + + // methods on ObjectClass + const UNPARENT: Option =3D None; } =20 /// Internal trait used to automatically fill in a class struct. @@ -134,7 +137,8 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { /// /// Each struct will implement this trait with `T` equal to each /// superclass. For example, a device should implement at least -/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>`. +/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>` and +/// `ClassInitImpl<`[`ObjectClass`](crate::bindings::ObjectClass)`>`. /// Such implementations are made in one of two ways. /// /// For most superclasses, `ClassInitImpl` is provided by the `qemu-api` @@ -147,9 +151,13 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { /// ```ignore /// impl ClassInitImpl for T /// where -/// T: DeviceImpl, +/// T: ClassInitImpl + DeviceImpl, /// ``` /// +/// The bound on `ClassInitImpl` is needed so that, +/// after initializing the `DeviceClass` part of the class struct, +/// the parent [`ObjectClass`] is initialized as well. +/// /// The other case is when manual implementation of the trait is needed. /// This covers the following cases: /// @@ -235,3 +243,33 @@ extern "C" fn ctor_fn() { } }; } + +/// # Safety +/// +/// We expect the FFI user of this function to pass a valid pointer that +/// can be downcasted to type `T`. We also expect the device is +/// readable/writeable from one thread at any time. +unsafe extern "C" fn rust_unparent_fn(dev: *mut Object) { + unsafe { + assert!(!dev.is_null()); + let state =3D core::ptr::NonNull::new_unchecked(dev.cast::()); + T::UNPARENT.unwrap()(state.as_ref()); + } +} + +impl ClassInitImpl for T +where + T: ObjectImpl, +{ + fn class_init(oc: &mut ObjectClass) { + if ::UNPARENT.is_some() { + oc.unparent =3D Some(rust_unparent_fn::); + } + } +} + +unsafe impl ObjectType for Object { + type Class =3D ObjectClass; + const TYPE_NAME: &'static CStr =3D + unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_OBJECT= ) }; +} diff --git a/rust/qemu-api/src/device_class.rs b/rust/qemu-api/src/device_c= lass.rs index dcec5488291..a9965d1f123 100644 --- a/rust/qemu-api/src/device_class.rs +++ b/rust/qemu-api/src/device_class.rs @@ -5,7 +5,7 @@ use std::ffi::CStr; =20 use crate::{ - bindings::{self, DeviceClass, DeviceState, Error, Property, VMStateDes= cription}, + bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Propert= y, VMStateDescription}, definitions::ClassInitImpl, prelude::*, }; @@ -68,7 +68,7 @@ fn vmsd() -> Option<&'static VMStateDescription> { =20 impl ClassInitImpl for T where - T: DeviceImpl, + T: ClassInitImpl + DeviceImpl, { fn class_init(dc: &mut DeviceClass) { if ::REALIZE.is_some() { @@ -88,6 +88,8 @@ fn class_init(dc: &mut DeviceClass) { bindings::device_class_set_props_n(dc, prop.as_ptr(), prop= .len()); } } + + >::class_init(&mut dc.parent_class= ); } } =20 --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597241; cv=none; d=zohomail.com; s=zohoarc; b=EiBwILXD5IXCznaMkUJwwiDOPPdzOQwswRVdLg3RJRAUgR+bliaPbe2jzYzF9HiOWW09bRZpkiofYtBq6xBitRfgWU3XcGTdVCAvjJwuwNv4hU+fdxf4NpoznnJCV6cTPA4p5O2me1LMegwmkMaUAIPoXqWx912OcuB4hGHE/D8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597241; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=daXIX4qhJQvUvabkI8ft1TwFgegwlmO6KSYPGJnvFVo=; b=V2sJ0hQAMpS1I5nd+hXqRVidZyWM1V9rPw1tdgU32JfMEA6ajJjaIznn9I1hjjEwmzmekr5TdG5glvU9vK9Pa9821eG3GMPobjPJxTDVLIZzYiq2iyicr+oTmQ59m8F1wBNpHOJgYZXYfDckJf7ldjzdTGoXs9053YH2eRzM9+8= 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 1734597241631438.6826357825962; Thu, 19 Dec 2024 00:34:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByR-0005eq-TX; Thu, 19 Dec 2024 03:33:35 -0500 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 1tOByP-0005bl-VI for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByN-0005DZ-OX for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:33 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-MwOLdUcKPJa5PZATZA6B3A-1; Thu, 19 Dec 2024 03:33:29 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-38639b4f19cso327437f8f.0 for ; Thu, 19 Dec 2024 00:33:29 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8474b6sm989965f8f.51.2024.12.19.00.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=daXIX4qhJQvUvabkI8ft1TwFgegwlmO6KSYPGJnvFVo=; b=NRX6zpMH1tqOWJUoJ7HywqlNq9VXj2vgIjnrJcLIU2ipTKi517P23uQjIrxiS9XkRqEWCw MYzCTqlnSfCXVWHGJ/wm5989aoMq9JGHW4QSTMgDxwUQxeTd7zbqtXaE3Tlq+i7bKjezkx LYimK4koKFnBIVSieLkHwgCwRfTgjGc= X-MC-Unique: MwOLdUcKPJa5PZATZA6B3A-1 X-Mimecast-MFC-AGG-ID: MwOLdUcKPJa5PZATZA6B3A X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597207; x=1735202007; 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=daXIX4qhJQvUvabkI8ft1TwFgegwlmO6KSYPGJnvFVo=; b=u91Q8CqH1PZU36LNX16Epheboof+koHzNtW8vmS2/+vfGK8UTBaJLI0Bh5WlIr6mDt Z/zodMZs0RBeBoEcqhjlSnSqXo3dps+t6wWv+iYWrg9dqbyhl2lItLGWUO5upwXbxk3H L3FiDxQ0eH2yxgX4kVOKXe8TyX9Gf8dYhB9rdaYaVvL5TW8TxrhQuZJlcE80ykzz9jDS eY/UwOr7zeOxDXQ+e+3Md5LSbjsQwcoPqTFoJQXXlKqmkesPMPbF7m+AUeLWPbo0Qs+I MoiihmuVSoT9A3JZdtELAVKs+883Efzn+cfU8+ff/Y6WLXEG3ZHRiDu+d2U/XQRHP+5x rdoQ== X-Gm-Message-State: AOJu0YyhMaas6RTAPTro78f+rk1YYvC77ex817Nj7kUWv5jCQPvHcBkK JEsjkiVptyP7avWsSM7VegABNOexcXchq/e6GyC8SLCp1Dzn8IlSzmPU71dMJvmBn0a8ymxNgrJ qwjUZkUrJhyUBSMmWRyrHBUIxdo95bMVo7fxsp9Z6cSNxbdepQlUYJ81uq4uAznGDo8cGI1ho8M F0nJM4iOHvQf7KkwuX5riVjD+Fywv/FgLWm2Rd X-Gm-Gg: ASbGncsyj/pQoXGG6uDXVebOXw3mj/HWzZpbbj3RvHaUBQvfml0OpBSQq0g/h/S7q5s 1ZQ2up72m8ai19KVIXr1JvVcY3Cf/oiDLh5tDT8IltcgFfsBxkORoMZ3ESGF/kpcd9fAaw2Ourc cf59MjGWM2Hs+kwUwmOM9OkQVT+/WHmgTf5UU7Dyo3/RSezYTqXAqFVHc6jbc/3JFDGRpmUzZOQ kqBXg1tbTAdncj9OZUiU5VntJRBqvB9CDOhRv+M111ILXlaQYaVPNrWZO4H X-Received: by 2002:a5d:648c:0:b0:385:e4a7:df09 with SMTP id ffacd0b85a97d-38a19b34d45mr2547362f8f.44.1734597206594; Thu, 19 Dec 2024 00:33:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IELv+0okT3YyluCSaV6T+pO+CmxsHf8UVXLFilooXvgj2/Y7XlN1meiK7tZIqCbxvoUSPj8uA== X-Received: by 2002:a5d:648c:0:b0:385:e4a7:df09 with SMTP id ffacd0b85a97d-38a19b34d45mr2547313f8f.44.1734597206023; Thu, 19 Dec 2024 00:33:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 27/41] rust: rename qemu-api modules to follow C code a bit more Date: Thu, 19 Dec 2024 09:32:14 +0100 Message-ID: <20241219083228.363430-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597243262116600 Content-Type: text/plain; charset="utf-8" A full match would mean calling them qom::object and hw::core::qdev. For n= ow, keep the names shorter but still a bit easier to find. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 4 +- rust/qemu-api-macros/src/lib.rs | 2 +- rust/qemu-api/meson.build | 5 +- rust/qemu-api/src/lib.rs | 5 +- rust/qemu-api/src/module.rs | 43 +++++++++++ rust/qemu-api/src/prelude.rs | 2 +- .../qemu-api/src/{device_class.rs =3D> qdev.rs} | 4 +- rust/qemu-api/src/{definitions.rs =3D> qom.rs} | 76 ++++++++----------- rust/qemu-api/src/sysbus.rs | 2 +- rust/qemu-api/tests/tests.rs | 4 +- 10 files changed, 91 insertions(+), 56 deletions(-) create mode 100644 rust/qemu-api/src/module.rs rename rust/qemu-api/src/{device_class.rs =3D> qdev.rs} (97%) rename rust/qemu-api/src/{definitions.rs =3D> qom.rs} (84%) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index d9e9f35f456..3fed8b4ad25 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -11,10 +11,10 @@ use qemu_api::{ bindings::{self, *}, c_str, - definitions::ObjectImpl, - device_class::DeviceImpl, irq::InterruptSource, prelude::*, + qdev::DeviceImpl, + qom::ObjectImpl, }; =20 use crate::{ diff --git a/rust/qemu-api-macros/src/lib.rs b/rust/qemu-api-macros/src/lib= .rs index cf99ac04b8f..74a8bc7503e 100644 --- a/rust/qemu-api-macros/src/lib.rs +++ b/rust/qemu-api-macros/src/lib.rs @@ -40,7 +40,7 @@ pub fn derive_object(input: TokenStream) -> TokenStream { let expanded =3D quote! { ::qemu_api::module_init! { MODULE_INIT_QOM =3D> unsafe { - ::qemu_api::bindings::type_register_static(&<#name as ::qe= mu_api::definitions::ObjectImpl>::TYPE_INFO); + ::qemu_api::bindings::type_register_static(&<#name as ::qe= mu_api::qom::ObjectImpl>::TYPE_INFO); } } }; diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build index adcee661150..7ff408ad68e 100644 --- a/rust/qemu-api/meson.build +++ b/rust/qemu-api/meson.build @@ -19,11 +19,12 @@ _qemu_api_rs =3D static_library( 'src/bitops.rs', 'src/cell.rs', 'src/c_str.rs', - 'src/definitions.rs', - 'src/device_class.rs', 'src/irq.rs', + 'src/module.rs', 'src/offset_of.rs', 'src/prelude.rs', + 'src/qdev.rs', + 'src/qom.rs', 'src/sysbus.rs', 'src/vmstate.rs', 'src/zeroable.rs', diff --git a/rust/qemu-api/src/lib.rs b/rust/qemu-api/src/lib.rs index 9e007e16354..124bece0449 100644 --- a/rust/qemu-api/src/lib.rs +++ b/rust/qemu-api/src/lib.rs @@ -15,10 +15,11 @@ pub mod bitops; pub mod c_str; pub mod cell; -pub mod definitions; -pub mod device_class; pub mod irq; +pub mod module; pub mod offset_of; +pub mod qdev; +pub mod qom; pub mod sysbus; pub mod vmstate; pub mod zeroable; diff --git a/rust/qemu-api/src/module.rs b/rust/qemu-api/src/module.rs new file mode 100644 index 00000000000..fa5cea3598f --- /dev/null +++ b/rust/qemu-api/src/module.rs @@ -0,0 +1,43 @@ +// Copyright 2024, Linaro Limited +// Author(s): Manos Pitsidianakis +// SPDX-License-Identifier: GPL-2.0-or-later + +//! Macro to register blocks of code that run as QEMU starts up. + +#[macro_export] +macro_rules! module_init { + ($type:ident =3D> $body:block) =3D> { + const _: () =3D { + #[used] + #[cfg_attr( + not(any(target_vendor =3D "apple", target_os =3D "windows"= )), + link_section =3D ".init_array" + )] + #[cfg_attr(target_vendor =3D "apple", link_section =3D "__DATA= ,__mod_init_func")] + #[cfg_attr(target_os =3D "windows", link_section =3D ".CRT$XCU= ")] + pub static LOAD_MODULE: extern "C" fn() =3D { + extern "C" fn init_fn() { + $body + } + + extern "C" fn ctor_fn() { + unsafe { + $crate::bindings::register_module_init( + Some(init_fn), + $crate::bindings::module_init_type::$type, + ); + } + } + + ctor_fn + }; + }; + }; + + // shortcut because it's quite common that $body needs unsafe {} + ($type:ident =3D> unsafe $body:block) =3D> { + $crate::module_init! { + $type =3D> { unsafe { $body } } + } + }; +} diff --git a/rust/qemu-api/src/prelude.rs b/rust/qemu-api/src/prelude.rs index 1b8677b2d9a..5cc41f081f9 100644 --- a/rust/qemu-api/src/prelude.rs +++ b/rust/qemu-api/src/prelude.rs @@ -7,4 +7,4 @@ pub use crate::cell::BqlCell; pub use crate::cell::BqlRefCell; =20 -pub use crate::definitions::ObjectType; +pub use crate::qom::ObjectType; diff --git a/rust/qemu-api/src/device_class.rs b/rust/qemu-api/src/qdev.rs similarity index 97% rename from rust/qemu-api/src/device_class.rs rename to rust/qemu-api/src/qdev.rs index a9965d1f123..ad4c12d097e 100644 --- a/rust/qemu-api/src/device_class.rs +++ b/rust/qemu-api/src/qdev.rs @@ -2,12 +2,14 @@ // Author(s): Manos Pitsidianakis // SPDX-License-Identifier: GPL-2.0-or-later =20 +//! Bindings to create devices and access device functionality from Rust. + use std::ffi::CStr; =20 use crate::{ bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Propert= y, VMStateDescription}, - definitions::ClassInitImpl, prelude::*, + qom::ClassInitImpl, }; =20 /// Trait providing the contents of [`DeviceClass`]. diff --git a/rust/qemu-api/src/definitions.rs b/rust/qemu-api/src/qom.rs similarity index 84% rename from rust/qemu-api/src/definitions.rs rename to rust/qemu-api/src/qom.rs index a2481c1fe70..2222d1a5ab9 100644 --- a/rust/qemu-api/src/definitions.rs +++ b/rust/qemu-api/src/qom.rs @@ -2,7 +2,34 @@ // Author(s): Manos Pitsidianakis // SPDX-License-Identifier: GPL-2.0-or-later =20 -//! Definitions required by QEMU when registering a device. +//! Bindings to access QOM functionality from Rust. +//! +//! This module provides automatic creation and registration of `TypeInfo` +//! for classes that are written in Rust, and mapping between Rust traits +//! and QOM vtables. +//! +//! # Structure of a class +//! +//! A leaf class only needs a struct holding instance state. The struct mu= st +//! implement the [`ObjectType`] trait, as well as any `*Impl` traits that= exist +//! for its superclasses. +//! +//! If a class has subclasses, it will also provide a struct for instance = data, +//! with the same characteristics as for concrete classes, but it also nee= ds +//! additional components to support virtual methods: +//! +//! * a struct for class data, for example `DeviceClass`. This corresponds= to +//! the C "class struct" and holds the vtable that is used by instances = of the +//! class and its subclasses. It must start with its parent's class stru= ct. +//! +//! * a trait for virtual method implementations, for example `DeviceImpl`. +//! Child classes implement this trait to provide their own behavior for +//! virtual methods. The trait's methods take `&self` to access instance= data. +//! +//! * an implementation of [`ClassInitImpl`], for example +//! `ClassInitImpl`. This fills the vtable in the class str= uct; +//! the source for this is the `*Impl` trait; the associated consts and +//! functions if needed are wrapped to map C types into Rust types. =20 use std::{ffi::CStr, os::raw::c_void}; =20 @@ -143,10 +170,9 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { /// /// For most superclasses, `ClassInitImpl` is provided by the `qemu-api` /// crate itself. The Rust implementation of methods will come from a -/// trait like [`ObjectImpl`] or -/// [`DeviceImpl`](crate::device_class::DeviceImpl), and `ClassInitImpl` is -/// provided by blanket implementations that operate on all implementors o= f the -/// `*Impl`* trait. For example: +/// trait like [`ObjectImpl`] or [`DeviceImpl`](crate::qdev::DeviceImpl), +/// and `ClassInitImpl` is provided by blanket implementations that +/// operate on all implementors of the `*Impl`* trait. For example: /// /// ```ignore /// impl ClassInitImpl for T @@ -194,7 +220,7 @@ pub trait ClassInitImpl { /// can change them to override virtual methods of a parent class. /// /// The virtual method implementations usually come from another - /// trait, for example [`DeviceImpl`](crate::device_class::DeviceImpl) + /// trait, for example [`DeviceImpl`](crate::qdev::DeviceImpl) /// when `T` is [`DeviceClass`](crate::bindings::DeviceClass). /// /// On entry, `klass`'s parent class is initialized, while the other f= ields @@ -206,44 +232,6 @@ pub trait ClassInitImpl { fn class_init(klass: &mut T); } =20 -#[macro_export] -macro_rules! module_init { - ($type:ident =3D> $body:block) =3D> { - const _: () =3D { - #[used] - #[cfg_attr( - not(any(target_vendor =3D "apple", target_os =3D "windows"= )), - link_section =3D ".init_array" - )] - #[cfg_attr(target_vendor =3D "apple", link_section =3D "__DATA= ,__mod_init_func")] - #[cfg_attr(target_os =3D "windows", link_section =3D ".CRT$XCU= ")] - pub static LOAD_MODULE: extern "C" fn() =3D { - extern "C" fn init_fn() { - $body - } - - extern "C" fn ctor_fn() { - unsafe { - $crate::bindings::register_module_init( - Some(init_fn), - $crate::bindings::module_init_type::$type, - ); - } - } - - ctor_fn - }; - }; - }; - - // shortcut because it's quite common that $body needs unsafe {} - ($type:ident =3D> unsafe $body:block) =3D> { - $crate::module_init! { - $type =3D> { unsafe { $body } } - } - }; -} - /// # Safety /// /// We expect the FFI user of this function to pass a valid pointer that diff --git a/rust/qemu-api/src/sysbus.rs b/rust/qemu-api/src/sysbus.rs index 5d15b317405..fa69cadd7c1 100644 --- a/rust/qemu-api/src/sysbus.rs +++ b/rust/qemu-api/src/sysbus.rs @@ -9,9 +9,9 @@ use crate::{ bindings::{self, DeviceClass}, cell::bql_locked, - definitions::ClassInitImpl, irq::InterruptSource, prelude::*, + qom::ClassInitImpl, }; =20 unsafe impl ObjectType for SysBusDevice { diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index ed3a555e76d..78f7da474b2 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -5,8 +5,8 @@ use std::ffi::CStr; =20 use qemu_api::{ - bindings::*, c_str, declare_properties, define_property, definitions::= ObjectImpl, - device_class::DeviceImpl, impl_device_class, prelude::*, zeroable::Zer= oable, + bindings::*, c_str, declare_properties, define_property, prelude::*, q= dev::DeviceImpl, + qom::ObjectImpl, zeroable::Zeroable, }; =20 #[test] --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597255; cv=none; d=zohomail.com; s=zohoarc; b=Rrb1aABQOvLDJ/YTJVQfP1prJ5mPNVHfs56QmOk9817FWBiD9ltO0tRVfSz5hMK0TOoWdsVCSlRhcAXZabB1yD/E/w1mIWRUf4Vh38EimtczIEdzDqaNhvS06LwQPJqWGJ3+Nrs0pPTbAEhOgeJ1JWe7DMlC2Le2NhoqicJuZM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597255; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4JuCYauHZuFnfd9+PJ8lQTIeKVe3Bn39qjIyqWPL2KU=; b=Vwh7PfDokvDIZ9g0OGTy1vsn+FWY0Pznq4kkHbtWXnDNxNFWRNvO6rEIa44EhdzGi6EKkjfAIzOaNSxprN+95Dd3YyyLIn6CVpiX3HUAzeS59T62zgxQoFUwoJBasiXWzhysX4tpWw5ffvZzH1Xv5KGfH9+ckLImjsO9vNw/EkQ= 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 1734597255970769.6685940296959; Thu, 19 Dec 2024 00:34:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByU-0005jz-W4; Thu, 19 Dec 2024 03:33:39 -0500 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 1tOByT-0005fO-1N for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByQ-0005Du-Or for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:36 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-CcSkPH6mN1CCV8fSMWx3CQ-1; Thu, 19 Dec 2024 03:33:32 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-386321c8f4bso302867f8f.0 for ; Thu, 19 Dec 2024 00:33:31 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acafesm970774f8f.98.2024.12.19.00.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4JuCYauHZuFnfd9+PJ8lQTIeKVe3Bn39qjIyqWPL2KU=; b=P/WaJtQn21dp25QQZIBlQDX0tl99P5GxL+NO5GZrLYNJF5qfbNq9DFcpbjTHstiRBKGtg0 dxqGwZyZbkj0rA3fjY5W68pzxGQtg3K4gL25/JS3p9KH53Diwy/mlabbNKfMeFRBpoBt06 53d77LQr/WOvB4tSJRRE/ULh+X+iGzQ= X-MC-Unique: CcSkPH6mN1CCV8fSMWx3CQ-1 X-Mimecast-MFC-AGG-ID: CcSkPH6mN1CCV8fSMWx3CQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597210; x=1735202010; 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=4JuCYauHZuFnfd9+PJ8lQTIeKVe3Bn39qjIyqWPL2KU=; b=jUDK5tptBBn2p/FzWO6XTRPAKtFNaMdA1gdjBY3WbleHwGrOD+PeQsLDpCLFUA4wIn iyAz/559MBndIBKhoAb9aa6VRbRFTYr8FSLle8U12c8gSpTrVQOyXNesDLIZqxpUqg6p ooPjjQ7HVJ3YAwJzm1bkhGztwAaPeU32iAywayeLWpUWO7bSJdZ6sVwzQC2ZyOgudTrC 6dqNkxBYhYyEiM1k+L2/nj8NL2MphFEZj/IePJsUo3C38JjlkDIF2yAcNJEm6Doc+tjD GTs/QZstTrCqQTx/Z89Pnh+m6jf38Rvl2IXXdn1kMiLVn9QMOCMdsZAOa+nP+j7U2V8/ w/gw== X-Gm-Message-State: AOJu0Yxa4G1Z8SZq+ThAwzz/Y905nN1dfoQaanJFaEy+tCwYMdKP5rZX BezWEf+Xjc3pH4LvUQ7xU+HZICo99JN2DZWeM/NRG7XTeb3QdwetszYc2l/Ss11sUz3nFUjjnvA eHGbX0sgTDcOzPa6DxH7L1hKUa3tyu94HUVyw6IoGinppIcYBfUBfM7nXt34uANBQxBn7ALw90j u0ArndOc+dh0Tb5E/I2QvYZhx4BaQi43D7EacF X-Gm-Gg: ASbGncuiX0WxRVRhRfK7d/Gtb6P7uiGWjKFUrlSCPo/jawCcxcrWVlXVnrP2kOPV3fx Mj0skgPrKB6kleiXZ62VKtkIjZeofAd59awRvF+hZTGiG6WbbDV77U6u92dUmVNBVpTwXk5z4My 1Wgna4XtHac32xPXQP/ot5HDEn5oGEQUkN/YLUmHjJ77WPBGMgAsoJWBug7hHutBj0xgUIuAk2s NIhyAsbdbPos6kCnIxZnlCltnE+jXIQga6IDv+3tiMq6AvBR+/hXyUyZ4a2 X-Received: by 2002:a5d:47af:0:b0:385:de8d:c0f5 with SMTP id ffacd0b85a97d-388e4d4b5e8mr4911222f8f.16.1734597210486; Thu, 19 Dec 2024 00:33:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCH2Sctnuu7aGZPs2XpMPyb9Nn96mjbdMPHxCk+jTiB/GWlKVrw6q6pgPd9/vjLKx3a16BlQ== X-Received: by 2002:a5d:47af:0:b0:385:de8d:c0f5 with SMTP id ffacd0b85a97d-388e4d4b5e8mr4911193f8f.16.1734597209981; Thu, 19 Dec 2024 00:33:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 28/41] rust: re-export C types from qemu-api submodules Date: Thu, 19 Dec 2024 09:32:15 +0100 Message-ID: <20241219083228.363430-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597257156116600 Content-Type: text/plain; charset="utf-8" Long term we do not want device code to use "bindings" at all, so make it possible to get the relevant types from the other modules of qemu-api. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/qdev.rs | 7 +++++-- rust/qemu-api/src/qom.rs | 12 +++++++----- rust/qemu-api/src/sysbus.rs | 5 +---- rust/qemu-api/src/vmstate.rs | 9 +++++---- rust/qemu-api/tests/tests.rs | 9 +++++++-- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/rust/qemu-api/src/qdev.rs b/rust/qemu-api/src/qdev.rs index ad4c12d097e..07a502a8371 100644 --- a/rust/qemu-api/src/qdev.rs +++ b/rust/qemu-api/src/qdev.rs @@ -6,10 +6,13 @@ =20 use std::ffi::CStr; =20 +pub use bindings::{DeviceClass, DeviceState, Property}; + use crate::{ - bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Propert= y, VMStateDescription}, + bindings::{self, Error}, prelude::*, - qom::ClassInitImpl, + qom::{ClassInitImpl, ObjectClass}, + vmstate::VMStateDescription, }; =20 /// Trait providing the contents of [`DeviceClass`]. diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-api/src/qom.rs index 2222d1a5ab9..a663647ffe5 100644 --- a/rust/qemu-api/src/qom.rs +++ b/rust/qemu-api/src/qom.rs @@ -33,7 +33,9 @@ =20 use std::{ffi::CStr, os::raw::c_void}; =20 -use crate::bindings::{self, Object, ObjectClass, TypeInfo}; +pub use bindings::{Object, ObjectClass}; + +use crate::bindings::{self, TypeInfo}; =20 unsafe extern "C" fn rust_instance_init(obj: *mut Object) { // SAFETY: obj is an instance of T, since rust_instance_init @@ -164,9 +166,9 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl { /// /// Each struct will implement this trait with `T` equal to each /// superclass. For example, a device should implement at least -/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>` and -/// `ClassInitImpl<`[`ObjectClass`](crate::bindings::ObjectClass)`>`. -/// Such implementations are made in one of two ways. +/// `ClassInitImpl<`[`DeviceClass`](crate::qdev::DeviceClass)`>` and +/// `ClassInitImpl<`[`ObjectClass`]`>`. Such implementations are made +/// in one of two ways. /// /// For most superclasses, `ClassInitImpl` is provided by the `qemu-api` /// crate itself. The Rust implementation of methods will come from a @@ -221,7 +223,7 @@ pub trait ClassInitImpl { /// /// The virtual method implementations usually come from another /// trait, for example [`DeviceImpl`](crate::qdev::DeviceImpl) - /// when `T` is [`DeviceClass`](crate::bindings::DeviceClass). + /// when `T` is [`DeviceClass`](crate::qdev::DeviceClass). /// /// On entry, `klass`'s parent class is initialized, while the other f= ields /// are all zero; it is therefore assumed that all fields in `T` can be diff --git a/rust/qemu-api/src/sysbus.rs b/rust/qemu-api/src/sysbus.rs index fa69cadd7c1..9abc687a261 100644 --- a/rust/qemu-api/src/sysbus.rs +++ b/rust/qemu-api/src/sysbus.rs @@ -7,10 +7,7 @@ pub use bindings::{SysBusDevice, SysBusDeviceClass}; =20 use crate::{ - bindings::{self, DeviceClass}, - cell::bql_locked, - irq::InterruptSource, - prelude::*, + bindings, cell::bql_locked, irq::InterruptSource, prelude::*, qdev::De= viceClass, qom::ClassInitImpl, }; =20 diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index bedcf1e8f39..25c68b703ea 100644 --- a/rust/qemu-api/src/vmstate.rs +++ b/rust/qemu-api/src/vmstate.rs @@ -10,6 +10,8 @@ //! [`vmstate_fields`](crate::vmstate_fields) are meant to be used when //! declaring a device model state struct. =20 +pub use crate::bindings::VMStateDescription; + #[doc(alias =3D "VMSTATE_UNUSED_BUFFER")] #[macro_export] macro_rules! vmstate_unused_buffer { @@ -328,7 +330,7 @@ macro_rules! vmstate_fields { } =20 /// A transparent wrapper type for the `subsections` field of -/// [`VMStateDescription`](crate::bindings::VMStateDescription). +/// [`VMStateDescription`]. /// /// This is necessary to be able to declare subsection descriptions as sta= tics, /// because the only way to implement `Sync` for a foreign type (and `*con= st` @@ -342,9 +344,8 @@ macro_rules! vmstate_fields { =20 unsafe impl Sync for VMStateSubsectionsWrapper {} =20 -/// Helper macro to declare a list of subsections -/// ([`VMStateDescription`](`crate::bindings::VMStateDescription`)) into a -/// static and return a pointer to the array of pointers it created. +/// Helper macro to declare a list of subsections ([`VMStateDescription`]) +/// into a static and return a pointer to the array of pointers it created. #[macro_export] macro_rules! vmstate_subsections { ($($subsection:expr),*$(,)*) =3D> {{ diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 78f7da474b2..68557fb85c7 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -5,8 +5,13 @@ use std::ffi::CStr; =20 use qemu_api::{ - bindings::*, c_str, declare_properties, define_property, prelude::*, q= dev::DeviceImpl, - qom::ObjectImpl, zeroable::Zeroable, + bindings::*, + c_str, declare_properties, define_property, + prelude::*, + qdev::{DeviceImpl, DeviceState, Property}, + qom::ObjectImpl, + vmstate::VMStateDescription, + zeroable::Zeroable, }; =20 #[test] --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597352; cv=none; d=zohomail.com; s=zohoarc; b=IITd0gnKidCAOYA5PPkmzcvzoTpkvGEXr2iyJMfZ+53zX04WLik6/DcdcdK5ieM2XTd8QNBcFzWLje/fyvZDb09Ee+2jLBUnGSvYRyqnPBvIVnN8iaUg6Cd/1z+mLp1Z7zJzx8x8JeVjFR7FkQ0AFRjdRcG4SRgahKbNG7L4Ww4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597352; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+xXzIAGpMzwTX5L3Xd5O8YYQJQmvdCw1SJPAzF30pYo=; b=iL3LyqGYQ5jdtmv4KW6RcfS9UQ8VquYUvvoKQrko5MP/8KlmoSqgxhSemKoAnh6Z8iydbgIV/NDiTD3BrmZHAHBkdYMY1mplYemk0GOnC5k1Z0d1BvNLBPHKYJ3HWleTna8sjiW9i2hAIjQGGRbPku6m7/kQiyWUFhPha0wdqQA= 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 1734597352334289.46077526152396; Thu, 19 Dec 2024 00:35:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByY-0005ua-Bv; Thu, 19 Dec 2024 03:33:42 -0500 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 1tOByW-0005mW-PH for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByU-0005ER-K4 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:39 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-uH0nzUK8M8K5PoCZXLFsxw-1; Thu, 19 Dec 2024 03:33:35 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3862be3bfc9so348917f8f.3 for ; Thu, 19 Dec 2024 00:33:35 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436612008bcsm11157875e9.16.2024.12.19.00.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+xXzIAGpMzwTX5L3Xd5O8YYQJQmvdCw1SJPAzF30pYo=; b=ck7R0nX6fQ42uqslUjt5YfOXx1Q1LAZzCbQcbItpROiLcdsqKXwhDEvlRwwe6efPAkd922 p3THqhH+x2Mm+c1cIqqT/E/M+zdw8tEhnrhYrzd2xWYLbTVLAjik8ZCGj76/OfoxG2ibt6 CFrJDLa85oi/XStW82Jecrtbcq+2oWI= X-MC-Unique: uH0nzUK8M8K5PoCZXLFsxw-1 X-Mimecast-MFC-AGG-ID: uH0nzUK8M8K5PoCZXLFsxw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597213; x=1735202013; 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=+xXzIAGpMzwTX5L3Xd5O8YYQJQmvdCw1SJPAzF30pYo=; b=iCLC10IoJwgJQxtJuu4QoL1qEDe/MuW+8hdi/2baYQbzhdYwJFJuABTkuTba6rpYza sVvbe2JfFU+lyETFJJINqODC116oSSC/uhmZLMwdtkSH5ItZelQbEDUxgYUraRE9/xP2 Yv23WlDrQBBqO/p7G9Wnga/Pz+/kMzvtVs85uSo4MN/5iqesfIpletymzv8bTGB+pFLe cnE4k8moapYgDhZocWt5V0C3p1IYjv4+FrDHwXQ4f8BWsOikZsZCmuEeiN9lxgHQdoSe TqEcZbWqpGQNreakOTHbqmXqZeHHy+U1jten5fszFuWVal36BiRBkGIXqDiuV/a6HyH6 jeug== X-Gm-Message-State: AOJu0Yyx77qMzkMRiAm7KSUQUx0+8mgwymjHX71EQWVxpbPaH5fB3+x3 9dEq1JCi+d3/376aPkmt51OlyVdFnnHGm+kF7jQH7Hc04WswDth+b6iOeNFKfL6ZUB8FvDv/v6W hn/UeySggYONtcMWqytKQi3PGXqfDhqbz+BJulOUKgp1Itb3tAXFg+HvVq4+z8qUHqsFQX/eArC QTZ7DZ2HdcUP8bK6cVFZEFyljWV3lojdelXYDY X-Gm-Gg: ASbGncs4c8m6ODstYUMo2/BNZPFJyDE0CBnde9vlKtBSdJjQ097DqEPT5VppU4NTGKa T0qeXK3mwe3Tp7uRjbD9cs6JqUq3tmKyjaOvBnpm5itF6tN6Q+Huo2laib8ey68a4vyFpU/jMc0 9/Sfhg85olHAixiDYat1+XgKWk0eBxHRfAHhz4h9llS2vvRgFT1bJi5n19O2We/ZlcTAA9a3lMz STmR+Foq936xTlXVPMLmvXU/zjfk4kcLAFOnyqScKtRQAFzSST9ILFyex8v X-Received: by 2002:a5d:47cf:0:b0:385:d852:29ed with SMTP id ffacd0b85a97d-388e4d8e083mr5137242f8f.36.1734597213038; Thu, 19 Dec 2024 00:33:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHapKmpVr0C+lCqozoqQNf3FxXQeibCMK1ky1BND1hEDI9XpgIToHEEj/Ar2Q0WqoLriYZmuw== X-Received: by 2002:a5d:47cf:0:b0:385:d852:29ed with SMTP id ffacd0b85a97d-388e4d8e083mr5137209f8f.36.1734597212541; Thu, 19 Dec 2024 00:33:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 29/41] rust: tests: allow writing more than one test Date: Thu, 19 Dec 2024 09:32:16 +0100 Message-ID: <20241219083228.363430-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597353528116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/tests/tests.rs | 115 ++++++++++++++++++++--------------- 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 68557fb85c7..953cb15975b 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -2,7 +2,7 @@ // Author(s): Manos Pitsidianakis // SPDX-License-Identifier: GPL-2.0-or-later =20 -use std::ffi::CStr; +use std::{cell::Cell, ffi::CStr, sync::Mutex}; =20 use qemu_api::{ bindings::*, @@ -14,55 +14,74 @@ zeroable::Zeroable, }; =20 +// Test that macros can compile. +pub static VMSTATE: VMStateDescription =3D VMStateDescription { + name: c_str!("name").as_ptr(), + unmigratable: true, + ..Zeroable::ZERO +}; + +#[derive(qemu_api_macros::offsets)] +#[repr(C)] +#[derive(qemu_api_macros::Object)] +pub struct DummyState { + parent: DeviceState, + migrate_clock: bool, +} + +declare_properties! { + DUMMY_PROPERTIES, + define_property!( + c_str!("migrate-clk"), + DummyState, + migrate_clock, + unsafe { &qdev_prop_bool }, + bool + ), +} + +unsafe impl ObjectType for DummyState { + type Class =3D ::Class; + const TYPE_NAME: &'static CStr =3D c_str!("dummy"); +} + +impl ObjectImpl for DummyState { + type ParentType =3D DeviceState; + const ABSTRACT: bool =3D false; +} + +impl DeviceImpl for DummyState { + fn properties() -> &'static [Property] { + &DUMMY_PROPERTIES + } + fn vmsd() -> Option<&'static VMStateDescription> { + Some(&VMSTATE) + } +} + +fn init_qom() { + // Tests can run in parallel; currently they do not need the + // Big QEMU Lock, so use an independent mutex (LazyLock is + // not available until Rust 1.80.0) to serialize calls to + // `type_register()`. If the tests start needing the BQL, + // bql_lock()/bql_unlock() can be wrapped in a similar way + // to `Mutex<>` and this can be changed to use a BqlCell. + static ONCE: Mutex> =3D Mutex::new(Cell::new(false)); + + let g =3D ONCE.lock().unwrap(); + if !g.get() { + unsafe { + module_call_init(module_init_type::MODULE_INIT_QOM); + } + g.set(true); + } +} + #[test] -fn test_device_decl_macros() { - // Test that macros can compile. - pub static VMSTATE: VMStateDescription =3D VMStateDescription { - name: c_str!("name").as_ptr(), - unmigratable: true, - ..Zeroable::ZERO - }; - - #[derive(qemu_api_macros::offsets)] - #[repr(C)] - #[derive(qemu_api_macros::Object)] - pub struct DummyState { - pub _parent: DeviceState, - pub migrate_clock: bool, - } - - declare_properties! { - DUMMY_PROPERTIES, - define_property!( - c_str!("migrate-clk"), - DummyState, - migrate_clock, - unsafe { &qdev_prop_bool }, - bool - ), - } - - unsafe impl ObjectType for DummyState { - type Class =3D ::Class; - const TYPE_NAME: &'static CStr =3D c_str!("dummy"); - } - - impl ObjectImpl for DummyState { - type ParentType =3D DeviceState; - const ABSTRACT: bool =3D false; - } - - impl DeviceImpl for DummyState { - fn properties() -> &'static [Property] { - &DUMMY_PROPERTIES - } - fn vmsd() -> Option<&'static VMStateDescription> { - Some(&VMSTATE) - } - } - +/// Create and immediately drop an instance. +fn test_object_new() { + init_qom(); unsafe { - module_call_init(module_init_type::MODULE_INIT_QOM); object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast()); } } --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597241; cv=none; d=zohomail.com; s=zohoarc; b=EhkdDdvuz3eG7gv5kTIiHfaUPGnoMFtZtANehlYE0J8AY4lkVs6BVKXlDXHJHTSnKdZoC5EauHCPvDIEWHnLPIE27SoAex3Q/qa6H5DEYRjh8Hi7rkZ4M3gNiKtn5fWSGVDL0fAAx7ANdfmmuaTX3Kg47blbRkuLrCXGu2QYbv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597241; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WqWzh2h1UvpMsoMNNGnTwlEeWlCR/rC8pyJNwgBOdls=; b=K7EB+hBhhxsb7jhrLwXGyQspMLJ2/HmDH6kIdiLDpEfHDn8vciJeMOzVmGQxbwXZjYfhaY8EHfDeRdnBR38j/ggUbGKh94V1sKlpkK7LniLZunjGPqZ5W1mCkxyUmuQ1YT8JyY9qkn0jihn7OG62BA06QrF63l1tcZXKmhN6goo= 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 1734597241540604.5340088950022; Thu, 19 Dec 2024 00:34:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByh-0006XI-DE; Thu, 19 Dec 2024 03:33:51 -0500 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 1tOByc-0006IV-G2 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByU-0005EZ-Pm for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:43 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-gl-Yzr8oP420DgZaq_5-Kw-1; Thu, 19 Dec 2024 03:33:36 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4361ac607b6so4594735e9.0 for ; Thu, 19 Dec 2024 00:33:36 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea3d5sm11342085e9.5.2024.12.19.00.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WqWzh2h1UvpMsoMNNGnTwlEeWlCR/rC8pyJNwgBOdls=; b=C+fqFL4Bvk4jK5rs08jQ/VoyeHiWwWmKlLKpFqZk/oxnR5z097uTaGdBIp5r4MMao8gGDs gJYvXUQqAQk/6f60nQjDkHLsppmb/g2dEfkrAljW+ui8wr3ZN6L1tbr+sIj3Zi8ViDskLC endlTvl+mVXk6oaH6lEddkNVXfWsCxY= X-MC-Unique: gl-Yzr8oP420DgZaq_5-Kw-1 X-Mimecast-MFC-AGG-ID: gl-Yzr8oP420DgZaq_5-Kw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597215; x=1735202015; 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=WqWzh2h1UvpMsoMNNGnTwlEeWlCR/rC8pyJNwgBOdls=; b=LWtDbKj+EH+m6gcygtgA3+4Evz98yBa+H2RrwAo5mp/W1qw58xY+yG51wm0etyaNYZ 34/k82T9DLv8+SK9vWlvy+p6TnOVJWvr6GMgpjZOvMBb0k0Cs7RGDx4kH8oDtQXw1PGO dQ9akwFvMJ6Dy/sTfREIZJ/s1wWQKOhhLKrM5iSPKrJDOoD2qmniPEqHfqukaSs9SsP2 wQVzLuF5s3svlPC5X/g6+sCzpnxmxuHaiDxkqgOaHS4AiDvmjnPODL2jANg897aFFt+a 9sNEqNgcOSJ4yQCi8u3IM5QyES8Q8y4YgZ52EY3hrYL1mRRfuqv163IxNhZBJ1sKQfCl MxZA== X-Gm-Message-State: AOJu0YyXBgjGVW9hdnV/wWYpI3lxH5qrcOD0z+8v97wz9HGAe50Wv8J+ rb+pXU6owQBGOQ8vonNf1MByBwdbI51sPnr6FVm513ywY6yjUJPiqOQUC/z3BLOFFZkZfWnVIgH 49O18Fj6vyeWbfAzjAYMixr4xMKdwrPuiUCLVYT5I9Rvc1uF5pppCjKqWwRQt3rH6H7xUbc7VL7 PKOE+o6hKDu4xq0p1qWazwVJdn2S8kG2Af2Hog X-Gm-Gg: ASbGncvBsEcrcEVaFLdxYqcZ7mcSUokOvPPJBbqX/u57UBebTXhPQPDMnSTD30Pj1IG yBrlGm4s+DjRcHtdxnxPufcQyLmbV0WwCKNKHTu9IkzOiVBaC1nkMSKhFn7BnWbZqo8+dkiureg Wn2jYAO4VxtjAodsyG/evTO8+4DovTeOFqxPjSftcWzfHXch/1Tcfv7N+2+PtdPVhD/QY2005CS xp7fVlLNRz9QqZtfBUbDTWMLeb0uJ+/C81I5Nc992rInjp2Jx+i0QMUV7z5 X-Received: by 2002:a05:600c:3106:b0:431:12a8:7f1a with SMTP id 5b1f17b1804b1-4365536801amr56420265e9.16.1734597214374; Thu, 19 Dec 2024 00:33:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFb4wdZIV6TntoyBuhA0U9kU+314TdlbN0B2hR9+YHjFbfl8YkfjsFoMcqlA10Ols9g1JW9Fw== X-Received: by 2002:a05:600c:3106:b0:431:12a8:7f1a with SMTP id 5b1f17b1804b1-4365536801amr56419755e9.16.1734597213671; Thu, 19 Dec 2024 00:33:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 30/41] rust: qom: add casting functionality Date: Thu, 19 Dec 2024 09:32:17 +0100 Message-ID: <20241219083228.363430-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597243223116600 Content-Type: text/plain; charset="utf-8" Add traits that let client cast typecast safely between object types. In particular, an upcast is compile-time guaranteed to succeed, and a YOLO C-style downcast must be marked as unsafe. The traits are based on an IsA<> trait that declares what is a subclass of what, which is an idea taken from glib-rs (https://docs.rs/glib/latest/glib/object/trait.IsA.html). The four primitives are also taken from there (https://docs.rs/glib/latest/glib/object/trait.Cast.html). However, the implementation of casting itself is a bit different and uses the Deref trait. This removes some pointer arithmetic from the pl011 device; it is also a prerequisite for the definition of methods, so that they can be invoked on all subclass structs. This will use the IsA<> trait to detect the structs that support the methods. glib also has a "monadic" casting trait which could be implemented on Option (as in https://docs.rs/glib/latest/glib/object/trait.CastNone.html) and perhaps even Result. For now I'm leaving it out, as the patch is already big enough and the benefit seems debatable. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/Cargo.toml | 1 + rust/hw/char/pl011/src/device.rs | 12 +- rust/qemu-api/src/prelude.rs | 7 + rust/qemu-api/src/qdev.rs | 1 + rust/qemu-api/src/qom.rs | 283 ++++++++++++++++++++++++++++++- rust/qemu-api/src/sysbus.rs | 7 +- rust/qemu-api/tests/tests.rs | 70 +++++++- 7 files changed, 368 insertions(+), 13 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6ec19b67297..5b6b6ca4382 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -38,6 +38,7 @@ should_implement_trait =3D "deny" unused_self =3D "allow" =20 # default-allow lints +as_ptr_cast_mut =3D "deny" as_underscore =3D "deny" assertions_on_result_states =3D "deny" bool_to_int_with_if =3D "deny" diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 3fed8b4ad25..e85d13c5a2b 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -106,6 +106,8 @@ pub struct PL011State { device_id: DeviceId, } =20 +qom_isa!(PL011State : SysBusDevice, DeviceState, Object); + unsafe impl ObjectType for PL011State { type Class =3D ::Class; const TYPE_NAME: &'static CStr =3D crate::TYPE_PL011; @@ -140,8 +142,6 @@ impl PL011State { unsafe fn init(&mut self) { const CLK_NAME: &CStr =3D c_str!("clk"); =20 - let sbd =3D unsafe { &mut *(addr_of_mut!(*self).cast::()) }; - // SAFETY: // // self and self.iomem are guaranteed to be valid at this point si= nce callers @@ -155,15 +155,16 @@ unsafe fn init(&mut self) { Self::TYPE_NAME.as_ptr(), 0x1000, ); + + let sbd: &mut SysBusDevice =3D self.upcast_mut(); sysbus_init_mmio(sbd, addr_of_mut!(self.iomem)); } =20 for irq in self.interrupts.iter() { + let sbd: &SysBusDevice =3D self.upcast(); sbd.init_irq(irq); } =20 - let dev =3D addr_of_mut!(*self).cast::(); - // SAFETY: // // self.clock is not initialized at this point; but since `NonNull= <_>` is Copy, @@ -172,6 +173,7 @@ unsafe fn init(&mut self) { // calls this function to initialize the fields; therefore no code= is // able to access an invalid self.clock value. unsafe { + let dev: &mut DeviceState =3D self.upcast_mut(); self.clock =3D NonNull::new(qdev_init_clock_in( dev, CLK_NAME.as_ptr(), @@ -632,6 +634,8 @@ unsafe fn init(&mut self) { } } =20 +qom_isa!(PL011Luminary : PL011State, SysBusDevice, DeviceState, Object); + unsafe impl ObjectType for PL011Luminary { type Class =3D ::Class; const TYPE_NAME: &'static CStr =3D crate::TYPE_PL011_LUMINARY; diff --git a/rust/qemu-api/src/prelude.rs b/rust/qemu-api/src/prelude.rs index 5cc41f081f9..a0a71fcd6bc 100644 --- a/rust/qemu-api/src/prelude.rs +++ b/rust/qemu-api/src/prelude.rs @@ -7,4 +7,11 @@ pub use crate::cell::BqlCell; pub use crate::cell::BqlRefCell; =20 +pub use crate::qom::IsA; +pub use crate::qom::Object; +pub use crate::qom::ObjectCast; +pub use crate::qom::ObjectCastMut; +pub use crate::qom::ObjectDeref; pub use crate::qom::ObjectType; + +pub use crate::qom_isa; diff --git a/rust/qemu-api/src/qdev.rs b/rust/qemu-api/src/qdev.rs index 07a502a8371..686054e737a 100644 --- a/rust/qemu-api/src/qdev.rs +++ b/rust/qemu-api/src/qdev.rs @@ -144,3 +144,4 @@ unsafe impl ObjectType for DeviceState { const TYPE_NAME: &'static CStr =3D unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_DEVICE= ) }; } +qom_isa!(DeviceState: Object); diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-api/src/qom.rs index a663647ffe5..74ea5721f77 100644 --- a/rust/qemu-api/src/qom.rs +++ b/rust/qemu-api/src/qom.rs @@ -4,15 +4,22 @@ =20 //! Bindings to access QOM functionality from Rust. //! -//! This module provides automatic creation and registration of `TypeInfo` -//! for classes that are written in Rust, and mapping between Rust traits -//! and QOM vtables. +//! The QEMU Object Model (QOM) provides inheritance and dynamic typing fo= r QEMU +//! devices. This module makes QOM's features available in Rust through tw= o main +//! mechanisms: +//! +//! * Automatic creation and registration of `TypeInfo` for classes that a= re +//! written in Rust, as well as mapping between Rust traits and QOM vtab= les. +//! +//! * Type-safe casting between parent and child classes, through the [`Is= A`] +//! trait and methods such as [`upcast`](ObjectCast::upcast) and +//! [`downcast`](ObjectCast::downcast). //! //! # Structure of a class //! //! A leaf class only needs a struct holding instance state. The struct mu= st -//! implement the [`ObjectType`] trait, as well as any `*Impl` traits that= exist -//! for its superclasses. +//! implement the [`ObjectType`] and [`IsA`] traits, as well as any `*Impl` +//! traits that exist for its superclasses. //! //! If a class has subclasses, it will also provide a struct for instance = data, //! with the same characteristics as for concrete classes, but it also nee= ds @@ -31,11 +38,57 @@ //! the source for this is the `*Impl` trait; the associated consts and //! functions if needed are wrapped to map C types into Rust types. =20 -use std::{ffi::CStr, os::raw::c_void}; +use std::{ + ffi::CStr, + ops::{Deref, DerefMut}, + os::raw::c_void, +}; =20 pub use bindings::{Object, ObjectClass}; =20 -use crate::bindings::{self, TypeInfo}; +use crate::bindings::{self, object_dynamic_cast, TypeInfo}; + +/// Marker trait: `Self` can be statically upcasted to `P` (i.e. `P` is a = direct +/// or indirect parent of `Self`). +/// +/// # Safety +/// +/// The struct `Self` must be `#[repr(C)]` and must begin, directly or +/// indirectly, with a field of type `P`. This ensures that invalid casts, +/// which rely on `IsA<>` for static checking, are rejected at compile tim= e. +pub unsafe trait IsA: ObjectType {} + +// SAFETY: it is always safe to cast to your own type +unsafe impl IsA for T {} + +/// Macro to mark superclasses of QOM classes. This enables type-safe +/// up- and downcasting. +/// +/// # Safety +/// +/// This macro is a thin wrapper around the [`IsA`] trait and performs +/// no checking whatsoever of what is declared. It is the caller's +/// responsibility to have $struct begin, directly or indirectly, with +/// a field of type `$parent`. +#[macro_export] +macro_rules! qom_isa { + ($struct:ty : $($parent:ty),* ) =3D> { + $( + // SAFETY: it is the caller responsibility to have $parent as = the + // first field + unsafe impl $crate::qom::IsA<$parent> for $struct {} + + impl AsRef<$parent> for $struct { + fn as_ref(&self) -> &$parent { + // SAFETY: follows the same rules as for IsA, which= is + // declared above. + let ptr: *const Self =3D self; + unsafe { &*ptr.cast::<$parent>() } + } + } + )* + }; +} =20 unsafe extern "C" fn rust_instance_init(obj: *mut Object) { // SAFETY: obj is an instance of T, since rust_instance_init @@ -96,8 +149,224 @@ pub unsafe trait ObjectType: Sized { /// The name of the type, which can be passed to `object_new()` to /// generate an instance of this type. const TYPE_NAME: &'static CStr; + + /// Return the receiver as an Object. This is always safe, even + /// if this type represents an interface. + fn as_object(&self) -> &Object { + unsafe { &*self.as_object_ptr() } + } + + /// Return the receiver as a const raw pointer to Object. + /// This is preferrable to `as_object_mut_ptr()` if a C + /// function only needs a `const Object *`. + fn as_object_ptr(&self) -> *const Object { + self.as_ptr().cast() + } + + /// Return the receiver as a mutable raw pointer to Object. + /// + /// # Safety + /// + /// This cast is always safe, but because the result is mutable + /// and the incoming reference is not, this should only be used + /// for calls to C functions, and only if needed. + unsafe fn as_object_mut_ptr(&self) -> *mut Object { + self.as_object_ptr() as *mut _ + } } =20 +/// This trait provides safe casting operations for QOM objects to raw poi= nters, +/// to be used for example for FFI. The trait can be applied to any kind of +/// reference or smart pointers, and enforces correctness through the [`Is= A`] +/// trait. +pub trait ObjectDeref: Deref +where + Self::Target: ObjectType, +{ + /// Convert to a const Rust pointer, to be used for example for FFI. + /// The target pointer type must be the type of `self` or a superclass + fn as_ptr(&self) -> *const U + where + Self::Target: IsA, + { + let ptr: *const Self::Target =3D self.deref(); + ptr.cast::() + } + + /// Convert to a mutable Rust pointer, to be used for example for FFI. + /// The target pointer type must be the type of `self` or a superclass. + /// Used to implement interior mutability for objects. + /// + /// # Safety + /// + /// This method is unsafe because it overrides const-ness of `&self`. + /// Bindings to C APIs will use it a lot, but otherwise it should not + /// be necessary. + unsafe fn as_mut_ptr(&self) -> *mut U + where + Self::Target: IsA, + { + #[allow(clippy::as_ptr_cast_mut)] + { + self.as_ptr::() as *mut _ + } + } +} + +/// Trait that adds extra functionality for `&T` where `T` is a QOM +/// object type. Allows conversion to/from C objects in generic code. +pub trait ObjectCast: ObjectDeref + Copy +where + Self::Target: ObjectType, +{ + /// Safely convert from a derived type to one of its parent types. + /// + /// This is always safe; the [`IsA`] trait provides static verification + /// trait that `Self` dereferences to `U` or a child of `U`. + fn upcast<'a, U: ObjectType>(self) -> &'a U + where + Self::Target: IsA, + Self: 'a, + { + // SAFETY: soundness is declared via IsA, which is an unsafe tr= ait + unsafe { self.unsafe_cast::() } + } + + /// Attempt to convert to a derived type. + /// + /// Returns `None` if the object is not actually of type `U`. This is + /// verified at runtime by checking the object's type information. + fn downcast<'a, U: IsA>(self) -> Option<&'a U> + where + Self: 'a, + { + self.dynamic_cast::() + } + + /// Attempt to convert between any two types in the QOM hierarchy. + /// + /// Returns `None` if the object is not actually of type `U`. This is + /// verified at runtime by checking the object's type information. + fn dynamic_cast<'a, U: ObjectType>(self) -> Option<&'a U> + where + Self: 'a, + { + unsafe { + // SAFETY: upcasting to Object is always valid, and the + // return type is either NULL or the argument itself + let result: *const U =3D + object_dynamic_cast(self.as_object_mut_ptr(), U::TYPE_NAME= .as_ptr()).cast(); + + result.as_ref() + } + } + + /// Convert to any QOM type without verification. + /// + /// # Safety + /// + /// What safety? You need to know yourself that the cast is correct; o= nly + /// use when performance is paramount. It is still better than a raw + /// pointer `cast()`, which does not even check that you remain in the + /// realm of QOM `ObjectType`s. + /// + /// `unsafe_cast::()` is always safe. + unsafe fn unsafe_cast<'a, U: ObjectType>(self) -> &'a U + where + Self: 'a, + { + unsafe { &*(self.as_ptr::().cast::()) } + } +} + +impl ObjectDeref for &T {} +impl ObjectCast for &T {} + +/// Trait for mutable type casting operations in the QOM hierarchy. +/// +/// This trait provides the mutable counterparts to [`ObjectCast`]'s conve= rsion +/// functions. Unlike `ObjectCast`, this trait returns `Result` for fallib= le +/// conversions to preserve the original smart pointer if the cast fails. = This +/// is necessary because mutable references cannot be copied, so a failed = cast +/// must return ownership of the original reference. For example: +/// +/// ```ignore +/// let mut dev =3D get_device(); +/// // If this fails, we need the original `dev` back to try something else +/// match dev.dynamic_cast_mut::() { +/// Ok(foodev) =3D> /* use foodev */, +/// Err(dev) =3D> /* still have ownership of dev */ +/// } +/// ``` +pub trait ObjectCastMut: Sized + ObjectDeref + DerefMut +where + Self::Target: ObjectType, +{ + /// Safely convert from a derived type to one of its parent types. + /// + /// This is always safe; the [`IsA`] trait provides static verification + /// that `Self` dereferences to `U` or a child of `U`. + fn upcast_mut<'a, U: ObjectType>(self) -> &'a mut U + where + Self::Target: IsA, + Self: 'a, + { + // SAFETY: soundness is declared via IsA, which is an unsafe tr= ait + unsafe { self.unsafe_cast_mut::() } + } + + /// Attempt to convert to a derived type. + /// + /// Returns `Ok(..)` if the object is of type `U`, or `Err(self)` if t= he + /// object if the conversion failed. This is verified at runtime by + /// checking the object's type information. + fn downcast_mut<'a, U: IsA>(self) -> Result<&'a mut U, S= elf> + where + Self: 'a, + { + self.dynamic_cast_mut::() + } + + /// Attempt to convert between any two types in the QOM hierarchy. + /// + /// Returns `Ok(..)` if the object is of type `U`, or `Err(self)` if t= he + /// object if the conversion failed. This is verified at runtime by + /// checking the object's type information. + fn dynamic_cast_mut<'a, U: ObjectType>(self) -> Result<&'a mut U, Self> + where + Self: 'a, + { + unsafe { + // SAFETY: upcasting to Object is always valid, and the + // return type is either NULL or the argument itself + let result: *mut U =3D + object_dynamic_cast(self.as_object_mut_ptr(), U::TYPE_NAME= .as_ptr()).cast(); + + result.as_mut().ok_or(self) + } + } + + /// Convert to any QOM type without verification. + /// + /// # Safety + /// + /// What safety? You need to know yourself that the cast is correct; o= nly + /// use when performance is paramount. It is still better than a raw + /// pointer `cast()`, which does not even check that you remain in the + /// realm of QOM `ObjectType`s. + /// + /// `unsafe_cast::()` is always safe. + unsafe fn unsafe_cast_mut<'a, U: ObjectType>(self) -> &'a mut U + where + Self: 'a, + { + unsafe { &mut *self.as_mut_ptr::().cast::() } + } +} + +impl ObjectDeref for &mut T {} +impl ObjectCastMut for &mut T {} + /// Trait a type must implement to be registered with QEMU. pub trait ObjectImpl: ObjectType + ClassInitImpl { /// The parent of the type. This should match the first field of diff --git a/rust/qemu-api/src/sysbus.rs b/rust/qemu-api/src/sysbus.rs index 9abc687a261..8193734bde4 100644 --- a/rust/qemu-api/src/sysbus.rs +++ b/rust/qemu-api/src/sysbus.rs @@ -7,7 +7,11 @@ pub use bindings::{SysBusDevice, SysBusDeviceClass}; =20 use crate::{ - bindings, cell::bql_locked, irq::InterruptSource, prelude::*, qdev::De= viceClass, + bindings, + cell::bql_locked, + irq::InterruptSource, + prelude::*, + qdev::{DeviceClass, DeviceState}, qom::ClassInitImpl, }; =20 @@ -16,6 +20,7 @@ unsafe impl ObjectType for SysBusDevice { const TYPE_NAME: &'static CStr =3D unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_SYS_BU= S_DEVICE) }; } +qom_isa!(SysBusDevice: DeviceState, Object); =20 // TODO: add SysBusDeviceImpl impl ClassInitImpl for T diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 953cb15975b..5d9f13b15d4 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -2,7 +2,13 @@ // Author(s): Manos Pitsidianakis // SPDX-License-Identifier: GPL-2.0-or-later =20 -use std::{cell::Cell, ffi::CStr, sync::Mutex}; +use std::{ + cell::Cell, + ffi::CStr, + os::raw::c_void, + ptr::{addr_of, addr_of_mut}, + sync::Mutex, +}; =20 use qemu_api::{ bindings::*, @@ -29,6 +35,8 @@ pub struct DummyState { migrate_clock: bool, } =20 +qom_isa!(DummyState: Object, DeviceState); + declare_properties! { DUMMY_PROPERTIES, define_property!( @@ -85,3 +93,63 @@ fn test_object_new() { object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast()); } } + +// a note on all "cast" tests: usually, especially for downcasts the desir= ed +// class would be placed on the right, for example: +// +// let sbd_ref =3D p.dynamic_cast::(); +// +// Here I am doing the opposite to check that the resulting type is correc= t. + +#[test] +#[allow(clippy::shadow_unrelated)] +/// Test casts on shared references. +fn test_cast() { + init_qom(); + let p: *mut DummyState =3D unsafe { object_new(DummyState::TYPE_NAME.a= s_ptr()).cast() }; + + let p_ref: &DummyState =3D unsafe { &*p }; + let obj_ref: &Object =3D p_ref.upcast(); + assert_eq!(addr_of!(*obj_ref), p.cast()); + + let sbd_ref: Option<&SysBusDevice> =3D obj_ref.dynamic_cast(); + assert!(sbd_ref.is_none()); + + let dev_ref: Option<&DeviceState> =3D obj_ref.downcast(); + assert_eq!(addr_of!(*dev_ref.unwrap()), p.cast()); + + // SAFETY: the cast is wrong, but the value is only used for comparison + unsafe { + let sbd_ref: &SysBusDevice =3D obj_ref.unsafe_cast(); + assert_eq!(addr_of!(*sbd_ref), p.cast()); + + object_unref(p_ref.as_object_mut_ptr().cast::()); + } +} + +#[test] +#[allow(clippy::shadow_unrelated)] +/// Test casts on mutable references. +fn test_cast_mut() { + init_qom(); + let p: *mut DummyState =3D unsafe { object_new(DummyState::TYPE_NAME.a= s_ptr()).cast() }; + + let p_ref: &mut DummyState =3D unsafe { &mut *p }; + let obj_ref: &mut Object =3D p_ref.upcast_mut(); + assert_eq!(addr_of_mut!(*obj_ref), p.cast()); + + let sbd_ref: Result<&mut SysBusDevice, &mut Object> =3D obj_ref.dynami= c_cast_mut(); + let obj_ref =3D sbd_ref.unwrap_err(); + + let dev_ref: Result<&mut DeviceState, &mut Object> =3D obj_ref.downcas= t_mut(); + let dev_ref =3D dev_ref.unwrap(); + assert_eq!(addr_of_mut!(*dev_ref), p.cast()); + + // SAFETY: the cast is wrong, but the value is only used for comparison + unsafe { + let sbd_ref: &mut SysBusDevice =3D obj_ref.unsafe_cast_mut(); + assert_eq!(addr_of_mut!(*sbd_ref), p.cast()); + + object_unref(p_ref.as_object_mut_ptr().cast::()); + } +} --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597283; cv=none; d=zohomail.com; s=zohoarc; b=RUkoQdCj92+ZgYoVzf1KAdebfCDJepzsK5T9NTPXdXoV6xwO/Tv2WgiywMglXjGYNpf5hOb+ZAZ0YQNparkdSQ82xMNHaJAKRMqzB2+9azVioQ67E5KGFejpMP5rvXnk3eIAf6xkyM9IiFX1CWCVP1TvV8mAvN/PdPGCP5HjdiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597283; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3f/tK+ZTxZZI3fMVdifM4kT9MvIwtAUXIGT42T0zO+Y=; b=KSaEIFLFlrW18Tjukk8ONqiuhWU5F/DPFWfLgfpBNVt6wORA3Dm4vZa0Cq/qUkITshbv5ifsBEPOsue89P8QpTvWA2sGIhkRJzHY5MlgYKDhuHqPx0TIJ+GPRQ2N2rJb3G3YYGF3STxHzAprUHGKJlEJLjd9vR4sxe6jaQO4ymI= 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 173459728393448.05505121864303; Thu, 19 Dec 2024 00:34:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByj-0006ev-53; Thu, 19 Dec 2024 03:33:53 -0500 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 1tOByf-0006WM-CM for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBya-0005FF-Hm for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:47 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-BqYw3DFOP1Sf0gDMppJZ4Q-1; Thu, 19 Dec 2024 03:33:40 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4359206e1e4so4083805e9.2 for ; Thu, 19 Dec 2024 00:33:40 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436604e9c2csm12851605e9.43.2024.12.19.00.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3f/tK+ZTxZZI3fMVdifM4kT9MvIwtAUXIGT42T0zO+Y=; b=PHbdgEYbJlWuv3ydBst52CSTyK/2ug3fwQ23OikBuq0Fg3R63ZFbBzOpKJJ4aTLSogknUr cij8zTyWrQHOKSSMc6CjDy1wTBQrzWsCX8MmcmfBZzqLVRTfuuHBYmO8rcSPtpvV0W5GcF UP5KcXxnGBrQSRkeFrws9NTSbREg5+8= X-MC-Unique: BqYw3DFOP1Sf0gDMppJZ4Q-1 X-Mimecast-MFC-AGG-ID: BqYw3DFOP1Sf0gDMppJZ4Q X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597217; x=1735202017; 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=3f/tK+ZTxZZI3fMVdifM4kT9MvIwtAUXIGT42T0zO+Y=; b=rBbulK5aIVoFcBDLs+Lx3k5RILpOQquBXJcli9Hn1uJLHOokjTZKobkRwJJnufEgaC FvPnYb+Oo4yRKr4r896WG/f+43j5wFOhv2h0QWxE4hmiS6TaJUU6K9/UwlEdphMEVpaK 5ARdjX8vSOznU+9hUVRIqFJ4gVqhCMPzfBdsYi4XSifegosHCA+fIqm0dD9W6uNlkt/3 vetyW5bis6tPChCY6FZbkZZ/g/lOpQtGtCWXfnUx8WdCbwXCe9gk/SdsHlGpYTSnCagY ouhFExzOyZPO0eZ93BpJpZezQiYtkgSnFSdUY22AJbWk1NM1agQ/49akoYWSvWljYooJ H8kA== X-Gm-Message-State: AOJu0YzAcxhTAnSlJNvA4lnl3c75HlQb3otl7tR1F7uLZxvMxGpCotN7 FrtNwSLG/w8LeU8TJt8GbbX8RYD0T8irZ0oBwQss+kJ6eOTpYuEXi4TI2h/Oyt5mNuVXVYurhP3 Fvfpy/O12X+trswbW2nhL4l6NUfgzc9/kKBjlk+K9EF2R+Arh3kj5jnnZYkKv47qCP2bK5KGteK vFLXJLbQOeTDQeo7c3SQ7lv0xS/TDTyYl7jra5 X-Gm-Gg: ASbGncs+L8pDlrCH/irUtxK0ijooqu1wfPXK4pBZhdbZ0pmK1kC/6JsUBVRRy6bo5+A GUP1cBsZP5qkjMCVwyoeszL08EFpY4DEmWbVrqOKBxU8he1uNmoYnCCE0wdhI9Y7df83lahE3Tl c6cvtFps5CDMUIpEIwAAG3gDHY/CDxyFcT6bRP8BHQywbOeqcYp1VRUQbaJPpse8MJnc3oBIGHt BsGugPKIv6ZRGkZRrnKjSotKwLQ7V017Nf3f7mhqDJ0rFE4X+MoepkW9ARE X-Received: by 2002:a05:6000:186f:b0:386:1ab5:f0e1 with SMTP id ffacd0b85a97d-38a19b050a5mr2431249f8f.14.1734597216864; Thu, 19 Dec 2024 00:33:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1D9nY5fIZLSfIgL12fieezyJCMj6kNP4Ops0+CGUpQBrGy4e6Z3JqkaZa5J/0ZrRybXZUYQ== X-Received: by 2002:a05:6000:186f:b0:386:1ab5:f0e1 with SMTP id ffacd0b85a97d-38a19b050a5mr2431215f8f.14.1734597216446; Thu, 19 Dec 2024 00:33:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 31/41] rust: qom: add initial subset of methods on Object Date: Thu, 19 Dec 2024 09:32:18 +0100 Message-ID: <20241219083228.363430-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597285375116600 Content-Type: text/plain; charset="utf-8" Add an example of implementing instance methods and converting the result back to a Rust type. In this case the returned types are a string (actually a Cow; but that's transparent as long as it derefs to &str) and a QOM class. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/prelude.rs | 1 + rust/qemu-api/src/qom.rs | 56 ++++++++++++++++++++++++++++++++++-- rust/qemu-api/tests/tests.rs | 12 ++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) diff --git a/rust/qemu-api/src/prelude.rs b/rust/qemu-api/src/prelude.rs index a0a71fcd6bc..6f32deeb2ed 100644 --- a/rust/qemu-api/src/prelude.rs +++ b/rust/qemu-api/src/prelude.rs @@ -12,6 +12,7 @@ pub use crate::qom::ObjectCast; pub use crate::qom::ObjectCastMut; pub use crate::qom::ObjectDeref; +pub use crate::qom::ObjectMethods; pub use crate::qom::ObjectType; =20 pub use crate::qom_isa; diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-api/src/qom.rs index 74ea5721f77..7d5fbef1e17 100644 --- a/rust/qemu-api/src/qom.rs +++ b/rust/qemu-api/src/qom.rs @@ -5,8 +5,8 @@ //! Bindings to access QOM functionality from Rust. //! //! The QEMU Object Model (QOM) provides inheritance and dynamic typing fo= r QEMU -//! devices. This module makes QOM's features available in Rust through tw= o main -//! mechanisms: +//! devices. This module makes QOM's features available in Rust through th= ree +//! main mechanisms: //! //! * Automatic creation and registration of `TypeInfo` for classes that a= re //! written in Rust, as well as mapping between Rust traits and QOM vtab= les. @@ -15,6 +15,11 @@ //! trait and methods such as [`upcast`](ObjectCast::upcast) and //! [`downcast`](ObjectCast::downcast). //! +//! * Automatic delegation of parent class methods to child classes. When a +//! trait uses [`IsA`] as a bound, its contents become available to all = child +//! classes through blanket implementations. This works both for class m= ethods +//! and for instance methods accessed through references or smart pointe= rs. +//! //! # Structure of a class //! //! A leaf class only needs a struct holding instance state. The struct mu= st @@ -37,6 +42,16 @@ //! `ClassInitImpl`. This fills the vtable in the class str= uct; //! the source for this is the `*Impl` trait; the associated consts and //! functions if needed are wrapped to map C types into Rust types. +//! +//! * a trait for instance methods, for example `DeviceMethods`. This trai= t is +//! automatically implemented for any reference or smart pointer to a de= vice +//! instance. It calls into the vtable provides access across all subcl= asses +//! to methods defined for the class. +//! +//! * optionally, a trait for class methods, for example `DeviceClassMetho= ds`. +//! This provides access to class-wide functionality that doesn't depend= on +//! instance data. Like instance methods, these are automatically inheri= ted by +//! child classes. =20 use std::{ ffi::CStr, @@ -46,7 +61,7 @@ =20 pub use bindings::{Object, ObjectClass}; =20 -use crate::bindings::{self, object_dynamic_cast, TypeInfo}; +use crate::bindings::{self, object_dynamic_cast, object_get_class, object_= get_typename, TypeInfo}; =20 /// Marker trait: `Self` can be statically upcasted to `P` (i.e. `P` is a = direct /// or indirect parent of `Self`). @@ -532,3 +547,38 @@ unsafe impl ObjectType for Object { const TYPE_NAME: &'static CStr =3D unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_OBJECT= ) }; } + +/// Trait for methods exposed by the Object class. The methods can be +/// called on all objects that have the trait `IsA`. +/// +/// The trait should only be used through the blanket implementation, +/// which guarantees safety via `IsA` +pub trait ObjectMethods: ObjectDeref +where + Self::Target: IsA, +{ + /// Return the name of the type of `self` + fn typename(&self) -> std::borrow::Cow<'_, str> { + let obj =3D self.upcast::(); + // SAFETY: safety of this is the requirement for implementing IsA + // The result of the C API has static lifetime + unsafe { + let p =3D object_get_typename(obj.as_mut_ptr()); + CStr::from_ptr(p).to_string_lossy() + } + } + + fn get_class(&self) -> &'static ::Class { + let obj =3D self.upcast::(); + + // SAFETY: all objects can call object_get_class; the actual class + // type is guaranteed by the implementation of `ObjectType` and + // `ObjectImpl`. + let klass: &'static ::Class =3D + unsafe { &*object_get_class(obj.as_mut_ptr()).cast() }; + + klass + } +} + +impl ObjectMethods for R where R::Target: IsA {} diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 5d9f13b15d4..41ea4026b83 100644 --- a/rust/qemu-api/tests/tests.rs +++ b/rust/qemu-api/tests/tests.rs @@ -94,6 +94,18 @@ fn test_object_new() { } } =20 +#[test] +/// Try invoking a method on an object. +fn test_typename() { + init_qom(); + let p: *mut DummyState =3D unsafe { object_new(DummyState::TYPE_NAME.a= s_ptr()).cast() }; + let p_ref: &DummyState =3D unsafe { &*p }; + assert_eq!(p_ref.typename(), "dummy"); + unsafe { + object_unref(p_ref.as_object_mut_ptr().cast::()); + } +} + // a note on all "cast" tests: usually, especially for downcasts the desir= ed // class would be placed on the right, for example: // --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597395; cv=none; d=zohomail.com; s=zohoarc; b=dylcMx3m2gvowiLVVdBJ+05hAV7I6g7DHScwazu3EvIMaqcgsvwEmpfctWbMm54GyQfa1p/d1l3kqcniSHqaavpN/EsmzVlWtLnBENR3/HuuboqmHxMoqQ2FOxetnTdqnVJhQp5SJTLbAx7xgJoyaMh8XzPSk6Ye11gFRFGs/2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597395; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G0DmIjvH8PGHsDKbo/jlvryd2McqZ2wVPERdSF97HVM=; b=VJ8RQgI5ZWfvZYrPzdqM+J1uRKrUEtuq4ZO7UZXn++GahT7dZV2Jw7VwkyTEgYlgaKVQslQ2JG3l3XT/dwMlb2cJ2wiGLVMjeaimhw6IYvJ1veseYiFJyu22DscCqu5X3HU/Xt+XyyGjatv6ng8HsYlcR2DIXIcw76cntxfBEcY= 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 1734597395700583.8328192993891; Thu, 19 Dec 2024 00:36:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByk-0006mj-TO; Thu, 19 Dec 2024 03:33:54 -0500 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 1tOByg-0006X1-8J for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBya-0005FB-04 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:47 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-646-KQm1mt0nOIeYRAL4xGzAxw-1; Thu, 19 Dec 2024 03:33:41 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43619b135bcso2940315e9.1 for ; Thu, 19 Dec 2024 00:33:41 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea4a7sm11194365e9.3.2024.12.19.00.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G0DmIjvH8PGHsDKbo/jlvryd2McqZ2wVPERdSF97HVM=; b=SuDGtt8Q12KTK7vUX0i9KqUokxokSX3+UWV67TJKPOrCqobWXK20Xa1GzSi06inOMuxL8J 4xd3DwwChhJqyehMrQMFPqU3orWSi62idC3UL99SUjboNCHn8EU5E6sOzuwh9HLwkDoLIJ Fk1t+YdrDAnbJMsVGV8SO0dCWMWO2Os= X-MC-Unique: KQm1mt0nOIeYRAL4xGzAxw-1 X-Mimecast-MFC-AGG-ID: KQm1mt0nOIeYRAL4xGzAxw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597218; x=1735202018; 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=G0DmIjvH8PGHsDKbo/jlvryd2McqZ2wVPERdSF97HVM=; b=el+FDxI71biWB6Dp15sUi35A+UJ7wucHo7XnHOFNdtKTxRxcSmfa49aAbZVIhyfFJ4 iSaVPz1fNRfGDzGTfCoH5Go18S+cGGCtFf3Y9As5ssq8lG/aOSLRIODcmre6ffML2tZP QniOY0KbmrC38EUEWRyb1+AJHcuXo7MMQb5sXjscke2QR9HZ0pvW45QofRo/FcGoJ3a6 RS7aaWc61UcfNVp++6HZAPEsnBm739yj1Ie+TtC8CaEEofGtC2p05tYyeJPPVlzi53Xw ZQ3nBKewfFasvBdZL/bFW+t4V6K6cgva1fJGOrNyExx5LqDSgbXi2m8OGew3s7GrcNPm e85w== X-Gm-Message-State: AOJu0Yw2eq4BZ14IKy2JgaNnFADaKrlWpajrAOdqxrirzrls5iIi9B4x vDS3Q9jb3Xjles00khKVt5Lp1fdmtI3PMGy6vszr17xH3QFXhnchSPoafV/NM1pUXINLAIFLtDX jK5cebhdUTYDLrcW2IoV6lNhh0bnGaoTfugzN8No9lsuqEn0i0S4xMRlVQTfKzPxCY22JvdpsWC WbamAVeNSQmaawuAukxxjR7FzR+yr8YJP3+YyC X-Gm-Gg: ASbGncsysGEICSEWlrJsYyVpQ1yx1WjhCHMpbljc57SEz1v1aJbqJNUTnnqTJU+hW6L LqmcEJrEm+j1fPUyI0QOrvTERilhYeHIaGuAcnVESM2oqsjbN4Q5sNcigLdzX49XbJ4TLufF8yr d5ivgW6/7rhDlR7Mbe9qYkpqbM584pYhpCFlQVmJVDmKpQ3Rf1WErjqOef8nwsdGpVDEm7V4TdR B3Lxr958GwAX3fZ9HVEWpIIHgrSvN2lSgHfLE+8x70L9D7ZL88Y6RrIlYkE X-Received: by 2002:a05:600c:4f92:b0:434:a711:ace4 with SMTP id 5b1f17b1804b1-4365536f5f6mr56976165e9.17.1734597218045; Thu, 19 Dec 2024 00:33:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk6APoaMosiqZ+Y16u4ivz/C53JaiMHSnjZYz1DEpsgZhu5IksThkYqnLaMYqpoHsnjSTMCA== X-Received: by 2002:a05:600c:4f92:b0:434:a711:ace4 with SMTP id 5b1f17b1804b1-4365536f5f6mr56975795e9.17.1734597217569; Thu, 19 Dec 2024 00:33:37 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 32/41] rust: qemu-api: add a module to wrap functions and zero-sized closures Date: Thu, 19 Dec 2024 09:32:19 +0100 Message-ID: <20241219083228.363430-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597397760116600 Content-Type: text/plain; charset="utf-8" One recurring issue when writing Rust bindings is how to convert a Rust function ("fn" or "impl Fn") to a C function, and how to pass around "self" to a C function that only takes a void*. An easy solution would be to store on the heap a pair consisting of a pointer to the Rust function and the pointer to "self", but it is possible to do better. If an "Fn" has zero size (that is, if it is a zero-capture closures or a function pointer---which in turn includes all methods), it is possible to build a generic Rust function that calls it even if you only have the type; you don't need either the pointer to the function itself (because the address of the code is part of the type) or any closure data (because it has size zero). Introduce a wrapper that provides the functionality of calling the function given only its type. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/meson.build | 1 + rust/qemu-api/src/callbacks.rs | 144 +++++++++++++++++++++++++++++++++ rust/qemu-api/src/lib.rs | 1 + 3 files changed, 146 insertions(+) create mode 100644 rust/qemu-api/src/callbacks.rs diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build index 7ff408ad68e..8c82c5e96c2 100644 --- a/rust/qemu-api/meson.build +++ b/rust/qemu-api/meson.build @@ -17,6 +17,7 @@ _qemu_api_rs =3D static_library( 'src/lib.rs', 'src/bindings.rs', 'src/bitops.rs', + 'src/callbacks.rs', 'src/cell.rs', 'src/c_str.rs', 'src/irq.rs', diff --git a/rust/qemu-api/src/callbacks.rs b/rust/qemu-api/src/callbacks.rs new file mode 100644 index 00000000000..314f9dce962 --- /dev/null +++ b/rust/qemu-api/src/callbacks.rs @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: MIT + +//! Utility functions to deal with callbacks from C to Rust. + +use std::{mem, ptr::NonNull}; + +/// Trait for functions (types implementing [`Fn`]) that can be used as +/// callbacks. These include both zero-capture closures and function point= ers. +/// +/// In Rust, calling a function through the `Fn` trait normally requires a +/// `self` parameter, even though for zero-sized functions (including func= tion +/// pointers) the type itself contains all necessary information to call t= he +/// function. This trait provides a `call` function that doesn't require `= self`, +/// allowing zero-sized functions to be called using only their type. +/// +/// This enables zero-sized functions to be passed entirely through generic +/// parameters and resolved at compile-time. A typical use is a function +/// receiving an unused parameter of generic type `F` and calling it via +/// `F::call` or passing it to another function via `func::`. +/// +/// QEMU uses this trick to create wrappers to C callbacks. The wrappers +/// are needed to convert an opaque `*mut c_void` into a Rust reference, +/// but they only have a single opaque that they can use. The `FnCall` +/// trait makes it possible to use that opaque for `self` or any other +/// reference: +/// +/// ```ignore +/// // The compiler creates a new `rust_bh_cb` wrapper for each function +/// // passed to `qemu_bh_schedule_oneshot` below. +/// unsafe extern "C" fn rust_bh_cb FnCall<(&'a T,)>>( +/// opaque: *mut c_void, +/// ) { +/// // SAFETY: the opaque was passed as a reference to `T`. +/// F::call((unsafe { &*(opaque.cast::()) }, )) +/// } +/// +/// // The `_f` parameter is unused but it helps the compiler build the ap= propriate `F`. +/// // Using a reference allows usage in const context. +/// fn qemu_bh_schedule_oneshot FnCall<(&'a T,)>>(_f: &F, op= aque: &T) { +/// let cb: unsafe extern "C" fn(*mut c_void) =3D rust_bh_cb::; +/// unsafe { +/// bindings::qemu_bh_schedule_oneshot(cb, opaque as *const T as *= const c_void as *mut c_void) +/// } +/// } +/// ``` +/// +/// Each wrapper is a separate instance of `rust_bh_cb` and is therefore +/// compiled to a separate function ("monomorphization"). If you wanted +/// to pass `self` as the opaque value, the generic parameters would be +/// `rust_bh_cb::`. +/// +/// `Args` is a tuple type whose types are the arguments of the function, +/// while `R` is the returned type. +/// +/// # Examples +/// +/// ``` +/// # use qemu_api::callbacks::FnCall; +/// fn call_it FnCall<(&'a str,), String>>(_f: &F, s: &str) -> = String { +/// F::call((s,)) +/// } +/// +/// let s: String =3D call_it(&str::to_owned, "hello world"); +/// assert_eq!(s, "hello world"); +/// ``` +/// +/// Note that the compiler will produce a different version of `call_it` f= or +/// each function that is passed to it. Therefore the argument is not rea= lly +/// used, except to decide what is `F` and what `F::call` does. +/// +/// Attempting to pass a non-zero-sized closure causes a compile-time fail= ure: +/// +/// ```compile_fail +/// # use qemu_api::callbacks::FnCall; +/// # fn call_it<'a, F: FnCall<(&'a str,), String>>(_f: &F, s: &'a str) ->= String { +/// # F::call((s,)) +/// # } +/// let x: &'static str =3D "goodbye world"; +/// call_it(&move |_| String::from(x), "hello workd"); +/// ``` +/// +/// # Safety +/// +/// Because `Self` is a zero-sized type, all instances of the type are +/// equivalent. However, in addition to this, `Self` must have no invarian= ts +/// that could be violated by creating a reference to it. +/// +/// This is always true for zero-capture closures and function pointers, a= s long +/// as the code is able to name the function in the first place. +pub unsafe trait FnCall: 'static + Sync + Sized { + /// Referring to this internal constant asserts that the `Self` type is + /// zero-sized. Can be replaced by an inline const expression in + /// Rust 1.79.0+. + const ASSERT_ZERO_SIZED: () =3D { assert!(mem::size_of::() =3D= =3D 0) }; + + /// Call the function with the arguments in args. + fn call(a: Args) -> R; +} + +macro_rules! impl_call { + ($($args:ident,)* ) =3D> ( + // SAFETY: because each function is treated as a separate type, + // accessing `FnCall` is only possible in code that would be + // allowed to call the function. + unsafe impl FnCall<($($args,)*), R> for F + where + F: 'static + Sync + Sized + Fn($($args, )*) -> R, + { + #[inline(always)] + fn call(a: ($($args,)*)) -> R { + let _: () =3D Self::ASSERT_ZERO_SIZED; + + // SAFETY: the safety of this method is the condition for = implementing + // `FnCall`. As to the `NonNull` idiom to create a zero-s= ized type, + // see https://github.com/rust-lang/libs-team/issues/292. + let f: &'static F =3D unsafe { &*NonNull::::dangling= ().as_ptr() }; + let ($($args,)*) =3D a; + f($($args,)*) + } + } + ) +} + +impl_call!(_1, _2, _3, _4, _5,); +impl_call!(_1, _2, _3, _4,); +impl_call!(_1, _2, _3,); +impl_call!(_1, _2,); +impl_call!(_1,); +impl_call!(); + +#[cfg(test)] +mod tests { + use super::*; + + // The `_f` parameter is unused but it helps the compiler infer `F`. + fn do_test_call<'a, F: FnCall<(&'a str,), String>>(_f: &F) -> String { + F::call(("hello world",)) + } + + #[test] + fn test_call() { + assert_eq!(do_test_call(&str::to_owned), "hello world") + } +} diff --git a/rust/qemu-api/src/lib.rs b/rust/qemu-api/src/lib.rs index 124bece0449..4b43e02c0f9 100644 --- a/rust/qemu-api/src/lib.rs +++ b/rust/qemu-api/src/lib.rs @@ -14,6 +14,7 @@ =20 pub mod bitops; pub mod c_str; +pub mod callbacks; pub mod cell; pub mod irq; pub mod module; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597413; cv=none; d=zohomail.com; s=zohoarc; b=Vl13CMGq63EsWwXiI8G1jgoRDN/2oeivnOYTGHA8ABqOaHmaG6xyxDla3JqhAkt0SXfipg3bS+d/8ChJbPuvYzTP3iNkv+YXb50C6Vf3+nZ/jzA/fukUlTDAGuoeHUeIfMFlI4jRsMVVFBusk/pki70sd+R45SbFS6ErOC79aTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597413; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=YoHuc/NNuJdIOvWlSl/Djx2vhx2e2wqt0iw58ph2W7s=; b=g/HgX+SizdD8E8AqeHETSu5KhEJxrXKEFih3b/ogTJeTm4Ka9IKpACkB+NRH4aFvH49UxxuGOhs/CMGRw261jntfKdIsRapTbAT7iXrwwh/AQaXUMSWMmm5UsvebH0S39sLH31ORTa+56sdHV69XxrXhcCzdUMt71owSjd3ayv4= 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 1734597413963244.08806986002173; Thu, 19 Dec 2024 00:36:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByl-0006pi-N2; Thu, 19 Dec 2024 03:33:55 -0500 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 1tOByi-0006Zy-5S for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByc-0005FR-9U for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:48 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-u4b6v_otMjGhFw3IxKOWzw-1; Thu, 19 Dec 2024 03:33:44 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4362b9c15d8so2899015e9.3 for ; Thu, 19 Dec 2024 00:33:43 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b013a1sm46067165e9.11.2024.12.19.00.33.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YoHuc/NNuJdIOvWlSl/Djx2vhx2e2wqt0iw58ph2W7s=; b=E/IGkmaRTBBsRyDTj9LE3MkKXn1fyW+WGA1h70PnLyl6Idf37uQQV1QEzXDdY+yhnIh9LR iZh3t3ldD900iJzq/HqK51jgv9HSUzkh+oh2BO1NAHB0D66PAcjX3O5IgB/LU+sEBsnSQ+ iE2Sq6e3iyCPBQHQZbEVdIE0oXDVgyc= X-MC-Unique: u4b6v_otMjGhFw3IxKOWzw-1 X-Mimecast-MFC-AGG-ID: u4b6v_otMjGhFw3IxKOWzw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597222; x=1735202022; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YoHuc/NNuJdIOvWlSl/Djx2vhx2e2wqt0iw58ph2W7s=; b=SDu8+7vnI5faHV5VDa8qR2ior2oV59PmkaVvjnXIyGayeghk3HzXcT5ehXm6tVpOuT sFo0pLZuAga5eccGxzS5DUfRJ1Nu1zyuxScKNp2rFl1J3ffIFcfO4qYNre2lOqmWUGsz mzucNHr2q/Da12dA9V+71JL11NU1WDOuBwoq7ibSge5EupS1TO5Nx/6kFj/0ztUp8SLb cKYw3KGrNtoSGDe8AgegwAM3tO7dAdeF1cw1J0Bxhz1+OZ5M2wbqjqXEWdxXK2FFkO8w bEtqIhOpdG1cWMbGGBGP+rlGOxddBb3+XeXy8b8xz2plczJseG0IdCrzPNJcSOQSxctp 69eQ== X-Gm-Message-State: AOJu0YymuL4QolkUYpgIuQyRQbgfheeOwri5gP6j87/7zGPrsfI4HIlX 2uopFxOMdXeb1Ljf+TPkQoW2RIkYgG9Dh7EkXm9qVKX5hFzk7U29Pp6e6G8YCZPb07DGmcqAdbQ whZTRtchKoTWNAVEMCbe3bVcIB5YX+8jHRr3PUBqqvT/HaMwJAl2d9NY1njXk9oROLDP+DIQKTE XqxQ/icKw1mvbr7Kgmi/JAsxozPubL92cYIVHs X-Gm-Gg: ASbGncvs5lrOEzWdMF9jyoo671qoCIk5HE89PxreTsPkjSSnvKVDOJ+GTFXoJv3Vg0o hhmRxjWeztCq6v/rQN0DQehb4LWPw+WlsEdUeEHPVpEX922iD6psWzQUZE6i3BBWangSuCwpJ7m aBGsl9vgTtA5y+wu0FpwkwBeSRM2sVNmr1IZd0o4VkxFKuqZEYdDd+k+Zs7HHdZhnmjiNVbkXnB wGbvhA3KqI5xvbG9FYrwSbVQT20gR+wGstU9c7F/4dbJeSOHpSgUGf/VgcK X-Received: by 2002:adf:e194:0:b0:385:e1e5:fff3 with SMTP id ffacd0b85a97d-388e4d9760bmr5351046f8f.57.1734597222181; Thu, 19 Dec 2024 00:33:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7Ud9Haahs+4ElvTqlfVsQCbil0VZ4GGmHR3RxWETKYN2EYD3XOt3DTAnfNmxhgVN4k3ItRg== X-Received: by 2002:adf:e194:0:b0:385:e1e5:fff3 with SMTP id ffacd0b85a97d-388e4d9760bmr5351012f8f.57.1734597221682; Thu, 19 Dec 2024 00:33:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 33/41] kvm: consistently return 0/-errno from kvm_convert_memory Date: Thu, 19 Dec 2024 09:32:20 +0100 Message-ID: <20241219083228.363430-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597415653116600 Content-Type: text/plain; charset="utf-8" In case of incorrect parameters, kvm_convert_memory() was returning -1 instead of -EINVAL. The guest won't notice because it will move anyway to RUN_STATE_INTERNAL_ERROR, but fix this for consistency and clarity. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 801cff16a5a..77d811ca70c 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2999,17 +2999,17 @@ int kvm_convert_memory(hwaddr start, hwaddr size, b= ool to_private) MemoryRegion *mr; RAMBlock *rb; void *addr; - int ret =3D -1; + int ret =3D -EINVAL; =20 trace_kvm_convert_memory(start, size, to_private ? "shared_to_private"= : "private_to_shared"); =20 if (!QEMU_PTR_IS_ALIGNED(start, qemu_real_host_page_size()) || !QEMU_PTR_IS_ALIGNED(size, qemu_real_host_page_size())) { - return -1; + return ret; } =20 if (!size) { - return -1; + return ret; } =20 section =3D memory_region_find(get_system_memory(), start, size); @@ -3027,7 +3027,7 @@ int kvm_convert_memory(hwaddr start, hwaddr size, boo= l to_private) if (!to_private) { return 0; } - return -1; + return ret; } =20 if (!memory_region_has_guest_memfd(mr)) { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597473; cv=none; d=zohomail.com; s=zohoarc; b=PFuFwTShXaWrfyh1+XKLHxDp2JFdUAfzuU6sPXEbB4PKAyFMDdg2j9l5vg27WuuX18WdslQrFymrayhA3U4azTYqORSKrUNVXoaWBmrLBEJY3546x19Ra0/hyTJ8iz3DqG+fgYS6eZ5WSBH5jxjudBvplFvQa++0RDtUWgJ7Wcc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597473; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eJDnjE/BAkbJeQX/EK6vVThXGUwkUNVfjMYxPU0nzCU=; b=SGsjXdHSq5HLg9yCwmRpSWY5OXbl6eTQa2VWGCD4S1mE5nu9kgTNcYDMEJoeasfV+WUXt+M7+335E6XouItI8IZ4z+ZLtEOu7oPhFIZm86r3lBlDTIol3GIcueEjvZIjczajKdQ7NYFgN2luI5Dy7tALJhDdA4nqW8UaaZzXCKc= 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 1734597473629963.6648313121029; Thu, 19 Dec 2024 00:37:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBym-0006rp-BJ; Thu, 19 Dec 2024 03:33:56 -0500 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 1tOByi-0006Zz-6Y for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByd-0005Fc-Fe for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:49 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-9_x_s7QuPyWE9KPKWPihsA-1; Thu, 19 Dec 2024 03:33:45 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-43625ceae52so2956695e9.0 for ; Thu, 19 Dec 2024 00:33:45 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac974sm968353f8f.91.2024.12.19.00.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eJDnjE/BAkbJeQX/EK6vVThXGUwkUNVfjMYxPU0nzCU=; b=IduSYHbNauy6dDG16Lspygm2AHqZrCQzXzsapRFd3KbGqbQ1ZPGoE4xgEQlqsHpE4aqD7q dGKIHG9140SElMY0JshTqWHymaRdZRxxWmZukWKzm3b4spPMQ7yILBdT+4fxH0sZpIZzjA Y8vkXKmMdZXJ3V6cY4XhSj8oB4u3TMk= X-MC-Unique: 9_x_s7QuPyWE9KPKWPihsA-1 X-Mimecast-MFC-AGG-ID: 9_x_s7QuPyWE9KPKWPihsA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597223; x=1735202023; 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=eJDnjE/BAkbJeQX/EK6vVThXGUwkUNVfjMYxPU0nzCU=; b=YQoB2fYKUl1ZvIyBz7dO8syj2DdFJKz58DjTBXFUMehKRrvSqxBHwP2I3UuWhfiW3s dEtIQKwsXsy22vbjbj5LkGoF7PBkR8ctT9tFE0v92WNnuQBrNABqvVcPTnxtRLdcjZ6b aWTKUCFoCXDh1jqJXVuuah9aV2jCWG+17DFiShQ4wuHgab0Kc9XjJWLGoTSWgdhYqYAa UxlAJizyfN/F/7VjCNdntqpfVx5JwnsVKO58xbMnG3y1H5UQEtdWB3l1RHGcSZrtmg0w FT8DOYKn9xBaVvBYYOB8tkEyajj58rY99cMwLpBFk3oyNQFtfl0Aw9fH0fquKbGveWz1 eL/w== X-Gm-Message-State: AOJu0YzQDMmsSqnP1DjpTwxG/9QFlkguNjcQCG0l81TNse8vGsghnSkD 0XcKydRZ+b3D/ZlzNYF3u2VQ59+LU/j+prLNdOo5MEjOn2qxB4K5QLxavC0013oVt2SsaIzCnWX ZGh5mbnnYNP3ebAxjpBdXr+MRZmvbkooSasyzny60Oc7QLU2O04LExHuCEnBXJeuy56yoHN8aVx BWApRDPJRfDdWErn0ey3SlTbiJAt9hAgBsZU4i X-Gm-Gg: ASbGnctgZzStKWyD9fvz+8c4juV/LE7cl+JD0n2HiZOa7eHT5cYUNEpwXrikwqTG26K taP6PU5qSbsKYZjMkoNOvFAwMFBM6CZxKwVO6M508tAHJtF85uNRbL4y/POty6ODE3CoBxzm+cu 5piIb2fo92FvZhssuKeED7gyYrFyMVN5O6n0VuNQi4jZEZv3v+a4n0bvB4fF03dmtG93kKm5ZT2 O12HTR+d7emiOlejx5MBFJYLW/vXckuMyjUXQrEFfU0OxNHfZX2GWT6FrtA X-Received: by 2002:a5d:6c63:0:b0:386:1c13:30d5 with SMTP id ffacd0b85a97d-388e4d4a602mr6275736f8f.7.1734597223389; Thu, 19 Dec 2024 00:33:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8mfBgfoZsrrEsn4jt5aFybkYtKfHi1/1tkA+F7sZdfhtu/u96vEX9Umy6mVUC62rFH/zt1A== X-Received: by 2002:a5d:6c63:0:b0:386:1c13:30d5 with SMTP id ffacd0b85a97d-388e4d4a602mr6275686f8f.7.1734597222876; Thu, 19 Dec 2024 00:33:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Maciej S. Szmigiero" Subject: [PULL 34/41] target/i386: Reset TSCs of parked vCPUs too on VM reset Date: Thu, 19 Dec 2024 09:32:21 +0100 Message-ID: <20241219083228.363430-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597476017116600 Content-Type: text/plain; charset="utf-8" From: "Maciej S. Szmigiero" Since commit 5286c3662294 ("target/i386: properly reset TSC on reset") QEMU writes the special value of "1" to each online vCPU TSC on VM reset to reset it. However parked vCPUs don't get that handling and due to that their TSCs get desynchronized when the VM gets reset. This in turn causes KVM to turn off PVCLOCK_TSC_STABLE_BIT in its exported PV clock. Note that KVM has no understanding of vCPU being currently parked. Without PVCLOCK_TSC_STABLE_BIT the sched clock is marked unstable in the guest's kvm_sched_clock_init(). This causes a performance regressions to show in some tests. Fix this issue by writing the special value of "1" also to TSCs of parked vCPUs on VM reset. Reproducing the issue: 1) Boot a VM with "-smp 2,maxcpus=3D3" or similar 2) device_add host-x86_64-cpu,id=3Dvcpu,node-id=3D0,socket-id=3D0,core-id= =3D2,thread-id=3D0 3) Wait a few seconds 4) device_del vcpu 5) Inside the VM run: # echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable Observe the sched_clock_stable() value is 1. 6) Reboot the VM 7) Once the VM boots once again run inside it: # echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable Observe the sched_clock_stable() value is now 0. Fixes: 5286c3662294 ("target/i386: properly reset TSC on reset") Signed-off-by: Maciej S. Szmigiero Link: https://lore.kernel.org/r/5a605a88e9a231386dc803c60f5fed9b48108139.17= 34014926.git.maciej.szmigiero@oracle.com Signed-off-by: Paolo Bonzini --- configs/targets/i386-softmmu.mak | 1 + configs/targets/x86_64-softmmu.mak | 1 + include/sysemu/kvm.h | 8 ++++++++ accel/kvm/kvm-all.c | 11 +++++++++++ target/i386/kvm/kvm.c | 15 +++++++++++++++ 5 files changed, 36 insertions(+) diff --git a/configs/targets/i386-softmmu.mak b/configs/targets/i386-softmm= u.mak index 2ac69d5ba37..2eb0e862500 100644 --- a/configs/targets/i386-softmmu.mak +++ b/configs/targets/i386-softmmu.mak @@ -1,4 +1,5 @@ TARGET_ARCH=3Di386 TARGET_SUPPORTS_MTTCG=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy +TARGET_KVM_HAVE_RESET_PARKED_VCPU=3Dy TARGET_XML_FILES=3D gdb-xml/i386-32bit.xml diff --git a/configs/targets/x86_64-softmmu.mak b/configs/targets/x86_64-so= ftmmu.mak index e12ac3dc59b..920e9a42006 100644 --- a/configs/targets/x86_64-softmmu.mak +++ b/configs/targets/x86_64-softmmu.mak @@ -2,4 +2,5 @@ TARGET_ARCH=3Dx86_64 TARGET_BASE_ARCH=3Di386 TARGET_SUPPORTS_MTTCG=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy +TARGET_KVM_HAVE_RESET_PARKED_VCPU=3Dy TARGET_XML_FILES=3D gdb-xml/i386-64bit.xml diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index c3a60b28909..ab17c09a551 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -377,6 +377,14 @@ int kvm_arch_init(MachineState *ms, KVMState *s); int kvm_arch_init_vcpu(CPUState *cpu); int kvm_arch_destroy_vcpu(CPUState *cpu); =20 +#ifdef TARGET_KVM_HAVE_RESET_PARKED_VCPU +void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd); +#else +static inline void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int k= vm_fd) +{ +} +#endif + bool kvm_vcpu_id_is_valid(int vcpu_id); =20 /* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 77d811ca70c..4ab277cc84a 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -437,6 +437,16 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id) return kvm_fd; } =20 +static void kvm_reset_parked_vcpus(void *param) +{ + KVMState *s =3D param; + struct KVMParkedVcpu *cpu; + + QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) { + kvm_arch_reset_parked_vcpu(cpu->vcpu_id, cpu->kvm_fd); + } +} + int kvm_create_vcpu(CPUState *cpu) { unsigned long vcpu_id =3D kvm_arch_vcpu_id(cpu); @@ -2728,6 +2738,7 @@ static int kvm_init(MachineState *ms) } =20 qemu_register_reset(kvm_unpoison_all, NULL); + qemu_register_reset(kvm_reset_parked_vcpus, s); =20 if (s->kernel_irqchip_allowed) { kvm_irqchip_create(s); diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 8e17942c3ba..2ff618fbf13 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -2415,6 +2415,21 @@ void kvm_arch_after_reset_vcpu(X86CPU *cpu) } } =20 +void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd) +{ + g_autofree struct kvm_msrs *msrs =3D NULL; + + msrs =3D g_malloc0(sizeof(*msrs) + sizeof(msrs->entries[0])); + msrs->entries[0].index =3D MSR_IA32_TSC; + msrs->entries[0].data =3D 1; /* match the value in x86_cpu_reset() */ + msrs->nmsrs++; + + if (ioctl(kvm_fd, KVM_SET_MSRS, msrs) !=3D 1) { + warn_report("parked vCPU %lu TSC reset failed: %d", + vcpu_id, errno); + } +} + void kvm_arch_do_init_vcpu(X86CPU *cpu) { CPUX86State *env =3D &cpu->env; --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597454; cv=none; d=zohomail.com; s=zohoarc; b=U9J5LgwV5QoEXk2oWs6+ul0MFbc5QQDCPKWmpvCKxPPAzwKZToNMP8AcRccFlmWklIzga4UjjMToIm/38ofz+MLKLbc4mkEdCvb+KyM1wKprE+DV91ZOKsAAHD2Fkjyg0tslImcfgQRp+HikcFIYXtXzC/laid2wfgeHpQP93yM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597454; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HLrfooTNBj4iNgOLqb5Ydjdi9unX3dn8owNvgl6hDAs=; b=PE8AZPA7K4A5IP+5SqdhkJ18uyT4P6nNeLWf1RQ85WgshU+yE0k/DGS/o6u7E+fb6vgsSxBPYHgkfZ1FEzH5ZlH0YCLv1MXBjVOla37dO+KmQtwh0f6MLy5Ice3tDqVps7lYh/FiBNNKmBt1MholJqbUxuv0Nn9RD0PDGribaIs= 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 1734597454452520.3349427336985; Thu, 19 Dec 2024 00:37:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBym-0006sT-Vl; Thu, 19 Dec 2024 03:33:57 -0500 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 1tOByj-0006gQ-Jq for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByg-0005G2-6z for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:53 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-BG5j7_ByP4CkC7YF_6_gNQ-1; Thu, 19 Dec 2024 03:33:48 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4361f371908so4283395e9.0 for ; Thu, 19 Dec 2024 00:33:48 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acc02sm973305f8f.104.2024.12.19.00.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HLrfooTNBj4iNgOLqb5Ydjdi9unX3dn8owNvgl6hDAs=; b=ezccKb+tHaJxiQGbINl/9m6X48MapNa9nnk9PGl0REhwm7wl490WG5bHWUZJG5fu3l7bhd SDquZdA236FgXkSj/a2R4y4PkweFtoRWWEuTF72Uhd1USzKMzzDQNYhK2YXqiKUU93OIXu IJnubanH0rZHrDOo58ZqIRi0x0l8LBo= X-MC-Unique: BG5j7_ByP4CkC7YF_6_gNQ-1 X-Mimecast-MFC-AGG-ID: BG5j7_ByP4CkC7YF_6_gNQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597226; x=1735202026; 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=HLrfooTNBj4iNgOLqb5Ydjdi9unX3dn8owNvgl6hDAs=; b=AZQl1q5HFMjVm/Ev/9aUJ8TNO0UEnrbYA1rt+mRLBqX9vEEwrIHzv/3kY+np9HIEoH fYNktil80DYnlimWT+W+nJEd9PC4YyfY+5cIV/DFCFL4tzN/FKf5Y4GEpv18PXB3fMLZ 5jIIAq461ycAI6unLRXPF48Htk5B0R2eQk/hy4v3qdGwmeD4SphVZuHbg7+LiltJcSfM dCiifoc2bT9mTyq/3YZSnpcg9MRG4IzLcOgL4dZUek3O3NgMKjtvX/InCWq4fWdLZSB8 DrjYCL9C0/FzCtLMyUclXhkd3gYh8DTgKTJP4OA934ttBfTgLMVP6crZAYLOVuG+bmxi MPLg== X-Gm-Message-State: AOJu0YznCjKN5pyvx+ZYymQm1fDxEHusOweNX7vCzgia9zaeZ5ldjj4T dwmZ62daHUlCFtqgG8d4VnZMDjLa1J0Zd32go/DlSic+9cNa0jf90AWm2MBvHWcXxlHrNKBQ5NI rhiYKobbDx4d9HGt/tOd8FuRaio7oIMMy2VPCodQhP9j50Z3ufbNCr9T7e7DDhR9qnjgnNeh4Iv baEdetkrDCUi7A50AAPM4oTH4BBikU1E4Eln0L X-Gm-Gg: ASbGncsfJEY2mR69xVVsgfORBSe4jadGcnxjXa/y4Qp389VfgvlOsEnztH4wrRKr974 LEka0Kcn2hIAY2BhL+FhaBmmNQEtvD/P7hEKfM6FfhKMlT9sKxxjl5sSJZezAYtfwHsuxKFnHYi QxrUMVdeL9V+WGHlqrnqT0xUv7c49sJill8EkiQ2HvWfKoL3kbZxM2lnlsVvctjOMtxEyUwYMzR 4ztQzxz6VR3mhvTtgofnnFrC+i7/8J0Aip+WFN2cPzcS73UCSwcrGp6oy9+ X-Received: by 2002:a05:600c:4586:b0:434:f586:753c with SMTP id 5b1f17b1804b1-43655341348mr47632745e9.7.1734597225601; Thu, 19 Dec 2024 00:33:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJTxGPQXyWfsoNvpTggTdyX7K8DAvvijr2gt16sCgoGWG/brNtkf9fEokzDOh0TlRipa9iSg== X-Received: by 2002:a05:600c:4586:b0:434:f586:753c with SMTP id 5b1f17b1804b1-43655341348mr47632395e9.7.1734597225026; Thu, 19 Dec 2024 00:33:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 35/41] rust: pl011: fix declaration of LineControl bits Date: Thu, 19 Dec 2024 09:32:22 +0100 Message-ID: <20241219083228.363430-36-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597455940116600 The bits in the LineControl struct were backwards. :( Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/lib.rs | 82 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs index 4dc0e8f345f..d5089f78854 100644 --- a/rust/hw/char/pl011/src/lib.rs +++ b/rust/hw/char/pl011/src/lib.rs @@ -319,32 +319,21 @@ fn default() -> Self { /// Line Control Register, `UARTLCR_H` #[doc(alias =3D "UARTLCR_H")] pub struct LineControl { - /// 15:8 - Reserved, do not modify, read as zero. - _reserved_zero_no_modify: u8, - /// 7 SPS Stick parity select. - /// 0 =3D stick parity is disabled - /// 1 =3D either: - /// =E2=80=A2 if the EPS bit is 0 then the parity bit is transmitt= ed and checked - /// as a 1 =E2=80=A2 if the EPS bit is 1 then the parity bit is - /// transmitted and checked as a 0. This bit has no effect when - /// the PEN bit disables parity checking and generation. See Table= 3-11 - /// on page 3-14 for the parity truth table. - pub sticky_parity: bool, - /// WLEN Word length. These bits indicate the number of data bits - /// transmitted or received in a frame as follows: b11 =3D 8 bits - /// b10 =3D 7 bits - /// b01 =3D 6 bits - /// b00 =3D 5 bits. - pub word_length: WordLength, - /// FEN Enable FIFOs: - /// 0 =3D FIFOs are disabled (character mode) that is, the FIFOs b= ecome - /// 1-byte-deep holding registers 1 =3D transmit and receive FIFO - /// buffers are enabled (FIFO mode). - pub fifos_enabled: Mode, - /// 3 STP2 Two stop bits select. If this bit is set to 1, two stop= bits - /// are transmitted at the end of the frame. The receive - /// logic does not check for two stop bits being received. - pub two_stops_bits: bool, + /// BRK Send break. + /// + /// If this bit is set to `1`, a low-level is continually output o= n the + /// `UARTTXD` output, after completing transmission of the + /// current character. For the proper execution of the break comma= nd, + /// the software must set this bit for at least two complete + /// frames. For normal use, this bit must be cleared to `0`. + pub send_break: bool, + /// 1 PEN Parity enable: + /// + /// - 0 =3D parity is disabled and no parity bit added to the data= frame + /// - 1 =3D parity checking and generation is enabled. + /// + /// See Table 3-11 on page 3-14 for the parity truth table. + pub parity_enabled: bool, /// EPS Even parity select. Controls the type of parity the UART u= ses /// during transmission and reception: /// - 0 =3D odd parity. The UART generates or checks for an odd nu= mber of @@ -355,21 +344,32 @@ pub struct LineControl { /// and generation. See Table 3-11 on page 3-14 for the parity /// truth table. pub parity: Parity, - /// 1 PEN Parity enable: - /// - /// - 0 =3D parity is disabled and no parity bit added to the data= frame - /// - 1 =3D parity checking and generation is enabled. - /// - /// See Table 3-11 on page 3-14 for the parity truth table. - pub parity_enabled: bool, - /// BRK Send break. - /// - /// If this bit is set to `1`, a low-level is continually output o= n the - /// `UARTTXD` output, after completing transmission of the - /// current character. For the proper execution of the break comma= nd, - /// the software must set this bit for at least two complete - /// frames. For normal use, this bit must be cleared to `0`. - pub send_break: bool, + /// 3 STP2 Two stop bits select. If this bit is set to 1, two stop= bits + /// are transmitted at the end of the frame. The receive + /// logic does not check for two stop bits being received. + pub two_stops_bits: bool, + /// FEN Enable FIFOs: + /// 0 =3D FIFOs are disabled (character mode) that is, the FIFOs b= ecome + /// 1-byte-deep holding registers 1 =3D transmit and receive FIFO + /// buffers are enabled (FIFO mode). + pub fifos_enabled: Mode, + /// WLEN Word length. These bits indicate the number of data bits + /// transmitted or received in a frame as follows: b11 =3D 8 bits + /// b10 =3D 7 bits + /// b01 =3D 6 bits + /// b00 =3D 5 bits. + pub word_length: WordLength, + /// 7 SPS Stick parity select. + /// 0 =3D stick parity is disabled + /// 1 =3D either: + /// =E2=80=A2 if the EPS bit is 0 then the parity bit is transmitt= ed and checked + /// as a 1 =E2=80=A2 if the EPS bit is 1 then the parity bit is + /// transmitted and checked as a 0. This bit has no effect when + /// the PEN bit disables parity checking and generation. See Table= 3-11 + /// on page 3-14 for the parity truth table. + pub sticky_parity: bool, + /// 15:8 - Reserved, do not modify, read as zero. + _reserved_zero_no_modify: u8, } =20 impl LineControl { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597482; cv=none; d=zohomail.com; s=zohoarc; b=c6C0CMNnArhWiVks43mTb0N/JDDVkL4dZiBxs1WXFS6npn1b2IpQnL+EQYsnoKOSpUhmJy1qhecA4k9IY7Auqx55giOaR+TCM1zS8Yy9+fRnQsSTGHUy6iDHqu57whPHAflmE1zA10QnAIu7ZuLHnx1Zl/Hulq4iQ9yuar4Jnxk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597482; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8AAp/S2v8W3fPum66lzAfsVl337fXfIWb2U5k64KdL0=; b=LrfteAED0MBm822RmSbf7kyuT0RrJ2JQbiryQfjV0AzRiiRATPeKwmqMf2CnytXzhFCifYeh6Ct/smetEz3rrmmzUqRVMOA5aEv5LfdrPpS+89cHUxMuvVjg4tQq36hpHcKG0ARkJUmNgv7iHZ7ktyajKFD2MlR57CREzgzINiM= 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 1734597482923657.5873397370943; Thu, 19 Dec 2024 00:38:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByn-0006tW-Cy; Thu, 19 Dec 2024 03:33:57 -0500 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 1tOByk-0006iB-AD for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByi-0005GS-Pa for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:54 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-9oDyKbxXNey8Cjv-i94plA-1; Thu, 19 Dec 2024 03:33:48 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-436219070b4so2729865e9.1 for ; Thu, 19 Dec 2024 00:33:48 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea423sm11356045e9.2.2024.12.19.00.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8AAp/S2v8W3fPum66lzAfsVl337fXfIWb2U5k64KdL0=; b=HehjXZxonx2cjglWoU7nlnNc6dMFRq23s8qa24EQoZD/UN2qkScziYzHogz2N/t3AlR2pW XGw2BzEQdK0chcUjSall3Ufv7xkkbLzKJHEXub72uQ7UgSZYFP6qM6hBq9vbPMoWnBsa3q +xrXKyuVMa5UrToP4ZUmHkM2KB4jTpA= X-MC-Unique: 9oDyKbxXNey8Cjv-i94plA-1 X-Mimecast-MFC-AGG-ID: 9oDyKbxXNey8Cjv-i94plA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597226; x=1735202026; 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=8AAp/S2v8W3fPum66lzAfsVl337fXfIWb2U5k64KdL0=; b=k4pcsAorNqnguAZd7q+eoJkHrYdzlRMTod2aIfXaEq47C/n3nFDUUEhAuQ7vFJcAe0 BQ/jIXhfeX0leblvbINPmHHfZk9OeYLXLPjTkOT1ydNdm3zgK1DUErt0qCRlsSC86DHA gX+T/FEL+vZrDkXXy3t8YauoxpfC+7hzXlcGxV9JrjquDQjYC62SqLyPZ4J0PaVzD2dV 8KKhUoR1sS1m2nJktr1bHiNXsvY/IIBvybPQTcke6RzSL+lgFZmTIyrFrFK1ruc6KMrX MxXj/c+VlnIpj3aCvn1bXVEngEa8ziudPlb8ciVV7vij8qo35KuHkNLfN2ebZc2rXEwE kUfA== X-Gm-Message-State: AOJu0YxX30VmSlrzzQrc3xpv/KwRLPkTEUnrO49trCQUNhFyrLMKseQ1 iU3TiNH+pXFgDg+UQy3i1j3CmVonQiRS+dTsaITCa7qVvIiwSHW6I0leQckrQUC0n26zsU032Zz ZE8yIaHNz7pn69Wf6xRVOaZAcPyPbJEAK96n04A4uhBTT4jso2RFqr7CJsmnFheY5Y4wBm3mQxp CjKIqvViPQWsJglYiE2rrMj0cvC2bnD6KnSO9G X-Gm-Gg: ASbGncsWFOHAqHVN3R98qus5XzCVNi1VETGADKXAKmSSeo6xmABMuvlx2Kwl371iMxZ PBaB8aP/ZYThjFhSIy8ppLLRwnniLBjPxg8U36XSBDomz+w/ipYd/MDE44QcgQ+iNBVR7vB6U3w CFTP6nG5XmaHh1wD5rWJKSsly2OWQudhQC/Zb7nIIq3NcbV6S5yaW3m8jMAF97fLZIcBSKTvf9J 2eOrh8Tipv+q6/Wq1LXdMCtAawB0Rrw8alXwBGPvOEVXCfhDa6YAGLOBFXO X-Received: by 2002:a05:600c:4f84:b0:434:f0df:a14 with SMTP id 5b1f17b1804b1-436553487famr54228145e9.2.1734597226542; Thu, 19 Dec 2024 00:33:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4H4vRHZk2XSkCrzocY6aLyz8yOIxWULqVjb1iPoLK6Z+chHqCfIJSfdI5UiTgDNqac6ftwQ== X-Received: by 2002:a05:600c:4f84:b0:434:f0df:a14 with SMTP id 5b1f17b1804b1-436553487famr54227885e9.2.1734597226195; Thu, 19 Dec 2024 00:33:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 36/41] rust: pl011: match break logic of C version Date: Thu, 19 Dec 2024 09:32:23 +0100 Message-ID: <20241219083228.363430-37-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597483908116600 Check loopback_enabled(), not fifo_enabled(), like the C code. Also, set_break_error() must not happen until the break is read from the FIFO. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index e85d13c5a2b..960ee38ed69 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -460,9 +460,8 @@ pub fn can_receive(&self) -> bool { } =20 pub fn event(&mut self, event: QEMUChrEvent) { - if event =3D=3D bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.f= ifo_enabled() { + if event =3D=3D bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.l= oopback_enabled() { self.put_fifo(DATA_BREAK); - self.receive_status_error_clear.set_break_error(true); } } =20 --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597401; cv=none; d=zohomail.com; s=zohoarc; b=XH17kkKP1MZ250ewIEklVC+RMbQFlRGbtmjqtqhPH32V0+eKxmR+u5rM83jAIJPB2IFrFYimfw/AN1T53y1dBlPPzybqiV/q7TUhssoPnIy4DSy9C1HqHRs8hGsjMjh3caSQ1jUYgat6CpAoQbVRGZP06QuWjJzg0OSK1v0RIl4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597401; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VTPmYEtJQTF4LhpsXLNB3KolsGRJJ0DGDHYuyRBvOuI=; b=FZfO4l+qwuwQHU2iVHpVaiscN3EjFvyX52BKsrHyDxm0IjVf+yX2xkKj+Rkkxt7pY9hj5NtrFXxemrYGZd6U5sVqDOMzdEns++sH/W8/SlzdqgOAYu5cNfSXR8iiFx2pUD4+D7cF8Q1OzBSuzAn04zfl9GpcCmz59OY0rIBFIv8= 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 1734597401345921.534898506026; Thu, 19 Dec 2024 00:36:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByp-0006uy-8r; Thu, 19 Dec 2024 03:33:59 -0500 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 1tOByl-0006pl-MA for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByk-0005H8-4c for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:55 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-9vpJtQ6cN0aiRgCQVpbAGw-1; Thu, 19 Dec 2024 03:33:51 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-388d1f6f3b2so223123f8f.0 for ; Thu, 19 Dec 2024 00:33:50 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c847263sm987383f8f.50.2024.12.19.00.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VTPmYEtJQTF4LhpsXLNB3KolsGRJJ0DGDHYuyRBvOuI=; b=Rc7h8eiyUTqJKL1bzZpTau8hrGpUqW1jd1RaUN39oWs+rnxzvsH5s5zEC3WIl/x6QptrtW CtQO7koRvtFEsLfPb/4Zl2lq7BeS7FHjnoFWfd0+mqNCberryGDURlDJ66eA+TTs1CAeOG Y+FCQ0eR/zzIB9a5K0mrnfrZNiH8VBQ= X-MC-Unique: 9vpJtQ6cN0aiRgCQVpbAGw-1 X-Mimecast-MFC-AGG-ID: 9vpJtQ6cN0aiRgCQVpbAGw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597229; x=1735202029; 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=VTPmYEtJQTF4LhpsXLNB3KolsGRJJ0DGDHYuyRBvOuI=; b=VLrL1IH5x4lpnaTbjJENXRsf6Iq/LqARDQhg1DZ+uCfu5gvYlhF9DXqfukXwBSilEF p+IuHNwXw1QkBOrCGDyWHn77wt3qdOTRtUBwse7fUTxI60441FuxSiAx/OKD3MEWN6Pj f/ZTZYDF5Qum1ui0s5l1ttzfbVARTA/f0+9kCnwTrO6Pv2lBzMnwf28cUBH1+3I6+znz gMTYOQX/ENKbIGQrO9nMnfpEaJJT4XImSPu5lfRWoHcDUXuuxoD2TOpyy2b9PTc9kI7q AeWVXxrsg8BY1XD+9Bn9hybINhst+moHYju+ZMk5kMvJUda8pcl0a0Z4ayd++0kOorrF 4HaA== X-Gm-Message-State: AOJu0Yyw7mMnOXcGqGvdIdFM0kROaH22hk+FNNeYDIZi0wxyljgvkQ+L YjrQ/gkrBmKaqiWPz7oFUUk7h8HnL5B6l7DlI79XWGflG+KsOcBdlAmodpcz1lL59srSej/nVgv 86f0sEgEKlTaYddXr0LCJlArkarwx+li1FlSDzB3ebRDyit8cKwg5bUB66UNpZSZefwkJl3WngZ 6z4fYWuJb/zExU0D56anYMe7awm1QlJjN6wzEf X-Gm-Gg: ASbGncsK/GUhNYkz/oGrAdcqzBH+4NDP4EfcCY4ITN3pTulzx/6SjSdUfmo4pcDZNrD xXEzLmV5GLwpIURz32b+NuvAcoa87xgFsNXGK1n/efgK6Nx6CorZt4qK7RzyZukAR3I3UnIgbrl /8rXM4nD/p0z02m/q+coEdhTVLmvHUlEpT/LcKU9fUm7CFOquy7G5dlFfzKKmrrUE60QlVMR5Wv KTLSOdiMEaNut1LBq4AsETeAh/dG/zX+oH8E6+tp86ijpT98vDoJsObnuvn X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6067061f8f.43.1734597229621; Thu, 19 Dec 2024 00:33:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiEagldsvaItOrlaSC7E7lbqh9Up6o720Ukb43YCjE88wzTVoXQ+ZEPO35x7L8ncb62Tw51w== X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6067027f8f.43.1734597229229; Thu, 19 Dec 2024 00:33:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 37/41] rust: pl011: always use reset() method on registers Date: Thu, 19 Dec 2024 09:32:24 +0100 Message-ID: <20241219083228.363430-38-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597401683116600 For CR, the ugly-ish "0.into()" idiom is already hidden within the reset method. Do not repeat it. For FR, standardize on reset() being equivalent to "*self =3D Self::default= ()" and let reset_fifo toggle only the bits that are related to FIFOs. This commit also reproduces C commit 02b1f7f6192 ("hw/char/pl011: Split RX/TX path of pl011_reset_fifo()", 2024-09-13). Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 23 ++++++++++++++++------- rust/hw/char/pl011/src/lib.rs | 13 +++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 960ee38ed69..f2ee8763d8f 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -262,7 +262,7 @@ pub fn write(&mut self, offset: hwaddr, value: u64) { self.update(); } Ok(RSR) =3D> { - self.receive_status_error_clear =3D 0.into(); + self.receive_status_error_clear.reset(); } Ok(FR) =3D> { // flag writes are ignored @@ -283,7 +283,8 @@ pub fn write(&mut self, offset: hwaddr, value: u64) { if bool::from(self.line_control.fifos_enabled()) ^ bool::from(new_val.fifos_enabled()) { - self.reset_fifo(); + self.reset_rx_fifo(); + self.reset_tx_fifo(); } if self.line_control.send_break() ^ new_val.send_break() { let mut break_enable: c_int =3D new_val.send_break().i= nto(); @@ -442,16 +443,24 @@ pub fn reset(&mut self) { self.read_trigger =3D 1; self.ifl =3D 0x12; self.control.reset(); - self.flags =3D 0.into(); - self.reset_fifo(); + self.flags.reset(); + self.reset_rx_fifo(); + self.reset_tx_fifo(); } =20 - pub fn reset_fifo(&mut self) { + pub fn reset_rx_fifo(&mut self) { self.read_count =3D 0; self.read_pos =3D 0; =20 - /* Reset FIFO flags */ - self.flags.reset(); + // Reset FIFO flags + self.flags.set_receive_fifo_full(false); + self.flags.set_receive_fifo_empty(true); + } + + pub fn reset_tx_fifo(&mut self) { + // Reset FIFO flags + self.flags.set_transmit_fifo_full(false); + self.flags.set_transmit_fifo_empty(true); } =20 pub fn can_receive(&self) -> bool { diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs index d5089f78854..e3eacb0e6b9 100644 --- a/rust/hw/char/pl011/src/lib.rs +++ b/rust/hw/char/pl011/src/lib.rs @@ -230,7 +230,7 @@ pub struct ReceiveStatusErrorClear { impl ReceiveStatusErrorClear { pub fn reset(&mut self) { // All the bits are cleared to 0 on reset. - *self =3D 0.into(); + *self =3D Self::default(); } } =20 @@ -297,19 +297,16 @@ pub struct Flags { =20 impl Flags { pub fn reset(&mut self) { - // After reset TXFF, RXFF, and BUSY are 0, and TXFE and RXFE a= re 1 - self.set_receive_fifo_full(false); - self.set_transmit_fifo_full(false); - self.set_busy(false); - self.set_receive_fifo_empty(true); - self.set_transmit_fifo_empty(true); + *self =3D Self::default(); } } =20 impl Default for Flags { fn default() -> Self { let mut ret: Self =3D 0.into(); - ret.reset(); + // After reset TXFF, RXFF, and BUSY are 0, and TXFE and RXFE a= re 1 + ret.set_receive_fifo_empty(true); + ret.set_transmit_fifo_empty(true); ret } } --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597448; cv=none; d=zohomail.com; s=zohoarc; b=AOLTQjo01uUeey2PZgj20Kmg7iWXTl8ZdKUg9ke3UUfWY6Z/FP6BoLZTevevRsa7DWnHvTeA4aYiLGIqkq5Py14KpzsRq21PhGA/a98WIV/Cly6xDFslGZdzhlOrUbsAnIpkX//QWC3t3awiw40ZMuvJpAHPL4FIgfOpsurVSDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597448; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nXPLw6Fjx2MSrvo34JfpWPClVUh4XC4K5EVI43tzIqo=; b=mhpzG6DimCYyi77+nQq84tlVkqTmxcOffA0mIQjKvi0XDoJE3W3vSwMn3yz5Eebn26sV+arU35a/jiAjbC5IWIuLUMIoIbPWq2CphOFIum0JTksNVPkOV7ru9K0/jA3C0w03gzvRccvxmG1Vz6fKydJMnQlnXM1ulA9u36FhPQY= 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 1734597448058711.9226105053851; Thu, 19 Dec 2024 00:37:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByq-0006wI-Ji; Thu, 19 Dec 2024 03:34:00 -0500 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 1tOByp-0006vN-Lg for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByn-0005Hf-Vf for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:59 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-377-M3KqLv1ANSmHADDiUq9uMQ-1; Thu, 19 Dec 2024 03:33:54 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-385d7611ad3so307664f8f.2 for ; Thu, 19 Dec 2024 00:33:54 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e150sm970982f8f.66.2024.12.19.00.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nXPLw6Fjx2MSrvo34JfpWPClVUh4XC4K5EVI43tzIqo=; b=SatD91oIzzrQ5AA5LSMHH0Y+4pwnfnI15s82n6H6++BmUM/HmSn6KVjB8nWhMlPYuTEPuS VeoWBmD5hBVfUZACg6ft2lOa+TEkjVDhjfx1eaEd3JWBbNbh7eiFavHfzOROMgEp9tVSuN He3l0ZhVMRIVe5SZymPkW3cWeD7pumA= X-MC-Unique: M3KqLv1ANSmHADDiUq9uMQ-1 X-Mimecast-MFC-AGG-ID: M3KqLv1ANSmHADDiUq9uMQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597232; x=1735202032; 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=nXPLw6Fjx2MSrvo34JfpWPClVUh4XC4K5EVI43tzIqo=; b=dqFfYwQcvFyBhwEHFNXgpOhQJ95w11ePmRRjFtkgwpz9a0P/zj7MozB+GQSf6MtZWQ NiyygbLLXu0JoVOnvwrgNZvwSUdn8TzHNlaoVfYmkB7oFwg6t7G/wIkPdtH7T60gEpCQ Q47rfDcOl5pX9oJNmgY4ptlWfrMOpSlxar9TnqKGil/azmwWF40ZsEsQNm4hTIRCADkz 2wJkQJnSENbMdCeHBKvkXCadd1ba+OFaiVagly/yy4MxOnC/gl+/NsSSQR8+dqtTJpzt TC5FTNjgSZpV9NTB4sw7i8C7qBj/35o+OlTQD+ltSwq7q3TnhELdBcSTQ1HWi7iueIqk iIoQ== X-Gm-Message-State: AOJu0Yxlr3iLd1waOFsWbY9njJNXHR8KAYA9H03dH5DSfhgjYqHBjbQF dfFVIgWSnQTmK38q/MEBtmwEJctVe4t3LysczwNWo7VciaUqiC3CT49VQdLy1v2n71ZfWG2Ty7C JZ0T1P0AS9s3TWo0cCw8ThTWOoyxoLUit3YHR2Lyx+qlDPF2b/BH2oJilaPPzv5UyDE7DJ/cveP XlhYsA43Nam+DX9Z/3avk832VlAQGdBEOY4KLi X-Gm-Gg: ASbGncuf1wYWpdC/IAJ9g/28jwAXelzMqk1NiQLYaZ9cU9ufklLCaGVaE6/h0omVflx DdXfdaRHCn4k31AXlXLzHNQsgTupDJj8ftxVBxIbCl4943LmJc9MLa27Kx0RIXteDKA4KhsI5Wj 3D0b81GRsttNy5jmXFLEye6TMfTf6P5nlXPmbEkxLV50G/hvYYCLi4/UCZiyL10GlM9qbbdlLdK EYDy7MOmZku+3T1m2UHYrAJIMWUHJIzoq6y9AcS/+HOae+HD55oxFQDJSJh X-Received: by 2002:a05:6000:1f81:b0:385:e94d:b152 with SMTP id ffacd0b85a97d-388e4d9af78mr5009201f8f.54.1734597232161; Thu, 19 Dec 2024 00:33:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0JY2FVrauI0OcLzl4tIBneuvgAEnUpMI12cxK4eQqLJNHwH9lDeBxhcXY9hLRYfFqiliSkQ== X-Received: by 2002:a05:6000:1f81:b0:385:e94d:b152 with SMTP id ffacd0b85a97d-388e4d9af78mr5009161f8f.54.1734597231687; Thu, 19 Dec 2024 00:33:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 38/41] rust: pl011: fix break errors and definition of Data struct Date: Thu, 19 Dec 2024 09:32:25 +0100 Message-ID: <20241219083228.363430-39-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597449918116600 The Data struct is wrong, and does not show how bits 8-15 of DR are the receive status. Fix it, and use it to fix break errors ("c >> 8" in the C code does not translate to "c.to_be_bytes()[3]"). Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 15 ++++++------ rust/hw/char/pl011/src/lib.rs | 41 ++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index f2ee8763d8f..5e3a9c6f581 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -30,8 +30,6 @@ /// Fractional Baud Rate Divider, `UARTFBRD` const FBRD_MASK: u32 =3D 0x3f; =20 -const DATA_BREAK: u32 =3D 1 << 10; - /// QEMU sourced constant. pub const PL011_FIFO_DEPTH: usize =3D 16_usize; =20 @@ -75,7 +73,7 @@ pub struct PL011State { pub dmacr: u32, pub int_enabled: u32, pub int_level: u32, - pub read_fifo: [u32; PL011_FIFO_DEPTH], + pub read_fifo: [registers::Data; PL011_FIFO_DEPTH], pub ilpr: u32, pub ibrd: u32, pub fbrd: u32, @@ -210,10 +208,11 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint)= -> std::ops::ControlFlow u8::from(self.receive_status_error_clear).into(), Ok(FR) =3D> u16::from(self.flags).into(), @@ -406,7 +405,7 @@ fn loopback_mdmctrl(&mut self) { =20 fn loopback_break(&mut self, enable: bool) { if enable { - self.loopback_tx(DATA_BREAK); + self.loopback_tx(registers::Data::BREAK.into()); } } =20 @@ -470,7 +469,7 @@ pub fn can_receive(&self) -> bool { =20 pub fn event(&mut self, event: QEMUChrEvent) { if event =3D=3D bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.l= oopback_enabled() { - self.put_fifo(DATA_BREAK); + self.put_fifo(registers::Data::BREAK.into()); } } =20 @@ -497,7 +496,7 @@ pub fn put_fifo(&mut self, value: c_uint) { let depth =3D self.fifo_depth(); assert!(depth > 0); let slot =3D (self.read_pos + self.read_count) & (depth - 1); - self.read_fifo[slot] =3D value; + self.read_fifo[slot] =3D registers::Data::from(value); self.read_count +=3D 1; self.flags.set_receive_fifo_empty(false); if self.read_count =3D=3D depth { diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs index e3eacb0e6b9..463ae60543b 100644 --- a/rust/hw/char/pl011/src/lib.rs +++ b/rust/hw/char/pl011/src/lib.rs @@ -139,6 +139,21 @@ pub mod registers { //! unused thus treated as zero when read or written. use bilge::prelude::*; =20 + /// Receive Status Register / Data Register common error bits + /// + /// The `UARTRSR` register is updated only when a read occurs + /// from the `UARTDR` register with the same status information + /// that can also be obtained by reading the `UARTDR` register + #[bitsize(8)] + #[derive(Clone, Copy, Default, DebugBits, FromBits)] + pub struct Errors { + pub framing_error: bool, + pub parity_error: bool, + pub break_error: bool, + pub overrun_error: bool, + _reserved_unpredictable: u4, + } + // TODO: FIFO Mode has different semantics /// Data Register, `UARTDR` /// @@ -181,16 +196,18 @@ pub mod registers { /// /// # Source /// ARM DDI 0183G 3.3.1 Data Register, UARTDR - #[bitsize(16)] - #[derive(Clone, Copy, DebugBits, FromBits)] + #[bitsize(32)] + #[derive(Clone, Copy, Default, DebugBits, FromBits)] #[doc(alias =3D "UARTDR")] pub struct Data { - _reserved: u4, pub data: u8, - pub framing_error: bool, - pub parity_error: bool, - pub break_error: bool, - pub overrun_error: bool, + pub errors: Errors, + _reserved: u16, + } + + impl Data { + // bilge is not very const-friendly, unfortunately + pub const BREAK: Self =3D Self { value: 1 << 10 }; } =20 // TODO: FIFO Mode has different semantics @@ -220,14 +237,14 @@ pub struct Data { #[bitsize(8)] #[derive(Clone, Copy, DebugBits, FromBits)] pub struct ReceiveStatusErrorClear { - pub framing_error: bool, - pub parity_error: bool, - pub break_error: bool, - pub overrun_error: bool, - _reserved_unpredictable: u4, + pub errors: Errors, } =20 impl ReceiveStatusErrorClear { + pub fn set_from_data(&mut self, data: Data) { + self.set_errors(data.errors()); + } + pub fn reset(&mut self) { // All the bits are cleared to 0 on reset. *self =3D Self::default(); --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597515; cv=none; d=zohomail.com; s=zohoarc; b=B//Yn6JJ+KCqGUmPfsvx6/BsDw6yGsvRnL9X7XRVG+acZQZo4K7ornYmeTIYlR90HxvQ8ebuODmXRlGWrvUZjtaWFSJgEohmGDOWM2aer0z7l1HQWIPVlUVYA0WtlQQ0lai+x/K0ykVDXt/KlI1atRgVUJZEosCyaZnqziaB6Hw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597515; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j8Hmi+GykNL3FXbMwL0qg3+bnuuJSORXl/Ac00UuXSo=; b=Z0nu2547TLEqTZcuXeRdbXzYr0H2qjupcCUFh7AdPOGmSr1pUxdgrd4fmwhoXlJ4/AFajEQ+H1USwdgxZ4RrEcQ+7PbtVw7SHN+LHiyQWnMU+79pCe9XD1nP6D2Xj5skl0x41oCX8+V8iglXgc67ruix0eBsv9+3JiVV3sQfH7s= 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 1734597515759639.5407395036243; Thu, 19 Dec 2024 00:38:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByt-0007BZ-9j; Thu, 19 Dec 2024 03:34:03 -0500 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 1tOByr-00070S-Qj for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByp-0005Ht-Sc for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:01 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-45JvSyWDOSa7ZlZJ9marNg-1; Thu, 19 Dec 2024 03:33:57 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3878ad4bf8cso319783f8f.1 for ; Thu, 19 Dec 2024 00:33:57 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8a6e19sm972226f8f.100.2024.12.19.00.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j8Hmi+GykNL3FXbMwL0qg3+bnuuJSORXl/Ac00UuXSo=; b=MF0GdCkV0HIFN+s6JXan9nXV2allKhBfM5FZ2ugdDbuDsaYf+zB27J53SDFanBZrOJ4Bmz UpcT2EQCp21Iqp7NAJkfKcI1b6B1/FbuoyapeXmefQJN55LRqObBWP4b6WSpiUtOqkFARt 8WKKgAo+HQUBgMuoexDq/QjIMjgDwQw= X-MC-Unique: 45JvSyWDOSa7ZlZJ9marNg-1 X-Mimecast-MFC-AGG-ID: 45JvSyWDOSa7ZlZJ9marNg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597235; x=1735202035; 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=j8Hmi+GykNL3FXbMwL0qg3+bnuuJSORXl/Ac00UuXSo=; b=RXcHtrLfzF0WjyGcjYyvrez7jqT+qdHEIQcoNU6LJ0O8MmFtmRaQ+tOjW5S2FjVyOC 9p9RLBkcw7smzlriYkz0s02qURbh9qsnflfVjfRSRnYZxkvLb2Jo5GazYveB1Qgom2k8 zNie2M8FNb3lK3wf+3V977mZj8at8SPg0pvzROWv1tciAZ0u8cKdlEbkjfQf7Sb+2GBF d9MsRFC8R61D+8B+12RxKXgbhLtDYk/sED7WKbln43QthV/lPH+WhyBDro1Odo7UemyI WYuStZOdpBDZfxpD0WFY3Q/WMhIFmym7pKW67APQyIufFetRiYLDsfI3OlPVY1iaXYEA k8OQ== X-Gm-Message-State: AOJu0YyD7Wa4DI+tlCQyWUmvZuXzFdendG3EQFIq8jQT3698Parxt5cp S2ybB1cEWzAqj6pXZ3zw+IITcZ4Scm58IFxE+ZyiuQzQS759vOPHDuxwjD2hfprSjLD8217oPpy kWCnNKNGcLTX6KgQwoe2FIj8IofMHaakD8aq+oel1hxqkUmqm/nSBrg8TpxkO4NvRUq2FR6bcaO ilHa5S9Qc9ZVid0BSXU2K76WBYIN5enpIFxex0 X-Gm-Gg: ASbGnctbwmmuUxRxxf6vSL8ZJuYPue0tvkc91KaudKw/8+NwGTjtUv41O7A6i7Sfg83 iE5CQyUdb6PeVJjsGUof3UbG+VLEvPKU2yVmpzmXOjj8UcqHrI6MjlgjzEaON3hQGiajxu4a1rS fxFE9CFjT+p5QpkJUuPq/wlpeXQUOdNBPoqgUJvwhREqwn89R3puq2+hgiIcWyfXSl7o/3LUjXR 9K4Loet00EqIoVxU5X7/GrlgkTGPEqGwamNh5YiZNw/RKsIKAvojsGAj1L5 X-Received: by 2002:a5d:584c:0:b0:385:ea11:dd92 with SMTP id ffacd0b85a97d-388e4d42bf8mr5551473f8f.15.1734597235189; Thu, 19 Dec 2024 00:33:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGH7Knlh0i/Tn3orSfT+92gKRmkMzrdmN+3cbZnV6bfuhrz37LsZXrx4DiOgTBM2zyruBOx1Q== X-Received: by 2002:a5d:584c:0:b0:385:ea11:dd92 with SMTP id ffacd0b85a97d-388e4d42bf8mr5551438f8f.15.1734597234665; Thu, 19 Dec 2024 00:33:54 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 39/41] rust: pl011: extend registers to 32 bits Date: Thu, 19 Dec 2024 09:32:26 +0100 Message-ID: <20241219083228.363430-40-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597516234116600 The PL011 Technical Reference Manual lists the "real" size of the registers in table 3-1, and only rounds up to the next byte when describing the registers; for example, UARTDR is listed as having width 12/8 (12 bits read, 8 written) and only bits 15:0 are listed in "Table 3-2 UARTDR Register". However, in practice these are 32-bit registers, accessible only through 32-bit MMIO accesses; preserving the fiction that they're smaller introduces multiple casts (to go from the bilge bitfield type to e.g u16 to u64) and more importantly it breaks the migration stream because the Rust vmstate macros are not yet type safe. So, just make everything 32-bits wide. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 36 ++++++++++++++------------------ rust/hw/char/pl011/src/lib.rs | 23 +++++++++----------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 5e3a9c6f581..090e5d64504 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -186,9 +186,9 @@ unsafe fn init(&mut self) { pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::Con= trolFlow { use RegisterOffset::*; =20 - std::ops::ControlFlow::Break(match RegisterOffset::try_from(offset= ) { + let value =3D match RegisterOffset::try_from(offset) { Err(v) if (0x3f8..0x400).contains(&(v >> 2)) =3D> { - u64::from(self.device_id[(offset - 0xfe0) >> 2]) + u32::from(self.device_id[(offset - 0xfe0) >> 2]) } Err(_) =3D> { // qemu_log_mask(LOG_GUEST_ERROR, "pl011_read: Bad offset = 0x%x\n", (int)offset); @@ -214,27 +214,25 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint)= -> std::ops::ControlFlow u8::from(self.receive_status_error_clear).into(), - Ok(FR) =3D> u16::from(self.flags).into(), - Ok(FBRD) =3D> self.fbrd.into(), - Ok(ILPR) =3D> self.ilpr.into(), - Ok(IBRD) =3D> self.ibrd.into(), - Ok(LCR_H) =3D> u16::from(self.line_control).into(), - Ok(CR) =3D> { - // We exercise our self-control. - u16::from(self.control).into() - } - Ok(FLS) =3D> self.ifl.into(), - Ok(IMSC) =3D> self.int_enabled.into(), - Ok(RIS) =3D> self.int_level.into(), - Ok(MIS) =3D> u64::from(self.int_level & self.int_enabled), + Ok(RSR) =3D> u32::from(self.receive_status_error_clear), + Ok(FR) =3D> u32::from(self.flags), + Ok(FBRD) =3D> self.fbrd, + Ok(ILPR) =3D> self.ilpr, + Ok(IBRD) =3D> self.ibrd, + Ok(LCR_H) =3D> u32::from(self.line_control), + Ok(CR) =3D> u32::from(self.control), + Ok(FLS) =3D> self.ifl, + Ok(IMSC) =3D> self.int_enabled, + Ok(RIS) =3D> self.int_level, + Ok(MIS) =3D> self.int_level & self.int_enabled, Ok(ICR) =3D> { // "The UARTICR Register is the interrupt clear register a= nd is write-only" // Source: ARM DDI 0183G 3.3.13 Interrupt Clear Register, = UARTICR 0 } - Ok(DMACR) =3D> self.dmacr.into(), - }) + Ok(DMACR) =3D> self.dmacr, + }; + std::ops::ControlFlow::Break(value.into()) } =20 pub fn write(&mut self, offset: hwaddr, value: u64) { @@ -276,7 +274,6 @@ pub fn write(&mut self, offset: hwaddr, value: u64) { self.fbrd =3D value; } Ok(LCR_H) =3D> { - let value =3D value as u16; let new_val: registers::LineControl =3D value.into(); // Reset the FIFO state on FIFO enable or disable if bool::from(self.line_control.fifos_enabled()) @@ -303,7 +300,6 @@ pub fn write(&mut self, offset: hwaddr, value: u64) { } Ok(CR) =3D> { // ??? Need to implement the enable bit. - let value =3D value as u16; self.control =3D value.into(); self.loopback_mdmctrl(); } diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs index 463ae60543b..0747e130cae 100644 --- a/rust/hw/char/pl011/src/lib.rs +++ b/rust/hw/char/pl011/src/lib.rs @@ -131,12 +131,6 @@ const fn _assert_exhaustive(val: RegisterOffset) { pub mod registers { //! Device registers exposed as typed structs which are backed by arbi= trary //! integer bitmaps. [`Data`], [`Control`], [`LineControl`], etc. - //! - //! All PL011 registers are essentially 32-bit wide, but are typed her= e as - //! bitmaps with only the necessary width. That is, if a struct bitmap - //! in this module is for example 16 bits long, it should be conceived - //! as a 32-bit register where the unmentioned higher bits are always - //! unused thus treated as zero when read or written. use bilge::prelude::*; =20 /// Receive Status Register / Data Register common error bits @@ -234,10 +228,11 @@ impl Data { /// # Source /// ARM DDI 0183G 3.3.2 Receive Status Register/Error Clear Register, /// UARTRSR/UARTECR - #[bitsize(8)] + #[bitsize(32)] #[derive(Clone, Copy, DebugBits, FromBits)] pub struct ReceiveStatusErrorClear { pub errors: Errors, + _reserved_unpredictable: u24, } =20 impl ReceiveStatusErrorClear { @@ -257,7 +252,7 @@ fn default() -> Self { } } =20 - #[bitsize(16)] + #[bitsize(32)] #[derive(Clone, Copy, DebugBits, FromBits)] /// Flag Register, `UARTFR` #[doc(alias =3D "UARTFR")] @@ -309,7 +304,7 @@ pub struct Flags { pub transmit_fifo_empty: bool, /// `RI`, is `true` when `nUARTRI` is `LOW`. pub ring_indicator: bool, - _reserved_zero_no_modify: u7, + _reserved_zero_no_modify: u23, } =20 impl Flags { @@ -328,7 +323,7 @@ fn default() -> Self { } } =20 - #[bitsize(16)] + #[bitsize(32)] #[derive(Clone, Copy, DebugBits, FromBits)] /// Line Control Register, `UARTLCR_H` #[doc(alias =3D "UARTLCR_H")] @@ -382,8 +377,8 @@ pub struct LineControl { /// the PEN bit disables parity checking and generation. See Table= 3-11 /// on page 3-14 for the parity truth table. pub sticky_parity: bool, - /// 15:8 - Reserved, do not modify, read as zero. - _reserved_zero_no_modify: u8, + /// 31:8 - Reserved, do not modify, read as zero. + _reserved_zero_no_modify: u24, } =20 impl LineControl { @@ -454,7 +449,7 @@ pub enum WordLength { /// /// # Source /// ARM DDI 0183G, 3.3.8 Control Register, `UARTCR`, Table 3-12 - #[bitsize(16)] + #[bitsize(32)] #[doc(alias =3D "UARTCR")] #[derive(Clone, Copy, DebugBits, FromBits)] pub struct Control { @@ -532,6 +527,8 @@ pub struct Control { /// CTS hardware flow control is enabled. Data is only transmitted= when /// the `nUARTCTS` signal is asserted. pub cts_hardware_flow_control_enable: bool, + /// 31:16 - Reserved, do not modify, read as zero. + _reserved_zero_no_modify2: u16, } =20 impl Control { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597433; cv=none; d=zohomail.com; s=zohoarc; b=TwzyrYjPaqcEEYvdivj7hRTiL6TWndQPByv66EEAcBoSKrsZ18PIbRRBQOgH2Vzk8zOSfULY6LFaZIvtGGGFxBYT3r1S7dJiTvjJtjFYt65dOMiEqIs7Br1Qw25BZNvQdjf7qzZ2skfk+7vOvK5tntEY2tZ9kCRJvg7gJIg/Yxw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597433; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U+S3jYqRgwAQ1T9HC2IL/MfLkL7BjAjJkf+HWEFlTLA=; b=NmmIbh2XQZiD3+6R5TR/JFyw8LZwR4eK2sy9cQXpchuxpEiGNZfcrudM4yWDMPdsxhCD6OUW+EqCptzMNN1l8fxcxWrEEfd+xPcgk7yN7UbuuRyyCxEzzBKh8Ds1KnpbBZFu+GhpZQntza52pi/b8uqQvI0A6ZJ3RehtjYctuq8= 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 1734597433240789.6369725996885; Thu, 19 Dec 2024 00:37:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByu-0007Gx-6c; Thu, 19 Dec 2024 03:34:04 -0500 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 1tOByr-00070x-Vt for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByq-0005I2-9L for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:01 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-at6QnB2jNGCoK7TnqPqeww-1; Thu, 19 Dec 2024 03:33:58 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4362f893bfaso2906595e9.1 for ; Thu, 19 Dec 2024 00:33:58 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c493sm10990055e9.28.2024.12.19.00.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U+S3jYqRgwAQ1T9HC2IL/MfLkL7BjAjJkf+HWEFlTLA=; b=WypAOm3ZCnMOgXxtYJGzARGySAQao+5X2Xzmw6bg+rIXDlyVjQze4uqfzZZ2uy0KX04gC5 JjUjRdOgfqqVqvD2Xkn6vlOoDTHt+4G223m/+NR1Kzn5FzoOnUrFzv8vuA9OQOMKvrTwIV xVnNfgIonJuwW6CF8FsDOxKitSd62Ps= X-MC-Unique: at6QnB2jNGCoK7TnqPqeww-1 X-Mimecast-MFC-AGG-ID: at6QnB2jNGCoK7TnqPqeww X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597236; x=1735202036; 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=U+S3jYqRgwAQ1T9HC2IL/MfLkL7BjAjJkf+HWEFlTLA=; b=WHJmUxvV4VtVA6Kocsv+fMM/9WOR4yUY0tSOvYZoNE/bAqfCd2uP8BW6DEHnz3FCcD UASkpAH9aVGBeLqS60U41Bx2fsd+UhWxcy8M72D5QaIcB8oSJ9wIuIVb3rKWsxoD1Xj/ VmdMe0TDIExWJCVRIQ549bhRIfsd2Rinrn8LlMts+tLeGXj7KaxU623BoD4NHENBntwh 0iQ4TOfqFnG8UMdfZ/DtL4ubMGda2apIcLvj9bz6ClsKcN1KVulVOZlc1Dqy9xZ0pdnr /upeANIxBP3yfGb0uB2IjDUSkqaR5SpyBpiajPosaxlNCibdddPS/zRNi3Jh4Zq8/Lfn 96XA== X-Gm-Message-State: AOJu0Yx7edM837mzpE+RYyZy2eAM8ZPk436kptc5Wa3TeTZxE0fs6wcr w8pzdCbajgOwR7DPkFJKYXXGPURNSwGjNjbjRTVDM5LWgcEd9+bDZikTKcOd9hmfGJBMtGIUkZl JluV14aPSYtVck/ACZ97V2imPoj4zeByLXSkXLoUIHsCzX2SdCUaR03Q4ZRjvDuIGKQH1M8jpup WTBuPIilFLgYvinSscnD8C6QaDFtqvoiUSyPRU X-Gm-Gg: ASbGncsz0wb8JJDEEmiD9qGCIVybAH71sYD8ls+/3tMdd2LZjburoQj5UL17OMTAkNe J13/1uXllD90Qj7b7/4zx/tro3v6hlUcoCzv9iyu4herrnAHN5n/BUcJHNoysMW7XR/3WtGPS99 GHZgo1qMgVfq4CkkpQsHhrjCe8l4ULWdk8NeUxJWcFjGTmDvci0MruHpJ8E7NPu6DjfLtxcSd4f gPw1FWNuCycTSz+m7ML/1ZkC41dd5zRA4GRk5MUp+qFz9SE2QiBp/nR56iA X-Received: by 2002:a5d:64ad:0:b0:386:4a0d:bb21 with SMTP id ffacd0b85a97d-388e4d65d0dmr4627776f8f.22.1734597236252; Thu, 19 Dec 2024 00:33:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFM1AtXbKz73wxXgesHASBpqMGQ97i3i/Tbv+mU2IvhyozYT/k0oF9ppraZFqb8AJLAu1v3/A== X-Received: by 2002:a5d:64ad:0:b0:386:4a0d:bb21 with SMTP id ffacd0b85a97d-388e4d65d0dmr4627746f8f.22.1734597235793; Thu, 19 Dec 2024 00:33:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 40/41] rust: pl011: fix migration stream Date: Thu, 19 Dec 2024 09:32:27 +0100 Message-ID: <20241219083228.363430-41-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597433869116600 Content-Type: text/plain; charset="utf-8" The Rust vmstate macros lack the type-safety of their C equivalents (so safe, much abstraction), and therefore they were predictably wrong. The registers have already been changed to 32-bits in the previous patch, but read_pos/read_count/read_trigger also have to be u32 instead of usize. The easiest way to do so is to let the FIFO use u32 indices instead of usize. My plan for making VMStateField typesafe is to have a trait to retrieve a basic VMStateField; for example something like vmstate_uint32 would become an implementation of the VMState trait on u32. Then you'd write something like "vmstate_of!(Type, field).with_version_id(2)". That is, vmstate_of retrieves the basic VMStateField and fills in the offset, and then more changes can be applied on top. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 38 ++++++++++++++++++++++---- rust/hw/char/pl011/src/device_class.rs | 10 +++---- rust/qemu-api/src/vmstate.rs | 22 --------------- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 090e5d64504..4d620b442ed 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -31,7 +31,7 @@ const FBRD_MASK: u32 =3D 0x3f; =20 /// QEMU sourced constant. -pub const PL011_FIFO_DEPTH: usize =3D 16_usize; +pub const PL011_FIFO_DEPTH: u32 =3D 16; =20 #[derive(Clone, Copy, Debug)] enum DeviceId { @@ -56,6 +56,32 @@ impl DeviceId { const PL011_ID_LUMINARY: [c_uchar; 8] =3D [0x11, 0x00, 0x18, 0x01, 0x0= d, 0xf0, 0x05, 0xb1]; } =20 +// FIFOs use 32-bit indices instead of usize, for compatibility with +// the migration stream produced by the C version of this device. +#[repr(transparent)] +#[derive(Debug, Default)] +pub struct Fifo([registers::Data; PL011_FIFO_DEPTH as usize]); + +impl Fifo { + const fn len(&self) -> u32 { + self.0.len() as u32 + } +} + +impl std::ops::IndexMut for Fifo { + fn index_mut(&mut self, idx: u32) -> &mut Self::Output { + &mut self.0[idx as usize] + } +} + +impl std::ops::Index for Fifo { + type Output =3D registers::Data; + + fn index(&self, idx: u32) -> &Self::Output { + &self.0[idx as usize] + } +} + #[repr(C)] #[derive(Debug, qemu_api_macros::Object, qemu_api_macros::offsets)] /// PL011 Device Model in QEMU @@ -73,14 +99,14 @@ pub struct PL011State { pub dmacr: u32, pub int_enabled: u32, pub int_level: u32, - pub read_fifo: [registers::Data; PL011_FIFO_DEPTH], + pub read_fifo: Fifo, pub ilpr: u32, pub ibrd: u32, pub fbrd: u32, pub ifl: u32, - pub read_pos: usize, - pub read_count: usize, - pub read_trigger: usize, + pub read_pos: u32, + pub read_count: u32, + pub read_trigger: u32, #[doc(alias =3D "chr")] pub char_backend: CharBackend, /// QEMU interrupts @@ -480,7 +506,7 @@ pub fn loopback_enabled(&self) -> bool { } =20 #[inline] - pub fn fifo_depth(&self) -> usize { + pub fn fifo_depth(&self) -> u32 { // Note: FIFO depth is expected to be power-of-2 if self.fifo_enabled() { return PL011_FIFO_DEPTH; diff --git a/rust/hw/char/pl011/src/device_class.rs b/rust/hw/char/pl011/sr= c/device_class.rs index 975c3d42be7..7f3ca895071 100644 --- a/rust/hw/char/pl011/src/device_class.rs +++ b/rust/hw/char/pl011/src/device_class.rs @@ -6,8 +6,8 @@ use std::os::raw::{c_int, c_void}; =20 use qemu_api::{ - bindings::*, c_str, vmstate_clock, vmstate_fields, vmstate_int32, vmst= ate_subsections, - vmstate_uint32, vmstate_uint32_array, vmstate_unused, zeroable::Zeroab= le, + bindings::*, c_str, vmstate_clock, vmstate_fields, vmstate_subsections= , vmstate_uint32, + vmstate_uint32_array, vmstate_unused, zeroable::Zeroable, }; =20 use crate::device::{PL011State, PL011_FIFO_DEPTH}; @@ -64,9 +64,9 @@ extern "C" fn pl011_post_load(opaque: *mut c_void, versio= n_id: c_int) -> c_int { vmstate_uint32!(ibrd, PL011State), vmstate_uint32!(fbrd, PL011State), vmstate_uint32!(ifl, PL011State), - vmstate_int32!(read_pos, PL011State), - vmstate_int32!(read_count, PL011State), - vmstate_int32!(read_trigger, PL011State), + vmstate_uint32!(read_pos, PL011State), + vmstate_uint32!(read_count, PL011State), + vmstate_uint32!(read_trigger, PL011State), }, subsections: vmstate_subsections! { VMSTATE_PL011_CLOCK diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index 25c68b703ea..63c897abcdf 100644 --- a/rust/qemu-api/src/vmstate.rs +++ b/rust/qemu-api/src/vmstate.rs @@ -106,28 +106,6 @@ macro_rules! vmstate_uint32 { }}; } =20 -#[doc(alias =3D "VMSTATE_INT32_V")] -#[macro_export] -macro_rules! vmstate_int32_v { - ($field_name:ident, $struct_name:ty, $version_id:expr) =3D> {{ - $crate::vmstate_single!( - $field_name, - $struct_name, - $version_id, - ::core::ptr::addr_of!($crate::bindings::vmstate_info_int32), - ::core::mem::size_of::() - ) - }}; -} - -#[doc(alias =3D "VMSTATE_INT32")] -#[macro_export] -macro_rules! vmstate_int32 { - ($field_name:ident, $struct_name:ty) =3D> {{ - $crate::vmstate_int32_v!($field_name, $struct_name, 0) - }}; -} - #[doc(alias =3D "VMSTATE_ARRAY")] #[macro_export] macro_rules! vmstate_array { --=20 2.47.1 From nobody Mon Dec 23 19:47:09 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1734597449; cv=none; d=zohomail.com; s=zohoarc; b=FNDIx5IGVDCSeYxVlLXDwj9K6lHRUsZraeBhaFChAgHZ6S0Hcvw72o/+xB+o52Pl/vE3V+nnttUB/gATDQ4Lv65ytqoaAo4dI4l098GtMezPFw3YWjU3RjIDE1V6mfezH/DiL0Xag16KzfarW8d0kB95KHqLtZcUSiwP41ZHrrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597449; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qa8Jvk5XtGFb7kM38ZNsMvSHVR2vxrvQofjqZy1g3DU=; b=n7RodvneFJLeJgO9slDdlqHl90mf9qdeheBxlLYnE2klyi0zTHiJZ0HDWLeKWbvlu3ChqUjd1/Juw5tNGPAmbqumjt3jtVw8VtVEIDfghfWbaB3DXDIvTiK2+37sxsyKVudvkf14zzqpB+0+B5DrS25yLe5X/fEO7JpCblloCEI= 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 1734597449564440.04690049639294; Thu, 19 Dec 2024 00:37:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByy-0007hM-27; Thu, 19 Dec 2024 03:34:08 -0500 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 1tOByv-0007Qr-JV for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByu-0005Il-1z for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:34:05 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-114-L_PL5zvBPfy9aJQIqNJoHg-1; Thu, 19 Dec 2024 03:34:01 -0500 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43621907030so4126805e9.1 for ; Thu, 19 Dec 2024 00:34:01 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656af6c4esm45213695e9.4.2024.12.19.00.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qa8Jvk5XtGFb7kM38ZNsMvSHVR2vxrvQofjqZy1g3DU=; b=e97Xjnscg6nHZT9bb+dU7iqKvJRSnstPIWfmtW63bPApIRlc9oYN0djdxpS/m7oaP9Wd7L yjV+DTxOGuHbxaDZtXROwJT9unOckf9VTwIXpJEKdA0AjPm+xWAdMlnJ8Z914cOatKbBo4 AtoxgHbSB230wlhGr3PREfoSm4eumTY= X-MC-Unique: L_PL5zvBPfy9aJQIqNJoHg-1 X-Mimecast-MFC-AGG-ID: L_PL5zvBPfy9aJQIqNJoHg X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597239; x=1735202039; 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=qa8Jvk5XtGFb7kM38ZNsMvSHVR2vxrvQofjqZy1g3DU=; b=CGTzJ/3gMVpEL66kFz51dnLsSc9INfrxLabVdeFMuMLvj+mdxBbxuchok1/6ynfEZ7 iPZcmB8r1KV3QKl9UyDEe2jbO6Iw0dTqhnmonxfhl78Bkm779VUs6WPb2p+ihDYGZFl8 bZDjc0PySy0dVK104blSpMSfPzFnEPJ19eVBzLG0fM1G+IIhkOu5Er8yTEBSjw+Vw6Vb H29TT51mjPppOH4zO9K1HzVGVHw/JjCCZjlwAODOZ8jqGBIvPa+J/TvuBQBVA8pSUlAg 5v9kZs453qVTRKviRI6tnPM0V6NSb2xzC4Jcyd3gKMb+6LVd6Fe7/7WEPJ3PiisbbYSZ Ncww== X-Gm-Message-State: AOJu0YxcUbO645ATjICzJd1KTa1UarPpyAMmCBkLb50c5l8ulkzhsyZm JbMDxgNSgpCzpr2W+ZOFc7xpKhn12RRGCQtNklRc4Y/Wj4+4zrzLjxc+s2ndoSA/er+l/4v1KZf 2hM6CLLjOByKfNjLeFrQ4QzCRXxJTDUEArTtGYMc4msoCooIEO8XcCTqwbUercTuT5KdwXmye5d 3uwEbFBxremRI2JwwZJMJaHWPAdxmE2YeUSUr3 X-Gm-Gg: ASbGncu+/9JWOjuQv+GGgkd1E+JuRWyoDNhNl72jbdWiZ/6GdCcxLWYDn1K5SyQH9iI KOsAWkAEtLsAX4hvEMMTQrpERNJnwjvZcL4h2DdEHhcMqohPJ9t5/HH1ghVoFLFYYHcMeMeNHZn hww09WkUgccWANGWdV4dhLZSx9Hgpahgd7FSbVZHp/JZWH9Aw9l2XHGYi+7soUGvoZ6T6PPBTBu O8aIbZF5rBxFbnsmJo66Pieg5gqKAhrwjc0+J8bmYzrxbBtHlnwloq6AnED X-Received: by 2002:a05:600c:46c9:b0:432:d735:cc71 with SMTP id 5b1f17b1804b1-4365c7c8eb7mr16230625e9.25.1734597239049; Thu, 19 Dec 2024 00:33:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF45Ik7RTEUR17b+ZfqI4y/Tc3WtLm5baMZZoY7kwAtEbBTIdaxeia4hBTRioVAThkNx5aaQw== X-Received: by 2002:a05:600c:46c9:b0:432:d735:cc71 with SMTP id 5b1f17b1804b1-4365c7c8eb7mr16230445e9.25.1734597238677; Thu, 19 Dec 2024 00:33:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 41/41] rust: pl011: simplify handling of the FIFO enabled bit in LCR Date: Thu, 19 Dec 2024 09:32:28 +0100 Message-ID: <20241219083228.363430-42-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @redhat.com) X-ZM-MESSAGEID: 1734597449828116600 Use =3D=3D/!=3D instead of going through bool and xor. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 6 ++---- rust/hw/char/pl011/src/lib.rs | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi= ce.rs index 4d620b442ed..18cc122951d 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -302,9 +302,7 @@ pub fn write(&mut self, offset: hwaddr, value: u64) { Ok(LCR_H) =3D> { let new_val: registers::LineControl =3D value.into(); // Reset the FIFO state on FIFO enable or disable - if bool::from(self.line_control.fifos_enabled()) - ^ bool::from(new_val.fifos_enabled()) - { + if self.line_control.fifos_enabled() !=3D new_val.fifos_en= abled() { self.reset_rx_fifo(); self.reset_tx_fifo(); } @@ -497,7 +495,7 @@ pub fn event(&mut self, event: QEMUChrEvent) { =20 #[inline] pub fn fifo_enabled(&self) -> bool { - matches!(self.line_control.fifos_enabled(), registers::Mode::FIFO) + self.line_control.fifos_enabled() =3D=3D registers::Mode::FIFO } =20 #[inline] diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs index 0747e130cae..69064d6929b 100644 --- a/rust/hw/char/pl011/src/lib.rs +++ b/rust/hw/char/pl011/src/lib.rs @@ -419,12 +419,6 @@ pub enum Mode { FIFO =3D 1, } =20 - impl From for bool { - fn from(val: Mode) -> Self { - matches!(val, Mode::FIFO) - } - } - #[bitsize(2)] #[derive(Clone, Copy, Debug, Eq, FromBits, PartialEq)] /// `WLEN` Word length, field of [Line Control register](LineControl). --=20 2.47.1