From patchwork Wed Nov 18 12:56:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 61005 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAICuSqM013236 for ; Wed, 18 Nov 2009 12:56:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753733AbZKRM4T (ORCPT ); Wed, 18 Nov 2009 07:56:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753663AbZKRM4T (ORCPT ); Wed, 18 Nov 2009 07:56:19 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55140 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbZKRM4T (ORCPT ); Wed, 18 Nov 2009 07:56:19 -0500 Received: from relay2.suse.de (mail2.suse.de [195.135.221.8]) by mx2.suse.de (Postfix) with ESMTP id C46194844E; Wed, 18 Nov 2009 13:56:24 +0100 (CET) From: Alexander Graf To: kvm list Cc: virtualization@lists.linux-foundation.org, Glauber Costa , Avi Kivity , Nick Piggin , Marcelo Tosatti Subject: [PATCH] Replace kvm io delay pv-ops with linux magic Date: Wed, 18 Nov 2009 13:56:24 +0100 Message-Id: <1258548984-32433-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 97d4f92..ebed686 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -527,20 +527,6 @@ config KVM_GUEST This option enables various optimizations for running under the KVM hypervisor. -config KVM_IODELAY - bool "KVM IO-delay support" - depends on KVM_GUEST - select PARAVIRT_CPU - ---help--- - Usually we wait for PIO access to complete. When inside KVM there's - no need to do that, as we know that we're not going through a bus, - but process PIO requests instantly. - - This option disables PIO waits, but drags in CPU-bound pv-ops. Thus - you will probably get more speed loss than speedup using this option. - - If in doubt, say N. - config KVM_MMU bool "KVM PV MMU support" depends on KVM_GUEST diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 7e0207f..be182e6 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -29,15 +29,6 @@ #include #include -#ifdef CONFIG_KVM_IODELAY -/* - * No need for any "IO delay" on KVM - */ -static void kvm_io_delay(void) -{ -} -#endif /* CONFIG_KVM_IODELAY */ - #ifdef CONFIG_KVM_MMU #define MMU_QUEUE_SIZE 1024 @@ -201,13 +192,12 @@ static void kvm_leave_lazy_mmu(void) static void __init paravirt_ops_setup(void) { + extern int io_delay_type; pv_info.name = "KVM"; pv_info.paravirt_enabled = 1; -#ifdef CONFIG_KVM_IODELAY - if (kvm_para_has_feature(KVM_FEATURE_NOP_IO_DELAY)) - pv_cpu_ops.io_delay = kvm_io_delay; -#endif + /* Disable IO delay */ + io_delay_type = CONFIG_IO_DELAY_TYPE_NONE; #ifdef CONFIG_KVM_MMU if (kvm_para_has_feature(KVM_FEATURE_MMU_OP)) {