From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211388; cv=none; d=zohomail.com; s=zohoarc; b=J3jBC3tp6M9GUKW5rlnZMLQ4/mqfRbs5P70r/Ddqhc42NZsw7W9D4EsU8Mq4HlJsBk4T7GOdhbuQZILiicOa7ahnVSe43X3IZBnfT6O+/4NKjMHDTvltKx82Nf1QZkv3NRPwPDEaVEFQYP5DSyWO5WalXuNb9IhqsfXNHE9E59w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211388; 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=Tq1no4zLUXdoN946mvZQOg7mW5BofsuZu3/728V7b3Q=; b=E8nezZIQG62NJqDRfB1akMEbYqDrCTFGBbhbQikvDzV+ZSMds/RN88iH/YLlLUr8WKJQNptVc43yaEbQ7/d33UtpGR2fnYcfasB9f1BwSchS2WqUylURQjPpqs9dXTf0QZFGNH7P9c7sjnG7oC9ao1BWrG+Afnos2dPEQQThrkI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211387979456.4331167413585; Wed, 14 May 2025 01:29:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7U9-0006f4-Gy; Wed, 14 May 2025 04:29:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U6-0006XB-5d; Wed, 14 May 2025 04:29:02 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U4-0006Fs-9b; Wed, 14 May 2025 04:29:01 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:28:57 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:28:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211340; x=1778747340; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FdOAj36KJleXLSX45p4llvGBDxu8kaQ/Flsl3wc8shs=; b=iLrHonJUpnw3kw7EY9b7kSHsgLmcRwFMdkFRWeFLWn6UzwtBwXuwUvJz mLp8hFYmyDkuEYeWEoqJGgdoPKNuEewBiHgYJC/5x+LJPYOxr68zlPlTI QlAEQP7GBrPBnUFNCOmX180PjvJVY98o/iSsfQryZfqjWxrWk7S3dxB0W /d/KDsoN9dEryNA9wvQUTMwGGGC10PqYsY/rJbWV9Pn7RQGgNueN7I7MZ V4c60IM5JUnrgXAGJINr1HG626tFGM4Fqc79Qs3PeUhtP9gyyd4aCHqP+ riZBxRjAqguYhC62op8XmgJSBZ0HbQGkJpgE8LIsGpV33D/0s2w9RPHC7 Q==; X-CSE-ConnectionGUID: +6YZbp5OTtqtf39B9lBKqw== X-CSE-MsgGUID: QJEqJfR3T1Wl/Lc/6TcA/Q== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505568" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505568" X-CSE-ConnectionGUID: hYjjzZBxQmu2mNLdCbMYEw== X-CSE-MsgGUID: sqcoE+Y6RqGv6+Je+l2zPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065806" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu Subject: [PATCH 1/9] qom/object: Improve the doc of macros related with simple type Date: Wed, 14 May 2025 16:49:49 +0800 Message-Id: <20250514084957.2221975-2-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211390010019000 There're 2 changes: - For OBJECT_DECLARE_SIMPLE_TYPE: Since a clase may not only has virtual method, but also field, thus mention when class is not needed for either, then there is no need to have the class. - For OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES: And the words like OBJECT_DEFINE_SIMPLE_TYPE about when the type is declared by OBJECT_DECLARE_SIMPLE_TYPE, then user should consider to define the type via OBJECT_DEFINE_SIMPLE_TYPE or OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES. Cc: Paolo Bonzini Cc: "Daniel P. Berrang=C3=A9" Cc: Eduardo Habkost Signed-off-by: Zhao Liu --- include/qom/object.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 1d5b03372429..14f84ae454d3 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -249,7 +249,7 @@ struct Object * declared. * * This macro should be used unless the class struct needs to have - * virtual methods declared. + * virtual methods or fields declared. */ #define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, MODULE_OBJ_NAME) \ typedef struct InstanceType InstanceType; \ @@ -402,7 +402,8 @@ struct Object * * This is a variant of OBJECT_DEFINE_TYPE_EXTENDED, which is suitable for * the case of a non-abstract type, with interfaces, and with no requireme= nt - * for a class struct. + * for a class struct. If you declared your type with OBJECT_DECLARE_SIMPL= E_TYPE + * then this is probably the right choice for defining it. */ #define OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(ModuleObjName, \ module_obj_name, \ --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211369; cv=none; d=zohomail.com; s=zohoarc; b=Thg6nd3t1pQ5T4IYBB5zgg0Im/YhH1ByBUpgs35OgLRP5v9xfEZ2Bfdw2+z+dLKsbENsg9LFdXQsUFEu7T2W/bjE1rJexlTepq8izAhsCXX4BVnA24BrE46AlWv+48V2Mca239c4gdZ4x+rI61yJWDO40zp8FYaKxj3S73dMzoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211369; 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=QASDYSbh0p1PahQplPmRM0J/wXaMDC9+WTXXp5g8qFY=; b=hEiCsmOWDfN+RyQQofPS/ZegeCnVfBkKwZKzgoLGvlzXXQYWBM5R3AuV50EPGJQj/cklQSAtwoA5qqX7GqXyWNjrfCRendgJTr48iNRZjEx4KGTxVBHaj43n0J1QHhX4FzTDHG5bsxItcJ5r+Y3o2vh6Oodt0z/PwHjq5bSzQks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211369140333.4244336316485; Wed, 14 May 2025 01:29:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7U9-0006fq-Sn; Wed, 14 May 2025 04:29:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U8-0006ao-0L; Wed, 14 May 2025 04:29:04 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U6-0006Fg-6y; Wed, 14 May 2025 04:29:03 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:28:58 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:28:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211342; x=1778747342; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D1v/A0ZXU1bNqLebJ7M+DCdIHB/C2f5yFTku3+t4lqY=; b=aL6iuwKH8FKJ3jmOsSgjnQLk9Kvlyivwo82GisfHtSlvt/WuQuLvAfbZ 0N5IvjM0srSRNLoR6JRMHxoFpHt9E3Mo1E04xQDIxDj3PIR1IipDi0H8Y yKKQ2C7FZreTk+V5fiv76I8I2t2lITKE+JUPSWNEZG0YlBuaUcSmcNXtP RaRaiw0lFwJdPhgGgBRTgOw7HKth9xAqnhLNb4c+R9Hok+ff5WFaNZzAI Dcrfy+mHB0N71HIxAHAz73OK9SfT5CZyCZGt0/3WTyC6aRNwR/WePaT9A ey6B4yXdHH4uiqbUb9z7NtRqQG0s9gvrKZoky80nm0T+KnVJM4x///pn7 w==; X-CSE-ConnectionGUID: S4V9GTZVTOSMngMjl4M58Q== X-CSE-MsgGUID: lliDimEnQcKzaMLUgrpX+A== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505574" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505574" X-CSE-ConnectionGUID: 6pjiF2b2SlGOFoe6V1Bv2A== X-CSE-MsgGUID: ifdDoHMvQYKKJ3s1zzQVkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065810" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu Subject: [PATCH 2/9] docs/devel/qom: Fix the doc about OBJECT_DECLARE_SIMPLE_TYPE Date: Wed, 14 May 2025 16:49:50 +0800 Message-Id: <20250514084957.2221975-3-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211371190116600 Currently, the expansion example of OBJECT_DECLARE_SIMPLE_TYPE "roughly" reflects what OBJECT_DECLARE_TYPE is doing. Why "roughly"? Because this line - > G_DEFINE_AUTOPTR_CLEANUP_FUNC(MyDeviceClass, object_unref) - is also wrong for OBJECT_DECLARE_TYPE. Fix the expansion example of OBJECT_DECLARE_SIMPLE_TYPE, especially drop that definition of MyDeviceClass. Cc: Paolo Bonzini Cc: "Daniel P. Berrang=C3=A9" Cc: Eduardo Habkost Signed-off-by: Zhao Liu --- docs/devel/qom.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 5870745ba27b..185f4c2f5921 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -326,21 +326,12 @@ This is equivalent to the following: :caption: Expansion from declaring a simple type =20 typedef struct MyDevice MyDevice; - typedef struct MyDeviceClass MyDeviceClass; =20 - G_DEFINE_AUTOPTR_CLEANUP_FUNC(MyDeviceClass, object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(MyDevice, object_unref) =20 - #define MY_DEVICE_GET_CLASS(void *obj) \ - OBJECT_GET_CLASS(MyDeviceClass, obj, TYPE_MY_DEVICE) - #define MY_DEVICE_CLASS(void *klass) \ - OBJECT_CLASS_CHECK(MyDeviceClass, klass, TYPE_MY_DEVICE) #define MY_DEVICE(void *obj) OBJECT_CHECK(MyDevice, obj, TYPE_MY_DEVICE) =20 - struct MyDeviceClass { - DeviceClass parent_class; - }; - The 'struct MyDevice' needs to be declared separately. If the type requires virtual functions to be declared in the class struct, then the alternative OBJECT_DECLARE_TYPE() macro can be --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211391; cv=none; d=zohomail.com; s=zohoarc; b=X/giBVP74VETUKqE16QgXabhiXhMZzNUKBX4Y5Qg3l4hJas6e1BIOjDGCeCYuXD4hWgVKdwlY7mPjjjTRAnPTdQTOcMklmfRI9Pny95AuI9umr8Q0nndd/HC4ChZzKBVekZfzIP2UlnVVXN2ekg6rDZEqPNz5N2MkK5k+GdBtyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211391; 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=1l49oiPZr+D7FZqJh9G5VxPO6vhLO82gjTZUxSIns7Q=; b=H2erFYsb4zRmAN4XTpCc6QO50tAKg5iqKRw70n7Ynuo3S4+HRxqNWDWrqILHs88pDSriCfXOkPHaQbOihtEJNJyb8e2gSFIUPeE7Enc8QNkS100v8sH77F5H1yTJoQ5U87CO6kgtLktkM2WERthrrAT/5radJEFwsY53RqGu8aU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 174721139175562.688146001990276; Wed, 14 May 2025 01:29:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UB-0006jC-K3; Wed, 14 May 2025 04:29:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U8-0006c4-HH; Wed, 14 May 2025 04:29:04 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U6-0006GC-CJ; Wed, 14 May 2025 04:29:03 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:00 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:28:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211343; x=1778747343; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XcfqfXhzwMnZCQ8ssMQpFUaIWpIFYFQwZh6vh4Z+M54=; b=NiO1WSZr7Qd9DYR9LGTEUrF0KvqzzcDDL7GpoxH9pwPKWCvHUk/s9mba c/5oO+MUDkXPmhIODZdnmZhnRFy9Th2A+BKTOSzRUmxm3Key1JZy101tu /iw9ndNzf5pY7l1VckNWFwQ/UVZ+XZKW+g9+R47fTa+EaH9cW8JKMdMbl 2v1df77LBIVfspa+2ZUyssAvdfycwZfnoRaSMtDAYTgRdMDC1KceOsK+E vN0dLAz+JgyuN4MmsFVfMw2TGgfOkwj3SIPOgllNVXO7xZau716FY4XgL j1pze7LJcFuhRpWCP0M+ZcR3wSnlxbEbaIz4WQBCdIMygsI0BIbmiY9V6 A==; X-CSE-ConnectionGUID: rgTAyvQiSwC0rRa3upkV9A== X-CSE-MsgGUID: W/hBv8vmRCifpwJdYCONBQ== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505579" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505579" X-CSE-ConnectionGUID: dEgjz3DOSZavm5HX5+IRZA== X-CSE-MsgGUID: mDvUXlf2TZajHn5CvXhD9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065815" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH 3/9] hw/acpi/pci: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:51 +0800 Message-Id: <20250514084957.2221975-4-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211393406116600 Content-Type: text/plain; charset="utf-8" The QOM types of AcpiGenericInitiator and AcpiGenericPort are declared by OBJECT_DECLARE_SIMPLE_TYPE, which means they don't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Ani Sinha Signed-off-by: Zhao Liu Reviewed-by: Ani Sinha --- hw/acpi/pci.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c index d511a8502954..acac6744525e 100644 --- a/hw/acpi/pci.c +++ b/hw/acpi/pci.c @@ -75,16 +75,12 @@ typedef struct AcpiGenericInitiator { uint32_t node; } AcpiGenericInitiator; =20 -typedef struct AcpiGenericInitiatorClass { - ObjectClass parent_class; -} AcpiGenericInitiatorClass; - #define TYPE_ACPI_GENERIC_INITIATOR "acpi-generic-initiator" =20 -OBJECT_DEFINE_TYPE_WITH_INTERFACES(AcpiGenericInitiator, acpi_generic_init= iator, - ACPI_GENERIC_INITIATOR, OBJECT, - { TYPE_USER_CREATABLE }, - { NULL }) +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(AcpiGenericInitiator, acpi_gener= ic_initiator, + ACPI_GENERIC_INITIATOR, OBJECT, + { TYPE_USER_CREATABLE }, + { NULL }) =20 OBJECT_DECLARE_SIMPLE_TYPE(AcpiGenericInitiator, ACPI_GENERIC_INITIATOR) =20 @@ -191,16 +187,12 @@ typedef struct AcpiGenericPort { uint32_t node; } AcpiGenericPort; =20 -typedef struct AcpiGenericPortClass { - ObjectClass parent_class; -} AcpiGenericPortClass; - #define TYPE_ACPI_GENERIC_PORT "acpi-generic-port" =20 -OBJECT_DEFINE_TYPE_WITH_INTERFACES(AcpiGenericPort, acpi_generic_port, - ACPI_GENERIC_PORT, OBJECT, - { TYPE_USER_CREATABLE }, - { NULL }) +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(AcpiGenericPort, acpi_generic_po= rt, + ACPI_GENERIC_PORT, OBJECT, + { TYPE_USER_CREATABLE }, + { NULL }) =20 OBJECT_DECLARE_SIMPLE_TYPE(AcpiGenericPort, ACPI_GENERIC_PORT) =20 --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211449; cv=none; d=zohomail.com; s=zohoarc; b=Dt5j1syctRCEzY6StFYM1zSjOAWVxxWE6MpK24AV1ndn60p7Ix+85WzTsdanhyvcd10hkZnmTX/QGbUPPlXshJYVlCS09kHWUSFWZVBrneHEEdVjohvstq2nQl+TaiwttJdY3tu/UVabjLrCd9WXuQM+vQMqp9IwGQHrxMO40pc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211449; 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=4Vw/divwfsJxAYLRuk86uiT+fLmiz943e0JU/gSz6fo=; b=HCOtPq9y7dfx4nI0QKiHNw3D/PA1dI7X4SfdZ3x4fNqcJXceQvEQWm0MEQGaOfawFZov2YU5/AckkdJ2MXvajvsXAUmW5Mhb3YC2DCw1l9kNeD18wQsMlXKefOdfHIYpMaMNJvHuFvHzUR9wt1gnzIP5m+ivJ3CP8nkaUmeHjHM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211449486254.54385762355923; Wed, 14 May 2025 01:30:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UE-0006nP-AP; Wed, 14 May 2025 04:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UA-0006gc-2W; Wed, 14 May 2025 04:29:06 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U7-0006Fs-OC; Wed, 14 May 2025 04:29:05 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:03 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:28:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211344; x=1778747344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1RQexxzH4YFkjxykLnQHXT3NcbCAnyHIN3979LqZumo=; b=Mo8erR1SrJnVLE3e+aK0/W8xcJ5ucWYF7nTquH97P0LzlT+0QP1JGtTh E7Uu3agpBqDuVvQD+8kLI+/I+ak7fU99r/WmOhzJWG5LXIuUjJXvoflv2 vKHkmYhacs5EGWhy8jy5qgHKKok1oiwtNHcOsiHynfPWnbPZKEjKV/H4U FZgMxc0IfDsga9CpOtu3lhWIl3Z30Z8hjA5DxHOTkpZyQ+QfEiaS3zDEJ yg4FqxA6Xd/4WAtIxGs7rWZemtO4w7NGwRKtEXRlovnx8DCULRGY5alnK WLe15hTRVhgF/bp8MHyz2qc10cmAfHPMwXurn7hExRn1Y4fZNy48lYP9J A==; X-CSE-ConnectionGUID: oZNOczmxQzm80Wlk2jVdlw== X-CSE-MsgGUID: QXuca8NnTSi04U0Io+ZI5g== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505583" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505583" X-CSE-ConnectionGUID: 7KGGgSw0QuG2Ewmiw+SMMg== X-CSE-MsgGUID: Q3ohJwzCRS6s+i2xXecPpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065821" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , Yoshinori Sato , Magnus Damm , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 4/9] hw/char/sh_serial: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:52 +0800 Message-Id: <20250514084957.2221975-5-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211453529116600 The QOM type of SHSerialState is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: Yoshinori Sato Cc: Magnus Damm Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Signed-off-by: Zhao Liu --- hw/char/sh_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 6abd80386fb4..8ccc2234ba4d 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -78,9 +78,7 @@ struct SHSerialState { qemu_irq bri; }; =20 -typedef struct {} SHSerialStateClass; - -OBJECT_DEFINE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEVICE) +OBJECT_DEFINE_SIMPLE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEV= ICE) =20 static void sh_serial_clear_fifo(SHSerialState *s) { --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211393; cv=none; d=zohomail.com; s=zohoarc; b=ArNqHcJ5cM1TwQqQk185LZxhB6okx8IesKHKnFH1d8CG6W3LIWn/+esfCAEnwFwK7iMlVziGCobZ2/GENi7f0FbRGeEOu1PcvTdrQvGaY6XrQWwFCHgqmN8ZAxr1FnzjP+emrnouGIwVaVa1sBbswoF9m0w26ZhkwWvGmN8H1pY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211393; 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=ABRYQqmJy6Dw4NfgUEI4DJ2YxxQnZhVq9LassJKA5p8=; b=P0K0I5BJsNgswQth8VQmkLmZKxui4tWjDQsChzR5MmceO2D3J0MAErTRmbLLN0lgifAPgMB1HTtYyrj6sFy/x2xkBEvxgZOZzb0FD8Ujn61kIb57HcpeBQ7fAQDBKZ7I4nq4Yai+/OWi/+nlOISyTgHi11xgl1R3l5oM7dVN3+k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211393904665.7183293322433; Wed, 14 May 2025 01:29:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UF-0006wF-U2; Wed, 14 May 2025 04:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UD-0006ng-JN; Wed, 14 May 2025 04:29:09 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UA-0006H0-U7; Wed, 14 May 2025 04:29:09 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:04 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:29:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211347; x=1778747347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=836Ep7tG5Dlv+jTQ31nvdVjjOxRRfYfEjYN1IhyCB6o=; b=n5P49jUFBGdBW6TgbISqE6mto3cQXm/RCmcwOOCkpzoX2xKC9VI6zrQJ ZO7JDVB/Ek2fcLu851CCH1Y9kMAGc0Hsf/oZmA145XC6X3WeO3SrYFK0d UWxMnj4YomRm7I2v1DwhEKjSYA0upgse51Dark62VkSIAx4O2i1CJGts4 YEAiLOwNozHsOwtXJY6asu6bGUoAuHH0PM/1WEKDMDttyGhVom9RFLYtK aoj0dcd3BXPinQPBcym6E/8rBkRXzblVairdvg2x8l0V24CL/oowKBhPQ 6bG6Iavkao9kDhsq1p6F00uQL52PiNeOZTlsbf8dndoQp7NaFG9YGxoK/ Q==; X-CSE-ConnectionGUID: 8COvPUv+QVm4TSucCbq6Zg== X-CSE-MsgGUID: v6+Iz64fQuCs4taToY/2vg== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505588" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505588" X-CSE-ConnectionGUID: JX1z1X70RriXvdcJ5JumnQ== X-CSE-MsgGUID: OHmN9ajmT6+QpSStXDBeoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065827" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , "Maciej S. Szmigiero" Subject: [PATCH 5/9] hw/hyperv/hv-balloon: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:53 +0800 Message-Id: <20250514084957.2221975-6-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211395338116600 Content-Type: text/plain; charset="utf-8" The QOM type of HvBalloon is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: "Maciej S. Szmigiero" Signed-off-by: Zhao Liu Acked-by: Maciej S. Szmigiero --- hw/hyperv/hv-balloon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 94b0abbd6834..db3be4246eae 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -67,10 +67,6 @@ * these requests */ =20 -struct HvBalloonClass { - VMBusDeviceClass parent_class; -} HvBalloonClass; - typedef enum State { /* not a real state */ S_NO_CHANGE =3D 0, @@ -162,8 +158,8 @@ typedef struct HvBalloon { MemoryRegion *mr; } HvBalloon; =20 -OBJECT_DEFINE_TYPE_WITH_INTERFACES(HvBalloon, hv_balloon, HV_BALLOON, VMBU= S_DEVICE, \ - { TYPE_MEMORY_DEVICE }, { }) +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(HvBalloon, hv_balloon, HV_BALLOO= N, VMBUS_DEVICE, \ + { TYPE_MEMORY_DEVICE }, { }) =20 #define HV_BALLOON_SET_STATE(hvb, news) \ do { \ --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211491; cv=none; d=zohomail.com; s=zohoarc; b=GELdYQWb/vp5RGuo5DjKJS9xptHPHIhISodem8Jx3ORHe6wWd5gOCL/w1wBdN/juNJELF5Ado//9DxRIPZLi2HfOJ28BDwE5eaKJUWr/wAkf15eYx3Y/Y7oyky2RR7J63uEiiOHb4Fim734QHreQPcHAsZ9b2T0vbc/OISTZnaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211491; 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=uL2NvLmpWwipoFeaaYeURC+9RPSmUzYvFcbe2MhJdms=; b=NduyhPbGuhyFXeJlV7hX8Ub3htY3KnFqolyJqJwYr5x2MWD1Q2r+JfFn4O1ecsl1Ur0Hdwxp+DQL0AsXyb5wEZk/VwbJvDOb2pdiogruqdG2ykx+fBtntoYtyVfEprXu9X3mKzWbPgetYGdHdE8MZAOMnQWLG6B1/5Y9DnY8zGI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211491393626.1144975650134; Wed, 14 May 2025 01:31:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UG-0006z0-T1; Wed, 14 May 2025 04:29:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UE-0006q3-MN; Wed, 14 May 2025 04:29:10 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UC-0006Fs-P8; Wed, 14 May 2025 04:29:10 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:07 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:29:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211349; x=1778747349; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c1yBPRLNETWRITPW9Cfd7x9/x8g1mHxqhLIAeGQqCAI=; b=KUDhpDyY8/bhVHJY0IFk/t7FPBf5afCa18wXvrnrMjfA21RwR8u5zA+8 xpaP/hIrezG4CEa7D2Fr5ghb5SQdziTxY6yK4qPDndsuS+MQN3bmGAeEu 4zNuFB5gppp/kh8dlE1OYT69zIDuCGfFBfJKby+ubggNerFoZBtSV0YPs pMt+VSaURQ3JMyfk0DBBucqknT8e7ikUdygwhV5n7rYFmS0ZwbLNfga0T jzdqG5kTlG1rg2HbgiV1p647cbgnieao/A3arw23xTuCXkHdE9to2Gk27 QEKyFJZPJmE9VquSDDDPsKP5HHJ9y8x1B1Sp6eBd8HkdYYJKfRka3cuUc w==; X-CSE-ConnectionGUID: /uQR861FSi2quwZt6cuU+g== X-CSE-MsgGUID: FoVZ8tLUSGmax5CxGgiA6A== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505596" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505596" X-CSE-ConnectionGUID: 5FVb5ywfRZ6jyhSgmOXB2A== X-CSE-MsgGUID: B7UxM+2kSQmVHQsc/0jSBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065834" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , Nicholas Piggin , Daniel Henrique Barboza , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [PATCH 6/9] hw/ppc/pef: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:54 +0800 Message-Id: <20250514084957.2221975-7-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211493407019000 Content-Type: text/plain; charset="utf-8" The QOM type of PefGuest is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: Nicholas Piggin Cc: Daniel Henrique Barboza Cc: Harsh Prateek Bora Cc: qemu-ppc@nongnu.org Signed-off-by: Zhao Liu --- hw/ppc/pef.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/ppc/pef.c b/hw/ppc/pef.c index 254f5707876f..1832791ee533 100644 --- a/hw/ppc/pef.c +++ b/hw/ppc/pef.c @@ -20,11 +20,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(PefGuest, PEF_GUEST) =20 typedef struct PefGuest PefGuest; -typedef struct PefGuestClass PefGuestClass; - -struct PefGuestClass { - ConfidentialGuestSupportClass parent_class; -}; =20 /** * PefGuest: @@ -121,12 +116,12 @@ static int pef_kvm_reset(ConfidentialGuestSupport *cg= s, Error **errp) return kvmppc_svm_off(errp); } =20 -OBJECT_DEFINE_TYPE_WITH_INTERFACES(PefGuest, - pef_guest, - PEF_GUEST, - CONFIDENTIAL_GUEST_SUPPORT, - { TYPE_USER_CREATABLE }, - { NULL }) +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(PefGuest, + pef_guest, + PEF_GUEST, + CONFIDENTIAL_GUEST_SUPPORT, + { TYPE_USER_CREATABLE }, + { NULL }) =20 static void pef_guest_class_init(ObjectClass *oc, const void *data) { --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211424; cv=none; d=zohomail.com; s=zohoarc; b=fVgEZu72HFgswatRv9Av1WmXgfzLLpa/XupsmkHfokonJ+jnZXnNoEDSUXBot60xlp0WNvUDE7Hje1sxJ8H0slSqtP32fBEJXJAI3dmAgv+MUbySeLR9WOfwBn3+rcLhJNWHm/MHoTF+qZXsa+sehetGyuX0bhA0caGZ5HwX3ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211424; 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=TswaMph1OlvRIx/IhL+ViIPi4vK9PNydukQB9Ezexdk=; b=fcYqPVGRPf/4pKd7LhGtjZLGxVKrqZyZzPcRihkpbnlITw8JRDfYID9A6TK8thGJWRWyS68FXIeSvji0Ka2ZwOKS46RX58Y9UobgW31l4NhxXlzhb9RFZD+M/66o8hbGWdtbWLD7RRBkHK4YZrlWmTg8gZTzzYiUVo9E9uPNJqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211424240765.1262262233427; Wed, 14 May 2025 01:30:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UH-00074m-NZ; Wed, 14 May 2025 04:29:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UG-0006wU-1B; Wed, 14 May 2025 04:29:12 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UE-0006H0-BE; Wed, 14 May 2025 04:29:11 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:09 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:29:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211351; x=1778747351; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VUxtdUfmhxC4kgSCPUeYsW2tnM9jTM6sDutnbwjMyCw=; b=a8LF1fLEbdFLddG5G5WTpfqVfPYOn/RhV35VUdyEKPJSu28oMMEnS2Op 9wwcVAPd/b++BEZ3Z4868oQeTre30WaN0bI4uNDL2le01fLTenACuwtu2 /fp8FLHkcRqDHz5ikBbhOuFRVnLeTOnODQyw5UBxgmVSDUe3zSorQHMiB 0JH0WYdtOBXNmM2g7FCgTRQKGGo8kAqRktLk1MsukPXIB84EiAvpkkErw kWyfVTJl/KUo01HsSpXm6ksNC5CrDHDxNCNBk0ViTfm0CVjqxvRPXGekV toeU8KiEZnKPFgE6xydLzEOoTLP+kDQw87vaq3riq9hYkSzeNI698uW09 A==; X-CSE-ConnectionGUID: o4gswYsDSH2a5OnRU92uLg== X-CSE-MsgGUID: wQp5iozeTYOneB1N4PIv8A== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505603" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505603" X-CSE-ConnectionGUID: 3+cZ8mfbSR+Hh4ug4IYxcQ== X-CSE-MsgGUID: EkYN1IWVT2aZfK9zgJY7eQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065842" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , Peter Maydell Subject: [PATCH 7/9] hw/core/resetcontainer: Consolidate OBJECT_DECLARE_SIMPLE_TYPE Date: Wed, 14 May 2025 16:49:55 +0800 Message-Id: <20250514084957.2221975-8-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211425804116600 Content-Type: text/plain; charset="utf-8" The QOM type of ResettableContainer is defined by OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES, which means it doesn't need the class! Therefore, use OBJECT_DECLARE_SIMPLE_TYPE to declare the type, then there's no need for class definition. Cc: Peter Maydell Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/core/resetcontainer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/core/resetcontainer.h b/include/hw/core/resetcontai= ner.h index 23db0c7a8806..daeb18c1ea81 100644 --- a/include/hw/core/resetcontainer.h +++ b/include/hw/core/resetcontainer.h @@ -20,7 +20,7 @@ #include "qom/object.h" =20 #define TYPE_RESETTABLE_CONTAINER "resettable-container" -OBJECT_DECLARE_TYPE(ResettableContainer, ResettableContainerClass, RESETTA= BLE_CONTAINER) +OBJECT_DECLARE_SIMPLE_TYPE(ResettableContainer, RESETTABLE_CONTAINER) =20 /** * resettable_container_add: Add a resettable object to the container --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211491; cv=none; d=zohomail.com; s=zohoarc; b=eX49sJONzEhWN1hI69hgMLW9RExEmFa6ya363N7bKk91Hlu1fUH48YfrAl4TyoHQbjOlvKCYat6+wDv9cqXtd7khYAGrNpnSDO2nGuQXMjYxPl6ZxBhiyYmnLZRzpYBUqZB5OsbYRe6TxurOi5/btOYAXmSXye2SOhrE4suzUWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211491; 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=A/NZ8zHf6dfgrvUO6b9pbc7mo5LRqNBk336eCr0g+No=; b=iWmuZRu+rUhjzWpkqV7of8U81vH8ftw6WsvRti+X6SLygMb4r7iXZ+qKZk8H8nkF3cyR6gGSzWRVwagN+N/Y62qhK5UecYSD8s3XHDZBTIlFfpoSnDJBJ4I/TFLluB6Hgqli7YqkyYf7q29HR+GAQKtM/iHv/z0TeyJiHGp0aog= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211491619170.04170181469908; Wed, 14 May 2025 01:31:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UK-0007EH-Fr; Wed, 14 May 2025 04:29:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UJ-0007D0-JD; Wed, 14 May 2025 04:29:15 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UH-0006H0-PY; Wed, 14 May 2025 04:29:15 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:12 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:29:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211354; x=1778747354; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JbnLeHCbjmi5qiZFkBbMgrEGQSATmTL1jzjpabktqpE=; b=UgL9mIy1WM++4HQTvgRxa+02aWtbK+FLdFSTfbHs5gJ70eviLUrqThqB KCJhNhiIqRA9jV71apdDA43iTTgUwpk8AdgR95IKFQh6fuBtcky7ZoH5G A26zto9rW8V1ju71iZWtxBJPZAAm90ButKhyBJXk4rqFi7aWMeWJ0O4nE 6pIdUWKqLKoZXbGpW6TJbj0hATQp3Q/SvQo7lXXPka/kGua92D5uX/XnP qHMKu49ZV3TnGHD25UEMv45O8CvMxOkAsmHG2SyS6q0Puu7ZuXqmtsi0J o9SyPkJD6iPCPC6X5E8+jJDviG27cb2LJ5eCJcVtjG06eI0M9EwGv+5jy A==; X-CSE-ConnectionGUID: B24Rzc/2TXWnedeMwMVyjw== X-CSE-MsgGUID: OjEEgq2/SQKBQi3bo7jzZg== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505614" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505614" X-CSE-ConnectionGUID: hypJoV7ZQemsAFomVxyWQQ== X-CSE-MsgGUID: tByd5RQATIuDgh3pTO+SQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065850" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , Halil Pasic , Christian Borntraeger , Thomas Huth , Richard Henderson , David Hildenbrand , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 8/9] target/s390x/kvm/pv: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:56 +0800 Message-Id: <20250514084957.2221975-9-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211493540116600 Content-Type: text/plain; charset="utf-8" The QOM type of S390PVGuest is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: Halil Pasic Cc: Christian Borntraeger Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Ilya Leoshkevich Cc: qemu-s390x@nongnu.org Signed-off-by: Zhao Liu Reviewed-by: David Hildenbrand --- target/s390x/kvm/pv.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c index 2bc916a5455f..a4dbbcef7e08 100644 --- a/target/s390x/kvm/pv.c +++ b/target/s390x/kvm/pv.c @@ -313,12 +313,6 @@ struct S390PVGuest { ConfidentialGuestSupport parent_obj; }; =20 -typedef struct S390PVGuestClass S390PVGuestClass; - -struct S390PVGuestClass { - ConfidentialGuestSupportClass parent_class; -}; - /* * If protected virtualization is enabled, the amount of data that the * Read SCP Info Service Call can use is limited to one page. The @@ -380,12 +374,12 @@ static int s390_pv_kvm_init(ConfidentialGuestSupport = *cgs, Error **errp) return 0; } =20 -OBJECT_DEFINE_TYPE_WITH_INTERFACES(S390PVGuest, - s390_pv_guest, - S390_PV_GUEST, - CONFIDENTIAL_GUEST_SUPPORT, - { TYPE_USER_CREATABLE }, - { NULL }) +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(S390PVGuest, + s390_pv_guest, + S390_PV_GUEST, + CONFIDENTIAL_GUEST_SUPPORT, + { TYPE_USER_CREATABLE }, + { NULL }) =20 static void s390_pv_guest_class_init(ObjectClass *oc, const void *data) { --=20 2.34.1 From nobody Sat Nov 15 20:52:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1747211435; cv=none; d=zohomail.com; s=zohoarc; b=KvXH0evBbvEhDjvM0PhnU9ifGGH1IGiPW8gLpcEPxo93ZhOqFyxgcXYuMqAmjX0cU/gWZj15pMdRlmoxvn3E9w3TO5A3QyndGid65fVlAgJS/bibIygrP1J9q/+grs6p8sihfDUNFphSSRO7cyVK42mtf6g2IUN8W3ZABDB99mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211435; 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=BY8PV5PYyYaAwhTH5U7q6BmdiBr/+LOULvsQES53QSs=; b=L+ztD8jJQflBTHvN6uow+OYNazYhb1VO3CMU+Ou0M4vvBlyn+EVmbDrrhfs3ulASdQfI8vcZDENEHxIaT+MmJ432jjBGB+s9B6pJuiMoR/yFOyD+RGLy9Pe+NJgAyhSTc9udS+1Nv68PGPbHSVTH1aakMV5hXVFrLSxXYXbhJCc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1747211434964815.4272109727044; Wed, 14 May 2025 01:30:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UN-0007L2-Lz; Wed, 14 May 2025 04:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UL-0007GH-BP; Wed, 14 May 2025 04:29:17 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7UJ-0006JJ-Gq; Wed, 14 May 2025 04:29:17 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:29:14 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:29:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211356; x=1778747356; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hPcHhjioLQi9o5CfHROpDsHKTCLxyOFvAINFhZm1c1U=; b=eMsEUjqg1tIjmP1VeDJqjNBTxTS6EvLOwwoXvAKITMZxtWQKTZrVLESu Q3zqMFnEZKwmcOAacbyjoFiGtzfTZfxCdwSqSBE0lalgHk92rSlq74Mj3 6fvsdGbiq4+yIixHATKn8ml9rbrgKKQez/2wDEFupVgl5OaN/eSnWE0AP gpSknPIn6TzJwTsEEf1MjlaCTTD7vKKdcHrT48DCn/xNLiv8q8XzVgUbc hINYaSHionKzOQX0eeP3XSuDnFY4HF/ENJ7Je5JHxB9OxUPSZlYlOWvJ0 bXW35lodZwfTyJr+odiB9e1Qi2XeoJ9uknGCAJXi+Z+Jm5Y6TDL7/fdhd w==; X-CSE-ConnectionGUID: +NtvBDPZTICnwXgc9oVbkQ== X-CSE-MsgGUID: 8b2T3Xo/QSuO+D+UH90HjA== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505619" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505619" X-CSE-ConnectionGUID: /ESUO+fYQ/2NT8TKhEjvxg== X-CSE-MsgGUID: Wo9EQtm8QFqpNNMdIaFjEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065857" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 9/9] ui/console-vc: Consolidate OBJECT_DEFINE_SIMPLE_TYPE Date: Wed, 14 May 2025 16:49:57 +0800 Message-Id: <20250514084957.2221975-10-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.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=198.175.65.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1747211437071019000 The QOM types of QemuTextConsole and QemuFixedTextConsole are declared by OBJECT_DECLARE_SIMPLE_TYPE, which means they don't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE to implement the type, then there's no need for class definition. Cc: "Marc-Andr=C3=A9 Lureau" Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 830842064d69..1b2c6951c275 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -70,17 +70,19 @@ typedef struct QemuTextConsole { Fifo8 out_fifo; } QemuTextConsole; =20 -typedef QemuConsoleClass QemuTextConsoleClass; - -OBJECT_DEFINE_TYPE(QemuTextConsole, qemu_text_console, QEMU_TEXT_CONSOLE, = QEMU_CONSOLE) +OBJECT_DEFINE_SIMPLE_TYPE(QemuTextConsole, + qemu_text_console, + QEMU_TEXT_CONSOLE, + QEMU_CONSOLE) =20 typedef struct QemuFixedTextConsole { QemuTextConsole parent; } QemuFixedTextConsole; =20 -typedef QemuTextConsoleClass QemuFixedTextConsoleClass; - -OBJECT_DEFINE_TYPE(QemuFixedTextConsole, qemu_fixed_text_console, QEMU_FIX= ED_TEXT_CONSOLE, QEMU_TEXT_CONSOLE) +OBJECT_DEFINE_SIMPLE_TYPE(QemuFixedTextConsole, + qemu_fixed_text_console, + QEMU_FIXED_TEXT_CONSOLE, + QEMU_TEXT_CONSOLE) =20 struct VCChardev { Chardev parent; --=20 2.34.1