From patchwork Wed Jul 18 20:26:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 10533235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 609D76020A for ; Wed, 18 Jul 2018 20:27:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5184A29D71 for ; Wed, 18 Jul 2018 20:27:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4619329D78; Wed, 18 Jul 2018 20:27:11 +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 F192829D71 for ; Wed, 18 Jul 2018 20:27:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730565AbeGRVGm (ORCPT ); Wed, 18 Jul 2018 17:06:42 -0400 Received: from mga12.intel.com ([192.55.52.136]:37426 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730511AbeGRVGl (ORCPT ); Wed, 18 Jul 2018 17:06:41 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2018 13:27:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,371,1526367600"; d="scan'208";a="68004831" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.132]) by orsmga003.jf.intel.com with ESMTP; 18 Jul 2018 13:27:08 -0700 From: Sean Christopherson To: kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com Cc: sean.j.christopherson@intel.com, Krish Sadhukhan Subject: [PATCH kvm-unit-tests 3/4] x86: vmx: mark "vTPR < threshold" tests as expected to fail Date: Wed, 18 Jul 2018 13:26:50 -0700 Message-Id: <20180718202651.19802-4-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180718202651.19802-1-sean.j.christopherson@intel.com> References: <20180718202651.19802-1-sean.j.christopherson@intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP KVM relies on hardware to perform the "vTPR < threshold" consistency check, i.e. the check will occur after KVM has done some amount of guest state checking in software. As such, KVM will signal a VMExit consistency check (due to bad guest state) instead of the expected VMFAIL (due to bad controls). Cc: Krish Sadhukhan Signed-off-by: Sean Christopherson --- x86/vmx_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index c4803a3..031bf66 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -3726,7 +3726,7 @@ static void try_tpr_threshold_and_vtpr(unsigned threshold, unsigned vtpr) set_vtpr(vtpr); report_prefix_pushf("TPR threshold 0x%x, VTPR.class 0x%x", threshold, (vtpr >> 4) & 0xf); - test_vmx_controls(valid, false); + test_vmx_controls(valid, !valid); report_prefix_pop(); }