Thread (152 messages) 152 messages, 14 authors, 2011-01-27

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

From: Jan Kiszka <jan.kiszka@siemens.com>
Date: 2011-01-18 16:18:52
Also in: qemu-devel

On 2011-01-18 17:04, Anthony Liguori wrote:
quoted
quoted
quoted
quoted
A KVM device should sit on a KVM specific bus that hangs off of
sysbus.
It can get to kvm_state through that bus.

That bus doesn't get instantiated through qdev so requiring a pointer
argument should not be an issue.


         
This design is in conflict with the requirement to attach KVM-assisted
devices also to their home bus, e.g. an assigned PCI device to the PCI
bus. We don't support multi-homed qdev devices.

       
The bus topology reflects how I/O flows in and out of a device.  We do
not model a perfect PC bus architecture and I don't think we ever intend
to.  Instead, we model a functional architecture.

I/O from an assigned device does not flow through the emulated PCI bus.
Therefore, it does not belong on the emulated PCI bus.

Assigned devices need to interact with the emulated PCI bus, but they
shouldn't be children of it.
     
You should be able to find assigned devices on some PCI bus, so you
either have to hack up the existing bus to host devices that are, on the
other side, not part of it or branch off a pci-kvm sub-bus, just like
you would have to create a sysbus-kvm.
Management tools should never transverse the device tree to find
devices.  This is a recipe for disaster in the long term because the
device tree will not remain stable.

So yes, a management tool should be able to enumerate assigned devices
as they would enumerate any other PCI device but that has almost nothing
to do with what the tree layout is.
I'm probably misunderstanding you, but if the bus topology as the guest
sees it is not properly reflected in an object tree on the qemu side, we
are creating hacks again.

Management and analysis tools must be able to traverse the system buses
and find guest devices this way. If they create a device on bus X, it
must never end up on bus Y just because it happens to be KVM-assisted or
has some other property. On the other hand, trying to hide this
dependency will likely cause severe damage to the qdev design.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help