From patchwork Mon Jun 15 16:33:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 49886 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 55F36205DE for ; Mon, 15 Jun 2015 16:34:33 +0000 (UTC) Received: by lbbwc1 with SMTP id wc1sf2047369lbb.3 for ; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TruMgaZzx4g+sFV7I2gjBXyEaZSclKv6DFFjRWseySY=; b=m1KWhadXpAu9mhskNatPmnx3WSf8wwd/pe+JvYkO82PHfSZYykzn/qWZuHbNqDcydm Rv6jd8QZ6Gfx9Aj6NKxrruIr34tE+SB56bsoQv70Av7MlWZo6CNHCobn8VV7m/0UVEoz lan0PmBo8uuM4q7W6N0tjgBh07FymtFX6JtMDD/ck5VOVo7MU2DkcX5izt6+RnCE0GEm XSi58xnYHKgMfX/LUjLJRf2FouFnnLu2idiB8+ceHs+2ZB7bv2J8kmZGPYcuh4f/fGw6 QJeDfigPnSkwlx1gLbAFl3Ro0wELUy9qFLmC6LL48x4v4xZCgcZeO1cAEuL92VBimAxS aH3Q== X-Gm-Message-State: ALoCoQlEBWQv8TRnlx+5dsYaRBw/B2cnI6G+zHaFUs8ykGES0DFuSALpDcy5uMuxvnLk/gDSvSS0 X-Received: by 10.194.58.164 with SMTP id s4mr30488903wjq.3.1434386072404; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.71 with SMTP id t7ls927514lae.31.gmail; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) X-Received: by 10.112.24.233 with SMTP id x9mr1098487lbf.7.1434386072236; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ws3si10891000lbb.70.2015.06.15.09.34.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 09:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laka10 with SMTP id a10so13990445lak.0 for ; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) X-Received: by 10.152.88.68 with SMTP id be4mr9027642lab.76.1434386072132; Mon, 15 Jun 2015 09:34:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1533905lbb; Mon, 15 Jun 2015 09:34:31 -0700 (PDT) X-Received: by 10.180.90.209 with SMTP id by17mr33135464wib.2.1434386068030; Mon, 15 Jun 2015 09:34:28 -0700 (PDT) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com. [74.125.82.41]) by mx.google.com with ESMTPS id c13si22914168wjr.158.2015.06.15.09.34.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 09:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.41 as permitted sender) client-ip=74.125.82.41; Received: by wgez8 with SMTP id z8so73381324wge.0 for ; Mon, 15 Jun 2015 09:34:27 -0700 (PDT) X-Received: by 10.194.157.168 with SMTP id wn8mr52175969wjb.79.1434386067741; Mon, 15 Jun 2015 09:34:27 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id bh7sm19677484wjb.8.2015.06.15.09.34.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Jun 2015 09:34:26 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, pbonzini@redhat.com, alex.williamson@redhat.com Cc: christoffer.dall@linaro.org, patches@linaro.org, b.reynal@virtualopensystems.com, vikrams@codeaurora.org Subject: [RESEND PATCH v16 2/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix Date: Mon, 15 Jun 2015 17:33:54 +0100 Message-Id: <1434386038-9246-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1434386038-9246-1-git-send-email-eric.auger@linaro.org> References: <1434386038-9246-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Tested-by: Vikram Sethi --- 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; }