From patchwork Fri Aug 3 13:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10555121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 180A614E2 for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 053302BCB6 for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA4A82BBCF; Fri, 3 Aug 2018 13:57:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4633429C45 for ; Fri, 3 Aug 2018 13:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=9t+X149UA7lcdzGRQd2lUloKzEtxeEGE7ARd5AnMrFg=; b=F8F RgvYFaiaVqBclnZvihN2TzK3+Apqdo+r3bOsyAHupbQ3h6Hb8Th7JWGCXYxY9gTprWy2KFTdUrxJY tY+j9nop5WVSxyq2MrAPhYSlRFC/erI8pa0Bt37IjFjUZxlMsvyC6fbFO1lQhSe/N0N2fsvGP3xt2 0363xPHM2CGs/5uYZSkFR8T/23rsJg7pd/xuHzIf8rlUSUyIy7eCPxBOXvrGQXhRT3kPD/1lT24nZ t4oNthKO6McN385DN72+9bVoYv8y7MkSd8toNCq+WaR3xkRCYRC8TuEK+HIg9Nm4iL3yTS9qJg9W3 EqPKZgMyyDVMeYxIh3nSduevSji7aRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaaF-0002gV-Lu; Fri, 03 Aug 2018 13:57:35 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaa9-0002eH-5x for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 13:57:34 +0000 Received: by mail-pf1-x441.google.com with SMTP id b11-v6so3297652pfo.3 for ; Fri, 03 Aug 2018 06:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PHQ7yNxJ6lPuxXq+MoW2dOPy5UfXv/j+KgXZyeUmOmw=; b=Lw7Ht7woMOzFlk9UmvcPOelSfsT0i/sCey5NmHUUS6LdfxgMyu96WlfqbEFL5EimlS 0T6KckVbnKo1jbK0lFrhP0vVKwTBXcH+vBptoWQkzpI+DQ4VBDM13DR7yULgmw9uMGp2 zQtRVwydGWpxmFKvp/ehquOcbFEEwI52MsXmKtGvaIOn1w9WDGEgsVJpA6jmTH9rXLQh iCIijOQIIepHTzaQ15QHs4JhIrFMdhjqSXc+Lz7G3jlCcAY4+NMlRayxEYfknr/OSm1z PJ8rtX8+yHZdqzFXVWl+KrD8IuVPbXobwkLy6DF2AL99ZdhVlekbTJSA6mYOdnwLEwXT qAdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PHQ7yNxJ6lPuxXq+MoW2dOPy5UfXv/j+KgXZyeUmOmw=; b=Iljbmy2gEb/wjgIKatgdh+WwTVQ5cjTDpl+aVE2eVKEv+g+/IA03IexA03/sMewzoa 26KpILbgzkSBUD9GD4Zrmzr1SITaabX/lGgzv1R4LsmtMKlMNE5xpvXI0txQG4SXisJB bscVtN2fSfThnXbCzyY+8ZNnJSpbZSXQNMjalTMjEcvDrSU262KimXv5koy+Yt4kq0MT nRcfbCypbPm00IS14uNn76RahjAyIr0cHCGYsdEIRgRSipMJAaPhzFOiI87RK+FSFm/R SY7twZgKlEwZvZIZ24K2dNndXfCMIu2qEeabp8PdpTtZCCv3W8OHrDIMuB1ijGtEOQHF PlOQ== X-Gm-Message-State: AOUpUlHWRTbbLyobXtQS9RTKKf1kDKCAKKUsKdWRlowsPfom8EcIgaFR puY3a98kvSllk7efuL2S58U= X-Google-Smtp-Source: AAOMgpdeZDJHu4jeJyjXtqS1nyARExkvhRant+yCzXmzL0jt5lZPZG28HYvAyjL4VFwseqWUXczwdA== X-Received: by 2002:a63:5c52:: with SMTP id n18-v6mr3902511pgm.360.1533304638128; Fri, 03 Aug 2018 06:57:18 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id p5-v6sm6755173pfn.57.2018.08.03.06.57.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 06:57:17 -0700 (PDT) From: Jia He X-Google-Original-From: Jia He To: Christoffer Dall , Marc Zyngier , Catalin Marinas , Eric Auger , Ard Biesheuvel Subject: [PATCH 1/2] KVM: arm/arm64: vgic: move DEBUG_SPINLOCK_BUG_ON to vgic.h Date: Fri, 3 Aug 2018 21:57:03 +0800 Message-Id: <1533304624-43250-1-git-send-email-jia.he@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_065729_225722_09DF4BA8 X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jia He , Andre Przywara , Jia He , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is to let DEBUG_SPINLOCK_BUG_ON be commonly used in vgic-v2 and vgic-v3. Signed-off-by: Jia He --- virt/kvm/arm/vgic/vgic.c | 6 ------ virt/kvm/arm/vgic/vgic.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 33c8325..c22cea6 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -28,12 +28,6 @@ #define CREATE_TRACE_POINTS #include "trace.h" -#ifdef CONFIG_DEBUG_SPINLOCK -#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) -#else -#define DEBUG_SPINLOCK_BUG_ON(p) -#endif - struct vgic_global kvm_vgic_global_state __ro_after_init = { .gicv3_cpuif = STATIC_KEY_FALSE_INIT, }; diff --git a/virt/kvm/arm/vgic/vgic.h b/virt/kvm/arm/vgic/vgic.h index ead00b2..ea51fcc 100644 --- a/virt/kvm/arm/vgic/vgic.h +++ b/virt/kvm/arm/vgic/vgic.h @@ -103,6 +103,12 @@ #define KVM_VGIC_V3_RDIST_COUNT_MASK GENMASK_ULL(63, 52) #define KVM_VGIC_V3_RDIST_COUNT_SHIFT 52 +#ifdef CONFIG_DEBUG_SPINLOCK +#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) +#else +#define DEBUG_SPINLOCK_BUG_ON(p) +#endif + /* Requires the irq_lock to be held by the caller. */ static inline bool irq_is_pending(struct vgic_irq *irq) { From patchwork Fri Aug 3 13:57:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10555123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAA8B15E9 for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7A012BBCF for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBD8F2BD32; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DBEA2BBCF for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=q08v2c99ljXf9ZbGx7oag7whYrUNTk2GA0U02RxCmZs=; b=qXQnz6JygDzEp6FYhMmfPiy73O wtnk1StdaWa+wTlIkzbOd2xNn7N71eMDzthWVLrCYYy4XnN+LQP1PrBeTu4vSBx+Sn0t4dyuXCmQJ DqbyER6ZAUSSF8K8qIX90yhRLx72K892jLE4LUUocHifiG/wcoKWUV5aGzWnTljqnfIZn7QNI8UWu Y0p8HQVDgKfwJrvv8lq1PgQ+gAl0jtNK4iEgRmc988GokkorKGFmFePSZ3ItOmDli0jRZPieD9eip fV1FuaCLwOBajJW0eW7nURd9TAqtZ9cHRYglEavwU6F3iWRAfkDHdTybNqHP4xzThlxBlFSGY4kJF 9tRtSDPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaaM-0002mj-5a; Fri, 03 Aug 2018 13:57:42 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaa9-0002eu-5x for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 13:57:34 +0000 Received: by mail-pf1-x441.google.com with SMTP id j8-v6so3293858pff.6 for ; Fri, 03 Aug 2018 06:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OPQwdkXqDlJWFQwM8PJrKFSYX6aJHA1emkWP9neFEcg=; b=cqHe8mDNvNRM4rqyTE4fY+zvYmCxeu6hch6FR0yfbBWD5dF1WVjPr+kA52003fg3AJ RJI9h33DY5vhkLu2J7Aw37ssxXLFZUWfuF90VDV2kbx28StEBIFynCID+RIckcb+Q8Wq ebNNZQoFe20gjXUVVG3SyMvCbOlx/NILcX+EmemxOvj82dZbNB+pcxbV10wJJoubJ0vo VYqbKoRY7jN8gzbhcMAiWnR8jWcBLzGqnf4vnnucTl86Nis8oaJW93TFBmoaKaxOMpM3 TvxXcsSH0O5fMwBS0OsNjDbVdIGBhttdjjjt2+HJkKIn8exLx/Wu9ppOLtqB1E5PVTyl XxTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OPQwdkXqDlJWFQwM8PJrKFSYX6aJHA1emkWP9neFEcg=; b=mc4LY7HyMMqamYQg9ReOh1QZGlfz1HLZUsuNIxrStHdTpshriTB/dg7vuoTDUy70+x lq50Z4vO/3C3AxD7ush0BjuB4pTS1n7uPDRVTX4R5259fmKnYbk9xBuvLBmFkT433xB0 Ik0G1BVaHxUzPV1/uFt1OPuja2rFa6zxzfuxllqGjVwib6k9Lgg4cqhGY+WvXYXDK5Od qs9wfH62niQoaelHtNK1lIkL8CabdHVNObnvDN9yb9QSY6TACgQDJRlFzfeSlcEmWnLz /s0kYBAMSUSN1ffTn3Yju3V97c/BiT57HRATq7mlAQJdhsnuTLx8Noqla+z9lyHVOy6H Xkkw== X-Gm-Message-State: AOUpUlEs70X/NQdY+6UcD3qlY2/Me5s2MaoRAjaKM0mXvv2WB7r71xTv qNvXTqlal42DHhuoNU3Bx0sBhvN9hNY= X-Google-Smtp-Source: AAOMgpfsXbrBD/0IKAQ5gTIeIxIW4Z34msz8guaCp1MASNSDSQPTg+HI+wGSMLMNzV1EdmBjNdONWg== X-Received: by 2002:a63:f344:: with SMTP id t4-v6mr3899062pgj.428.1533304643814; Fri, 03 Aug 2018 06:57:23 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id p5-v6sm6755173pfn.57.2018.08.03.06.57.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 06:57:23 -0700 (PDT) From: Jia He X-Google-Original-From: Jia He To: Christoffer Dall , Marc Zyngier , Catalin Marinas , Eric Auger , Ard Biesheuvel Subject: [PATCH 2/2] KVM: arm/arm64: vgic: no need to call spin_lock_irqsave/restore when irq is disabled Date: Fri, 3 Aug 2018 21:57:04 +0800 Message-Id: <1533304624-43250-2-git-send-email-jia.he@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1533304624-43250-1-git-send-email-jia.he@hxt-semitech.com> References: <1533304624-43250-1-git-send-email-jia.he@hxt-semitech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_065729_226277_14677D91 X-CRM114-Status: GOOD ( 12.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jia He , Andre Przywara , Jia He , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Because kvm_vgic_sync_hwstate currently is definitly in the context which irq is disabled (local_irq_disable/enable). There is no need to call spin_lock_irqsave/restore in vgic_fold_lr_state and vgic_prune_ap_list This patch replace them with the spin_lock/unlock no irq version Signed-off-by: Jia He Acked-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-v2.c | 7 ++++--- virt/kvm/arm/vgic/vgic-v3.c | 7 ++++--- virt/kvm/arm/vgic/vgic.c | 13 +++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c index a5f2e44..487f5f2 100644 --- a/virt/kvm/arm/vgic/vgic-v2.c +++ b/virt/kvm/arm/vgic/vgic-v2.c @@ -62,7 +62,8 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu) struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; struct vgic_v2_cpu_if *cpuif = &vgic_cpu->vgic_v2; int lr; - unsigned long flags; + + DEBUG_SPINLOCK_BUG_ON(!irqs_disabled()); cpuif->vgic_hcr &= ~GICH_HCR_UIE; @@ -83,7 +84,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu) irq = vgic_get_irq(vcpu->kvm, vcpu, intid); - spin_lock_irqsave(&irq->irq_lock, flags); + spin_lock(&irq->irq_lock); /* Always preserve the active bit */ irq->active = !!(val & GICH_LR_ACTIVE_BIT); @@ -126,7 +127,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu) vgic_irq_set_phys_active(irq, false); } - spin_unlock_irqrestore(&irq->irq_lock, flags); + spin_unlock(&irq->irq_lock); vgic_put_irq(vcpu->kvm, irq); } diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c index cdce653..b66b513 100644 --- a/virt/kvm/arm/vgic/vgic-v3.c +++ b/virt/kvm/arm/vgic/vgic-v3.c @@ -46,7 +46,8 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu) struct vgic_v3_cpu_if *cpuif = &vgic_cpu->vgic_v3; u32 model = vcpu->kvm->arch.vgic.vgic_model; int lr; - unsigned long flags; + + DEBUG_SPINLOCK_BUG_ON(!irqs_disabled()); cpuif->vgic_hcr &= ~ICH_HCR_UIE; @@ -75,7 +76,7 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu) if (!irq) /* An LPI could have been unmapped. */ continue; - spin_lock_irqsave(&irq->irq_lock, flags); + spin_lock(&irq->irq_lock); /* Always preserve the active bit */ irq->active = !!(val & ICH_LR_ACTIVE_BIT); @@ -118,7 +119,7 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu) vgic_irq_set_phys_active(irq, false); } - spin_unlock_irqrestore(&irq->irq_lock, flags); + spin_unlock(&irq->irq_lock); vgic_put_irq(vcpu->kvm, irq); } diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index c22cea6..7cfdfbc 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -593,10 +593,11 @@ static void vgic_prune_ap_list(struct kvm_vcpu *vcpu) { struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; struct vgic_irq *irq, *tmp; - unsigned long flags; + + DEBUG_SPINLOCK_BUG_ON(!irqs_disabled()); retry: - spin_lock_irqsave(&vgic_cpu->ap_list_lock, flags); + spin_lock(&vgic_cpu->ap_list_lock); list_for_each_entry_safe(irq, tmp, &vgic_cpu->ap_list_head, ap_list) { struct kvm_vcpu *target_vcpu, *vcpuA, *vcpuB; @@ -637,7 +638,7 @@ static void vgic_prune_ap_list(struct kvm_vcpu *vcpu) /* This interrupt looks like it has to be migrated. */ spin_unlock(&irq->irq_lock); - spin_unlock_irqrestore(&vgic_cpu->ap_list_lock, flags); + spin_unlock(&vgic_cpu->ap_list_lock); /* * Ensure locking order by always locking the smallest @@ -651,7 +652,7 @@ static void vgic_prune_ap_list(struct kvm_vcpu *vcpu) vcpuB = vcpu; } - spin_lock_irqsave(&vcpuA->arch.vgic_cpu.ap_list_lock, flags); + spin_lock(&vcpuA->arch.vgic_cpu.ap_list_lock); spin_lock_nested(&vcpuB->arch.vgic_cpu.ap_list_lock, SINGLE_DEPTH_NESTING); spin_lock(&irq->irq_lock); @@ -676,7 +677,7 @@ static void vgic_prune_ap_list(struct kvm_vcpu *vcpu) spin_unlock(&irq->irq_lock); spin_unlock(&vcpuB->arch.vgic_cpu.ap_list_lock); - spin_unlock_irqrestore(&vcpuA->arch.vgic_cpu.ap_list_lock, flags); + spin_unlock(&vcpuA->arch.vgic_cpu.ap_list_lock); if (target_vcpu_needs_kick) { kvm_make_request(KVM_REQ_IRQ_PENDING, target_vcpu); @@ -686,7 +687,7 @@ static void vgic_prune_ap_list(struct kvm_vcpu *vcpu) goto retry; } - spin_unlock_irqrestore(&vgic_cpu->ap_list_lock, flags); + spin_unlock(&vgic_cpu->ap_list_lock); } static inline void vgic_fold_lr_state(struct kvm_vcpu *vcpu)