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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB711C433F5 for ; Wed, 4 May 2022 22:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379610AbiEDWzA (ORCPT ); Wed, 4 May 2022 18:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379295AbiEDWxt (ORCPT ); Wed, 4 May 2022 18:53:49 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83CC053B5E for ; Wed, 4 May 2022 15:50:04 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id s185-20020a632cc2000000b003c18e076a2bso1338913pgs.13 for ; Wed, 04 May 2022 15:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=X5ejK3ALymV3WJX0jLnTwZBvoVVn9CiBNagBWrKCE/c=; b=FQ5Y4G1jdMcxzC4YeAze9qmRTVA51vK7cwsOKwP2c+9bqfg7Y3ip3xUjqBbbqKF3U6 hZL8jhuJsSotBGo5rOR/r9DyzkNYUIUivbyKzo9mRaYYCwEzUFhPkEQStsRVWE+AQkri IJQf8ib+efSe21JvQQS2CSGUCZccS7JQwyqd2qVxHkqwyvbB9PH++HnRp9x9++WTVbtk 3DSSSSeErAN0k9X7fbrCRvlUmrnNE4NMW6uLjoFKzcOBZCSCxnvZqVCcKmp2Nf2hRr39 TtlftgTN17otS9qlAi17mXG6OpzxE7bO7T3BP6WJxnQDyTntnss6nfqerKLgdtQFwBPO ghZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=X5ejK3ALymV3WJX0jLnTwZBvoVVn9CiBNagBWrKCE/c=; b=ahTcrEGn7zAYE+Qn+saDrLbHdSWKx1xmMloXu07sYeQC0B+1fGMGt4IJXU4ANKsGuU DQymk7LB67VBFB6OXlplH0NoJRwXzeKc4FPae8ck+wd0V8HvgwmkQm3hKAw4vh3KYkOC RC5m+skWG2hvdyQV11dVo5/yOs/haAPtGchi4s6fCW0MVy8L05RigszsqmgWNu7Ej4bI 5IdMmk8HijFzyRyrm7WWqeQLzNN7zywaSWPMk+AE1m2qq+Le5Hnl35UbOS+lUOFOdKVy n448FPSaOwwzMijy6J1EiFlioaXy7M8R2dJfRFJa9rD1zFktSB188jJX+Ql60G5ztoEW undg== X-Gm-Message-State: AOAM533gpvbqwsv1NN1wg4bcWMd1ZDb7nCMlFsoewLD9zr+igtvuYB7s 5kExjaC06o3zncfdPNbQKJvQAUUbXjI= X-Google-Smtp-Source: ABdhPJwBGWVdCEp8FNBvPucswMVo2PWyvJN8pOvf7+umBXFwxnQLKA0HVK7Gr1tVT/6BlRctH96PiMxUG6M= X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a62:8684:0:b0:50d:972b:d9d2 with SMTP id x126-20020a628684000000b0050d972bd9d2mr22697955pfd.4.1651704604041; Wed, 04 May 2022 15:50:04 -0700 (PDT) Reply-To: Sean Christopherson Date: Wed, 4 May 2022 22:47:25 +0000 In-Reply-To: <20220504224914.1654036-1-seanjc@google.com> Message-Id: <20220504224914.1654036-20-seanjc@google.com> Mime-Version: 1.0 References: <20220504224914.1654036-1-seanjc@google.com> X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [PATCH 019/128] KVM: selftests: Make x86-64's register dump helpers static From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Vitaly Kuznetsov , Andrew Jones , David Matlack , Ben Gardon , Oliver Upton , Sean Christopherson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make regs_dump() and sregs_dump() static, they're only implemented by x86 and only used internally. Signed-off-by: Sean Christopherson --- .../selftests/kvm/lib/kvm_util_internal.h | 34 ------------------ .../selftests/kvm/lib/x86_64/processor.c | 36 ++----------------- 2 files changed, 2 insertions(+), 68 deletions(-) diff --git a/tools/testing/selftests/kvm/lib/kvm_util_internal.h b/tools/testing/selftests/kvm/lib/kvm_util_internal.h index 0c7c44499129..544b90df2f80 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util_internal.h +++ b/tools/testing/selftests/kvm/lib/kvm_util_internal.h @@ -88,40 +88,6 @@ struct vcpu *vcpu_get(struct kvm_vm *vm, uint32_t vcpuid); */ void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent); -/* - * Register Dump - * - * Input Args: - * stream - Output FILE stream - * regs - Registers - * indent - Left margin indent amount - * - * Output Args: None - * - * Return: None - * - * Dumps the state of the registers given by @regs, to the FILE stream - * given by @stream. - */ -void regs_dump(FILE *stream, struct kvm_regs *regs, uint8_t indent); - -/* - * System Register Dump - * - * Input Args: - * stream - Output FILE stream - * sregs - System registers - * indent - Left margin indent amount - * - * Output Args: None - * - * Return: None - * - * Dumps the state of the system registers given by @sregs, to the FILE stream - * given by @stream. - */ -void sregs_dump(FILE *stream, struct kvm_sregs *sregs, uint8_t indent); - struct userspace_mem_region * memslot2region(struct kvm_vm *vm, uint32_t memslot); diff --git a/tools/testing/selftests/kvm/lib/x86_64/processor.c b/tools/testing/selftests/kvm/lib/x86_64/processor.c index 6113cf6bb238..93726d8cac44 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/processor.c +++ b/tools/testing/selftests/kvm/lib/x86_64/processor.c @@ -19,8 +19,7 @@ vm_vaddr_t exception_handlers; -void regs_dump(FILE *stream, struct kvm_regs *regs, - uint8_t indent) +static void regs_dump(FILE *stream, struct kvm_regs *regs, uint8_t indent) { fprintf(stream, "%*srax: 0x%.16llx rbx: 0x%.16llx " "rcx: 0x%.16llx rdx: 0x%.16llx\n", @@ -43,21 +42,6 @@ void regs_dump(FILE *stream, struct kvm_regs *regs, regs->rip, regs->rflags); } -/* - * Segment Dump - * - * Input Args: - * stream - Output FILE stream - * segment - KVM segment - * indent - Left margin indent amount - * - * Output Args: None - * - * Return: None - * - * Dumps the state of the KVM segment given by @segment, to the FILE stream - * given by @stream. - */ static void segment_dump(FILE *stream, struct kvm_segment *segment, uint8_t indent) { @@ -75,21 +59,6 @@ static void segment_dump(FILE *stream, struct kvm_segment *segment, segment->unusable, segment->padding); } -/* - * dtable Dump - * - * Input Args: - * stream - Output FILE stream - * dtable - KVM dtable - * indent - Left margin indent amount - * - * Output Args: None - * - * Return: None - * - * Dumps the state of the KVM dtable given by @dtable, to the FILE stream - * given by @stream. - */ static void dtable_dump(FILE *stream, struct kvm_dtable *dtable, uint8_t indent) { @@ -99,8 +68,7 @@ static void dtable_dump(FILE *stream, struct kvm_dtable *dtable, dtable->padding[0], dtable->padding[1], dtable->padding[2]); } -void sregs_dump(FILE *stream, struct kvm_sregs *sregs, - uint8_t indent) +static void sregs_dump(FILE *stream, struct kvm_sregs *sregs, uint8_t indent) { unsigned int i; -- 2.36.0.464.gb9c8b46e94-goog