From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC87DC433E6 for ; Wed, 10 Feb 2021 23:13:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A5CE64ED3 for ; Wed, 10 Feb 2021 23:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233683AbhBJXN0 (ORCPT ); Wed, 10 Feb 2021 18:13:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233939AbhBJXJb (ORCPT ); Wed, 10 Feb 2021 18:09:31 -0500 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB5ADC0611BD for ; Wed, 10 Feb 2021 15:07:07 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id y79so2937843qka.23 for ; Wed, 10 Feb 2021 15:07:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=i/onZ3KiqIHBpv3eMUYx1zyRXltUgIE1V0UnnfUHTlU=; b=cduvZoyAs6pKakf+DUM0JAes2PTO8Xs8SjSx1xNAQRHLUo21knOelo8gzCqGwDHQqB KpP8TQfaQ9yfySQnM6cjOuNQvYt32rnyADYp42LMjK6RdTFJ2l+huXmQKxBDCHeAxkbE v0snVtPybCrxaPnQfXhkc+FzGqFk7EmHzgwtTNC0D8r6b7cYlVA1KXdsG9t7nqC0gTAn tyC1xAVjrMUsD8INIhne/bi2tsAdfhFmmtnDGoIuln/MNT1aqZBwDVdOtXO9p8LZCpX3 PBRUIlbJ3OQ4K1YsvOrElg48KybP6ODa07Qo7GJY2WoaJ1U2YMBiJH6U/QM4CWcHclqd i8HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=i/onZ3KiqIHBpv3eMUYx1zyRXltUgIE1V0UnnfUHTlU=; b=tcsP8MmV0bh9cCvi8bybTeJybNI20bDF+VFJXIRXCcBsJdSan5ufOGVnZ+SvZJDjvT LINLvxrNSok59wgTfNVW6E7umbT4JZ4ANeAAmPM5/fbISNkQTESSqInpWfc/luieEYt/ lqVkJO3OSyCbTxH+cTQv9AzpZGW6P58pqdqs6dSdlg5D6DTS6ytRTs4JTZYGMh7ySdLh BWjaqiLwfvc6w+ePwsMIiNufSbttSqo/RyQFc/K37wzUaVGmZagc6+ioUufl7HWscdcY L2Zoszwwr1nyNcb5cBX8Jb6PDoBd3hvP7xJJiLpdEqscsI/uadzIO2Fu50FgzZQlBzKF +tig== X-Gm-Message-State: AOAM533XlxCrb8OQQAARduyKtrywgXGvuOOsXNvJbnXTbl5z3aotT/Jd O5ORRV9Tkl23ubLtxAc2V/aqXcBrXOE= X-Google-Smtp-Source: ABdhPJzGJXgDaZRgmcj37pw6FCoVQ458rPN2FxbCfzyyF0dPrmlaITMAuJKlttUJ5rXiMxCAJaeo4VbIPeY= Sender: "seanjc via sendgmr" X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:11fc:33d:bf1:4cb8]) (user=seanjc job=sendgmr) by 2002:a05:6214:10e7:: with SMTP id q7mr5120746qvt.16.1612998426830; Wed, 10 Feb 2021 15:07:06 -0800 (PST) Reply-To: Sean Christopherson Date: Wed, 10 Feb 2021 15:06:25 -0800 In-Reply-To: <20210210230625.550939-1-seanjc@google.com> Message-Id: <20210210230625.550939-16-seanjc@google.com> Mime-Version: 1.0 References: <20210210230625.550939-1-seanjc@google.com> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH 15/15] KVM: selftests: Get rid of gorilla math in memslots modification test From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Ben Gardon , Yanan Wang , Andrew Jones , Peter Xu , Aaron Lewis Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the recently added perf_test_args.nr_bytes to define the location of the dummy memslot created/removed by the memslot modification test. Presumably, the goal of the existing code is simply to ensure the GPA of the dummy memslot doesn't overlap with perf_test's memslot. Signed-off-by: Sean Christopherson --- .../testing/selftests/kvm/memslot_modification_stress_test.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/testing/selftests/kvm/memslot_modification_stress_test.c b/tools/testing/selftests/kvm/memslot_modification_stress_test.c index 5ea9d7ef248e..cfc2b75619ba 100644 --- a/tools/testing/selftests/kvm/memslot_modification_stress_test.c +++ b/tools/testing/selftests/kvm/memslot_modification_stress_test.c @@ -114,10 +114,7 @@ static void run_test(enum vm_guest_mode mode, void *arg) add_remove_memslot(vm, p->memslot_modification_delay, p->nr_memslot_modifications, - perf_test_args.gpa + - (guest_percpu_mem_size * nr_vcpus) + - getpagesize() + - perf_test_args.guest_page_size); + perf_test_args.gpa + perf_test_args.nr_bytes); run_vcpus = false; -- 2.30.0.478.g8a0d178c01-goog