From patchwork Tue Jul 23 10:12:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Ott X-Patchwork-Id: 13739834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87B37C3DA49 for ; Tue, 23 Jul 2024 10:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xzuyk5RPlpL9t0A/8o4faeOblpZCzvEu932Ng83fGMs=; b=EAZx0RN7JcwCRerMpvjh/h0sjf Gfg6mdoqC5BQR3Nki670vdBzZEW6zkXifRtq9nwNmAZZoj7b+nftAPMB07niR81gIJb08hVwosBEB 0Jr9L6CjCdALQMtvwDxoPgTMHDW4Ilo/WtmkDGTE6ireTXJdPj+if++OoqpoaWgmiC55E8N3Mi3k2 kH66GxcuqpjWTwwIEtWKMJKWdGCuqHUFnPxTbHIYBmV8uQPkBwKbb+girX2jPs9gS4JkQvoMqvELy s3VTfCIdUrF8vn6Lb3alypqg8wxV2E0o2TK0SpUkcVGtr/NUeqTlWTjses4zvqjdRosOdBO4GsCJP OOuMEUUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCX2-0000000C8BW-0vMG; Tue, 23 Jul 2024 10:14:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCWd-0000000C84Z-2JPc for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2024 10:13:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721729622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xzuyk5RPlpL9t0A/8o4faeOblpZCzvEu932Ng83fGMs=; b=BKof8rkoWI7FDnZLaR+VmHeKiBFuAziS8NfIqwxentzjvgU1Rmi/ZFAuLNyH8KEtQM0jhj 7G9UKR88XdQmHg4Y0mps2gP8AMs72w5CZUWV2rN1omFWeE0eLyGPpfLBiqdFtQcWjL8C8z u7Cm3T3G9+C2q9+i3mB4gHjR7kFdhWI= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-RbEHnraiO7KvypG3gqMuVA-1; Tue, 23 Jul 2024 06:12:14 -0400 X-MC-Unique: RbEHnraiO7KvypG3gqMuVA-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7a16375187aso725999485a.1 for ; Tue, 23 Jul 2024 03:12:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721729533; x=1722334333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xzuyk5RPlpL9t0A/8o4faeOblpZCzvEu932Ng83fGMs=; b=rqUiKlXeRhf8YWGI95rIySsti4+ah/4p5hScrUu3cEOFG28ZE31MoDUwVwssvGP5Jq Ae4fIGfaL/ftPlioQogV627pk3g/shE62VkUqeSYylHtAUvfk1fE6mX6v9YFpvizokqv 4fAb+Jm31/kbf2ZJwGQZyq6OeoAU6zB3n7wtt9Src7JszgOFRHnwoH35d8zfXmFNlWGn 8eiGmw3jUNB9EnZ2iNJf6RZnXIjde/3eEN9zXnhrfba7TdJJp4XRhfJDgjIBIjit0qPI YpXkMX951eBtzl9KYTu0Rry/E7P6berrUGo6HiU6ZbTtUe+8DrtFCYvXWMhXwofL8w5w OsCw== X-Gm-Message-State: AOJu0YwOWRtG+jBdeOYgbgpn+nJNKhfhEdIKdCsOc/qAr7wdHruu3ffe eUhbehSdhGFe2pUy3hAdy+MKF7x0o9NYUphE6cr0+QKCVYXIha6xQxUV/Uz+qXyowS6/VyVgf+w Zqo+WitHfBNXUEThMrFc7wSCuI7MiP0W0m2F2XIkH7Eoo5gt30awr2dWgc3yLd5BRg5go3PYya9 gOyNGhgn2JBRFAUlsuYV1eAtV6rtBkbRt8wd91uce289CsmyqnjKt4CQ== X-Received: by 2002:a05:620a:394a:b0:79f:16c8:b04a with SMTP id af79cd13be357-7a1c06bc41fmr275053385a.26.1721729533472; Tue, 23 Jul 2024 03:12:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvx7LA7H50ASsJ8L06HMjDMhwLdP2mNIndsn8L+inHJpH2PTr3YecDjb7uZQ/0eEz1EtS9Fw== X-Received: by 2002:a05:620a:394a:b0:79f:16c8:b04a with SMTP id af79cd13be357-7a1c06bc41fmr275049785a.26.1721729532879; Tue, 23 Jul 2024 03:12:12 -0700 (PDT) Received: from rh.redhat.com (p200300c93f45e50062e5f8c654844c9a.dip0.t-ipconnect.de. [2003:c9:3f45:e500:62e5:f8c6:5484:4c9a]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1990063f2sm463780085a.64.2024.07.23.03.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 03:12:12 -0700 (PDT) From: Sebastian Ott To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Zenghui Yu , Mark Rutland Subject: [PATCH v2 1/3] KVM: arm64: fix override-init warnings in W=1 builds Date: Tue, 23 Jul 2024 12:12:02 +0200 Message-ID: <20240723101204.7356-2-sebott@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723101204.7356-1-sebott@redhat.com> References: <20240723101204.7356-1-sebott@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240723_031343_671499_653A64C1 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add -Wno-override-init to the build flags for sys_regs.c, handle_exit.c, and switch.c to fix warnings like the following: arch/arm64/kvm/hyp/vhe/switch.c:271:43: warning: initialized field overwritten [-Woverride-init] 271 | [ESR_ELx_EC_CP15_32] = kvm_hyp_handle_cp15_32, | Signed-off-by: Sebastian Ott --- arch/arm64/kvm/Makefile | 3 +++ arch/arm64/kvm/hyp/nvhe/Makefile | 2 ++ arch/arm64/kvm/hyp/vhe/Makefile | 2 ++ 3 files changed, 7 insertions(+) diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile index a6497228c5a8..86a629aaf0a1 100644 --- a/arch/arm64/kvm/Makefile +++ b/arch/arm64/kvm/Makefile @@ -10,6 +10,9 @@ include $(srctree)/virt/kvm/Makefile.kvm obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM) += hyp/ +CFLAGS_sys_regs.o += -Wno-override-init +CFLAGS_handle_exit.o += -Wno-override-init + kvm-y += arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \ inject_fault.o va_layout.o handle_exit.o \ guest.o debug.o reset.o sys_regs.o stacktrace.o \ diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index 782b34b004be..b43426a493df 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -20,6 +20,8 @@ HOST_EXTRACFLAGS += -I$(objtree)/include lib-objs := clear_page.o copy_page.o memcpy.o memset.o lib-objs := $(addprefix ../../../lib/, $(lib-objs)) +CFLAGS_switch.nvhe.o += -Wno-override-init + hyp-obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \ hyp-main.o hyp-smp.o psci-relay.o early_alloc.o page_alloc.o \ cache.o setup.o mm.o mem_protect.o sys_regs.o pkvm.o stacktrace.o ffa.o diff --git a/arch/arm64/kvm/hyp/vhe/Makefile b/arch/arm64/kvm/hyp/vhe/Makefile index 3b9e5464b5b3..afc4aed9231a 100644 --- a/arch/arm64/kvm/hyp/vhe/Makefile +++ b/arch/arm64/kvm/hyp/vhe/Makefile @@ -6,6 +6,8 @@ asflags-y := -D__KVM_VHE_HYPERVISOR__ ccflags-y := -D__KVM_VHE_HYPERVISOR__ +CFLAGS_switch.o += -Wno-override-init + obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \ ../fpsimd.o ../hyp-entry.o ../exception.o From patchwork Tue Jul 23 10:12:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Ott X-Patchwork-Id: 13739833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C7DFC3DA63 for ; Tue, 23 Jul 2024 10:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eYU79afplONI6yVx+AGbEJT6iE6q/eJtdNUT3lyaw3g=; b=eZobDTmaZ3f59q6xvMAJSxmSde BPVTC9CqYrVWE80DdrTdMQAARAnL9wET3+9VCEW4KADQiGcJ2fgRbDM0F1s6Kpb0xN1Zp4uAHyLuQ Xd5vl1slcxjA68+TCiVv0cZ7Ex5sV4mWjcyJQZ3FZWl+zRQ9R4vfUjDRfRYIYOe0wPYZ0O6NUJ7XL mzr0sGZm8xYh6lP2KpNepwK5wsVEOvP7NayPKfCBujkKweHnF58nmw7kM1QdlCvYo4FuPy4ZSlFG1 Mjn3tJb3CzgztAd9OlsF924RrbU0HrcWMkTfT4Uj9TXVNQrEb2RIJRzUrk6tAUt027FMg2WuhUKz3 QUMru3SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCWE-0000000C7vq-1iDg; Tue, 23 Jul 2024 10:13:18 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCVT-0000000C7e4-45ox for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2024 10:12:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721729541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eYU79afplONI6yVx+AGbEJT6iE6q/eJtdNUT3lyaw3g=; b=BSk/1qQdeqRflm12nlD/UNb1jjp1x9eObI6glT7IBKPzyPk+YOTyekHttaKJjBu5qO6d88 TU3suQUnuiqzxzxzq7FHyD04hNF5pGeyieeJ1Wx/kZKs8XWE5620lvCY4dJiHmNufh0r5X knLjaiNQLqTQhQd1jZEzZHXP+F07E4M= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-4Mj0pYy_PsKFbIiam4WCXA-1; Tue, 23 Jul 2024 06:12:17 -0400 X-MC-Unique: 4Mj0pYy_PsKFbIiam4WCXA-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a199a3eebfso626969185a.2 for ; Tue, 23 Jul 2024 03:12:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721729537; x=1722334337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eYU79afplONI6yVx+AGbEJT6iE6q/eJtdNUT3lyaw3g=; b=BjxUYW92nJ0TBMRoeACmQyIYfSk99HgsQC6yUQIHYiRODqA6XOS29MylcOCRIkmOX6 EMbw/+M1FZyCPB5ZLlojlz4JpxxyucbuXQEjTVtd7I+f29ewKbYTIqOBmLEftTOeUg82 ARrlnKoqZoU/hbBTqAVHxLmD9TlHJJWh8RWqzbncMq9p6kfnuAxCu/gMZ0dw/HNkEwFx p8lJ5nWLTcCDGE452OGer8jacDxSfzubhA8Vo6LF4PymkfSd4AsPQVEtYQG+EwXTzmFi DzbpDCSX78BAVMAV0Z9s0jAfZKhjEZ5pFr13Xw49kMQDqnNUI8+WtPeOhwNMvFP/uJbw 7EWg== X-Gm-Message-State: AOJu0YzExhseUXm9RdNmfXoatAm53HWYU71lgebNGdkfVn+Ary+Yyppb Ugt+wHbaaaeNDfWagp0ib2U00GEmYw4kGBWMVaHnpiZTkRU+OBv0qmNeJIX5JSaeQfi4VGIdwbB nD1xMnZPkPcr2IFh6Ny8xBP5sX5iO2kS3ptzLIhDA1pXhzbdIEL5mJOJWbIIbHp7gqrj6ciHpNp /diZVrQYAy93ileJQ14xZzpZIaqZSL612wn634TJfvcfX4GXTnvlmBog== X-Received: by 2002:a05:620a:2889:b0:79f:186e:40ae with SMTP id af79cd13be357-7a1a66656edmr1162832885a.53.1721729536633; Tue, 23 Jul 2024 03:12:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLHZv1++yvDs2k3NZSaNv8PP8WkhYN1uecWcb93Utq4aaTWS6WbOltpz2JXXEdPG07aFrkHg== X-Received: by 2002:a05:620a:2889:b0:79f:186e:40ae with SMTP id af79cd13be357-7a1a66656edmr1162829385a.53.1721729536084; Tue, 23 Jul 2024 03:12:16 -0700 (PDT) Received: from rh.redhat.com (p200300c93f45e50062e5f8c654844c9a.dip0.t-ipconnect.de. [2003:c9:3f45:e500:62e5:f8c6:5484:4c9a]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1990063f2sm463780085a.64.2024.07.23.03.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 03:12:15 -0700 (PDT) From: Sebastian Ott To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Zenghui Yu , Mark Rutland Subject: [PATCH v2 2/3] KVM: arm64: fix kdoc warnings in W=1 builds Date: Tue, 23 Jul 2024 12:12:03 +0200 Message-ID: <20240723101204.7356-3-sebott@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723101204.7356-1-sebott@redhat.com> References: <20240723101204.7356-1-sebott@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240723_031232_739991_85353AB5 X-CRM114-Status: GOOD ( 17.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix kdoc warnings by adding missing function parameter descriptions or by conversion to a normal comment. Signed-off-by: Sebastian Ott --- arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/vgic/vgic-irqfd.c | 7 ++++--- arch/arm64/kvm/vgic/vgic-its.c | 18 +++++++++++------- arch/arm64/kvm/vgic/vgic-v3.c | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index a7ca776b51ec..23e1fa56c02d 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -164,6 +164,7 @@ static int kvm_arm_default_max_vcpus(void) /** * kvm_arch_init_vm - initializes a VM data structure * @kvm: pointer to the KVM struct + * @type: kvm device type */ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) { diff --git a/arch/arm64/kvm/vgic/vgic-irqfd.c b/arch/arm64/kvm/vgic/vgic-irqfd.c index 8c711deb25aa..c314c016659a 100644 --- a/arch/arm64/kvm/vgic/vgic-irqfd.c +++ b/arch/arm64/kvm/vgic/vgic-irqfd.c @@ -9,7 +9,7 @@ #include #include "vgic.h" -/** +/* * vgic_irqfd_set_irq: inject the IRQ corresponding to the * irqchip routing entry * @@ -75,7 +75,8 @@ static void kvm_populate_msi(struct kvm_kernel_irq_routing_entry *e, msi->flags = e->msi.flags; msi->devid = e->msi.devid; } -/** + +/* * kvm_set_msi: inject the MSI corresponding to the * MSI routing entry * @@ -98,7 +99,7 @@ int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e, return vgic_its_inject_msi(kvm, &msi); } -/** +/* * kvm_arch_set_irq_inatomic: fast-path for irqfd injection */ int kvm_arch_set_irq_inatomic(struct kvm_kernel_irq_routing_entry *e, diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c index 40bb43f20bf3..ba945ba78cc7 100644 --- a/arch/arm64/kvm/vgic/vgic-its.c +++ b/arch/arm64/kvm/vgic/vgic-its.c @@ -2040,6 +2040,7 @@ typedef int (*entry_fn_t)(struct vgic_its *its, u32 id, void *entry, * @start_id: the ID of the first entry in the table * (non zero for 2d level tables) * @fn: function to apply on each entry + * @opaque: pointer to opaque data * * Return: < 0 on error, 0 if last element was identified, 1 otherwise * (the last element may not be found on second level tables) @@ -2079,7 +2080,7 @@ static int scan_its_table(struct vgic_its *its, gpa_t base, int size, u32 esz, return 1; } -/** +/* * vgic_its_save_ite - Save an interrupt translation entry at @gpa */ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev, @@ -2099,6 +2100,8 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev, /** * vgic_its_restore_ite - restore an interrupt translation entry + * + * @its: its handle * @event_id: id used for indexing * @ptr: pointer to the ITE entry * @opaque: pointer to the its_device @@ -2231,6 +2234,7 @@ static int vgic_its_restore_itt(struct vgic_its *its, struct its_device *dev) * @its: ITS handle * @dev: ITS device * @ptr: GPA + * @dte_esz: device table entry size */ static int vgic_its_save_dte(struct vgic_its *its, struct its_device *dev, gpa_t ptr, int dte_esz) @@ -2313,7 +2317,7 @@ static int vgic_its_device_cmp(void *priv, const struct list_head *a, return 1; } -/** +/* * vgic_its_save_device_tables - Save the device table and all ITT * into guest RAM * @@ -2386,7 +2390,7 @@ static int handle_l1_dte(struct vgic_its *its, u32 id, void *addr, return ret; } -/** +/* * vgic_its_restore_device_tables - Restore the device table and all ITT * from guest RAM to internal data structs */ @@ -2478,7 +2482,7 @@ static int vgic_its_restore_cte(struct vgic_its *its, gpa_t gpa, int esz) return 1; } -/** +/* * vgic_its_save_collection_table - Save the collection table into * guest RAM */ @@ -2518,7 +2522,7 @@ static int vgic_its_save_collection_table(struct vgic_its *its) return ret; } -/** +/* * vgic_its_restore_collection_table - reads the collection table * in guest memory and restores the ITS internal state. Requires the * BASER registers to be restored before. @@ -2556,7 +2560,7 @@ static int vgic_its_restore_collection_table(struct vgic_its *its) return ret; } -/** +/* * vgic_its_save_tables_v0 - Save the ITS tables into guest ARM * according to v0 ABI */ @@ -2571,7 +2575,7 @@ static int vgic_its_save_tables_v0(struct vgic_its *its) return vgic_its_save_collection_table(its); } -/** +/* * vgic_its_restore_tables_v0 - Restore the ITS tables from guest RAM * to internal data structs according to V0 ABI * diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c index ed6e412cd74b..3eecdd2f4b8f 100644 --- a/arch/arm64/kvm/vgic/vgic-v3.c +++ b/arch/arm64/kvm/vgic/vgic-v3.c @@ -370,7 +370,7 @@ static void map_all_vpes(struct kvm *kvm) dist->its_vm.vpes[i]->irq)); } -/** +/* * vgic_v3_save_pending_tables - Save the pending tables into guest RAM * kvm lock and all vcpu lock must be held */ From patchwork Tue Jul 23 10:12:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Ott X-Patchwork-Id: 13739835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C7F0C3DA49 for ; Tue, 23 Jul 2024 10:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QS7Q6moReX0ytgpoj7OMDTRK1GZLav9EGBrr2p1MFoI=; b=TrfsyIOyyUbSuNSSu+Vphw7Rx0 E4/5i2qj6EDgRnlh7qRN/nxHN9fJYYwnQueTZP3GwuVGB7/U3yLWsEHruayFgSc6fo6jhVb8Pkruq Xl1muh5jcS59K8coeBjkLPs57n6VL4IEtxrw+S1mdxoaDtGVsfuMu11LxjF9g6f0Mz8Db3Ww781j4 045z3uixGnFqe9tnq4HRFFBvi5Waizz3XjkeyjWw5ovRkS75WSTjzXWc60S0hk9ox8FJIMQVjbabt J2bEI75uBqY7n2pf/m3B+7dBOrf61J9mflNh7GPVUE1M1xxwr7+QExp+TaAROUzXxSatnLg17Gfex drSgKesA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCXN-0000000C8H0-2qF7; Tue, 23 Jul 2024 10:14:29 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWCWv-0000000C88u-3S3B for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2024 10:14:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721729640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QS7Q6moReX0ytgpoj7OMDTRK1GZLav9EGBrr2p1MFoI=; b=cTaBW3Yr8SvghQtFRnf3hP5/PhtVR5gKKTjqo+Xna0TiC6cPwUusgP9246gCX3rlwZqElK wBuOSlXTiLaWMo6/YNYcHQq/3vIeaacPFMLm43rk/QEkGvBaJ/M2ptdJq5QaXdW9nPXK9X nE0Fh3/Xgi2OHUAN4+TCSoI6IXomIq0= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-kUiBEqbqNHWDhM6vI6Sigw-1; Tue, 23 Jul 2024 06:12:20 -0400 X-MC-Unique: kUiBEqbqNHWDhM6vI6Sigw-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-79efca8478bso549628285a.1 for ; Tue, 23 Jul 2024 03:12:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721729540; x=1722334340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QS7Q6moReX0ytgpoj7OMDTRK1GZLav9EGBrr2p1MFoI=; b=J7S4mhcGPP8eaNdsPTB36Fo/R9UWu8HtdvK2itGeyeQOpss7hNvRYbPprwM/OY5XgB IN3PG+joSXcOyFlklhAgmPek3T3pIVbaB9sz9tTg+FIbSjgrEGEGif+trx9q4sYV6hjf 6qOsPtoODEimqcVUb5Qy8rhMmdN9FUOva0S9RE6Ele2alw3KN+ajtaWYIcpW6xjUIbEe uFzc947w2rPgmsqVSepU34f4ik8eoIrLjG9AKCnRP9eRAp1rMvSjqem5EzoFv3pf+qjt MG9HpsV5GXZF+a39c0TjFxydNU+V74vKuKejgX68IeDx86pQPwbxkp8cgn8Pg9uetYJ7 3cYg== X-Gm-Message-State: AOJu0YxtumhwM/abijeNbXU1wiX3p2K6IcmT2SP3irtexCqA7a12pZ1H wZMpVOIh0Nso3GrjkXWqLbTnBTpF4aWZg/BGN09cJIyGib5oOyLmkh/f2r/6i9I2Ue9sBJeQdfi rADUarY8luvgjR2XOfTuStzuJahFO1/H41rFmJ4H/A2ArJa1lUgY+cxYJfF1tKJCtZxw06SUCNr znAe2piHECApda608B50D7PkEKxp8MMEuPKz9zU2+gJdC5Fo5w2TvERw== X-Received: by 2002:a05:620a:244d:b0:79d:569a:699f with SMTP id af79cd13be357-7a1a654db8cmr1283856185a.39.1721729539925; Tue, 23 Jul 2024 03:12:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2wFZtBagU/E46pV0uxTwzvChsAR2Dj7XVxuoFQCCKIFbTAHgkyz2V/BD0RPFoS8SnlRhwYw== X-Received: by 2002:a05:620a:244d:b0:79d:569a:699f with SMTP id af79cd13be357-7a1a654db8cmr1283853185a.39.1721729539500; Tue, 23 Jul 2024 03:12:19 -0700 (PDT) Received: from rh.redhat.com (p200300c93f45e50062e5f8c654844c9a.dip0.t-ipconnect.de. [2003:c9:3f45:e500:62e5:f8c6:5484:4c9a]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1990063f2sm463780085a.64.2024.07.23.03.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 03:12:19 -0700 (PDT) From: Sebastian Ott To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Zenghui Yu , Mark Rutland Subject: [PATCH v2 3/3] KVM: arm64: vgic: fix unexpected unlock sparse warnings Date: Tue, 23 Jul 2024 12:12:04 +0200 Message-ID: <20240723101204.7356-4-sebott@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723101204.7356-1-sebott@redhat.com> References: <20240723101204.7356-1-sebott@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240723_031402_089952_BEB10ACE X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Get rid of unexpected unlock sparse warnings in vgic code by adding an annotation to vgic_queue_irq_unlock(). arch/arm64/kvm/vgic/vgic.c:334:17: warning: context imbalance in 'vgic_queue_irq_unlock' - unexpected unlock arch/arm64/kvm/vgic/vgic.c:419:5: warning: context imbalance in 'kvm_vgic_inject_irq' - different lock contexts for basic block Signed-off-by: Sebastian Ott --- arch/arm64/kvm/vgic/vgic.c | 2 +- arch/arm64/kvm/vgic/vgic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c index f07b3ddff7d4..974849ea7101 100644 --- a/arch/arm64/kvm/vgic/vgic.c +++ b/arch/arm64/kvm/vgic/vgic.c @@ -313,7 +313,7 @@ static bool vgic_validate_injection(struct vgic_irq *irq, bool level, void *owne * with all locks dropped. */ bool vgic_queue_irq_unlock(struct kvm *kvm, struct vgic_irq *irq, - unsigned long flags) + unsigned long flags) __releases(&irq->irq_lock) { struct kvm_vcpu *vcpu; diff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h index 03d356a12377..ba8f790431bd 100644 --- a/arch/arm64/kvm/vgic/vgic.h +++ b/arch/arm64/kvm/vgic/vgic.h @@ -186,7 +186,7 @@ bool vgic_get_phys_line_level(struct vgic_irq *irq); void vgic_irq_set_phys_pending(struct vgic_irq *irq, bool pending); void vgic_irq_set_phys_active(struct vgic_irq *irq, bool active); bool vgic_queue_irq_unlock(struct kvm *kvm, struct vgic_irq *irq, - unsigned long flags); + unsigned long flags) __releases(&irq->irq_lock); void vgic_kick_vcpus(struct kvm *kvm); void vgic_irq_handle_resampling(struct vgic_irq *irq, bool lr_deactivated, bool lr_pending);