From patchwork Tue Aug 27 13:08:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13779539 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 2E500C54734 for ; Tue, 27 Aug 2024 13:09:35 +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-Transfer-Encoding: Content-Type:MIME-Version: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:In-Reply-To:References:List-Owner; bh=vmhgoThXpsRE2ZPXF8R0CGdwPpFNc8Epv22ahkVAR6E=; b=37fFFmiVg6I8kGQ4IRYvwHHxgm q8qwPdzCkWWcc9E9NH7bkbWCghx8aqMPwelylZejuNxX4lUYXe2HmIBAhezWeV0LkZCBm4REnV8I1 PxVmK+vbPU2N63QWs777SI3Y7qqoLay0PmMZjRPzxZY6wa/nUH2bHASBPqB2l0R281Lm8wAl09vrc St0SVZ3r67TE3/F5jH7ZUT8mDBT06f9Qh2ja69cZKImYTtVpidW1kQsYj5OWxWp75Ryy5hZst63al lPUODCkZ8TTFeZBdF0Eyxv+IrzBhmwM6zM0WCLRcxuzn1QgGERmwf637RZhqOPprvPZrLnvl7BvLV MCENC1Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sivwq-0000000BNv4-1gUG; Tue, 27 Aug 2024 13:09:24 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sivw2-0000000BNi9-0D6w for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 13:08:35 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-36d2a601c31so3236032f8f.0 for ; Tue, 27 Aug 2024 06:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724764112; x=1725368912; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vmhgoThXpsRE2ZPXF8R0CGdwPpFNc8Epv22ahkVAR6E=; b=K4xW2+sArVGkeXJmRMFbO6eZ8RV0LqI4WkVMblK/UQTGJjNkDX9O5mFJmi/rJYJX4v x98zmu2gUuZd8LI39sy5k5wwqGqmcPCThgGuxg9unNtHDu8TiR+YwS6IMbOWOG9sArij +BrwjPlFvPYdR5+LpoMOlxuRh9Yrx/zKOD+4HYw3E3WWoL4pgq3ru3hgrrS0nRy7apM8 ZDBOKNpkD8Nidl1+Ci3mctL5lZxMCtTpsVeqHRebqmQS1boSrt2EmF9BbS+lvo7r0Dh5 ENfpWqbZqplbtJGzTFVKLdj5dmUSypmqpLpInMeOYWmjwCLHRCCncax3AJhoIk+Ah23m iSaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724764112; x=1725368912; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vmhgoThXpsRE2ZPXF8R0CGdwPpFNc8Epv22ahkVAR6E=; b=jYRHcur2rtkVvQXMnrRVNDdScMPgborM0aExT5SkC0mRLHKaILWSXw2UXY9mZtrbKK EqPAymo8Fwu5fmAQTDV9NrVpNWL/3dZed7I391Za8V/7eloom4HSxwsPB9OikumIxDbA Zu3zsSidxBgdg0Kr06Eb34pJPp5R8XV4cpYyz3WNq8NQg+lw3SnVsbg7YtawscGJXjfa 0r68p69UUpAUbWtBNkzqtVux4u3z+loV7xotM9Yw5lDV3E7+G9PR9SkZh2iWYG3OQwdi JCOPnz3flvn01Qb573uYBOFJrRVjfF32D1Br8Va8QpfWPMovC630Lk0ACDjVazlEsD2F 3uHQ== X-Forwarded-Encrypted: i=1; AJvYcCUIovbIDTf47Ccwp8yTPLwtTtN6Ym1qqOTEaWFtfhfI295qhTkuxgfNE4VJREjz5ZXqcd7EL9XYpglEwWyqw9To@lists.infradead.org X-Gm-Message-State: AOJu0Yx5x1e7re6CANXBRQtxSlRIseoPSOEqgAL87OHY4dEQC82GdXam YB+COal25i4O+nhNT7072+MFg+ZfnXnjJH/cAp+BR0vobGCq5JhkJ6nMV1UaraQ= X-Google-Smtp-Source: AGHT+IGHn0fUmNiXD2kqIU9eVqVFjdu3ykcNSCWApUcSFi9kVI2cR/nL4JnTMb6vecuV/AX0n7YrfQ== X-Received: by 2002:a5d:570b:0:b0:365:980c:d281 with SMTP id ffacd0b85a97d-3748c81a115mr1892925f8f.45.1724764111532; Tue, 27 Aug 2024 06:08:31 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ac516252asm184573695e9.26.2024.08.27.06.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 06:08:30 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0DA6E5F9E6; Tue, 27 Aug 2024 14:08:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, maz@kernel.org, arnd@linaro.org, =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= Subject: [PATCH 0/3] altra workarounds for PCIE_64 with instrumentation Date: Tue, 27 Aug 2024 14:08:26 +0100 Message-Id: <20240827130829.43632-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_060834_113740_6C7E6200 X-CRM114-Status: GOOD ( 19.16 ) 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 While testing virtio-vulkan on the AVA platform we needed to include some fixups for its PCI handling. As far as I know these have only been included in various downstream kernel repos: https://community.amperecomputing.com/t/gpu-support-for-ampere-altra/274 The initial two patches are as we found them save for a fix to align_ldst_regoff_simdfp in the alignment handler. The third and new patch is trace point instrumentation so we could see how often the workaround is being invoked. Combined with Sean's PFN patches: https://lore.kernel.org/all/20240726235234.228822-1-seanjc@google.com/ And the Vulkan/Venus support for QEMU: https://patchew.org/QEMU/20240822185110.1757429-1-dmitry.osipenko@collabora.com/ I was able to test virtio-vulkan running in a Aarch64 KVM guest hosted on my AVA platform with an AMD Radeon graphics card plugged into the PCI bus. I don't know if there is any interest in getting these upstream but I figured it was worth posting to the lists for wider visibility and discussion. For now I'll just carry these patches locally on my AVA until I get a better system for PCI GPU experiments. Thanks, Alex. Alex Bennée (1): ampere/arm64: instrument the altra workarounds D Scott Phillips (2): ampere/arm64: Add a fixup handler for alignment faults in aarch64 code ampere/arm64: Work around Ampere Altra erratum #82288 PCIE_65 arch/arm64/Kconfig | 22 +- arch/arm64/include/asm/insn.h | 1 + arch/arm64/include/asm/io.h | 3 + arch/arm64/include/asm/pgtable.h | 29 +- arch/arm64/mm/Makefile | 3 +- arch/arm64/mm/fault.c | 726 +++++++++++++++++++++++++++++ arch/arm64/mm/fault_neon.c | 59 +++ arch/arm64/mm/ioremap.c | 38 ++ drivers/pci/quirks.c | 9 + include/asm-generic/io.h | 4 + include/trace/events/altra_fixup.h | 57 +++ mm/ioremap.c | 2 +- 12 files changed, 945 insertions(+), 8 deletions(-) create mode 100644 arch/arm64/mm/fault_neon.c create mode 100644 include/trace/events/altra_fixup.h