From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTycg-000768-V6 for qemu-devel@nongnu.org; Tue, 07 Jun 2011 11:55:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTycd-0002Pv-Pr for qemu-devel@nongnu.org; Tue, 07 Jun 2011 11:55:18 -0400 Message-ID: <4DEE49DE.2050302@siemens.com> Date: Tue, 07 Jun 2011 17:55:10 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DCFB3EF.3060801@web.de> In-Reply-To: <4DCFB3EF.3060801@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] ioapic: Implement polarity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: qemu-trivial On 2011-05-15 13:07, Jan Kiszka wrote: > From: Jan Kiszka > > If the polarity bit is set in a redirection table entry, the input level > simply has to inverted as it is low active in this case. Ping for this and http://thread.gmane.org/gmane.comp.emulators.qemu/102459. Maybe even trivial, so CC'ing. Jan > > Signed-off-by: Jan Kiszka > --- > hw/ioapic.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/hw/ioapic.c b/hw/ioapic.c > index 5916387..61991d7 100644 > --- a/hw/ioapic.c > +++ b/hw/ioapic.c > @@ -148,6 +148,9 @@ static void ioapic_set_irq(void *opaque, int vector, int level) > uint32_t mask = 1 << vector; > uint64_t entry = s->ioredtbl[vector]; > > + if (entry & (1 << IOAPIC_LVT_POLARITY_SHIFT)) { > + level = !level; > + } > if (((entry >> IOAPIC_LVT_TRIGGER_MODE_SHIFT) & 1) == > IOAPIC_TRIGGER_LEVEL) { > /* level triggered */ > > -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux