From: Paolo Bonzini <pbonzini@redhat.com>
To: Stephen Zhang <starzhangzsd@gmail.com>,
seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com,
jmattson@google.com, joro@8bytes.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm:vmx:code changes in handle_io() to save some CPU cycles.
Date: Sat, 12 Dec 2020 01:34:47 +0100 [thread overview]
Message-ID: <46f11275-c697-9c0b-a12b-152301acaa76@redhat.com> (raw)
In-Reply-To: <1607588115-29971-1-git-send-email-starzhangzsd@gmail.com>
On 10/12/20 09:15, Stephen Zhang wrote:
> code changes in handle_io() to save some CPU cycles.
>
> Signed-off-by: Stephen Zhang <starzhangzsd@gmail.com>
> ---
> arch/x86/kvm/vmx/vmx.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 47b8357..109bcf64 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -4899,15 +4899,14 @@ static int handle_triple_fault(struct kvm_vcpu *vcpu)
> static int handle_io(struct kvm_vcpu *vcpu)
> {
> unsigned long exit_qualification;
> - int size, in, string;
> + int size, in;
> unsigned port;
>
> exit_qualification = vmx_get_exit_qual(vcpu);
> - string = (exit_qualification & 16) != 0;
>
> ++vcpu->stat.io_exits;
>
> - if (string)
> + if (exit_qualification & 16)
> return kvm_emulate_instruction(vcpu, 0);
>
> port = exit_qualification >> 16;
>
I would be very surprised if there's any change in the assembly code
after this patch.
Paolo
prev parent reply other threads:[~2020-12-12 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 8:15 [PATCH] kvm:vmx:code changes in handle_io() to save some CPU cycles Stephen Zhang
2020-12-10 9:56 ` Vitaly Kuznetsov
2020-12-12 0:34 ` Paolo Bonzini [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=46f11275-c697-9c0b-a12b-152301acaa76@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=starzhangzsd@gmail.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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;
as well as URLs for NNTP newsgroup(s).