From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 0/8] KVM updates for 2.6.20-rc2 Date: Thu, 28 Dec 2006 14:15:14 +0100 Message-ID: <20061228131513.GA2011@elte.hu> References: <45939755.7010603@qumranet.com> <20061228103345.GA4708@elte.hu> <4593A4B7.2070404@qumranet.com> <20061228112356.GA14386@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel Return-path: To: Avi Kivity Content-Disposition: inline In-Reply-To: <20061228112356.GA14386-X9Un+BFzKDI@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org * Ingo Molnar wrote: > * Avi Kivity wrote: > > > >NOTE: this is not a worry for upstream kernel, it is caused by > > >PREEMPT_RT scheduling in previously atomic APIs like kunmap(). But > > >KVM used to work pretty nicely in -rt and this problem got introduced > > >fairly recently, related to some big-page changes IIRC. > > > > This is not a recent change. The x86 emulator is fetching an > > instruction or a memory operand. > > well, the fact that it's somehow ending up in highmem and thus the > kmap becomes nontrivial could be a recent change maybe? i have worked the problem around via the change below. This affects 32-bit hosts only, and only on CONFIG_PREEMPT_RT. with this and the other two patches kvm/vmx works on 32-bit -rt hosts. Ingo Index: linux/drivers/kvm/kvm_main.c =================================================================== --- linux.orig/drivers/kvm/kvm_main.c +++ linux/drivers/kvm/kvm_main.c @@ -628,8 +628,12 @@ raced: memset(new.phys_mem, 0, npages * sizeof(struct page *)); for (i = 0; i < npages; ++i) { +#ifdef CONFIG_PREEMPT_RT + new.phys_mem[i] = alloc_page(GFP_USER | __GFP_ZERO); +#else new.phys_mem[i] = alloc_page(GFP_HIGHUSER | __GFP_ZERO); +#endif if (!new.phys_mem[i]) goto out_free; } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV