qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O


From: Peter Maydell
Subject: Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O
Date: Wed, 30 Jan 2013 20:19:31 +0000

On 30 January 2013 20:08, Michael S. Tsirkin <address@hidden> wrote:
> Anthony wrote:
>> Nope.  You can use composition:
>>
>> QXLDevice is-a VGACommonState
>>
>> QXLPCI is-a PCIDevice
>>        has-a QXLDevice
>
> But why like this?
> The distinction is artificial, isn't it?

I think it's the wrong way round. QXLPCI should has-a PCI interface
(the physical card possesses an edge connector which fits a PCI
socket; it is not the case that the physical card is a kind of
edge connector). Having PCI card models inherit from PCIDevice
is just a convenient (but misleading) shortcut, and that is what
we should drop if it turns out that we should be inheriting
from some other class.

Or you could make them both has-a; I don't know enough about
QXLDevice to know if it should be is-a or has-a.

-- PMM



reply via email to

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