qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/24] ide: add trigger_irq callback


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 10/24] ide: add trigger_irq callback
Date: Wed, 30 Oct 2013 14:34:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 30.10.2013 um 14:16 hat Paolo Bonzini geschrieben:
> Il 30/10/2013 13:47, Kevin Wolf ha scritto:
> > This whole add_status(BM_STATUS_INT) is weird and doesn't seem to make
> > sense. For AHCI it triggers the actual IRQ, whereas for BMIDE it only
> > sets the status register bit and requires a separate call to trigger the
> > IRQ. This function is ide_set_irq(), which in turn ends up completely
> > ignored by AHCI (ahci_irq_set() is an empty function).
> 
> The problem is that the IRQ ack is done differently in AHCI (using the
> write-1-clears register PORT_IRQ_STAT; PORT_IRQ_MASK can also modify the
> status of the interrupt line) and PATA (reading 0x1f7).

I don't understand how this is related; I'm really talking about
internal interfaces here. ide_set_irq() and .trigger_irq() are really
two different ways for the IDE core to communicate that an IRQ should be
triggered. They can in theory be used for the same things, but are used
inconsistently.

> So perhaps the legacy PIO code of hw/ide/core.c should be abstracted
> out, including the new restart support.  (BTW, to test this with AHCI I
> rigged up a modified version of AHCI that has the legacy ports, so that
> I could run the new qtest on it).

This could be a good idea anyway.

Kevin



reply via email to

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