From patchwork Wed Feb 10 23:06:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 12081985 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=ham 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 9AB67C433E0 for ; Wed, 10 Feb 2021 23:09:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60E9C64D99 for ; Wed, 10 Feb 2021 23:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234061AbhBJXJP (ORCPT ); Wed, 10 Feb 2021 18:09:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233897AbhBJXIy (ORCPT ); Wed, 10 Feb 2021 18:08:54 -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 AF3FDC061A28 for ; Wed, 10 Feb 2021 15:07:07 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id p185so2969836qkc.9 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=tWkTfAux8EQ7QJ9oniH/BK/vnaHCYGe1R6E50Dtk/f+oNy+sc7oqAOzJrGy5uR4J5H qoz+kVhA4XmEF74X9wWUG/wFKlNwemYRIktgbLDSAFPOwX1lNnEubpbFsv7wEvPhTyBH LUa8eW6/ObFRW+31rUO+WUthHKUmxiPtJ8NYfrPwlA+St1dlAGEx+ftsNZpB1n/LzTCm +HQy13xA+EO8u/3lFESBDckAD0G5joOV19GXoJ3atnCzknZZMB+0luvTjknDYIpaUx9H 2UCxpOD1XcUJyVjZCTQNS2EtQzZ0/Tldm6wCESDEfVY2A5vwP+3WRjv6MWISxBKTbdh3 wXmg== X-Gm-Message-State: AOAM533MjOsKk4SAhfIj+DkXjrD2rNfEFcLlVsAeoqOXDaIxFahqfWST WFai40DNDyWfKw58WT4+GQrHtZxYiD0= 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 Precedence: bulk List-ID: X-Mailing-List: kvm@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;