qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM suppor


From: Like Xu
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties
Date: Tue, 2 Apr 2019 10:35:30 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 2019/4/2 7:38, Eduardo Habkost wrote:
On Mon, Apr 01, 2019 at 10:56:30AM +0800, Like Xu wrote:
On 2019/3/29 17:27, Alex Bennée wrote:
[...]
@@ -1713,6 +1717,9 @@ static void cortex_a9_initfn(Object *obj)
   #ifndef CONFIG_USER_ONLY
   static uint64_t a15_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
   {
+    MachineState *ms = MACHINE(qdev_get_machine());

How expensive is qdev_get_machine? This could potentially be a
performance issue if this register is read a lot.

It may not bother us cause the MachineState object would be feteched from
qemu QOM at its first requested time and save it as static variable for
incoming requests.

We already have a current_machine variable declared in
include/hw/boards.h.  We normally avoid using it and use
MACHINE(qdev_get_machine()) instead, but I never understood why.

Which one do you prefer to access smp machine properties?



reply via email to

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