Message ID | 20210909013818.1191270-14-rananta@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=W04P=N7=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 AAC8BC433EF for <linux-arm-kernel@archiver.kernel.org>; Thu, 9 Sep 2021 01:47:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D07960187 for <linux-arm-kernel@archiver.kernel.org>; Thu, 9 Sep 2021 01:47:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D07960187 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=w9DaCIXVDDXEL2TwFTFquIrPaaIAoRZn7G6MFb5/vMk=; b=zIuO52/nTzQteOJPgHwOShvbBY 1uzWOcGmmlA83812m9AA7m9+Mtin9dF9YjRRmiywggwGSVS7v1elidfBvvOoP1q/ilLjEsNhuWiQ1 2CW2s+NZC3+x3fszCBDm3epaUKbMnDTk0TrRTl44ugcL2T7rgfYiovT827O1bD45b/hC+wszuSNBx TEWObyheekW32jr0Lrjyr438d8qQQUNRWJBtcqjIVaJ7lAcNPXSCQBftx6Cu0xfT/to2y11oB8V8W SM3D7gRLzTRaK+mve5PWA7ZkltDJNwXVCIaJCgIECT+OAts+tcyoWOnxfJ9UWc77jk3skq135NUab 0aRsLRBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mO97N-007y1H-S0; Thu, 09 Sep 2021 01:44:46 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mO91l-007vSJ-7y for linux-arm-kernel@lists.infradead.org; Thu, 09 Sep 2021 01:38:58 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id j9-20020a2581490000b02905897d81c63fso408724ybm.8 for <linux-arm-kernel@lists.infradead.org>; Wed, 08 Sep 2021 18:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QFzaphrb6MUUmunc6a6PS61JVYVIo4B9xEZOBe9g7Fo=; b=OLiKiebf2TxifAFIXy3Xc+KcOCQ/0AGYdrE4MhqknFVHdroim3LDpPE5sbASnxry8W ghCwia/tmngpglMpIPxqFiP/MURbu6c5Zh04SGNyNjrRUwXb8msisPMuTnnvPkAmp8ld XaU8Y/HKaoWMRtpKDZ1RIjIx0Zfa9OZP+kfhw7YYEn6EkSg84iz0n3ox9rYxOhGMoyAc PJynGxE7Gh2YmOv8iN2CyaJMw760I7ez+eq7P7opjhhuBEdHdiYjYKq2/nzYHc6u2Opa 7I4bUJNYcVxZpfxT158n0bnulcLHoTMeunqeYJ0nIT69aIpW+yLjqlg29DzurHUuGODU nq0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QFzaphrb6MUUmunc6a6PS61JVYVIo4B9xEZOBe9g7Fo=; b=MMXddH2e7cYxMu3IZGKjWxj84uw6l77Agpj00tlDeGSG/3lkYOVNEbHcqHZ1gZqeHv /FDNQJq7jGtiuZRNuxXpvDouXTQbuAwrQMRtcWGMz82Ikl8fLOBJKreN/BTvMBt4J0AA dlxRhAVB4SBGyDdpDWjwvahaUmwLSjj64rIYCG22ZffNOTwEReBZY53nVRvFqVvDPWnf epJJa8rXUOa2aIfBCrgZmBmdc9P/0kY5iy2bMUaFauMa+ohuZgTCK9zILPmqVHauR5OD g2+K6nrRf0MhjhQ3U+FvrEDabsJNID7KeIk3EBzhs98wQwxaWj6C/pbEw/zJ16ZbPefi GmIA== X-Gm-Message-State: AOAM5315rQ8OOjOrWR1lWypFgwFWptq7mdjeVXoiWemSFOnUGFz6Okdh SZGNyIn6KAMsR4ylcSLWyzGAIQs5vW7h X-Google-Smtp-Source: ABdhPJyIJlWSvy9ha4r+TmbXK5U100h0ul3t0NMi635x/oKJd6ScJd3FEJZ8ks+Ji3XU4v7IezN+undvXWOe X-Received: from rananta-virt.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1bcc]) (user=rananta job=sendgmr) by 2002:a25:802:: with SMTP id 2mr528307ybi.61.1631151535888; Wed, 08 Sep 2021 18:38:55 -0700 (PDT) Date: Thu, 9 Sep 2021 01:38:13 +0000 In-Reply-To: <20210909013818.1191270-1-rananta@google.com> Message-Id: <20210909013818.1191270-14-rananta@google.com> Mime-Version: 1.0 References: <20210909013818.1191270-1-rananta@google.com> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog Subject: [PATCH v4 13/18] KVM: selftests: Add support to get the VM's mode From: Raghavendra Rao Ananta <rananta@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Andrew Jones <drjones@redhat.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Peter Shier <pshier@google.com>, Ricardo Koller <ricarkol@google.com>, Oliver Upton <oupton@google.com>, Reiji Watanabe <reijiw@google.com>, Jing Zhang <jingzhangos@google.com>, Raghavendra Rao Anata <rananta@google.com>, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210908_183857_361206_7D46F3A3 X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: selftests: Introduce arch_timer selftest
|
expand
|
diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h index d5d0ca919928..9842bf5e2c2e 100644 --- a/tools/testing/selftests/kvm/include/kvm_util.h +++ b/tools/testing/selftests/kvm/include/kvm_util.h @@ -400,5 +400,6 @@ uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc); int vm_get_stats_fd(struct kvm_vm *vm); int vcpu_get_stats_fd(struct kvm_vm *vm, uint32_t vcpuid); int vm_get_nr_vcpus(struct kvm_vm *vm); +enum vm_guest_mode vm_get_mode(struct kvm_vm *vm); #endif /* SELFTEST_KVM_UTIL_H */ diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 1b5349b5132f..ad73ca921e2e 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -2350,3 +2350,8 @@ int vm_get_nr_vcpus(struct kvm_vm *vm) { return vm->nr_vcpus; } + +enum vm_guest_mode vm_get_mode(struct kvm_vm *vm) +{ + return vm->mode; +}
The host utility functions (in upcoming patches) may want to know the mode of the VM. Hence, create vm_get_mode() to return the same. Signed-off-by: Raghavendra Rao Ananta <rananta@google.com> --- tools/testing/selftests/kvm/include/kvm_util.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 5 +++++ 2 files changed, 6 insertions(+)