qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 6/8] cpu: Add per-cpu address space


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [RFC PATCH 6/8] cpu: Add per-cpu address space
Date: Sat, 23 Nov 2013 22:56:33 +0100
User-agent: Mutt/1.5.21+155 (d3096e8796e7) (2012-12-30)

On Sat, Nov 23, 2013 at 07:00:51PM +0100, Andreas Färber wrote:
> Am 22.11.2013 17:02, schrieb Edgar E. Iglesias:
> > Hi, no I actually had it in cpustate first but had to do env-get-cpu all
> > over so i moved it to env. Iiuc env-get-cpu involves a dyn typecheck.
> 
> No, it doesn't any more, it's just a pointer offset.
> 

Hi Andreas,

Looking at todays master, for example for i386:

target-i386/cpu-qom.h:
#define ENV_GET_CPU(e) CPU(x86_env_get_cpu(e))

include/qom/cpu.h:
#define CPU(obj) OBJECT_CHECK(CPUState, (obj), TYPE_CPU)

include/qom/object.h:
#define OBJECT_CHECK(type, obj, name) \
    ((type *)object_dynamic_cast_assert(OBJECT(obj), (name), \
                                        __FILE__, __LINE__, __func__))


Maybe we should remove the CPU() around xx_env_get_cpu(e)?

I'm happy to move the cpu address space into CPUState, but right 
now I'm afraid ENV_GET_CPU will slow down some of these hot paths.

Cheers,
Edgar



reply via email to

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