From patchwork Wed Dec 24 08:23:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiejun Chen X-Patchwork-Id: 5537831 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9790E9F2F7 for ; Wed, 24 Dec 2014 08:24:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9CC02012D for ; Wed, 24 Dec 2014 08:24:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C1B2200E0 for ; Wed, 24 Dec 2014 08:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbaLXIX5 (ORCPT ); Wed, 24 Dec 2014 03:23:57 -0500 Received: from mga11.intel.com ([192.55.52.93]:28931 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbaLXIX4 (ORCPT ); Wed, 24 Dec 2014 03:23:56 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 24 Dec 2014 00:23:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,637,1413270000"; d="scan'208";a="628601020" Received: from tiejunch-mobl.ccr.corp.intel.com (HELO [10.238.128.128]) ([10.238.128.128]) by orsmga001.jf.intel.com with ESMTP; 24 Dec 2014 00:23:54 -0800 Message-ID: <549A781A.6010505@intel.com> Date: Wed, 24 Dec 2014 16:23:54 +0800 From: "Chen, Tiejun" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andy Lutomirski , Paolo Bonzini , jamie@audible.transient.net CC: kvm list , Igor Mammedov Subject: Re: [bisected] KVM in 3.19-rc1 is completely broken References: <54992591.5070206@intel.com> <1967770651.2358249.1419369239480.JavaMail.zimbra@redhat.com> In-Reply-To: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 2014/12/24 5:29, Andy Lutomirski wrote: > On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini wrote: >> >>> I can reproduce it using the same steps on a Sandy Bridge laptop, with >>> whatever QEMU is packaged in Fedora 21. I attached the config. >>> >>> I also submitted a virtme update for Fedora Rawhide and 21 (20 is >>> still building) in case it helps. The build is here: >>> >>> http://koji.fedoraproject.org/koji/buildinfo?buildID=600732 >> >> The other reporter bisected it to >> 0e60b0799fedc495a5c57dbd669de3c10d72edd2. Can you try its parent? > > That's what I bisected it to. The parent works. > >> >> Also, does it break with 3.18 host and 3.19-rc1 guest, or with >> 3.19-rc1 host and 3.18 guest? (Sorry I should do this myself >> but I'm a bit swamped due to vacation until Jan 6th). >> > > The breakage is with 3.17.7-something L0 and the same test kernel as > L1 and L2. I think it breaks the same way with 3.19-rc1 as host and > guest without any nesting, but that's awkward to test right now. > Andy, Could you try this? Signed-off-by: Tiejun Chen Tested-by: Andy Lutomirski --- virt/kvm/kvm_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f528343..a2d928c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -672,6 +672,7 @@ static void update_memslots(struct kvm_memslots *slots, WARN_ON(mslots[i].id != id); if (!new->npages) { new->base_gfn = 0; + new->flags = 0; if (mslots[i].npages) slots->used_slots--; } else { @@ -688,7 +689,7 @@ static void update_memslots(struct kvm_memslots *slots, i++; } while (i > 0 && - new->base_gfn > mslots[i - 1].base_gfn) { + new->base_gfn >= mslots[i - 1].base_gfn) { mslots[i] = mslots[i - 1]; slots->id_to_index[mslots[i].id] = i; i--;