qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>, qemu-stable@nongnu.org
Subject: [Qemu-devel] [PULL 01/14] KVM: Fix GSI number space limit
Date: Fri, 20 Jun 2014 14:11:10 +0200	[thread overview]
Message-ID: <1403266283-1517-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1403266283-1517-1-git-send-email-pbonzini@redhat.com>

From: Alexander Graf <agraf@suse.de>

KVM tells us the number of GSIs it can handle inside the kernel. That value is
basically KVM_MAX_IRQ_ROUTES. However when we try to set the GSI mapping table,
it checks for

    r = -EINVAL;
    if (routing.nr >= KVM_MAX_IRQ_ROUTES)
        goto out;

erroring out even when we're only using all of the GSIs. To make sure we never
hit that limit, let's reduce the number of GSIs we get from KVM by one.

Cc: qemu-stable@nongnu.org
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 kvm-all.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 4e19eff..56a251b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -938,7 +938,7 @@ void kvm_init_irq_routing(KVMState *s)
 {
     int gsi_count, i;
 
-    gsi_count = kvm_check_extension(s, KVM_CAP_IRQ_ROUTING);
+    gsi_count = kvm_check_extension(s, KVM_CAP_IRQ_ROUTING) - 1;
     if (gsi_count > 0) {
         unsigned int gsi_bits, i;
 
-- 
1.7.1

  reply	other threads:[~2014-06-20 12:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 12:11 [Qemu-devel] [PULL 00/14] Pending KVM patches for 2.1 Paolo Bonzini
2014-06-20 12:11 ` Paolo Bonzini [this message]
2014-06-20 12:11 ` [Qemu-devel] [PULL 02/14] target-mips: Reset CPU timer consistently Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 03/14] hw/mips/cputimer: Don't start periodic timer in KVM mode Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 04/14] hw/mips: Add API to convert KVM guest KSEG0 <-> GPA Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 05/14] target-mips: get_physical_address: Add defines for segment bases Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 06/14] target-mips: get_physical_address: Add KVM awareness Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 07/14] kvm: Allow arch to set sigmask length Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 08/14] target-mips: kvm: Add main KVM support for MIPS Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 09/14] target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset() Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 10/14] hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctls Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 11/14] hw/mips: malta: Add KVM support Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 12/14] target-mips: Enable KVM support in build system Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 13/14] MAINTAINERS: Add entry for MIPS KVM Paolo Bonzini
2014-06-20 12:11 ` [Qemu-devel] [PULL 14/14] hw/mips: malta: Don't boot from flash with KVM T&E Paolo Bonzini
2014-06-20 19:01 ` [Qemu-devel] [PULL 00/14] Pending KVM patches for 2.1 Peter Maydell

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=1403266283-1517-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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).