* [PATCH] x86: svm: use kvm_fast_pio_in()
@ 2015-02-28 0:01 Joel Schopp
0 siblings, 0 replies; 4+ messages in thread
From: Joel Schopp @ 2015-02-28 0:01 UTC (permalink / raw)
To: Gleb Natapov, Paolo Bonzini, kvm
Cc: David Kaplan, David Kaplan, rkrcmar, Joerg Roedel,
Marcelo Tosatti, linux-kernel, --bcc=ssg.sos.patches,
Borislav Petkov
From: David Kaplan <David.Kaplan@amd.com>
We can make the in instruction go faster the same way the out instruction is
already.
Signed-off-by: David Kaplan <David.Kaplan@amd.com>
[extracted from larger unlrelated patch, forward ported, tested]
Signed-off-by: Joel Schopp <joel.schopp@amd.com>
---
arch/x86/kvm/svm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index d319e0c..f8c906b 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1899,7 +1899,7 @@ static int io_interception(struct vcpu_svm *svm)
++svm->vcpu.stat.io_exits;
string = (io_info & SVM_IOIO_STR_MASK) != 0;
in = (io_info & SVM_IOIO_TYPE_MASK) != 0;
- if (string || in)
+ if (string)
return emulate_instruction(vcpu, 0) == EMULATE_DONE;
port = io_info >> 16;
@@ -1907,6 +1907,8 @@ static int io_interception(struct vcpu_svm *svm)
svm->next_rip = svm->vmcb->control.exit_info_2;
skip_emulated_instruction(&svm->vcpu);
+ if (in)
+ return kvm_fast_pio_in(vcpu, size, port);
return kvm_fast_pio_out(vcpu, size, port);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] x86: svm: use kvm_fast_pio_in()
@ 2015-02-28 0:04 Joel Schopp
2015-03-02 13:38 ` Radim Krčmář
0 siblings, 1 reply; 4+ messages in thread
From: Joel Schopp @ 2015-02-28 0:04 UTC (permalink / raw)
To: Gleb Natapov, Paolo Bonzini, kvm
Cc: David Kaplan, David Kaplan, rkrcmar, Joerg Roedel,
Marcelo Tosatti, linux-kernel, Borislav Petkov
From: David Kaplan <David.Kaplan@amd.com>
We can make the in instruction go faster the same way the out instruction is
already.
Signed-off-by: David Kaplan <David.Kaplan@amd.com>
[extracted from larger unlrelated patch, forward ported, tested]
Signed-off-by: Joel Schopp <joel.schopp@amd.com>
---
arch/x86/kvm/svm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index d319e0c..f8c906b 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1899,7 +1899,7 @@ static int io_interception(struct vcpu_svm *svm)
++svm->vcpu.stat.io_exits;
string = (io_info & SVM_IOIO_STR_MASK) != 0;
in = (io_info & SVM_IOIO_TYPE_MASK) != 0;
- if (string || in)
+ if (string)
return emulate_instruction(vcpu, 0) == EMULATE_DONE;
port = io_info >> 16;
@@ -1907,6 +1907,8 @@ static int io_interception(struct vcpu_svm *svm)
svm->next_rip = svm->vmcb->control.exit_info_2;
skip_emulated_instruction(&svm->vcpu);
+ if (in)
+ return kvm_fast_pio_in(vcpu, size, port);
return kvm_fast_pio_out(vcpu, size, port);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: svm: use kvm_fast_pio_in()
2015-02-28 0:04 [PATCH] x86: svm: use kvm_fast_pio_in() Joel Schopp
@ 2015-03-02 13:38 ` Radim Krčmář
2015-03-02 16:03 ` Joel Schopp
0 siblings, 1 reply; 4+ messages in thread
From: Radim Krčmář @ 2015-03-02 13:38 UTC (permalink / raw)
To: Joel Schopp
Cc: Gleb Natapov, Paolo Bonzini, kvm, David Kaplan, Joerg Roedel,
Marcelo Tosatti, linux-kernel, Borislav Petkov
2015-02-27 18:04-0600, Joel Schopp:
> From: David Kaplan <David.Kaplan@amd.com>
>
> We can make the in instruction go faster the same way the out instruction is
> already.
>
> Signed-off-by: David Kaplan <David.Kaplan@amd.com>
> [extracted from larger unlrelated patch, forward ported, tested]
> Signed-off-by: Joel Schopp <joel.schopp@amd.com>
> ---
> arch/x86/kvm/svm.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> @@ -1907,6 +1907,8 @@ static int io_interception(struct vcpu_svm *svm)
> svm->next_rip = svm->vmcb->control.exit_info_2;
> skip_emulated_instruction(&svm->vcpu);
>
> + if (in)
> + return kvm_fast_pio_in(vcpu, size, port);
Have I missed a patch that defined kvm_fast_pio_in()?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: svm: use kvm_fast_pio_in()
2015-03-02 13:38 ` Radim Krčmář
@ 2015-03-02 16:03 ` Joel Schopp
0 siblings, 0 replies; 4+ messages in thread
From: Joel Schopp @ 2015-03-02 16:03 UTC (permalink / raw)
To: Radim Krčmář
Cc: Gleb Natapov, Paolo Bonzini, kvm, David Kaplan, Joerg Roedel,
Marcelo Tosatti, linux-kernel, Borislav Petkov
>> + if (in)
>> + return kvm_fast_pio_in(vcpu, size, port);
> Have I missed a patch that defined kvm_fast_pio_in()?
Not sure how I managed to leave out the bulk of the patch. Resending v2
momentarily.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-02 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 0:04 [PATCH] x86: svm: use kvm_fast_pio_in() Joel Schopp
2015-03-02 13:38 ` Radim Krčmář
2015-03-02 16:03 ` Joel Schopp
-- strict thread matches above, loose matches on Subject: below --
2015-02-28 0:01 Joel Schopp
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).