qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 5/5] hw/intc/apic: Pass CPU using QOM link property


From: Paolo Bonzini
Subject: Re: [PATCH v2 5/5] hw/intc/apic: Pass CPU using QOM link property
Date: Fri, 6 Oct 2023 01:04:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 10/3/23 10:27, Philippe Mathieu-Daudé wrote:
-    /* TODO: convert to link<> */
-    apic = APIC_COMMON(cpu->apic_state);
-    apic->cpu = cpu;
-    apic->apicbase = APIC_DEFAULT_ADDRESS | MSR_IA32_APICBASE_ENABLE;
+    qdev_prop_set_uint32(cpu->apic_state, "base-addr",
+                         APIC_DEFAULT_ADDRESS | MSR_IA32_APIC

For this to use a link, it's missing the corresponding object_unref(apic->cpu) + apic->cpu = NULL assignment somewhere. For example you can add it in apic_common_unrealize (called by device_unparent - which is called in turn by x86_cpu_unrealizefn).

Paolo




reply via email to

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