From: Borislav Petkov <bp@alien8.de>
To: Joel Schopp <joel.schopp@amd.com>
Cc: Gleb Natapov <gleb@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Joerg Roedel <joro@8bytes.org>,
linux-kernel@vger.kernel.org, David Kaplan <david.kaplan@amd.com>
Subject: Re: [PATCH v2] x86: svm: use kvm_register_write()/read()
Date: Sat, 21 Feb 2015 00:21:16 +0100 [thread overview]
Message-ID: <20150220232116.GN19378@pd.tnic> (raw)
In-Reply-To: <20150220220210.14409.84036.stgit@joelvmguard2.amd.com>
On Fri, Feb 20, 2015 at 04:02:10PM -0600, Joel Schopp wrote:
> From: David Kaplan <david.kaplan@amd.com>
>
> KVM has nice wrappers to access the register values, clean up a few places
> that should use them but currently do not.
>
> Signed-off-by: David Kaplan <david.kaplan@amd.com>
> [forward port and testing]
> Signed-off-by: Joel Schopp <joel.schopp@amd.com>
Looks good.
Acked-by: Borislav Petkov <bp@suse.de>
> ---
> arch/x86/kvm/svm.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index d319e0c..a7d88e4 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
...
> @@ -3142,8 +3142,8 @@ static int rdmsr_interception(struct vcpu_svm *svm)
> } else {
> trace_kvm_msr_read(ecx, data);
>
> - svm->vcpu.arch.regs[VCPU_REGS_RAX] = data & 0xffffffff;
> - svm->vcpu.arch.regs[VCPU_REGS_RDX] = data >> 32;
> + kvm_register_write(&svm->vcpu, VCPU_REGS_RAX, data & 0xffffffff);
> + kvm_register_write(&svm->vcpu, VCPU_REGS_RDX, data >> 32);
Right, kvm is missing kvm_write_edx_eax() in addition to the read
variant. Someone might want to do a patch and such, ^^hint hint^^...
:-)
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
next prev parent reply other threads:[~2015-02-20 23:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 22:02 [PATCH v2] x86: svm: use kvm_register_write()/read() Joel Schopp
2015-02-20 23:21 ` Borislav Petkov [this message]
2015-02-25 22:26 ` Marcelo Tosatti
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=20150220232116.GN19378@pd.tnic \
--to=bp@alien8.de \
--cc=david.kaplan@amd.com \
--cc=gleb@kernel.org \
--cc=joel.schopp@amd.com \
--cc=joro@8bytes.org \
--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