From patchwork Fri Aug 2 22:40:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anish Moorthy X-Patchwork-Id: 13752087 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC95D13C3F9 for ; Fri, 2 Aug 2024 22:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638464; cv=none; b=c+FvqaptyotUTg593BfaA9HcZ1vZSyUpeEgqWJZEDoHLbbFr4c09XnEm8vc+jPdqi+exWgYkLuASFpx8G8g77aCSuM2Ui6GcmyAZooz47U60y+Ui03RFLPDV5umQ3/rHXxXWF+eePx92BX+bAaGYlfbIkH0/qcOxnOuZNehDDYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638464; c=relaxed/simple; bh=+8PWqUn5v8ELFuwRLcfeynpHGo4ajB+2U+KO7lA8yMI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ILcmlBC6vyWRnIVpNYwTyFEXAeq/fcKIkrrAq8/LF+TDbKXk/ljg4wgEAXm6su0G1ivOoAzMnh3wUARTdNVVLHwoIMBal59KtZJemlsxWvNx9BpsxLWObqSXFQ2gPeao4b/ZC6gs0CmIpQ91CaEm2W/ri/TW12jVR/fpty47wHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=0onijI8D; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="0onijI8D" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e0872023b7dso13629930276.2 for ; Fri, 02 Aug 2024 15:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722638461; x=1723243261; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=wQg/YvoMgl7FyNj9U0nitSnR849bmsnUb2Q2PwwvwGA=; b=0onijI8DPv0zFSKfF0oUVLZlb74CWn8L+9fqircR2gJGIHSa/0C4XFNk82lYcCqGrS meoiyN7usZ3JRbs1xVI+a/za9pgCHr40uFuilf6MWj7KJCo30GQHbGfMGKhw4xCExF7D nQvy8H4enAskKXh2zCiFnjrgBg3VqSNnReWcuMBkSVbfKiDtjfx94Feql+xouRzEa4+A jzWm3CZC9idBvTSIYzULEB+87kvj3eaYsZHb9hCnRyHpnYWEmj3l+umMbGt/mJfAA1Hf 3ajreWlx6TeOei5FXSO/Q8A5ypI1GcxC/mBvG8xx6E1uSTYx94+eSsqwMikFmBrxjN0z xijA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722638461; x=1723243261; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wQg/YvoMgl7FyNj9U0nitSnR849bmsnUb2Q2PwwvwGA=; b=TaLGeth6sbXRTEnO9rcBZz1gy0UYFUK2AZp8uqpBWLxRoTsCYE3U6T/f0LTRDgUVGr FgXWfNHiU/Vf/zGm/oDptYOaVchWOZ0eOHm14wHAfMHEVfhF91uXad/CPTLOUq1xZNq1 cwUFuAXUYqAMYnfolJwxtRvkJGh45XL42JtSr9iaeKtsA0dcNVvI/LH4gmJLzCcSRR4C hcvFKoyJnBArdA2MKgXDRR231qs1hNsxQjSBw7SxE+nqaxeIbdI2p8swviSyTNKTL3GN QSNnoRMdDSYu9VYDbOfuKhlNnt9zSgGKNduEk/L9GXE8463117ok2Fh5mlJhlyi90s+z TlCQ== X-Gm-Message-State: AOJu0YybjpJAIrnSf9b4OZo8CtWynv8R/wsgALBDEU5lRbr7nGiHPS32 JtlpHqAnIhEkKXXpSf7luXOVLATPaijEaZ7ypppTkiprztKC+K24N4pRl3v3PIOYPJxbcNGkeyv lPHhLWWiWDw== X-Google-Smtp-Source: AGHT+IGtFaFx4zh5naUYBzERvzjQFXAsvrg5mgn76ZrbuxK1hvekubdwutq95TgJoPA0V0wp7mG5L6tjyEmn4g== X-Received: from laogai.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:2c9]) (user=amoorthy job=sendgmr) by 2002:a05:6902:100c:b0:e0b:4dd5:3995 with SMTP id 3f1490d57ef6-e0bde4abb59mr7845276.7.1722638461690; Fri, 02 Aug 2024 15:41:01 -0700 (PDT) Date: Fri, 2 Aug 2024 22:40:29 +0000 In-Reply-To: <20240802224031.154064-1-amoorthy@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240802224031.154064-1-amoorthy@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Message-ID: <20240802224031.154064-2-amoorthy@google.com> Subject: [PATCH 1/3] KVM: x86: Do a KVM_MEMORY_FAULT EXIT when stage-2 fault handler EFAULTs From: Anish Moorthy To: seanjc@google.com, oliver.upton@linux.dev Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, jthoughton@google.com, amoorthy@google.com, rananta@google.com Right now userspace just gets a bare EFAULT when the stage-2 fault handler fails to fault in the relevant page. Set up a memory fault exit when this happens, which at the very least eases debugging and might also let userspace decide on/take some specific action other than crashing the VM. Signed-off-by: Anish Moorthy --- arch/x86/kvm/mmu/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 901be9e420a4..c22c807696ae 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -3264,6 +3264,7 @@ static int kvm_handle_error_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fa return RET_PF_RETRY; } + kvm_mmu_prepare_memory_fault_exit(vcpu, fault); return -EFAULT; } From patchwork Fri Aug 2 22:40:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anish Moorthy X-Patchwork-Id: 13752088 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A84413A878 for ; Fri, 2 Aug 2024 22:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638465; cv=none; b=dxVUz62yzQ0JspiN0YiHa4XYy9bctR1Njz0PxXqXgA8chLS5UnvO8rczoJbQRFtNvuQcTm5ivwUwc8/3GsQOUQd6vxoexBEXap+Lw/lMYGrVjBBK/x3NNYleNspe8hPKfwwMuZZXzJfs52o4zsisun9ts++teQHannMPOxWdMpI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638465; c=relaxed/simple; bh=v3acPLwhV+gpk7Lv0W7XpGHBnCDV1cxxTMNqqwFABeo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DKlPEhXOx8OurN2he/2Qpmpk/DZWfMocfizr7Kdw5XcWYrQHboUvXJsRdw21d2FLDEHR4StKiSv8JQyUR669h7n97F6Ub7JArFjLRDF8CDlhCj/BB8bOtSxbUEarb4Bz8HsQcvUlRKDCBKrvQLHqQA71z02l5G7K3auFZzrHXm8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=D+eBdBYv; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="D+eBdBYv" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-66a2aee82a0so175886337b3.0 for ; Fri, 02 Aug 2024 15:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722638463; x=1723243263; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WUTD+PpdYxApWk0wW3A8Rkz7siPlFF3F1FyTT2F4Hns=; b=D+eBdBYvfe9D1HyqfwH0yalrqb0f0SRsI2PfzgbBvLptpTI/mW+d/QwDuoQRZh6K+i 6+sETDRneB8rEyHZgRfgspCHbX5/O7tx+nkFVJmDIoyuGQZiR/ZRreDvYwKPsrQJnuaj A3UJ4gGVrI7A8J9mETCWNEKXi+dxwpKxcdcn54MK0BSm2lWmqCVElXzkCIMx0oIG+ogp yoGXScaOZ9/zcbsz22JRdtzmxIj04tdFDZsOmU0yX+bycrB6/ljqmYpev/ys3oMUI5bO rebdd/kE96CZSiU4SQSP9u66rkx9eOHhTYGXc14Jr82c69Uguo9mGtp1hQYx6wdhqoQX 1eMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722638463; x=1723243263; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WUTD+PpdYxApWk0wW3A8Rkz7siPlFF3F1FyTT2F4Hns=; b=Puzg+6qh8OfcUdzTpwL0yrf6KsekgcSvk0fsVIQY0HHHkZvTRpwEeKznfEMNvWCyA8 PmnGRaQWVtpvQTUbhIO+qH555a9GvvrAw/94Th3MITpei9+jgdIOhu3CgLT/5H+9YIe7 43xWHmwTxq2KdxPOgAHqYS3T+0AN6AhV7YRyvHtnEnqdjVrkqX8+VZr8wgL8EEcBi7S3 hPvJZklOH2UgJE6ohafR0ga/2pq5BPwSW9C9B8FsiLQS8B05zJnaYymSc1Pg/IufHC27 puD9iGkFmh96bg6XSBq5eSwxjNsTneM/j7ETT+4nHQo8ruAecTVD62id6NJ2Mybp6bWr cwNQ== X-Gm-Message-State: AOJu0Yzw29ZXu6ghhLqv3RlSvT6/rRs1J9f+l4Lar64hfQtjsM/UIBIm /HNVAaioV9kR1raAYogFTjeWGffYi8tg0fLGspX1BUFQ2bBRN4KHdaBc9bL/k2V3ZbZocqvLlEk uGwuMDkwLQw== X-Google-Smtp-Source: AGHT+IFKNhjc3bbOHyYY5UfiMGDF2uVqzD6G4qc/2EsStmrwR8+ngkVWR6nBrvU9pNgNKVw3FEM43mqMAO/ycg== X-Received: from laogai.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:2c9]) (user=amoorthy job=sendgmr) by 2002:a05:690c:dd1:b0:665:a4a4:57c1 with SMTP id 00721157ae682-6895f02c633mr602787b3.2.1722638462564; Fri, 02 Aug 2024 15:41:02 -0700 (PDT) Date: Fri, 2 Aug 2024 22:40:30 +0000 In-Reply-To: <20240802224031.154064-1-amoorthy@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240802224031.154064-1-amoorthy@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Message-ID: <20240802224031.154064-3-amoorthy@google.com> Subject: [PATCH 2/3] KVM: arm64: Declare support for KVM_CAP_MEMORY_FAULT_INFO From: Anish Moorthy To: seanjc@google.com, oliver.upton@linux.dev Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, jthoughton@google.com, amoorthy@google.com, rananta@google.com Although arm64 doesn't currently use memory fault exits anywhere, it's still valid to advertise the capability: and a subsequent commit will add KVM_EXIT_MEMORY_FAULTs to the stage-2 fault handler Signed-off-by: Anish Moorthy --- Documentation/virt/kvm/api.rst | 2 +- arch/arm64/kvm/arm.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 8e5dad80b337..49c504b12688 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8128,7 +8128,7 @@ unavailable to host or other VMs. 7.34 KVM_CAP_MEMORY_FAULT_INFO ------------------------------ -:Architectures: x86 +:Architectures: x86, arm64 :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP. The presence of this capability indicates that KVM_RUN will fill diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index a7ca776b51ec..4121b5a43b9c 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -335,6 +335,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_ARM_SYSTEM_SUSPEND: case KVM_CAP_IRQFD_RESAMPLE: case KVM_CAP_COUNTER_OFFSET: + case KVM_CAP_MEMORY_FAULT_INFO: r = 1; break; case KVM_CAP_SET_GUEST_DEBUG2: From patchwork Fri Aug 2 22:40:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anish Moorthy X-Patchwork-Id: 13752089 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A524613C682 for ; Fri, 2 Aug 2024 22:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638467; cv=none; b=YR5JLgSBQhFme5A146UZOTO5abjVUvsOr+054sZh2W/bf+TjM+Td5MxPs/TKvrxCQi1N9ZLg2HDI1QloTXvOI0gxtW9uY/yC16gXLNWK3dUBn+c18olAqs2MRCx1sQp6OovrdYNNw6Q6PhA7E5r+cZQHr2a6ci2O0l6WVo3dO/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722638467; c=relaxed/simple; bh=2BJP/Gjlhn0CI12zdChPBuMYdNrdF6BpuynLMzCWLmY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DEZVz9GGfbn5l962g0u/b4xAXyLRLB15su11KMvEl2Lyq7T1yIjY32cNOKgm+MPLgHZLMF9wK26tA9wVZXpGFbB7lJ5KmN6lynVkF/lfZ8EknR5zpa/9k2CZTkkPhYjYjzXiWqP0S0h6hqyKfkhqehpJtWvXJLaLVJ0gbmlalXU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EKyUO5N2; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--amoorthy.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EKyUO5N2" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6698f11853aso166291677b3.0 for ; Fri, 02 Aug 2024 15:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722638464; x=1723243264; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mg6abDzvai2Zsgu1qbiWH7RLNmKIJFQcCyuMlSnLw2M=; b=EKyUO5N2UV5EjE3FOBeCAVa+sVYFZ/OrHHcdf/np16W3wH5JCbk8daXql8SGBaPyJw PAOeVedYTGcJoOA5dL4BKjyVcEA2wD32pqZZKd/syqPqdbLZ4kdanllvd8LXVZvg71Qh Y7rMoMszDSXw4bxYOQ1GAREHjpjZtxiW+a0An0JTC5JTlY1fjJsJeHODJ9aSC+v57NFT pDGLoa65+YZDr0Mz+rJtSf/6v5mZnUTERVQl/F3buM5WhFpUXowx100vPS8npJbVDqdi fIe9H1hdyPlVQs3EQqkD7yO2cw5yOe7Es213gQaeS8RpqMlelvnUBQ1Ahixmdk3I4mYy +xFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722638464; x=1723243264; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mg6abDzvai2Zsgu1qbiWH7RLNmKIJFQcCyuMlSnLw2M=; b=Ql14KkkEseZD2n46jD3fWxFPh58eW4D/IsFqVbPC59btMOqT7X4meooWaZRJpRbw/a zMzH6wkmkomk78i0WkB6Y1Mq01K9xUvWcileWry7l3fxPcOSF5tyZOXnj+m2xxWwpbEk BpoT30FNJjQrRD/2S7F3JmZT0LtJWX/2IyNrdDYrh5y1Cz2WzyNhYv2x/DGnZLf1zPRl OZKUWWHR/zR2pHxxA4oJrK0mMErqKVgy8C9uQ6NDHWWiCK7cliXJVrV08Jt9lJBTrdlI VNHyG1LcFZZSTGU3rKr+wS6LRh4MVx5jO+m0LnBf95w7YvNMZ46QoqWXgghuXRYCt2O+ GENA== X-Gm-Message-State: AOJu0Yxpk1zcoQdesfkeoSAmw3qnszL/wAot78+Xqu/ntj3ViXVrVSHT hlyf6QzZN7O8s3SedxpDPWfvdEb7nM+oVUPWQJKOEKfgiba2AFPJRXsPsxC/ofvXvRtJuhW0Ddw 9KUECvecEYg== X-Google-Smtp-Source: AGHT+IEY5CubreumvsIjMcPe2q5xXNHlPJqiPWsr+2ng5ETcTgVR1+5qyV+F3pi2OrpH5AWrnR9VlKryzgVK+Q== X-Received: from laogai.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:2c9]) (user=amoorthy job=sendgmr) by 2002:a05:6902:2b0d:b0:dff:1070:84b7 with SMTP id 3f1490d57ef6-e0bde21e24dmr9370276.5.1722638464470; Fri, 02 Aug 2024 15:41:04 -0700 (PDT) Date: Fri, 2 Aug 2024 22:40:31 +0000 In-Reply-To: <20240802224031.154064-1-amoorthy@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240802224031.154064-1-amoorthy@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Message-ID: <20240802224031.154064-4-amoorthy@google.com> Subject: [PATCH 3/3] KVM: arm64: Do a KVM_EXIT_MEMORY_FAULT when stage-2 fault handler EFAULTs From: Anish Moorthy To: seanjc@google.com, oliver.upton@linux.dev Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, jthoughton@google.com, amoorthy@google.com, rananta@google.com Right now userspace just gets a bare EFAULT when the stage-2 fault handler fails to fault in the relevant page. Set up a memory fault exit when this happens, which at the very least eases debugging and might also let userspace decide on/take some specific action other than crashing the VM. Signed-off-by: Anish Moorthy --- arch/arm64/kvm/mmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 6981b1bc0946..52b4f8e648fb 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1568,8 +1568,11 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, kvm_send_hwpoison_signal(hva, vma_shift); return 0; } - if (is_error_noslot_pfn(pfn)) + if (is_error_noslot_pfn(pfn)) { + kvm_prepare_memory_fault_exit(vcpu, fault_ipa, vma_pagesize, + write_fault, exec_fault, false); return -EFAULT; + } if (kvm_is_device_pfn(pfn)) { /*