From patchwork Mon May 27 14:31:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 10963253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 679CD76 for ; Mon, 27 May 2019 14:31:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5682328620 for ; Mon, 27 May 2019 14:31:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 491B4286C0; Mon, 27 May 2019 14:31:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64D728620 for ; Mon, 27 May 2019 14:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbfE0Obq (ORCPT ); Mon, 27 May 2019 10:31:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46224 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbfE0Obq (ORCPT ); Mon, 27 May 2019 10:31:46 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A39CD3082211 for ; Mon, 27 May 2019 14:31:46 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C6C460126; Mon, 27 May 2019 14:31:42 +0000 (UTC) From: Andrew Jones To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, rkrcmar@redhat.com, thuth@redhat.com, peterx@redhat.com Subject: [PATCH v2 0/4] kvm: selftests: aarch64: use struct kvm_vcpu_init Date: Mon, 27 May 2019 16:31:37 +0200 Message-Id: <20190527143141.13883-1-drjones@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 27 May 2019 14:31:46 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP aarch64 vcpu setup requires a vcpu init step that takes a kvm_vcpu_init struct. So far we've just hard coded that to be one that requests no features and always uses KVM_ARM_TARGET_GENERIC_V8 for the target. We should have used the preferred target from the beginning, so we do that now, and we also provide an API to unit tests to select a target of their choosing and/or cpu features. Switching to the preferred target fixes running on platforms that don't like KVM_ARM_TARGET_GENERIC_V8. The new API will be made use of with some coming unit tests. v2: - rename vm_vcpu_add_memslots to vm_vcpu_add_with_memslots Andrew Jones (4): kvm: selftests: rename vm_vcpu_add to vm_vcpu_add_with_memslots kvm: selftests: introduce vm_vcpu_add kvm: selftests: introduce aarch64_vcpu_setup kvm: selftests: introduce aarch64_vcpu_add_default .../selftests/kvm/include/aarch64/processor.h | 4 +++ .../testing/selftests/kvm/include/kvm_util.h | 5 +-- .../selftests/kvm/lib/aarch64/processor.c | 33 +++++++++++++++---- tools/testing/selftests/kvm/lib/kvm_util.c | 29 +++++++++++++--- .../selftests/kvm/lib/x86_64/processor.c | 2 +- .../testing/selftests/kvm/x86_64/evmcs_test.c | 2 +- .../kvm/x86_64/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- .../testing/selftests/kvm/x86_64/state_test.c | 2 +- 9 files changed, 63 insertions(+), 18 deletions(-) Signed-off-by: Paolo Bonzini