Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
> Thanks for your reply. This isn't about a specific IOMMU. Let me > describe the situation better: > > 1. I'm implementing the AMD IOMMU, which is a PCI IOMMU (not in the CPU). > 2. Devices need address translation and checking through this IOMMU. > 3. But in the future there might be other IOMMU

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Eduard - Gabriel Munteanu
On Mon, Jun 21, 2010 at 03:07:13PM +0100, Paul Brook wrote: > > So I've been looking for a way to obtain things like a PCIDevice from a > > more generic structure (say from hw/qdev.h), > > If you're having to figure out what kind of a device you have then I think > you're already doing something

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
> So I've been looking for a way to obtain things like a PCIDevice from a > more generic structure (say from hw/qdev.h), If you're having to figure out what kind of a device you have then I think you're already doing something else wrong. I'd expect the bits of code that needs to identify device