From: Avi Kivity <avi@qumranet.com>
To: "Xu, Anthony" <anthony.xu@intel.com>
Cc: kvm-ia64@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>,
kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] irq assignment
Date: Wed, 25 Jun 2008 14:53:20 +0300 [thread overview]
Message-ID: <486231B0.9080904@qumranet.com> (raw)
In-Reply-To: <51CFAB8CB6883745AE7B93B3E084EBE201D2C53B@pdsmsx412.ccr.corp.intel.com>
(copying qemu-devel)
Xu, Anthony wrote:
> Subject: [PATCH] Irq assignment
>
> 1. use bimodal _PRT
> 2. pci device can use irq > 15, reduce interrupt sharing
> 3. test by running linux guest in kvm-ia64, kvm-i32(w/ wo/ -no-kvm)
>
>
> +
> +static int ioapic_irq_count[IOAPIC_NUM_PINS];
> +
> void ioapic_set_irq(void *opaque, int vector, int level)
> {
> IOAPICState *s = opaque;
> -
> + if( vector >= 16 ){
> + if( level )
> + ioapic_irq_count[vector] += 1;
> + else
> + ioapic_irq_count[vector] -= 1;
> + level = (ioapic_irq_count[vector] != 0);
> + }
> +#ifdef KVM_CAP_IRQCHIP
> + if (kvm_enabled())
> + if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0))
> + return;
> +#endif
>
It's legal to call ioapic_set_irq(vector, 1) twice, which will screw up
the level calculation.
We need qemu_irq_or(), similar to qemu_irq_invert():
qemu_irq qemu_irq_or(qemu_irq irqs[], int nr);
Also, this is not the place for doing the or. The ioapic does not know
which interrupts are level connected and which are not. This belongs on
the pci level (or the mainboard level).
--
error compiling committee.c: too many arguments to function
parent reply other threads:[~2008-06-25 11:53 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <51CFAB8CB6883745AE7B93B3E084EBE201D2C53B@pdsmsx412.ccr.corp.intel.com>]
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=486231B0.9080904@qumranet.com \
--to=avi@qumranet.com \
--cc=anthony.xu@intel.com \
--cc=kvm-ia64@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).