Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp177663iob; Mon, 2 May 2022 16:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8++V22MQvZ1v+KaD5XM6ZusS1Qmp8/x1EQeSpZMHKemhhYkq+7lYknMbk/DauM1j65AQW X-Received: by 2002:a17:902:d88a:b0:156:1609:1e62 with SMTP id b10-20020a170902d88a00b0015616091e62mr13961988plz.143.1651533731606; Mon, 02 May 2022 16:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651533731; cv=none; d=google.com; s=arc-20160816; b=FApXFRmFwJsMV6AtDOS9Ec/ZjElFjVkUhL3yxyqW4x9wqQDyKSMi9NsHpw5cxvyJff nMncXXGTEyOCrDKL0tShiZ4ipr5BQDynQ/UH0a7U0UByse7pAAocxoNn2zTvaj83Xlxv 9TjQD+iYZ1n/IEKag1WZBOmTs12ZRUQ734Mkl5bp4SF9maU8MSLuutXq56QyDpO0M641 5c0nc/zYGlCUpkG8sT5qP7w9AuEyJgCKHmmxogzi9iGyJ6UVoqvoYhcMgxwOGhOpUNmn OsvepvrEh4CE0S2RMXGouv3e7pw6XBAp1SaFpQG8+imbAs9XwbvPAUA0ADPS8oavcVJ5 PFqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FR217X+sFZL46Wxt9EvSsoLWknD7uWUFk7IHaZjgk18=; b=GhlIFUirffN2ficR6Jele9n7lSx0MB0tpxgRtJcOG1//aOWtAvWJHfETtDsEMFuxWy 8yUnewFG2739fuqmmmlvEC6CrHly0tCYxDCEIrL1+iS0dR2b5jpFN37Y/d5ksFJAgmxS pc+Uribr1ZxZeHe3VvR9RjG3rDjMfpTtoOrr3zjWHj/hhsf62X15RaPvF4xHGw6zTmk4 dJ0w3KbpsgGrfyX7Y36PusOI1VANzIEWOhUbvZK1HY54R6SmYvTOZabFrrsyedj7NU8L GAkYHQdzO+90shcwzJ/psmLxQwfNhJ95bTl9+KAmOPFvIEhauKOy9ttTfN2KqaOeNvq+ FkxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=djimFbij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u7-20020a637907000000b003aa55fc2ad0si15910628pgc.501.2022.05.02.16.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=djimFbij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8237E27B1E; Mon, 2 May 2022 16:22:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386564AbiEBQ4J (ORCPT + 99 others); Mon, 2 May 2022 12:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386459AbiEBQ4F (ORCPT ); Mon, 2 May 2022 12:56:05 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AAEBE085 for ; Mon, 2 May 2022 09:51:59 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id z5-20020a17090a468500b001d2bc2743c4so13214127pjf.0 for ; Mon, 02 May 2022 09:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FR217X+sFZL46Wxt9EvSsoLWknD7uWUFk7IHaZjgk18=; b=djimFbijDCzrFhkQD10nuWI4luGThhVdo3NKqwTf1z0IanLgpqjTqe/DI6RZcEDejz Qf1jiP21D8fkk0ZzrhzDOV5iH/DtZXFCbwcqKwx1Cx99AzkiloCknKreU2RtvlKPWn7h oJBXCr+s2GpO/iH6g2BQAr7G40owz2zIa1mfHBaKmzTuNawocY8S12g3ukdBFVNZxB1c R5K23bsvyrLH4Is4OewGMC/REV7wYO3GeZS69j/Mziy+q3wUcP425hltALfW4zYGrnBP qd3VQqOhyK6ZNrLxqa+0LDbXyRkbXF+eltDSGPRlVWvjM1xfwcnff5zAGcGUBUFt0i4M nqfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FR217X+sFZL46Wxt9EvSsoLWknD7uWUFk7IHaZjgk18=; b=qwurRQiVBZq5sHkZXQ1ALojsg//PEnGwgPQYb8PwdmHZgHpwItIgu9VQVZFCvUDT5m b351sAG9y7Zcutqkb5HCoU8wqMYaPin/zZeLrFvHiNH5pICWGtC7/CXslPlFcH7QtXSo ECbYi7Jo7b6Vurb6xKI9pe+ERiHuIWwI06h4T8DF820Cxz9jPa90sMM+wOCrTnj1Jkyr en0/fBno7mHbbuao+5hYvLV7DkmW9pthPhWmJF1aOU+V6wSgMjVyFlitu04oO1mGP7+A I1Ct/fPiVm5RuQ1NquT9MbLCFtZLoGa3PDmxg/MaNzNTNOftYunUpc+hAAUYIF3R0Z1u fnZA== X-Gm-Message-State: AOAM530ljYczR1rV4UYuXZsO8ltXWafan1V1K2a+WnrDfPISntanljE6 KeZgLMRwqK+oaE576IjdcpSLFg== X-Received: by 2002:a17:902:a705:b0:156:9cc5:1d6f with SMTP id w5-20020a170902a70500b001569cc51d6fmr12597635plq.66.1651510318553; Mon, 02 May 2022 09:51:58 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id c21-20020aa78c15000000b0050dc7628179sm4928026pfd.83.2022.05.02.09.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 09:51:58 -0700 (PDT) Date: Mon, 2 May 2022 16:51:54 +0000 From: Sean Christopherson To: Maxim Levitsky Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Gardon , David Matlack Subject: Re: [PATCH] KVM: x86/mmu: Do not create SPTEs for GFNs that exceed host.MAXPHYADDR Message-ID: References: <337332ca-835c-087c-c99b-92c35ea8dcd3@redhat.com> <20e1e7b1-ece7-e9e7-9085-999f7a916ac2@redhat.com> <82d1a5364f1cc479da3762b046d22f136db167e3.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 02, 2022, Maxim Levitsky wrote: > On Mon, 2022-05-02 at 10:59 +0300, Maxim Levitsky wrote: > > > > Also I can reproduce it all the way to 5.14 kernel (last kernel I have installed in this VM). > > > > > > > > I tested kvm/queue as of today, sadly I still see the warning. > > > > > > Due to a race, the above statements are out of order ;-) > > > > So futher investigation shows that the trigger for this *is* cpu_pm=on :( > > > > So this is enough to trigger the warning when run in the guest: > > > > qemu-system-x86_64 -nodefaults -vnc none -serial stdio -machine accel=kvm > > -kernel x86/dummy.flat -machine kernel-irqchip=on -smp 8 -m 1g -cpu host > > -overcommit cpu-pm=on > > > > > > '-smp 8' is needed, and the more vCPUs the more often the warning appears. > > > > > > Due to non atomic memslot update bug, I use patched qemu version, with an > > attached hack, to pause/resume vcpus around the memslot update it does, but > > even without this hack, you can just ctrl+c the test after it gets the KVM > > internal error, and then tdp mmu memory leak warning shows up (not always > > but very often). > > > > > > Oh, and if I run the above command on the bare metal, it never terminates. > > Must be due to preemption, qemu shows beeing stuck in kvm_vcpu_block. AVIC > > disabled, kvm/queue. Bugs, bugs, and features :) > > All right, at least that was because I removed the '-device isa-debug-exit,iobase=0xf4,iosize=0x4', > which is apparently used by KVM unit tests to signal exit from the VM. Can you provide your QEMU command line for running your L1 VM? And your L0 and L1 Kconfigs too? I've tried both the dummy and ipi_stress tests on a variety of hardware, kernels, QEMUs, etc..., with no luck.