[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 13/23] hyperv: qdev-ify SynIC
From: |
Roman Kagan |
Subject: |
Re: [Qemu-devel] [PATCH 13/23] hyperv: qdev-ify SynIC |
Date: |
Wed, 14 Jun 2017 12:58:04 +0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Tue, Jun 13, 2017 at 03:34:34PM -0300, Eduardo Habkost wrote:
> On Tue, Jun 06, 2017 at 09:19:38PM +0300, Roman Kagan wrote:
> > 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 exposes a few
> > properties which are maintained in sync with the respecitve msrs of the
> > parent cpu.
[...]
> > +static SynICState *get_synic(X86CPU *cpu)
> > +{
> > + SynICState *synic =
> > + SYNIC(object_resolve_path_component(OBJECT(cpu), "synic"));
> > + assert(synic);
> > + return synic;
>
> How often this will run? I think a new X86CPU struct field would
> be acceptable to avoid resolving a QOM path on every hyperv exit.
It's only used at the points where synic state is updated: at
realize/save/load/unrealize and when the guest configures synics via
msrs (i.e. a few times per cpu at guest startup). None of those is
performance-critical.
> Do you even need QOM for this?
I need to reach the synic from the cpu on slow paths, and IMHO the
pointer on X86CPU is not justified here. Besides there are two memory
regions associated with every synic (in a followup patch) and I thought
it made sense to have a dedicated parent QOM node for them.
> > +static Property synic_props[] = {
> > + DEFINE_PROP_BOOL("enabled", SynICState, enabled, false),
> > + DEFINE_PROP_UINT64("msg-page-addr", SynICState, msg_page_addr, 0),
> > + DEFINE_PROP_UINT64("evt-page-addr", SynICState, evt_page_addr, 0),
>
> What do you need the QOM properties for? Are they supposed to be
> configurable by the user?
No. Actually I wanted to define them as read-only, but I failed to find
a way to do so.
> Are they supposed to be queried from outside QEMU? On which cases?
ATM I only see them as informational fields that may prove useful during
debugging.
Roman.
- [Qemu-devel] [PATCH 07/23] hyperv_testdev: refactor for readability, (continued)
- [Qemu-devel] [PATCH 07/23] hyperv_testdev: refactor for readability, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 08/23] hyperv: cosmetic: g_malloc -> g_new, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 09/23] hyperv: synic: only setup ack notifier if there's a callback, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 12/23] hyperv: make HvSintRoute reference-counted, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 10/23] hyperv: allow passing arbitrary data to sint ack callback, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 14/23] kvm-all: make async_safe_run_on_cpu safe on kvm too, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 13/23] hyperv: qdev-ify SynIC, Roman Kagan, 2017/06/06
[Qemu-devel] [PATCH 15/23] hyperv: make overlay pages for SynIC, Roman Kagan, 2017/06/06
[Qemu-devel] [PATCH 19/23] hyperv: process SIGNAL_EVENT hypercall, Roman Kagan, 2017/06/06
[Qemu-devel] [PATCH 18/23] hyperv: add synic event flag signaling, Roman Kagan, 2017/06/06
[Qemu-devel] [PATCH 17/23] hyperv: add synic message delivery, Roman Kagan, 2017/06/06