public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brijesh Singh <brijesh.singh@amd.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: brijesh.singh@amd.com
Subject: Re: [PATCH] KVM: SVM: limit kvm_handle_page_fault to #PF handling
Date: Wed, 11 Oct 2017 10:30:00 -0500	[thread overview]
Message-ID: <42e37c49-dacb-1449-635c-459f88add949@amd.com> (raw)
In-Reply-To: <1507625383-23795-1-git-send-email-pbonzini@redhat.com>

Hi Paolo,


On 10/10/2017 03:49 AM, Paolo Bonzini wrote:
...

> +
> +static int npf_interception(struct vcpu_svm *svm)
> +{
> +	u64 fault_address = svm->vmcb->control.exit_info_2;
> +	u64 error_code = svm->vmcb->control.exit_info_1;
> +
> +	trace_kvm_page_fault(fault_address, error_code);
> +	return kvm_mmu_page_fault(&svm->vcpu, error_code, fault_address,
                                               ^^^^^^^     ^^^^^

The argument order need to be swapped, second argument should be 
'fault_address' and third 'error_code'

         return kvm_mmu_page_fault(&svm->vcpu, fault_address, error_code,
                          svm->vmcb->control.insn_bytes,
                          svm->vmcb->control.insn_len);


With that fixed.

Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>

thanks

      parent reply	other threads:[~2017-10-11 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10  8:49 [PATCH] KVM: SVM: limit kvm_handle_page_fault to #PF handling Paolo Bonzini
2017-10-10 19:01 ` Radim Krčmář
2017-10-11 15:30 ` Brijesh Singh [this message]

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=42e37c49-dacb-1449-635c-459f88add949@amd.com \
    --to=brijesh.singh@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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