Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp655204pxb; Tue, 2 Feb 2021 14:31:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcX4BQL4PcNghoHfi7eXbuyTnch11rcRk/h0XI/uW/wxTMuej6j7Fh3UgIW6uTaEQPwdGS X-Received: by 2002:a05:6402:202d:: with SMTP id ay13mr234403edb.335.1612305096625; Tue, 02 Feb 2021 14:31:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612305096; cv=none; d=google.com; s=arc-20160816; b=CJomV3xUdN0zsfRsCwM+GHYZVWpP0NfTuEVk/BYx17Kf6wldmQ09NmZaaMEecBvCrB B+f/Eklr993L4OEe7uqfP/o5f3DDY+p/kedCNWkda1RTdjSmsCr8x4piDHoft6HE9cZM fqYQOdddWMM4mZUlbWzE+sLVE1oLHQSJcJoi7Dedzmw68DMqlj5DxQWcG15D0c3NYceN mTldMCv87tuRpdnVa93X/kE2iKRtUKrCSnnndtdXeW+LQTQhXDZa1oiNuRlFXid0Zi8u oDAkrMAiAa6ZSK/oLGRhKRGc4cthi4bJQuHX/Lf76RoYWvzMOBsDKYVLO6DeTYDNpNRf pOMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=/dDkwgBonpuYyX9TspnLxl4WlLfe5ZqD9V2Bn/xzeMA=; b=GGmJ6Iut3r38jfMxhX19HVI4teCFeuwNssYbGmN9euY/PdXOc8UGPaPuY0P+G5NBNo QRubGUJpLFN1GbEdOCXQ8wtxbaaq7h5g9eJAMdePcmn2iBpwCqp4oPS/EslYV7oDF0pC lQgqbWgkqY8QBG5tA0etWpIxlQ1LMWpuVSBy3i3AUHs0wJEqlDVP1xSn3j34OuY05/ow gmuZPaoWyRAXE7BLAFYB3HYtnaEDPuV8V/UPf1Y+BsS5Z5h9gT2ZZxcLm7M6uoR5gqI/ JaFZrlHWX6ReEqvWCCJfjojn3+oYapKYSTluFdaC0jLlB1Q/wnBCCAbakb+rnK1bwan7 semw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs42si140934ejc.136.2021.02.02.14.31.07; Tue, 02 Feb 2021 14:31:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234924AbhBBPEE (ORCPT + 99 others); Tue, 2 Feb 2021 10:04:04 -0500 Received: from mga17.intel.com ([192.55.52.151]:5162 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbhBBPDM (ORCPT ); Tue, 2 Feb 2021 10:03:12 -0500 IronPort-SDR: 0tS82fhxbbW+yhCrZraqK1Ilv0Q4c2RSfGeYyJwTrmbrEw0/xq1ClTw6cH4t1KZteOR6SBC21I zh18TnryHtiw== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="160630491" X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="160630491" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 07:02:24 -0800 IronPort-SDR: Uk16hOdv++iDDB6vBp3X4IW1QopUSrgThIjgkSnakOTR0EjLHHYyA3Hti03a7tzpvWAKkI8ZeN BtIPyQZudnLA== X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="370732514" Received: from xiaoyaol-mobl.ccr.corp.intel.com (HELO [10.255.29.197]) ([10.255.29.197]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 07:02:22 -0800 Subject: Re: [PATCH v2 1/3] KVM: X86: Rename DR6_INIT to DR6_ACTIVE_LOW To: Paolo Bonzini , Chenyi Qiang , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210202090433.13441-1-chenyi.qiang@intel.com> <20210202090433.13441-2-chenyi.qiang@intel.com> <3db069ba-b4e0-1288-ec79-66ac44938682@redhat.com> From: Xiaoyao Li Message-ID: <6678520f-e69e-6116-88c9-e9d6cd450934@intel.com> Date: Tue, 2 Feb 2021 23:02:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <3db069ba-b4e0-1288-ec79-66ac44938682@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/2021 10:49 PM, Paolo Bonzini wrote: > On 02/02/21 10:04, Chenyi Qiang wrote: >> >>  #define DR6_FIXED_1    0xfffe0ff0 >> -#define DR6_INIT    0xffff0ff0 >> +/* >> + * DR6_ACTIVE_LOW is actual the result of DR6_FIXED_1 | ACTIVE_LOW_BITS. >> + * We can regard all the current FIXED_1 bits as active_low bits even >> + * though in no case they will be turned into 0. But if they are defined >> + * in the future, it will require no code change. >> + * At the same time, it can be served as the init/reset value for DR6. >> + */ >> +#define DR6_ACTIVE_LOW    0xffff0ff0 >>  #define DR6_VOLATILE    0x0001e00f >> > > Committed with some changes in the wording of the comment. > > Also, DR6_FIXED_1 is (DR6_ACTIVE_LOW & ~DR6_VOLATILE). Maybe we can add BUILD_BUG_ON() to make sure the correctness? > Paolo >