qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [Qemu-devel] [PATCH v6 3/6] gicv3: Convert to DEFINE_PROP


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v6 3/6] gicv3: Convert to DEFINE_PROP_LINK
Date: Tue, 5 Sep 2017 13:20:43 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/05/2017 12:35 PM, Fam Zheng wrote:
On Tue, 09/05 10:44, Philippe Mathieu-Daudé wrote:
Hi Fam,

On 09/05/2017 10:11 AM, Fam Zheng wrote:
Signed-off-by: Fam Zheng <address@hidden>
---
   hw/intc/arm_gicv3_its_kvm.c | 19 +++++++------------
   1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index 1f8991b8a6..39903d5eab 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -120,17 +120,6 @@ static void kvm_arm_its_realize(DeviceState *dev, Error 
**errp)
       qemu_add_vm_change_state_handler(vm_change_state_handler, s);
   }
-static void kvm_arm_its_init(Object *obj)
-{
-    GICv3ITSState *s = KVM_ARM_ITS(obj);
-
-    object_property_add_link(obj, "parent-gicv3",
-                             "kvm-arm-gicv3", (Object **)&s->gicv3,
-                             object_property_allow_set_link,
-                             OBJ_PROP_LINK_UNREF_ON_RELEASE,
-                             &error_abort);
-}
-
   /**
    * kvm_arm_its_pre_save - handles the saving of ITS registers.
    * ITS tables are flushed into guest RAM separately and earlier,
@@ -205,12 +194,19 @@ static void kvm_arm_its_post_load(GICv3ITSState *s)
                         GITS_CTLR, &s->ctlr, true, &error_abort);
   }
+static Property kvm_arm_its_props[] = {
+    DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "kvm-arm-gicv3",

moving TYPE_KVM_ARM_GICV3 to kvm_arm.h and using it here:
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

This file is only compiled natively on arm, so I'm not comfortable to make a
more complex change than this patch which may break build due to the #ifdef's in
the headers, or add your rev-by without a compile test.  :(

Fine, no problem :)


The open coded type name has already been used here so the change you requested
can be done separately, I think.

Fam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]