From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org,
"kvm@vger.kernel.org mailing list" <kvm@vger.kernel.org>,
Scott Wood <scottwood@freescale.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH 1/7] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS
Date: Wed, 17 Apr 2013 13:51:10 +0200 [thread overview]
Message-ID: <516E8CAE.9050500@redhat.com> (raw)
In-Reply-To: <1366133175-23986-2-git-send-email-agraf@suse.de>
Il 16/04/2013 19:26, Alexander Graf ha scritto:
> The concept of routing interrupt lines to an irqchip is nothing
> that is IOAPIC specific. Every irqchip has a maximum number of pins
> that can be linked to irq lines.
>
> So let's add a new define that allows us to reuse generic code for
> non-IOAPIC platforms.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/x86/include/asm/kvm_host.h | 2 ++
ia64 missing too.
Paolo
> include/linux/kvm_host.h | 2 +-
> virt/kvm/irq_comm.c | 2 +-
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 82f1dc6..6a1871b 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -43,6 +43,8 @@
> #define KVM_PIO_PAGE_OFFSET 1
> #define KVM_COALESCED_MMIO_PAGE_OFFSET 2
>
> +#define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS
> +
> #define CR0_RESERVED_BITS \
> (~(unsigned long)(X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS \
> | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM \
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 4a76aca..303d05b 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -307,7 +307,7 @@ struct kvm_kernel_irq_routing_entry {
> #ifdef __KVM_HAVE_IOAPIC
>
> struct kvm_irq_routing_table {
> - int chip[KVM_NR_IRQCHIPS][KVM_IOAPIC_NUM_PINS];
> + int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS];
> struct kvm_kernel_irq_routing_entry *rt_entries;
> u32 nr_rt_entries;
> /*
> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
> index 8efb580..f02659b 100644
> --- a/virt/kvm/irq_comm.c
> +++ b/virt/kvm/irq_comm.c
> @@ -480,7 +480,7 @@ int kvm_set_irq_routing(struct kvm *kvm,
>
> new->nr_rt_entries = nr_rt_entries;
> for (i = 0; i < 3; i++)
> - for (j = 0; j < KVM_IOAPIC_NUM_PINS; j++)
> + for (j = 0; j < KVM_IRQCHIP_NUM_PINS; j++)
> new->chip[i][j] = -1;
>
> for (i = 0; i < nr; ++i) {
>
next prev parent reply other threads:[~2013-04-17 11:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 17:26 [PATCH 0/7] KVM: irqfd generalization prepare patch set Alexander Graf
2013-04-16 17:26 ` [PATCH 1/7] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS Alexander Graf
2013-04-17 11:51 ` Paolo Bonzini [this message]
2013-04-16 17:26 ` [PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP Alexander Graf
2013-04-17 11:49 ` Paolo Bonzini
2013-04-17 11:53 ` Alexander Graf
2013-04-17 11:54 ` Paolo Bonzini
2013-04-17 11:59 ` Alexander Graf
2013-04-17 12:06 ` Paolo Bonzini
2013-04-17 12:10 ` Alexander Graf
2013-04-17 12:15 ` Paolo Bonzini
2013-04-17 12:16 ` Alexander Graf
2013-04-24 9:55 ` Gleb Natapov
2013-04-16 17:26 ` [PATCH 3/7] KVM: Remove kvm_get_intr_delivery_bitmask Alexander Graf
2013-04-16 17:26 ` [PATCH 4/7] KVM: Move irq routing to generic code Alexander Graf
2013-04-16 17:26 ` [PATCH 5/7] KVM: Extract generic irqchip logic into irqchip.c Alexander Graf
2013-04-17 11:50 ` Paolo Bonzini
2013-04-17 11:54 ` Alexander Graf
2013-04-17 12:05 ` Paolo Bonzini
2013-04-17 12:06 ` Alexander Graf
2013-04-16 17:26 ` [PATCH 6/7] KVM: Move irq routing setup to irqchip.c Alexander Graf
2013-04-16 17:26 ` [PATCH 7/7] KVM: Move irqfd resample cap handling to generic code Alexander Graf
2013-04-21 10:51 ` [PATCH 0/7] KVM: irqfd generalization prepare patch set Michael S. Tsirkin
2013-04-25 9:39 ` Alexander Graf
2013-04-24 10:20 ` Gleb Natapov
2013-04-25 7:28 ` Gleb Natapov
2013-04-25 9:35 ` Alexander Graf
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=516E8CAE.9050500@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=scottwood@freescale.com \
/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