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