From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: SVM: fix random segfaults with NPT enabled Date: Wed, 27 Aug 2008 18:50:27 +0300 Message-ID: <48B577C3.3050302@qumranet.com> References: <1219839523-25677-1-git-send-email-joerg.roedel@amd.com> <48B55266.4000300@qumranet.com> <48B55C56.2060503@qumranet.com> <20080827135731.GC26059@amd.com> <48B57126.7000603@qumranet.com> <20080827153550.GB3801@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Rodel , kvm@vger.kernel.org, stable@kernel.org, Alexander Graf To: Joerg Roedel Return-path: Received: from il.qumranet.com ([212.179.150.194]:47823 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753730AbYH0Pu3 (ORCPT ); Wed, 27 Aug 2008 11:50:29 -0400 In-Reply-To: <20080827153550.GB3801@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: Joerg Roedel wrote: > On Wed, Aug 27, 2008 at 06:22:14PM +0300, Avi Kivity wrote: > >> Joerg Rodel wrote: >> >>> I will test it. Is the fix in your latest kernel.org tree? >>> >> It is now. It doesn't fix the problem. >> >> >>> Reproduce it >>> with a KVM guest and start tbench in it with around 100 clients >>> configured. The tbench-process will crash when the bug is hit. >>> >>> >> Does it reproduce with uniprocessor guests? >> > > Don't know yet. We will try that. > > It didn't reproduce here on uniprocessor, but I hadn't tried for long. Some observations: - tbench triggers many cases where we have concurrent faults on the same address. these are serialized by mmu_lock. I tried to have direct_map_entry() return is it detects a race. didn't help. - I instrumented set_shadow_pte() to warn if changing the pfn or writeable bit. Didn't trip. Are there any rules for touching npt ptes concurrently? Meanwhile, I applied the patch, but I'm very worried about this. -- error compiling committee.c: too many arguments to function