Re: [Qemu-devel] [RFC PATCH 08/34] hyperv: qom-ify SynIC

2018-02-08 Thread Paolo Bonzini
On 07/02/2018 19:37, Roman Kagan wrote: > On Wed, Feb 07, 2018 at 11:45:28AM +0100, Paolo Bonzini wrote: >> On 06/02/2018 21:30, Roman Kagan wrote: >>> +static SynICState *get_synic(X86CPU *cpu) >>> +{ >>> +SynICState *synic = >>> +SYNIC(object_resolve_path_component(OBJECT(cpu), "synic

Re: [Qemu-devel] [RFC PATCH 08/34] hyperv: qom-ify SynIC

2018-02-07 Thread Roman Kagan
On Wed, Feb 07, 2018 at 11:45:28AM +0100, Paolo Bonzini wrote: > On 06/02/2018 21:30, Roman Kagan wrote: > > +static SynICState *get_synic(X86CPU *cpu) > > +{ > > +SynICState *synic = > > +SYNIC(object_resolve_path_component(OBJECT(cpu), "synic")); > > +assert(synic); > > +retur

Re: [Qemu-devel] [RFC PATCH 08/34] hyperv: qom-ify SynIC

2018-02-07 Thread Paolo Bonzini
On 06/02/2018 21:30, Roman Kagan wrote: > +static SynICState *get_synic(X86CPU *cpu) > +{ > +SynICState *synic = > +SYNIC(object_resolve_path_component(OBJECT(cpu), "synic")); > +assert(synic); > +return synic; > +} > + This is somewhat slow, maybe add the pointer to X86CPU? >

[Qemu-devel] [RFC PATCH 08/34] hyperv: qom-ify SynIC

2018-02-06 Thread Roman Kagan
Make Hyper-V SynIC a device which is attached as a child to X86CPU. For now it only makes SynIC visibile in the qom hierarchy, and maintains its internal fields in sync with the respecitve msrs of the parent cpu (the fields will be used in followup patches). Signed-off-by: Roman Kagan --- targe