From nobody Mon Sep 16 19:32:32 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E0A514EC47 for ; Tue, 23 Jul 2024 10:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729537; cv=none; b=eec+T6tZcECMgr+pzUo0CVoeSpXLlseg1qUrhB3xZCFeYJGKnwuoLMwJka/x1g75pRMIExYytRSkQfX5MnMMRI3wn3HgkuUgBdRoyZvYVAJxhLeGgoaMvM0LAQbyghpWRvlUP2q2Bak11QUzltXnCfGlVFH/upnNE2oGC4M7iQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729537; c=relaxed/simple; bh=itl1BX28HKdGQXXxJvtLtVN7uHwH3jOcmXGakq6ld9k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sqpB+vDfZzFfp4EO0kiCMfHHz1bTKhLUTEe+g4ggajSPjXps15s5BpeJIKuFuUx9dFSmFtnOia/UBGT962d3TFwSDWuteQzNRpOFdcxweffGK+/jP5srJUnptRrbb35J7dnQhhZdxFx+mNT9hyO74Fm2w7Na5p27GGaEi02fbmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PdQknqTH; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PdQknqTH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721729535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xzuyk5RPlpL9t0A/8o4faeOblpZCzvEu932Ng83fGMs=; b=PdQknqTH1zFPPyUaaBuikFqwxy2g2vL4DJIVfY7MXBatmP88pWXYFl2zJ6/YxEqGy7f7ye aCebBd/Jt/OF29w2WjwHNijmW6lFfkphoLs7or/XET/rd8aPAiu+TLh/ZZ3Z539Ts8bKun yRkeFxTuXlDIUSB823oYCbWcpp9gt7Y= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-101-EoCeDWnVN56TGYZDwjzBsA-1; Tue, 23 Jul 2024 06:12:13 -0400 X-MC-Unique: EoCeDWnVN56TGYZDwjzBsA-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-79f19f19b11so743201385a.0 for ; Tue, 23 Jul 2024 03:12:13 -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=MDvtWjEe2YumGu/A+tCAnethXq9Y6ZvGgX+eiWKsVI/BtU8oP1E5Tnba5+KnB5M3Kh Io9wHauq7AEhLXsjJLOyF58xYliZ2eWbJLn+yqdsOyTHJV/0MWWTmR/s3EqTiC9wbAjj wNvWfQz+MfUWrvf5NCmfY2uIivxNoDDCBNtRcFMWc+W6fVqllWWfLw2WEjw3nO0GqS6u mjkCk9pauePfweb19glBRdTjft8IctIdSkpHywILWOwOyIMYbhYOpFTw6D6IbkPNZlVo ic3mdGLm1TnmmbQHVzt42BWlFWh6jwS/n9pRpJ+pErUCsnFBlP596pK4/UIipmeFUJVB VWlg== X-Forwarded-Encrypted: i=1; AJvYcCXnv9pUvKv0itgkUH+6uh4GTGo6b+ytUWd1sAByc87O1k6TNHt+tEjX9FAVmShRXUNIKvZ5m0lhLQC715ImZhh25OkU7CyqmuWffO7d X-Gm-Message-State: AOJu0YyqZyRUuCEMtOREjX4rVqX8XMQQaAwKDQGo+aTnEcuRFXssAgLL Nya5KsCLX4X1JuY26C8QpBDnYuDYPLrY6Ty/uDpGxEBC5yKcH0KhtJYaArIT0IWcpI3NgxriU8P +/4Yithap0dUeqIVICsnxdysTCVoijT7SQwEJLN0zU2/I/orNT5g/opQJnczptQ== X-Received: by 2002:a05:620a:394a:b0:79f:16c8:b04a with SMTP id af79cd13be357-7a1c06bc41fmr275051585a.26.1721729533205; 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 overwrit= ten [-Woverride-init] 271 | [ESR_ELx_EC_CP15_32] =3D kvm_hyp_handle_cp15_32, | Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier --- 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) +=3D kvm.o obj-$(CONFIG_KVM) +=3D hyp/ =20 +CFLAGS_sys_regs.o +=3D -Wno-override-init +CFLAGS_handle_exit.o +=3D -Wno-override-init + kvm-y +=3D 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/Mak= efile index 782b34b004be..b43426a493df 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -20,6 +20,8 @@ HOST_EXTRACFLAGS +=3D -I$(objtree)/include lib-objs :=3D clear_page.o copy_page.o memcpy.o memset.o lib-objs :=3D $(addprefix ../../../lib/, $(lib-objs)) =20 +CFLAGS_switch.nvhe.o +=3D -Wno-override-init + hyp-obj-y :=3D 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/Makef= ile index 3b9e5464b5b3..afc4aed9231a 100644 --- a/arch/arm64/kvm/hyp/vhe/Makefile +++ b/arch/arm64/kvm/hyp/vhe/Makefile @@ -6,6 +6,8 @@ asflags-y :=3D -D__KVM_VHE_HYPERVISOR__ ccflags-y :=3D -D__KVM_VHE_HYPERVISOR__ =20 +CFLAGS_switch.o +=3D -Wno-override-init + obj-y :=3D timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o obj-y +=3D ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.= o \ ../fpsimd.o ../hyp-entry.o ../exception.o --=20 2.42.0 From nobody Mon Sep 16 19:32:32 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3242814F10F for ; Tue, 23 Jul 2024 10:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729541; cv=none; b=efWXUyGa1Ub4gGRbBro6O6ZFZvt38tndbzDbcYVt5oIEeNZ7DSNrAc8S7XxfMqO4bS6pBSa6Ut/p7toayHoqlhrH60ZhISOKOBBrnyQBkoyH7lDF3cmvr9Z+emzMU66JbTJRzN4JlybtqUeXvteGfQ3zZUXtqEbaO/wYwf3C8dQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729541; c=relaxed/simple; bh=AYfOsTim18mKk3f/6TIR5xq65kd3Yt1GDi3RAW/TNkk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ftwQnjkI4QSl+gQ4FoviKkxPuk5oDAfTva5kETxbBJmLrSDLu8gZzSd4yE9RFrWZAw2Ii0jaNFeQMSyvxUFL8Iy6Wohvk272yZVoQyTiG/RS9sfL/alIelJcHJgUD0M5Gc+fjfrwD/4xlQT9FSJiItbvQwBdheVxH6q4lSkynbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NYM+/mKn; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NYM+/mKn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721729538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eYU79afplONI6yVx+AGbEJT6iE6q/eJtdNUT3lyaw3g=; b=NYM+/mKnAVMbCst4zNR/2roh/QNawZJ9gr3gKg3G49LdnVw/5lFy9WjAwNLfBhqIba71zL SV7FzphQ0TRVH1pEJXf/0rxYmRgdsrCBpU9nLCu3OaVduGfxDB9Q1QxEbaJK7LybHKGoXN zuOyReUJHmlmarHpJhpFALz0tnigyKo= 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-339-yH6tlV8SOaaOoAOqvg555A-1; Tue, 23 Jul 2024 06:12:17 -0400 X-MC-Unique: yH6tlV8SOaaOoAOqvg555A-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-79ef9c44d3eso729950085a.0 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=1721729536; x=1722334336; 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=kS6NS7qcxL8ScSH1eyJfhSXba41SRsykajYNaLdMq0ONYnk+QngJL3hlYdpKb3ysXZ gCrRR6B0YtJcyBtUig+iXp9TbKUUV0Zsxd059aSNWASbcnG91vwr0I+TxUBj8EF2gflv Q4ic4njWMsSTiM46KgS6QNK70HJzx3lK6Emr7mRB935dlBDVxeaUQjP27qQK62byNFow naHng3SxhFtaGZOK6PNEkIJvRAL9aL5SMdvIPnEXblLpSB7nx4YLo7UFBEMKCrd467nq CY4PYF9z90LYlgnxx6mQv+InYrwFsCf/57z8x8oQ9pyWhXt8jp1Xrf0t7FW8j1xAhdBE jKsA== X-Forwarded-Encrypted: i=1; AJvYcCUuSpZ8enDa5yrLtfJ1habA4d5XcTBA/G++QrmhCeAghClwoG80Zzzh7lpcZK6fw0Ssa+cDHd3H28V2464VppIUjJSaS0Md2ONQszgm X-Gm-Message-State: AOJu0YyLBaYWn7skgp7ztzJ97/1LJu8X9cHp7ziqzDQc1Ds6dBzHmNBe ynMayRA9Vp6eu+OSCfd8XcZf3SZOdVdNBKIVOxpLWcLzdTtWiLxnAYB6a90iMsn8JxYmThLjbZx UFYOYfyiMaYzwfhCVxtpzWJzVc20yE8jLZ89YCHN6gxIRCZeR7ZKnmO7DQ+dtkg== X-Received: by 2002:a05:620a:2889:b0:79f:186e:40ae with SMTP id af79cd13be357-7a1a66656edmr1162831185a.53.1721729536477; 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix kdoc warnings by adding missing function parameter descriptions or by conversion to a normal comment. Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier --- 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-ir= qfd.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" =20 -/** +/* * 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_routin= g_entry *e, msi->flags =3D e->msi.flags; msi->devid =3D 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); } =20 -/** +/* * 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 i= d, 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; } =20 -/** +/* * 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, st= ruct its_device *dev, =20 /** * 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 stru= ct list_head *a, return 1; } =20 -/** +/* * 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; } =20 -/** +/* * 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; } =20 -/** +/* * 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; } =20 -/** +/* * 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 v= gic_its *its) return ret; } =20 -/** +/* * 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 *i= ts) return vgic_its_save_collection_table(its); } =20 -/** +/* * 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)); } =20 -/** +/* * vgic_v3_save_pending_tables - Save the pending tables into guest RAM * kvm lock and all vcpu lock must be held */ --=20 2.42.0 From nobody Mon Sep 16 19:32:32 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 094F114F132 for ; Tue, 23 Jul 2024 10:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729544; cv=none; b=f8rlbY99O/b4plsVyRxqRoVpiLR8E46fs7oxNSlW7tkdAQWLMfe54cDDlJwfDWexkwX5v4x+4s9TFk8dCtizZu2jK8YktwyWh96WJLpDrQyhKjM2WrmfQlgeeKeFAImk/dI3o7P5byASzGlNWGNWVf8rzK2SZDKCgYTxBIJn+NM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721729544; c=relaxed/simple; bh=rTkj/gLNEoKH1Qi6UhwNBuSC4NJP/u445SQy5IWYwE4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OZZFzLAXxaRMYiihRQ6TCOXyrJikceKL+dm5ohGqGBY/pqeOYftm19L8zRglz5L5C7f7lpQEZeZdd6k56SRNWf7mPLPCbUlftEV7IDn+KHRIpHlxN0y97HQNem0FPn0grzEaZ8ILM1AR54Z9vmPtEmIA7D3eOmi++08kpTCtCKA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YFqt9Qfk; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YFqt9Qfk" 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QS7Q6moReX0ytgpoj7OMDTRK1GZLav9EGBrr2p1MFoI=; b=YFqt9QfkOA+mQRngYttFttLSkzy4/37LLV49DOi6V1kuXpy3zb5BQCgpU5wPZD0AIcEhe+ TeqxybcovNwKTMOyPZhc031MD1Xap0g4kJxritqzVUR4ZJRdU/h3HQEDrfAIw7AI9QWLNb PxPJpVSUj7z8vGSUg/Zp8o33I8qp74w= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-QKpLSU4tMK2pvkakO5eHTw-1; Tue, 23 Jul 2024 06:12:20 -0400 X-MC-Unique: QKpLSU4tMK2pvkakO5eHTw-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-79f0283223eso713733485a.2 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=A3RNu44aabtHlTZ1HxoHTLf20Fr1JKdH16GvVSWyhe+rL7+gmQocXjkCJw64Swp1Mg iMiVz1IRZVOCRWkFVSD0s2Y3yooOcBYkI1v9mYfRsjv1EIGV22TkknSDxz3jcpHASv8s 7T41oNdyTxB8SFPhal1yOlmF5fkGc+XQ/6RSWlZPTpAw1pntSELNnbsChhWTf1xvJadl hhf+XKbyOHiz5cQSJqo6+FgcUM42hKMokBKwtjVlArbvp4J2QjByQvAeBR9X9S+nXNZD P2rUOhq13LOUN7Rjg9snx7R/DTZW7XUsdu0Dc+YRTTacIVv8AQUrx7FQ7YRC2+32fmxw 0PrA== X-Forwarded-Encrypted: i=1; AJvYcCVJ4RB7hqn9+u++UGR/SKfqyG5d+U5F92Twx7J733GlJrCBOWqiO2rWAWqeAfB7EsrJrDz1s1G9RhRzOo9IP3ohG5Qr1fLVr9P48fo9 X-Gm-Message-State: AOJu0YzKyorq+G2A/xeLia5xCQSUxhQOSCIDb4VeIEBrwvriF9M8FQqn H87bKmANJ5VZ+M05eOm/Yvik2+WN5PPeT6SvPO3UDm3Zkj3PtGEwe9AXDExMqFJVM0D/8pMMjkH Id5J+QEP5j0FDzFLZCTKTHCxKD9trokR9vTvKFQTZlNBGwyFplb9ELd/ucO4wUg== X-Received: by 2002:a05:620a:244d:b0:79d:569a:699f with SMTP id af79cd13be357-7a1a654db8cmr1283855785a.39.1721729539872; 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_queu= e_irq_unlock' - unexpected unlock arch/arm64/kvm/vgic/vgic.c:419:5: warning: context imbalance in 'kvm_vgic_i= nject_irq' - different lock contexts for basic block Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier --- 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 *ir= q, 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; =20 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); --=20 2.42.0