From patchwork Tue Sep 14 22:31:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Ananta X-Patchwork-Id: 12495061 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=-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, 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 1993FC433EF for ; Tue, 14 Sep 2021 22:52:33 +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 DC11361155 for ; Tue, 14 Sep 2021 22:52:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DC11361155 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=JI7gprQ+GGNwEP8YsPfdk2gijGyGz6wjm9hUhV/OKcw=; b=o7wFo4TLVFidvz2ptya5tZ+ovX 17R4Uz4DrINwdcVluZ8fo7gdePFGFXEnAy3VjwCFAPa7g1VXGiBu14f1nx4UfchCEDrx6uocPFc/f ypjjjLZZgBke+2DjvFgGs9CdnoVQXRWRmzkm4oiGtiIB/n1+JgnsweRLvkJ7ZWxy8dTEBE+t+hwVr T3WRhG1rJ48a2fH8YeIIP1DPi+7afv8CzshsBC9hjIz0cjt4rpDrFZQ4G5LbzLh5lHyk7DiYusEi7 kTCtXZ2qOWBU5ssi+xnEgHy48FrhPJt5ASwtiVh/HTNmbVF3gQOnGeG0QqMMeEJ0NSq4Iwr3heYmh 2OWw7l/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQHFq-007WZu-MW; Tue, 14 Sep 2021 22:50:19 +0000 Received: from mail-pj1-x104a.google.com ([2607:f8b0:4864:20::104a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQGxr-007PG5-Ug for linux-arm-kernel@lists.infradead.org; Tue, 14 Sep 2021 22:31:45 +0000 Received: by mail-pj1-x104a.google.com with SMTP id d33-20020a17090a6f2400b001996ffaef72so2659715pjk.6 for ; Tue, 14 Sep 2021 15:31:43 -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=wauNwIwmja2q2Jg5bPFVhyVB/9NFZO9dAmOByqwKIHE=; b=GxzJdEKoi4NpRi08FJiVjpv24DdGyPJUWcN9gW/uSdAhLxMXXuhGlshuhdAsJd+XCH C1RUeXk46jm2J3liTO0ZWgSU4wk16C4LWyjvtoxQSK96FEpWoMuuSpCQ6isi86tGeho5 icu9UaD+sm3/wKOkzhwl0tju2R7f6yqM4P+yRI2lQDh7mWSd4FDAfeSTJC6ncz9K9pk3 7aOlXYiEj7dmRldEnnLZQytgtEk4nLw8iTNyN9bAvmfkzSvMqqqwfgScuRYEK3S65cYH +IRTfdqQ+l0DdJ7RJ0cp38Quez2Ux0KsGHpD64jaUFzwPVC0jHxDGjKCAwWA1M2pbdKt hvzQ== 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=wauNwIwmja2q2Jg5bPFVhyVB/9NFZO9dAmOByqwKIHE=; b=GoNztEkZdgoHAOplKX9ZeoLeXdt+MzD1r898QPI8lJSBypID+rA9mqakDvcprdrRmv pO1rquEmOdaGO2iuM8qtGeJJhLz3WfMzB20/af90ERqFj99P2VKSBChOzFlntINST9kJ 9KvJIq1RKauCM61XrXH6f25UDYz/7AY3UeTaefXRKBgD9+onHal5tsTqBayThx891yg/ nMsCUybn+sJzU26efh6MWrv3pRyITov07acvI3z8UoNz2S1oWC6nm93DAt3Sqh2g3X0X FA2NwNA6BeNG0311yifbtkdDyGWqvLnOrgXxfB1S1uXO2zIL76ymqobBm6pydM6rKrGQ MOIg== X-Gm-Message-State: AOAM531qH5rXnxoNhcIek7uFb4KJHVHGF5w9iDH8ttCECb+Qbp/Hu6LY 0ZXKXPL0oJOi+/UexC5CxiJfBGNUzsXq X-Google-Smtp-Source: ABdhPJwraibtgDwt+aMWBczNgOCVVTCAtCVQFbLYOLSXu8hvCj2vOUYR+M2U4dlOaah4JO7ydfm+C8fxPZ30 X-Received: from rananta-virt.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1bcc]) (user=rananta job=sendgmr) by 2002:a17:90b:3909:: with SMTP id ob9mr663472pjb.151.1631658702532; Tue, 14 Sep 2021 15:31:42 -0700 (PDT) Date: Tue, 14 Sep 2021 22:31:08 +0000 In-Reply-To: <20210914223114.435273-1-rananta@google.com> Message-Id: <20210914223114.435273-10-rananta@google.com> Mime-Version: 1.0 References: <20210914223114.435273-1-rananta@google.com> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog Subject: [PATCH v7 09/15] KVM: arm64: selftests: Maintain consistency for vcpuid type From: Raghavendra Rao Ananta To: Paolo Bonzini , Marc Zyngier , Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose Cc: Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Oliver Upton , Reiji Watanabe , Jing Zhang , Raghavendra Rao Anata , 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-20210914_153144_063049_A4D39AF3 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The prototype of aarch64_vcpu_setup() accepts vcpuid as 'int', while the rest of the aarch64 (and struct vcpu) carries it as 'uint32_t'. Hence, change the prototype to make it consistent throughout the board. Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Andrew Jones --- tools/testing/selftests/kvm/include/aarch64/processor.h | 2 +- tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/include/aarch64/processor.h b/tools/testing/selftests/kvm/include/aarch64/processor.h index 515d04a3c27d..27d8e1bb5b36 100644 --- a/tools/testing/selftests/kvm/include/aarch64/processor.h +++ b/tools/testing/selftests/kvm/include/aarch64/processor.h @@ -63,7 +63,7 @@ static inline void set_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint vcpu_ioctl(vm, vcpuid, KVM_SET_ONE_REG, ®); } -void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init); +void aarch64_vcpu_setup(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_init *init); void aarch64_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_init *init, void *guest_code); diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c index db64ee206064..34f6bd47661f 100644 --- a/tools/testing/selftests/kvm/lib/aarch64/processor.c +++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c @@ -212,7 +212,7 @@ void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) } } -void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init) +void aarch64_vcpu_setup(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_init *init) { struct kvm_vcpu_init default_init = { .target = -1, }; uint64_t sctlr_el1, tcr_el1;