From patchwork Wed Jul 17 19:22:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 2828959 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 DE4929F9EE for ; Wed, 17 Jul 2013 19:27:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F351720395 for ; Wed, 17 Jul 2013 19:27:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70DD82039F for ; Wed, 17 Jul 2013 19:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756894Ab3GQT1O (ORCPT ); Wed, 17 Jul 2013 15:27:14 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:39446 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756254Ab3GQT1N convert rfc822-to-8bit (ORCPT ); Wed, 17 Jul 2013 15:27:13 -0400 Received: by mail-pd0-f179.google.com with SMTP id q10so2163064pdj.38 for ; Wed, 17 Jul 2013 12:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=kH3ztyRDFG6uWKm6Z27zwHxo8X6tRcIT3Gz2C98a0wk=; b=R6t7aLcMGkSV/+ZJNoBXqifOZbgtLfryktr5BzL4fpFf8NXrKjGmh83pvKj98nlQmW aUp3UKDG8osSj+Y6j+RS0uWIYFvzc96DpC5nqGHb+DemwhbGrXs/HL6jVzJwOWcbTDyw eFUlLZr5Cjc4+c22hJcKsF62gglKk3WrA4IgcgoL4JahkiGJfR6lArbpVD5inZ7Th0VQ MBI6+FQPX9PMMo6X0DIYw8mAuqW1elmRUQVSViev91wjTrlvNdfRdMs24b4am1g30f7d 7r/L+QrvwXkQH9W55fT66xl9KL24cPamMIZSA5C+3vHNhJuvETkrgCR7OeTnWpgqHAOE x43A== X-Received: by 10.66.144.199 with SMTP id so7mr9320931pab.99.1374089232381; Wed, 17 Jul 2013 12:27:12 -0700 (PDT) Received: from [192.168.1.12] ([58.241.37.61]) by mx.google.com with ESMTPSA id ai6sm12051034pad.15.2013.07.17.12.24.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jul 2013 12:27:11 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: commit f8f559422b (KVM: MMU: fast invalidate all mmio sptes) causes hang From: Xiao Guangrong In-Reply-To: <20130717184226.GA358@x4> Date: Thu, 18 Jul 2013 03:22:32 +0800 Cc: Gleb Natapov , kvm@vger.kernel.org, Xiao Guangrong , Marcelo Tosatti , Paolo Bonzini , linux-kernel@vger.kernel.org Message-Id: <3B49A7E5-F5ED-462B-969B-B8481D881340@gmail.com> References: <20130717163215.GA359@x4> <20130717164232.GI13732@redhat.com> <20130717165743.GA357@x4> <20130717184226.GA358@x4> To: Markus Trippelsdorf X-Mailer: Apple Mail (2.1508) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Hi, Could you please try this: index 460b9c6..16d1578 100644 On Jul 18, 2013, at 2:42 AM, Markus Trippelsdorf wrote: > On 2013.07.18 at 01:25 +0800, Xiao Guangrong wrote: >> Hi Markus, >> >> Thanks for your report! I am downloading the ubuntu iso and will try to reproducible it. >> >> Could you please enable these tracepoints: >> kvmmmu/check_mmio_spte >> kvmmmu/handle_mmio_page_fault >> kvmmmu/kvm_mmu_invalidate_zap_all_pages >> kvmmmu/mark_mmio_spte >> kvm/kvm_mmio >> kvm/vcpu_match_mmio >> >> and post the output? >> > First line repeated ad nauseam. > ... > 10346367 qemu-system-x86-1403 [001] 1451.422225: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346368 qemu-system-x86-1403 [001] 1451.422226: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346369 qemu-system-x86-1403 [001] 1451.422227: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346370 qemu-system-x86-1403 [001] 1451.422228: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346371 qemu-system-x86-1403 [001] 1451.422229: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0index 460b9c6..16d1578 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2952,6 +2952,9 @@ static bool page_fault_can_be_fast(u32 error_code) > !(error_code & PFERR_WRITE_MASK)) > return false; > > + if (error_code & PFERR_RSVD_MASK) > + return false; > + > return true; > }10346372 qemu-system-x86-1404 [002] 1451.422229: kvm_mmio: mmio write len 4 gpa 0xfee000b0 val 0x0 > 10346373 qemu-system-x86-1403 [001] 1451.422230: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346374 qemu-system-x86-1403 [001] 1451.422231: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346375 qemu-system-x86-1403 [001] 1451.422232: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346376 qemu-system-x86-1403 [001] 1451.422233: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346377 qemu-system-x86-1403 [001] 1451.422234: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346378 qemu-system-x86-1403 [001] 1451.422235: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346379 qemu-system-x86-1404 [002] 1451.422236: kvm_mmio: mmio write len 4 gpa 0xfee00380 val 0x3c7b0 > 10346380 qemu-system-x86-1403 [001] 1451.422237: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346381 qemu-system-x86-1403 [001] 1451.422238: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346382 qemu-system-x86-1403 [001] 1451.422239: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346383 qemu-system-x86-1403 [001] 1451.422240: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346384 qemu-system-x86-1403 [001] 1451.422241: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346385 qemu-system-x86-1403 [001] 1451.422242: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346386 qemu-system-x86-1403 [001] 1451.422243: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346387 qemu-system-x86-1403 [001] 1451.422244: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > 10346403 qemu-system-x86-1403 [001] 1451.422260: check_mmio_spte: spte ffff0000fee00e3f kvm_gen 7ffc8 spte-gen 7ffc7 valid 0 > ... > Last line repeated ad nauseam. > > Whole output is over 1.3G of size. > > -- > Markus --- 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 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2952,6 +2952,9 @@ static bool page_fault_can_be_fast(u32 error_code) !(error_code & PFERR_WRITE_MASK)) return false; + if (error_code & PFERR_RSVD_MASK) + return false; + return true; }