|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH v5 06/16] apic: Introduce backend/frontend infrastructure for KVM reuse |
Date: | Tue, 20 Dec 2011 07:41:12 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 |
On 12/20/2011 03:56 AM, Avi Kivity wrote:
On 12/20/2011 02:38 AM, Anthony Liguori wrote:That was v1 of my patches. Avi didn't like it, I tried it like this, and in the end I had to agree. So, no, I don't think we want such a model.Yes, we do :-) The in-kernel APIC is a different implementation of the APIC device. It's not an "accelerator" for the userspace APIC.A different implementation but not a different device. Device == spec.
If it was hardware, it'd be a fully compatible clone. The way we would model this is via inheritance.
Regards, Anthony Liguori
All that you're doing here is reinventing qdev. You're defining your own type system (APICBackend), creating a new regression system for it, and then defining your own factory function for creating it (through a qdev property). I'm struggling to understand the reason to avoid using the infrastructure we already have to do all of this.Not every table of function pointers has to be done through qdev (not that I feel strongly about this - only that there is just one APIC device).
[Prev in Thread] | Current Thread | [Next in Thread] |