From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Auger <eric.auger@linaro.org>,
eric.auger@st.com, qemu-devel@nongnu.org,
peter.maydell@linaro.org, peter.crosthwaite@xilinx.com,
alex.williamson@redhat.com
Cc: b.reynal@virtualopensystems.com, christoffer.dall@linaro.org,
vikrams@codeaurora.org, patches@linaro.org
Subject: Re: [Qemu-devel] [RESEND PATCH v16 2/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix
Date: Wed, 24 Jun 2015 11:53:12 +0200 [thread overview]
Message-ID: <558A7E08.1030106@redhat.com> (raw)
In-Reply-To: <1434386038-9246-3-git-send-email-eric.auger@linaro.org>
On 15/06/2015 18:33, Eric Auger wrote:
> Anticipating for the introduction of new add/remove functions taking
> a qemu_irq parameter, let's rename existing ones with a gsi suffix.
>
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> Tested-by: Vikram Sethi <vikrams@codeaurora.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>
> v15 -> v16:
> - added Vikram's T-b
> - resolve rebase conflict in kvm.h
> ---
> hw/s390x/virtio-ccw.c | 8 ++++----
> hw/vfio/pci.c | 6 +++---
> hw/virtio/virtio-pci.c | 4 ++--
> include/sysemu/kvm.h | 7 ++++---
> kvm-all.c | 7 ++++---
> kvm-stub.c | 7 ++++---
> 6 files changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index b7a88d6..4a2b0f1 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -1186,8 +1186,8 @@ static int virtio_ccw_add_irqfd(VirtioCcwDevice *dev, int n)
> VirtQueue *vq = virtio_get_queue(vdev, n);
> EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
>
> - return kvm_irqchip_add_irqfd_notifier(kvm_state, notifier, NULL,
> - dev->routes.gsi[n]);
> + return kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, notifier, NULL,
> + dev->routes.gsi[n]);
> }
>
> static void virtio_ccw_remove_irqfd(VirtioCcwDevice *dev, int n)
> @@ -1197,8 +1197,8 @@ static void virtio_ccw_remove_irqfd(VirtioCcwDevice *dev, int n)
> EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
> int ret;
>
> - ret = kvm_irqchip_remove_irqfd_notifier(kvm_state, notifier,
> - dev->routes.gsi[n]);
> + ret = kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, notifier,
> + dev->routes.gsi[n]);
> assert(ret == 0);
> }
>
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index e0e339a..ac85624 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -597,7 +597,7 @@ static void vfio_add_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage *msg,
> return;
> }
>
> - if (kvm_irqchip_add_irqfd_notifier(kvm_state, &vector->kvm_interrupt,
> + if (kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, &vector->kvm_interrupt,
> NULL, virq) < 0) {
> kvm_irqchip_release_virq(kvm_state, virq);
> event_notifier_cleanup(&vector->kvm_interrupt);
> @@ -609,8 +609,8 @@ static void vfio_add_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage *msg,
>
> static void vfio_remove_kvm_msi_virq(VFIOMSIVector *vector)
> {
> - kvm_irqchip_remove_irqfd_notifier(kvm_state, &vector->kvm_interrupt,
> - vector->virq);
> + kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, &vector->kvm_interrupt,
> + vector->virq);
> kvm_irqchip_release_virq(kvm_state, vector->virq);
> vector->virq = -1;
> event_notifier_cleanup(&vector->kvm_interrupt);
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index d7cf34c..1d4435a 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -495,7 +495,7 @@ static int kvm_virtio_pci_irqfd_use(VirtIOPCIProxy *proxy,
> VirtQueue *vq = virtio_get_queue(vdev, queue_no);
> EventNotifier *n = virtio_queue_get_guest_notifier(vq);
> int ret;
> - ret = kvm_irqchip_add_irqfd_notifier(kvm_state, n, NULL, irqfd->virq);
> + ret = kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, n, NULL, irqfd->virq);
> return ret;
> }
>
> @@ -509,7 +509,7 @@ static void kvm_virtio_pci_irqfd_release(VirtIOPCIProxy *proxy,
> VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
> int ret;
>
> - ret = kvm_irqchip_remove_irqfd_notifier(kvm_state, n, irqfd->virq);
> + ret = kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, n, irqfd->virq);
> assert(ret == 0);
> }
>
> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
> index f459fbd..acb3025 100644
> --- a/include/sysemu/kvm.h
> +++ b/include/sysemu/kvm.h
> @@ -416,9 +416,10 @@ void kvm_irqchip_release_virq(KVMState *s, int virq);
>
> int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter);
>
> -int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
> - EventNotifier *rn, int virq);
> -int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
> +int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + EventNotifier *rn, int virq);
> +int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + int virq);
> void kvm_pc_gsi_handler(void *opaque, int n, int level);
> void kvm_pc_setup_irq_routing(bool pci_enabled);
> void kvm_init_irq_routing(KVMState *s);
> diff --git a/kvm-all.c b/kvm-all.c
> index 53e01d4..730b818 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1325,14 +1325,15 @@ int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
> }
> #endif /* !KVM_CAP_IRQ_ROUTING */
>
> -int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
> - EventNotifier *rn, int virq)
> +int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + EventNotifier *rn, int virq)
> {
> return kvm_irqchip_assign_irqfd(s, event_notifier_get_fd(n),
> rn ? event_notifier_get_fd(rn) : -1, virq, true);
> }
>
> -int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
> +int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + int virq)
> {
> return kvm_irqchip_assign_irqfd(s, event_notifier_get_fd(n), -1, virq,
> false);
> diff --git a/kvm-stub.c b/kvm-stub.c
> index 7ba90c5..977de21 100644
> --- a/kvm-stub.c
> +++ b/kvm-stub.c
> @@ -137,13 +137,14 @@ int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter)
> return -ENOSYS;
> }
>
> -int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
> - EventNotifier *rn, int virq)
> +int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + EventNotifier *rn, int virq)
> {
> return -ENOSYS;
> }
>
> -int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
> +int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
> + int virq)
> {
> return -ENOSYS;
> }
>
next prev parent reply other threads:[~2015-06-24 9:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 16:33 [Qemu-devel] [RESEND PATCH v16 0/6] KVM platform device passthrough Eric Auger
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation Eric Auger
2015-06-16 8:29 ` Peter Maydell
2015-06-16 8:44 ` Eric Auger
2015-06-16 8:57 ` Peter Maydell
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 2/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix Eric Auger
2015-06-24 9:53 ` Paolo Bonzini [this message]
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 3/6] kvm-all.c: add qemu_irq/gsi hash table and utility routines Eric Auger
2015-06-24 9:53 ` Paolo Bonzini
2015-06-26 11:41 ` Peter Maydell
2015-06-26 11:56 ` Eric Auger
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 4/6] intc: arm_gic_kvm: set the qemu_irq/gsi mapping Eric Auger
2015-06-24 9:54 ` Paolo Bonzini
2015-06-26 11:43 ` Peter Maydell
2015-06-26 11:59 ` Eric Auger
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 5/6] sysbus: add irq_routing_notifier Eric Auger
2015-06-15 16:33 ` [Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd support Eric Auger
2015-06-26 11:57 ` Peter Maydell
2015-06-26 12:19 ` Eric Auger
2015-06-26 16:21 ` Alex Williamson
2015-06-26 16:26 ` Paolo Bonzini
2015-06-26 16:31 ` Eric Auger
2015-06-26 16:46 ` Alex Williamson
2015-06-22 7:56 ` [Qemu-devel] [RESEND PATCH v16 0/6] KVM platform device passthrough Eric Auger
2015-06-24 9:55 ` Paolo Bonzini
2015-06-24 9:59 ` Eric Auger
2015-06-24 10:10 ` Paolo Bonzini
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=558A7E08.1030106@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=b.reynal@virtualopensystems.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@linaro.org \
--cc=eric.auger@st.com \
--cc=patches@linaro.org \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=vikrams@codeaurora.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.