From: Michael Tokarev <mjt@tls.msk.ru>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
KVM list <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] Re: >2 serial ports?
Date: Mon, 22 Mar 2010 11:35:17 +0300 [thread overview]
Message-ID: <4BA72BC5.1020303@msgid.tls.msk.ru> (raw)
In-Reply-To: <201003171118.09873.paul@codesourcery.com>
Paul Brook wrote at Wed, 17 Mar 2010 11:18:09 +0000:
>> Oh, well, yes, I remember. qemu is more strict on ISA irq sharing now.
>> A bit too strict.
>>
>> /me goes dig out a old patch which never made it upstream for some
>> reason I forgot. Attached.
>
> This is wrong. Two devices should never be manipulating the same qemu_irq
> object. If you want multiple devices connected to the same IRQ then you need
> an explicit multiplexer. e.g. arm_timer.c:sp804_set_irq.
So... what we have to do here?
I've looked at the mentioned routine, here it is:
/* Merge the IRQs from the two component devices. */
static void sp804_set_irq(void *opaque, int irq, int level)
{
sp804_state *s = (sp804_state *)opaque;
s->level[irq] = level;
qemu_set_irq(s->irq, s->level[0] || s->level[1]);
}
But I know nothing about qemu internals, so don't quite
understand how to do this in case of serial ports. I
see it is tracking two timers and raises the irq level
if at least one half is raised... That to say - I've
got the idea, but how to apply it to serial ports?
Thanks!
/mjt
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org, KVM list <kvm@vger.kernel.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] Re: >2 serial ports?
Date: Mon, 22 Mar 2010 11:35:17 +0300 [thread overview]
Message-ID: <4BA72BC5.1020303@msgid.tls.msk.ru> (raw)
In-Reply-To: <201003171118.09873.paul@codesourcery.com>
Paul Brook wrote at Wed, 17 Mar 2010 11:18:09 +0000:
>> Oh, well, yes, I remember. qemu is more strict on ISA irq sharing now.
>> A bit too strict.
>>
>> /me goes dig out a old patch which never made it upstream for some
>> reason I forgot. Attached.
>
> This is wrong. Two devices should never be manipulating the same qemu_irq
> object. If you want multiple devices connected to the same IRQ then you need
> an explicit multiplexer. e.g. arm_timer.c:sp804_set_irq.
So... what we have to do here?
I've looked at the mentioned routine, here it is:
/* Merge the IRQs from the two component devices. */
static void sp804_set_irq(void *opaque, int irq, int level)
{
sp804_state *s = (sp804_state *)opaque;
s->level[irq] = level;
qemu_set_irq(s->irq, s->level[0] || s->level[1]);
}
But I know nothing about qemu internals, so don't quite
understand how to do this in case of serial ports. I
see it is tracking two timers and raises the irq level
if at least one half is raised... That to say - I've
got the idea, but how to apply it to serial ports?
Thanks!
/mjt
next prev parent reply other threads:[~2010-03-22 8:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 8:38 >2 serial ports? Michael Tokarev
2010-03-17 9:17 ` Gerd Hoffmann
2010-03-17 9:17 ` [Qemu-devel] " Gerd Hoffmann
2010-03-17 10:33 ` Michael Tokarev
2010-03-17 10:33 ` [Qemu-devel] " Michael Tokarev
2010-03-17 11:18 ` Paul Brook
2010-03-17 11:18 ` Paul Brook
2010-03-22 8:35 ` Michael Tokarev [this message]
2010-03-22 8:35 ` Michael Tokarev
2010-03-22 9:02 ` Avi Kivity
2010-03-22 9:02 ` Avi Kivity
2010-03-17 9:19 ` Neo Jia
2010-03-17 10:35 ` Michael Tokarev
2010-03-17 18:45 ` Neo Jia
2010-03-17 19:16 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BA72BC5.1020303@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.