Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1732308 > unrolled thread
| Started by | Borislav Petkov <bp@suse.de> |
|---|---|
| First post | 2017-09-14 16:40 +0200 |
| Last post | 2017-09-14 16:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC Part2 PATCH v3 24/26] KVM: SVM: Clear C-bit from the page fault address Borislav Petkov <bp@suse.de> - 2017-09-14 16:40 +0200
| From | Borislav Petkov <bp@suse.de> |
|---|---|
| Date | 2017-09-14 16:40 +0200 |
| Subject | Re: [RFC Part2 PATCH v3 24/26] KVM: SVM: Clear C-bit from the page fault address |
| Message-ID | <upDt7-6ey-5@gated-at.bofh.it> |
On Mon, Jul 24, 2017 at 03:03:01PM -0500, Brijesh Singh wrote:
> When SEV is active, on #NPF the page fault address will contain C-bit.
"... contain the C-bit."
> We must clear the C-bit before handling the fault.
>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
> arch/x86/kvm/svm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 0bbd050..64b9f60 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -2321,7 +2321,7 @@ static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value)
>
> static int pf_interception(struct vcpu_svm *svm)
> {
> - u64 fault_address = svm->vmcb->control.exit_info_2;
> + u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2);
> u64 error_code = svm->vmcb->control.exit_info_1;
>
> return kvm_handle_page_fault(&svm->vcpu, error_code, fault_address,
> --
Otherwise:
Reviewed-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
Back to top | Article view | linux.kernel
csiph-web