From: Jarkko Sakkinen <jarkko@profian.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Harald Hoyer <harald@profian.com>, Tom Dohrmann <erbse.13@gmx.de>,
Ashish Kalra <ashish.kalra@amd.com>,
Michael Roth <michael.roth@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Jarkko Sakkinen <jarkko@profian.com>,
kvm@vger.kernel.org (open list:KERNEL VIRTUAL MACHINE FOR X86
(KVM/x86)),
linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT
AND 64-BIT))
Subject: [PATCH RFC 1/8] KVM: SVM: fix: calculate end instead of passing size
Date: Fri, 27 Jan 2023 02:52:30 +0000 [thread overview]
Message-ID: <20230127025237.269680-2-jarkko@profian.com> (raw)
In-Reply-To: <20230127025237.269680-1-jarkko@profian.com>
From: Tom Dohrmann <erbse.13@gmx.de>
The third parameter of `kvm_vm_do_hva_range_op` doesn't take the size
of the range, but the end of the range.
Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
Link: https://lore.kernel.org/lkml/Y6Sgwp%2FBofzCUrQe@notebook/
Signed-off-by: Jarkko Sakkinen <jarkko@profian.com>
---
arch/x86/kvm/svm/sev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 855f5e702240..d3468d1533bd 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -500,7 +500,7 @@ static int sev_get_memfile_pfn(struct kvm *kvm, unsigned long addr,
unsigned long size, unsigned long npages,
struct page **pages)
{
- return kvm_vm_do_hva_range_op(kvm, addr, size,
+ return kvm_vm_do_hva_range_op(kvm, addr, addr + size,
sev_get_memfile_pfn_handler, pages);
}
--
2.38.1
next parent reply other threads:[~2023-01-27 2:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230127025237.269680-1-jarkko@profian.com>
2023-01-27 2:52 ` Jarkko Sakkinen [this message]
2023-01-27 2:52 ` [PATCH RFC 2/8] KVM: SVM: fix: initialize `npinned` Jarkko Sakkinen
2023-01-27 2:52 ` [PATCH RFC 3/8] KVM: SVM: write back corrected CPUID page Jarkko Sakkinen
2023-01-27 22:46 ` Tom Lendacky
2023-01-27 2:52 ` [PATCH RFC 4/8] KVM: SVM: fix: add separate error for missing slot Jarkko Sakkinen
2023-01-27 2:52 ` [PATCH RFC 5/8] KVM: SVM: fix: Don't return an error for `GHCB_MSR_PSC_REQ` Jarkko Sakkinen
2023-01-27 2:52 ` [PATCH RFC 6/8] KVM: SVM: KVM_SEV_SNP_LAUNCH_RESET_VECTOR Jarkko Sakkinen
2023-01-27 2:52 ` [PATCH RFC 8/8] crypto: ccp: Move __sev_snp_init_locked() call inside __sev_platform_init_locked() Jarkko Sakkinen
2023-01-27 2:56 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230127025237.269680-2-jarkko@profian.com \
--to=jarkko@profian.com \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=erbse.13@gmx.de \
--cc=harald@profian.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox