Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp771620pxb; Tue, 5 Apr 2022 22:38:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9B50mUeCIMFalwt6kQ505TNHmH8ApRo6yCBCaF4yo7gc20jKM7nAv+JdHRp3Jk2re6jym X-Received: by 2002:a17:903:1cb:b0:154:4bee:c034 with SMTP id e11-20020a17090301cb00b001544beec034mr6853683plh.155.1649223533800; Tue, 05 Apr 2022 22:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649223533; cv=none; d=google.com; s=arc-20160816; b=VmZwP9UDVwLdFb6XahidDhJbP3uZyWkvshjxA/8/wpUBfc78CKDhUEqRgjjGdUJuid qblxR+81L+vaxK4gjczDNvAWmXgbt9TL7d4vn755g+xIQBnCbYc0agAraEGumz/w91AI 9FN9SwV7fFYJFoFI0sL4UYRII6jfRlGwUjWNXBegoEDy51oNzBQVa4hBho7gPpsbQ2pn KwId0HpRWZZhnuZMwqAjYJwJshqfzhwagAtkeokQTX6Tsi6GgtavkDIakdr2dflnJy/n 1w/RxO2ka1sIP+TN7qhJ0bKxpE4SiYQtXKC7+m/2kU9Pk5NAwq548Hf141A6UcS1sa12 H3ag== 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=zrf+gH1Sy82K5gg/a5Dlt8LashIXeZ1Mo8cMFm2VVvg=; b=cPIh3VRn0dhHg8Q1U+hSYPE3maidHD8ednEPRYVQuzHp13fixTU/DNiJS1KA6cDEhB OHgfQFuzs0Z7V0JEeGSBbDRsX5BTF2ulsX2Mhw7uXaQ6QMcRF+jUn+FW6gzxuvQuE02t 1aksamlzUv7nGXMjl6cxG+y5wMURJL6cXgGYbgMIUS/CCIS9iW4vafWCJcFAcELgDTv4 zkygrHU/JdCypaz8aTfWr4NGMMDqcmEtuQKiws0CQChjMs2jxYedvkZSg22bzyLxlyyc P4A/uMUtirkoks0ZraKiNTtL/SZUT4C/Cj9vCXdHBaCxabLDUvpz4d3pEygODMmc3vqO 4muA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XUjZIKj8; 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 b2-20020a17090a550200b001c5f4e39398si3869183pji.127.2022.04.05.22.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:38:53 -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=XUjZIKj8; 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 55BD83C76D0; Tue, 5 Apr 2022 21:35:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392356AbiDFCt5 (ORCPT + 99 others); Tue, 5 Apr 2022 22:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1586675AbiDFABy (ORCPT ); Tue, 5 Apr 2022 20:01:54 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46E5DD1CE0 for ; Tue, 5 Apr 2022 15:29:19 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id y10so758084pfa.7 for ; Tue, 05 Apr 2022 15:29:19 -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=zrf+gH1Sy82K5gg/a5Dlt8LashIXeZ1Mo8cMFm2VVvg=; b=XUjZIKj8jqoCKPQBxoRD0oT6yLRcHuhC4Wr6StBjL6TZo37AaEt0Nlk4eplWBVAlKQ qCQ6srli5Ee5b3r5s1m496WDbfXWPM4cw3Fxd7VSYVx6qzYivDrsSDFwk+yDlXycVzOS yy5U6llkan+PkDFlrLxWKGJK6FB8i9TQl9rMnkmNFMUpWmQqV2Ko7nPFy2OglfbScM4h 4cIKaDlPFaFF9jTcaBv3Hjx8XlJDBDas+p0bTgQSRNpJYzm8jKmzE9LDausDUnekLQYg tafK8hE11+8CsdOw83m3Gg8IpcsyeSr9J/Q11L51e+dqrfTMprNZ37TYGWPet0tH7y4R GjiA== 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=zrf+gH1Sy82K5gg/a5Dlt8LashIXeZ1Mo8cMFm2VVvg=; b=B+BdWQxnsfna/nY8j8VRczaLZGbrGbEQYkSMx9QcRc4QyLnj8pS8YjW2hYg/MZzVfs BaisH3/kiR3+JYWRYw4zZP9TtftuhnfekzswNmSCLjXgB/xckN0b6pBpM90HGCGLvN0+ RCqFC47tfMSHDpjeknoxCkDfjlXmCjND1x6wa7/yGl+l14XQEFzUiS6LNbSDq44FaoN5 BkMh7/4/ilUY0S1UDUZPreqyVTs1+dtnIGhmIvjijtimBAMK/MyYBcuSvBbMUeew69Jh bkc/FnsCWsJRy0vcOHD3G7gLCD+Q10M75Vy8Vrh7qGPjZy9eSqIwrwHKOoejty7DtEVP UexA== X-Gm-Message-State: AOAM532jc+kH+jeRcddY+rSavBFkOLqw13gx8pAMZJKaggUJ8Ns3npsN x3GL9v/yJGESknKQ74U2RgmoNA== X-Received: by 2002:a63:f507:0:b0:380:c32c:d696 with SMTP id w7-20020a63f507000000b00380c32cd696mr4581890pgh.226.1649197758365; Tue, 05 Apr 2022 15:29:18 -0700 (PDT) Received: from google.com (254.80.82.34.bc.googleusercontent.com. [34.82.80.254]) by smtp.gmail.com with ESMTPSA id x67-20020a623146000000b004fdf02851e5sm10182068pfx.220.2022.04.05.15.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:29:17 -0700 (PDT) Date: Tue, 5 Apr 2022 22:29:14 +0000 From: David Matlack To: Ben Gardon Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Peter Xu , Sean Christopherson , Jim Mattson , David Dunn , Jing Zhang , Junaid Shahid Subject: Re: [PATCH v3 05/11] KVM: selftests: Improve error message in vm_phy_pages_alloc Message-ID: References: <20220330174621.1567317-1-bgardon@google.com> <20220330174621.1567317-6-bgardon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220330174621.1567317-6-bgardon@google.com> 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 Wed, Mar 30, 2022 at 10:46:15AM -0700, Ben Gardon wrote: > Make an error message in vm_phy_pages_alloc more specific, and log the vm_phy_pages_alloc() > number of pages requested in the allocation. > > Signed-off-by: Ben Gardon > --- > tools/testing/selftests/kvm/lib/kvm_util.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c > index 09742a787546..9d72d1bb34fa 100644 > --- a/tools/testing/selftests/kvm/lib/kvm_util.c > +++ b/tools/testing/selftests/kvm/lib/kvm_util.c > @@ -2408,9 +2408,10 @@ vm_paddr_t vm_phy_pages_alloc(struct kvm_vm *vm, size_t num, > } while (pg && pg != base + num); > > if (pg == 0) { > - fprintf(stderr, "No guest physical page available, " > + fprintf(stderr, > + "Unable to find %ld contiguous guest physical pages. " > "paddr_min: 0x%lx page_size: 0x%x memslot: %u\n", > - paddr_min, vm->page_size, memslot); > + num, paddr_min, vm->page_size, memslot); > fputs("---- vm dump ----\n", stderr); > vm_dump(stderr, vm, 2); > abort(); > -- > 2.35.1.1021.g381101b075-goog >