Gerd Hoffmann wrote:
> Hi,>>> +static void ahci_trigger_irq(AHCIState *s, AHCIDevice *d,>> + int irq_type)>>> +static void ahci_check_irq(AHCIState *s)>> MSI support would be nice to have.
Alrighty, I added MSI support. But I only have a single vector in use
atm as nvec > 0 doesn't get written to the PCI config space so the code
trips on that later on.
[...]
>>> + if (dinfo) {>> + ide_create_drive(&ad->port, 0, dinfo);>> + }>> That doesn't belong into the qdev init function.>> Look how ide/isa.c handles it: The qdev init function> (isa_ide_initfn) doesn't create ide-drives at all. And there is a> convinience function (isa_ide_init) which first creates the> controller, then attaches the drives. The later is called from> pc_init() with the drives specified via -drive if=ide (or -hda).
Hrm. I guess I'll just put it into the PC specific initialization
function :).
>> Does AHCI support drive hotplug btw?
AHCI does, my code does not yet :). Feel free to add support for it! :D
Alex

>>> +static void ahci_check_irq(AHCIState *s)>>>> MSI support would be nice to have.>> Alrighty, I added MSI support. But I only have a single vector in use> atm as nvec> 0 doesn't get written to the PCI config space so the code> trips on that later on.
For multiple vectors MSI-X is the best choice as it fixes a few design
issues MSI has when it comes to multiple vectors. I think linux never
ever uses MSI with multiple vectors anyway.
cheers,
Gerd

On Fri, Nov 19, 2010 at 04:12:43AM -0500, Gerd Hoffmann wrote:
> >>> +static void ahci_check_irq(AHCIState *s)> >>> >> MSI support would be nice to have.> >> > Alrighty, I added MSI support. But I only have a single vector in use> > atm as nvec> 0 doesn't get written to the PCI config space so the code> > trips on that later on.> > For multiple vectors MSI-X is the best choice as it fixes a few design > issues MSI has when it comes to multiple vectors. I think linux never > ever uses MSI with multiple vectors anyway.
Linux doesn't even support MSI with multiple vectors today.
Joerg