public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Pass through the host kernel's IO delay port
Date: Mon, 22 Jun 2009 14:35:28 -0300	[thread overview]
Message-ID: <20090622173528.GA4673@amt.cnet> (raw)
In-Reply-To: <1245406553-22013-1-git-send-email-pbonzini@redhat.com>


Paolo,

As said in private email you can change the port 80 passthrough to
disabled only on those hosts that have broken port 80 (you can find the
blacklist at arch/x86/kernel/io_delay.c).c

On Fri, Jun 19, 2009 at 12:15:53PM +0200, Paolo Bonzini wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> KVM's optimization of guest port 80 accesses was removed last May 11
> in commit 99f85a.  However, this probably has speed penalties.  I don't
> have a machine to test but the equivalent VMX patch (fdef3ad) reported
> a speedup of 3-5%, and on the Xen mailing list it was mentioned that on
> Xen passing port 80 through had positive effects on startup speed.
> 
> We can enable passthrough to the same port the host kernel uses instead.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kernel/io_delay.c |    1 +
>  arch/x86/kvm/svm.c         |    5 +++++
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c
> index a979b5b..a478cb2 100644
> --- a/arch/x86/kernel/io_delay.c
> +++ b/arch/x86/kernel/io_delay.c
> @@ -129,3 +129,4 @@ static int __init io_delay_param(char *s)
>  }
>  
>  early_param("io_delay", io_delay_param);
> +EXPORT_SYMBOL_GPL(io_delay_type);
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 1f8510c..c49f4db 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -26,6 +26,7 @@
>  #include <linux/highmem.h>
>  #include <linux/sched.h>
>  
> +#include <asm/io.h>
>  #include <asm/desc.h>
>  
>  #include <asm/virtext.h>
> @@ -411,6 +412,10 @@ static __init int svm_hardware_setup(void)
>  
>  	iopm_va = page_address(iopm_pages);
>  	memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER));
> +	if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80)
> +		clear_bit(0x80, iopm_va);
> +	else if (io_delay_type == CONFIG_IO_DELAY_TYPE_0XED)
> +		clear_bit(0xED, iopm_va);
>  	iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT;
>  
>  	if (boot_cpu_has(X86_FEATURE_NX))
> -- 
> 1.6.0.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-06-22 17:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 10:15 [PATCH] KVM: SVM: Pass through the host kernel's IO delay port Paolo Bonzini
2009-06-22  9:31 ` Avi Kivity
2009-06-22 10:11   ` Paolo Bonzini
2009-06-22 10:24     ` Gleb Natapov
2009-06-22 11:11     ` Avi Kivity
2009-06-22 17:35 ` Marcelo Tosatti [this message]
2009-06-22 17:57   ` Paolo Bonzini
2009-06-22 18:30     ` Marcelo Tosatti
2009-06-23  6:59       ` Paolo Bonzini

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=20090622173528.GA4673@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=kvm@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