From patchwork Thu Mar 28 02:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krish Sadhukhan X-Patchwork-Id: 10874441 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 47C7A1390 for ; Thu, 28 Mar 2019 02:58:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33C9928BAF for ; Thu, 28 Mar 2019 02:58:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24C5E28BF2; Thu, 28 Mar 2019 02:58:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 10FA128BAF for ; Thu, 28 Mar 2019 02:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbfC1C60 (ORCPT ); Wed, 27 Mar 2019 22:58:26 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46808 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727932AbfC1C60 (ORCPT ); Wed, 27 Mar 2019 22:58:26 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2S2sEFY082828; Thu, 28 Mar 2019 02:58:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=Ai/BzGqM2KEVGroXhmQRL2kJk9LuQOKwmC9quMPL3AQ=; b=Mb95wZ97xfc9XFYac+kFUqKXji8WNhBgcOvOVQoKWb4AOlI4Jcxu4GoFmkVVfzxTz8sf X3+GkAfw1zP1jHPr8Kn0WW31J7hXXODAdY+6LEEJB4m6nbBT5NVRDytwQgIlSoVzdeYB 1sw+1F6IxLQxY8fx23pbZn93cW7IXcsNnqzP6+7ak8I3acZmmCKog0UqzWsganW6/rf0 linMt6sW0CeUIXd3b1EgKat4LZ2c5o/Rpcs5k1elyVs19tyLZTQpCZTpgCllQC8V5yHJ cTy9sfYODjimcm+7sOyk68U7X0Co0evUHLbumUWWjnxYoKpHMihO0RjDIDqplIFPzEqC gg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2re6g1412n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Mar 2019 02:58:23 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2S2wHTE027335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Mar 2019 02:58:17 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2S2wFFb022302; Thu, 28 Mar 2019 02:58:15 GMT Received: from ban25x6uut29.us.oracle.com (/10.153.73.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 27 Mar 2019 19:58:15 -0700 From: Krish Sadhukhan To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, rkrcmar@redhat.com Subject: [PATCH][kvm-unit-test VMX]: Use #define for bit# 1 in GUEST_RFLAGS Date: Wed, 27 Mar 2019 22:32:46 -0400 Message-Id: <20190328023246.12087-1-krish.sadhukhan@oracle.com> X-Mailer: git-send-email 2.17.2 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9208 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903280020 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Krish Sadhukhan Reviewed-by: Mark Kanda Reviewed-by: David Hildenbrand --- x86/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index 6ba56bc..d1a0da8 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -1193,7 +1193,7 @@ static void init_vmcs_guest(void) /* 26.3.1.4 */ vmcs_write(GUEST_RIP, (u64)(&guest_entry)); vmcs_write(GUEST_RSP, (u64)(guest_stack + PAGE_SIZE - 1)); - vmcs_write(GUEST_RFLAGS, 0x2); + vmcs_write(GUEST_RFLAGS, X86_EFLAGS_FIXED); /* 26.3.1.5 */ vmcs_write(GUEST_ACTV_STATE, ACTV_ACTIVE); @@ -1705,7 +1705,7 @@ static int test_run(struct vmx_test *test) test->exits = 0; current = test; regs = test->guest_regs; - vmcs_write(GUEST_RFLAGS, regs.rflags | 0x2); + vmcs_write(GUEST_RFLAGS, regs.rflags | X86_EFLAGS_FIXED); launched = 0; guest_finished = 0; printf("\nTest suite: %s\n", test->name);