[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 17/27] kvm/i8259.c: convert to use DEFINE_TYPES() macro


  • To: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 15:19:23 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YBENO+AVPrr9uTUjU0EffDFLvrFbeW1XWzcjaPVFV10=; b=BglMhNcHuYCZCe0SsbE+KVm0/E2mhQRza/YnYsV3adpIHnd1YG3fo4YomGR7SR5zTr+a+fHnAVaKXuRby1nDjEpT2+VFZHArVZ5VDDJxGTVkpxsEZeBNhWkzW9UpD+hzlwGM7ut1Srq09noWGPhZjDj3YtF5dTm2n4tnLsDDLTeefFxQ+7PtaciRvyL1m+s5IgaqlBgP1ji0U1xLVIWJNqDxPcgZI8WWJu26WSntkLeyaFiuN/9KiUvKRZA/QLsiSfkuD+HjVSV46NwBOEMJlide5WtRPK+zJ6E9OARIs+bJJUh8vM9vpxtiGEs2r4xGUZBmM9o0iZ863ZINETvKgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iMHEqxa+8VNhEJCJ3Vu+Q1OpgfTz2olpN3De7dgGD9ewTakFPJYJm1ocRfPK9tiFB4cQpjnol0T5GBGSPHtWAJMPHSzup6TPyuTnOj2Dbds1tsW2lIxiBYP30GXhBcksu2vm7FvrBoVZ+4tfggz35AKaCqyej9in3VWnhIgeQxJrUECa8WTbPcuoSbGaN9DbM/B0pbyDNP5YO82bx6kVvF00x3sJ///c8hQQU9pLYWKERxyw/e82/xX5XV2qux/0hACUOIAUgSXpc9tjnhUPHIOvlge5TwZnAiLLP4hM1n48j0qiUVpd8kH+2Cv6FJqR7pp/nYkC0Kx8eL37biAyMA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=proofpoint20171006 header.d=nutanix.com header.i="@nutanix.com" header.h="Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector1 header.d=nutanix.com header.i="@nutanix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nutanix.com;
  • Delivery-date: Fri, 16 Oct 2026 14:22:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
---
 hw/i386/kvm/i8259.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
index 952f58be11..9ee23b5695 100644
--- a/hw/i386/kvm/i8259.c
+++ b/hw/i386/kvm/i8259.c
@@ -154,17 +154,14 @@ static void kvm_i8259_class_init(ObjectClass *klass, 
const void *data)
     k->post_load  = kvm_i8259_put;
 }
 
-static const TypeInfo kvm_i8259_info = {
-    .name = TYPE_KVM_I8259,
-    .parent = TYPE_I8259_COMMON,
-    .instance_size = sizeof(KVMI8259State),
-    .class_init = kvm_i8259_class_init,
-    .class_size = sizeof(KVMI8259Class),
+static const TypeInfo kvm_i8259_type_infos[] = {
+    {
+        .name = TYPE_KVM_I8259,
+        .parent = TYPE_I8259_COMMON,
+        .instance_size = sizeof(KVMI8259State),
+        .class_init = kvm_i8259_class_init,
+        .class_size = sizeof(KVMI8259Class),
+    },
 };
 
-static void kvm_i8259_register_types(void)
-{
-    type_register_static(&kvm_i8259_info);
-}
-
-type_init(kvm_i8259_register_types)
+DEFINE_TYPES(kvm_i8259_type_infos)
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.