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

[PATCH 06/22] kvm/i8259.c: move parent_realize from KVMPICClass to I8259CommonClass


  • 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: Wed, 16 Sep 2026 11:43:34 +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=b4a1VVZQ1aZOauQn24XOWH2/qUfMYMvEynGh+kmjSlA=; b=XJmJEYb1XbNefDZHTOgbzcddC3unWyAYyPY7p9eF+eQJsuRGhhBX4eReBa23o5DHl2WOYt364AlgAmRkw9fZM+m35RsbuDG/stfkbpi/gUKdy91Bg/o5c72fbrPXXqsUIVhok0TYTfRVGJzIZ1gXazzrLAiDDtnMkGWU7EZ7Ho10kRTxD67KALL4gcNxV4nG18UBVMuTbaJCL9xvqqQjcnrtrm+EA8+MIXo5EmPM/ASP9h3PhUzllk3Xp0k/houNuWUVUH1tabDNdFLvjvO1T8p3H5NDuaZZSon+lnuC5WWkkMv95TtqAs1SJtzFEFEfWQvlhmGOOqBSFb6PBq3i1g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JVrSN/8qfPXU7fBMOlJLhPTSEqOqIZV6uFR0YaEk1v7DBKKvkWVp7Oppi4YzYyBXfT9I//iZE0OADALjnMuK9Yciho3Xe8uQ1OpFAUe9e6A1RAV8h4kX8X7slC4F1cUrC4pfzsBo1tBc5HToYlMpuICr/YJOVohWi0RGNPQglRuhWsONJfhXIuNWS0M/eQHKsqU8zkoL4ft+Gxyb3QKTz+EOqeq+blwkWV/kFXRVQC6WHGTUjs4be/u5KuuDR8TaZewMUvKGLJ2Z87KzCNUxYwElQXwtX99d4itct/z0gegpOn86y1caBxxsFn+689lXSVb9Il2zQrLg/AC7G57bww==
  • 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"
  • Delivery-date: Wed, 16 Sep 2026 10:45:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Move parent_realize from KVMPICClass to I8259CommonClass and remove KVMPICClass
since it is no longer required.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
---
 hw/i386/kvm/i8259.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
index 68607d721d..bcfed11a3a 100644
--- a/hw/i386/kvm/i8259.c
+++ b/hw/i386/kvm/i8259.c
@@ -20,19 +20,6 @@
 #include "qom/object.h"
 
 #define TYPE_KVM_I8259 "kvm-i8259"
-typedef struct KVMPICClass KVMPICClass;
-DECLARE_CLASS_CHECKERS(KVMPICClass, KVM_PIC,
-                       TYPE_KVM_I8259)
-
-/**
- * KVMPICClass:
- * @parent_realize: The parent's realizefn.
- */
-struct KVMPICClass {
-    I8259CommonClass parent_class;
-
-    DeviceRealize parent_realize;
-};
 
 static void kvm_pic_get(I8259CommonState *s)
 {
@@ -123,12 +110,12 @@ static void kvm_pic_set_irq(void *opaque, int irq, int 
level)
 static void kvm_pic_realize(DeviceState *dev, Error **errp)
 {
     I8259CommonState *s = I8259_COMMON(dev);
-    KVMPICClass *kpc = KVM_PIC_GET_CLASS(dev);
+    I8259CommonClass *k = I8259_COMMON_GET_CLASS(dev);
 
     memory_region_init_io(&s->base_io, OBJECT(dev), NULL, NULL, "kvm-pic", 2);
     memory_region_init_io(&s->elcr_io, OBJECT(dev), NULL, NULL, "kvm-elcr", 1);
 
-    kpc->parent_realize(dev, errp);
+    k->parent_realize(dev, errp);
 }
 
 qemu_irq *kvm_i8259_init(ISABus *bus)
@@ -141,12 +128,11 @@ qemu_irq *kvm_i8259_init(ISABus *bus)
 
 static void kvm_i8259_class_init(ObjectClass *klass, const void *data)
 {
-    KVMPICClass *kpc = KVM_PIC_CLASS(klass);
     I8259CommonClass *k = I8259_COMMON_CLASS(klass);
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     device_class_set_legacy_reset(dc, kvm_pic_reset);
-    device_class_set_parent_realize(dc, kvm_pic_realize, &kpc->parent_realize);
+    device_class_set_parent_realize(dc, kvm_pic_realize, &k->parent_realize);
     k->pre_save   = kvm_pic_get;
     k->post_load  = kvm_pic_put;
 }
@@ -154,9 +140,7 @@ static void kvm_i8259_class_init(ObjectClass *klass, const 
void *data)
 static const TypeInfo kvm_i8259_info = {
     .name = TYPE_KVM_I8259,
     .parent = TYPE_I8259_COMMON,
-    .instance_size = sizeof(I8259CommonState),
     .class_init = kvm_i8259_class_init,
-    .class_size = sizeof(KVMPICClass),
 };
 
 static void kvm_pic_register_types(void)
-- 
2.43.0




 


Rackspace

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