[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-19 Thread Roedel, Joerg
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 s

[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-19 Thread Gerd Hoffmann
+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

[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-18 Thread Alexander Graf
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 at

[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-18 Thread Gerd Hoffmann
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. +#ifndef min +#define min(a, b) ((a)< (b) ? (a) : (b)) +#endif osdep.h has MIN/MAX macros. +static