Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3540678ybl; Mon, 3 Feb 2020 02:10:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwtv9Yu1IqzqLjzO8GVu6BeufIKXZdfNNrXRk3SsFWv9uPusKx4dKDLGbWthT8R7+/nPEJK X-Received: by 2002:aca:2207:: with SMTP id b7mr14527748oic.109.1580724613339; Mon, 03 Feb 2020 02:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580724613; cv=none; d=google.com; s=arc-20160816; b=KtICqwHc9mXYt/hyzf/ynfDCcW5+ets75T1mTHyldU+Axjxsw1FO2fjmAEM2UQKhbY WhabZs0JFpjiewGFu5kSUK+1S29W/XYIxVGSY6+3YdpBnmRGSVOGs265+6gofly5Z2Tu aiEyJRhZXkTKzqNEpbOsdVShmNdfPFs6JHpDo6VXxSRHRmuGSs70RwsQPSICajcda2o5 C3cTM9Q/zYB7llVbcp0SLFRBKIn99zBNXhusnnsRd5zzPG9ljZNkaq5+uNg385K+YKb2 k6gsCNp2BeeFRqxiGQcTSszQucHywySa/qwi/2jPqYCK0ViiGXLNmM5fq0JoNyNG7TmK bnEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r9fxWWlEahNQ22mhQNSmY7IQqFx4Ff6A7HJS7S6T+SQ=; b=hjXcrCwxce4VNNEblwaQxNWCEW6pcwWIwxPOtHHedhuKr92cLTZHrIc0c820F/T+Hn msNeFZtnQcA3kJ6dGIS0x3hnaujCGIcson9KqstNqYzEp72lyKazshWfa6uDrlvQ1TSJ 8wfX1sYUQKOJXfjraS30rfS3mG5N807w6Aa7iUWWZXP0vh5EELy31Sv9M6nCVkUdmMEZ psXxZNq5YFoA+cBVAtac+abSNauGRhfv4yZSGTfil6zZPcbEMkknpkgdoklPt07hFGMY SJingxjP8UT/DgPi8ilkLWCPEeXY21fwdeD1BVu7M7rF3F/XBNUNxmlyJ0AjI8m4A5Jp TZmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AU6oMYsI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w77si8041303oif.216.2020.02.03.02.09.52; Mon, 03 Feb 2020 02:10:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AU6oMYsI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbgBCJJY (ORCPT + 99 others); Mon, 3 Feb 2020 04:09:24 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46741 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726884AbgBCJJY (ORCPT ); Mon, 3 Feb 2020 04:09:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580720962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=r9fxWWlEahNQ22mhQNSmY7IQqFx4Ff6A7HJS7S6T+SQ=; b=AU6oMYsIs0o6tkMN36SnSguHx5DQdEhQzcqFbMVuSQkBUnf2Edgfn3qGuPi05xpto8y0bQ 9JBmiDQV8XzHHs29qFXqO6KmcF2cUAymmlDHEMgXL8pkvwlAezg0/1WlayBJfS70/u5u35 rjqSuaaahnAnmimvTQ4oPPsFiCAWX64= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-kETJaCAZP4eWE84Y6UxxdA-1; Mon, 03 Feb 2020 04:09:21 -0500 X-MC-Unique: kETJaCAZP4eWE84Y6UxxdA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D1B21882CD2; Mon, 3 Feb 2020 09:09:20 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id AED40165F7; Mon, 3 Feb 2020 09:09:13 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, vkuznets@redhat.com Cc: thuth@redhat.com, drjones@redhat.com, wei.huang2@amd.com Subject: [PATCH v2 0/2] selftests: KVM: AMD Nested SVM test infrastructure Date: Mon, 3 Feb 2020 10:08:49 +0100 Message-Id: <20200203090851.19938-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the basic infrastructure needed to test AMD nested SVM. Also add a first basic vmcall test. Best regards Eric This series can be found at: https://github.com/eauger/linux/tree/v5.5-amd-svm-v2 History: v1 -> v2: - split into 2 patches - remove the infrastructure to run low-level sub-tests and only keep vmmcall's one. - move struct regs into processor.h - force vmcb_gpa into rax in run_guest() Eric Auger (2): selftests: KVM: AMD Nested test infrastructure selftests: KVM: SVM: Add vmcall test tools/testing/selftests/kvm/Makefile | 3 +- .../selftests/kvm/include/x86_64/processor.h | 20 + .../selftests/kvm/include/x86_64/svm.h | 355 ++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/svm.c | 211 +++++++++++ .../selftests/kvm/x86_64/svm_vmcall_test.c | 86 +++++ 5 files changed, 674 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/kvm/include/x86_64/svm.h create mode 100644 tools/testing/selftests/kvm/lib/x86_64/svm.c create mode 100644 tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c --=20 2.20.1