From patchwork Mon Jul 6 18:35:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 50792 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E0452229FC for ; Mon, 6 Jul 2015 19:37:45 +0000 (UTC) Received: by lagc2 with SMTP id c2sf5819452lag.0 for ; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=2kv89VpYIO+ZnfpvUbETsuPy4d9lzJ5b/vZ5yE8qiq4=; b=MDLm4y609ipOSB6XvegNY/YPPj5GFtpUSI6xXcu3ZmnfkMcIZEl7fnoVXFvhBOiTV7 0/ZPZXB+XWgd/vWtltkg5t9kuX++yG3JUgbxHwMwA2q81A6RPyHrlFhpSS7kWCWL6PVh DKAF8Mk+GzE6PrwgfObLjI23pH1swk6QSWu0s2kG/SPQmPa6f0x40RBikbuxE0brs+HE RTtVfwzm+XKBHwNhD6w3xWidUJjzOodT4yRHJkoo32DgAWBJwWvj2JtYK7Ldf8QvoV7n MrzoIXUV4wrqSIFqJE4B5N23zFLIEOHyxVq0eOqOSQUXvHzN4+GqMVeaJRDvIrVoRKpG yF4g== X-Gm-Message-State: ALoCoQkabf2E2XiBEaZBcq02V/HnE0ltJljwe6YqLs7gfTBOuO7UqZVuCifNANgNtAVy0YozXtK8 X-Received: by 10.180.37.198 with SMTP id a6mr16040481wik.7.1436211464880; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.7 with SMTP id f7ls669480lah.48.gmail; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr444876lbb.29.1436211464619; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id gj2si16039531lbc.159.2015.07.06.12.37.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 12:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labgy5 with SMTP id gy5so15885575lab.2 for ; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) X-Received: by 10.112.93.37 with SMTP id cr5mr467629lbb.106.1436211464410; Mon, 06 Jul 2015 12:37:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1925809lbb; Mon, 6 Jul 2015 12:37:43 -0700 (PDT) X-Received: by 10.68.185.37 with SMTP id ez5mr982162pbc.74.1436211459284; Mon, 06 Jul 2015 12:37:39 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id sl6si30513738pac.192.2015.07.06.12.37.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 06 Jul 2015 12:37:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:52688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCCCv-0006Ik-9u for patch@linaro.org; Mon, 06 Jul 2015 15:37:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCCC3-0005Tv-S6 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 15:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCCBy-0001z9-Vh for qemu-devel@nongnu.org; Mon, 06 Jul 2015 15:36:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCCBy-0001yG-Nm for qemu-devel@nongnu.org; Mon, 06 Jul 2015 15:36:38 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 071A391596 for ; Mon, 6 Jul 2015 19:36:38 +0000 (UTC) Received: from gimli.home (ovpn-113-190.phx2.redhat.com [10.3.113.190]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t66IZ0Im011903; Mon, 6 Jul 2015 14:35:00 -0400 From: Alex Williamson To: qemu-devel@nongnu.org Date: Mon, 06 Jul 2015 12:35:00 -0600 Message-ID: <20150706183500.15635.41576.stgit@gimli.home> In-Reply-To: <20150706183311.15635.76314.stgit@gimli.home> References: <20150706183311.15635.76314.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/11] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.williamson@redhat.com 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.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Eric Auger 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 Acked-by: Paolo Bonzini Reviewed-by: Peter Maydell Signed-off-by: Alex Williamson --- 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 d631337..e345a6e 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1316,8 +1316,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) @@ -1327,8 +1327,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 66d4223..27b7ec1 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 6a0174e..7a89081 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 df57da0..de73b35 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1328,14 +1328,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; }