From: "Huang, Kai" <kai.huang@intel.com>
To: "Li, Xin3" <xin3.li@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Yang, Weijiang" <weijiang.yang@intel.com>,
"seanjc@google.com" <seanjc@google.com>,
"x86@kernel.org" <x86@kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"bp@alien8.de" <bp@alien8.de>,
"pbonzini@redhat.com" <pbonzini@redhat.com>
Subject: Re: [PATCH v4 1/2] KVM: VMX: Cleanup VMX basic information defines and usages
Date: Mon, 15 Jan 2024 11:46:08 +0000 [thread overview]
Message-ID: <4374f38331e2c7261618f0bda5b50edc83077b8a.camel@intel.com> (raw)
In-Reply-To: <20240112093449.88583-1-xin3.li@intel.com>
On Fri, 2024-01-12 at 01:34 -0800, Li, Xin3 wrote:
> Define VMX basic information fields with BIT_ULL()/GENMASK_ULL(), and
> replace hardcoded VMX basic numbers with these field macros.
>
> Per Sean's ask, save the full/raw value of MSR_IA32_VMX_BASIC in the
> global vmcs_config as type u64 to get rid of the hi/lo crud, and then
> use VMX_BASIC helpers to extract info as needed.
For the sake of wanting a single 'u64 vmx_basic', feel free to add:
Acked-by: Kai Huang <kai.huang@intel.com>
Although I still don't like splitting ...
[...]
> --- a/arch/x86/include/asm/vmx.h
> +++ b/arch/x86/include/asm/vmx.h
> @@ -120,6 +120,14 @@
>
...
> +/* VMX_BASIC bits and bitmasks */
> +#define VMX_BASIC_32BIT_PHYS_ADDR_ONLY BIT_ULL(48)
> +#define VMX_BASIC_INOUT BIT_ULL(54)
> +
>
...
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -1226,23 +1226,32 @@ static bool is_bitwise_subset(u64 superset, u64 subset, u64 mask)
> return (superset | subset) == superset;
> }
>
> +#define VMX_BASIC_DUAL_MONITOR_TREATMENT BIT_ULL(49)
> +#define VMX_BASIC_TRUE_CTLS BIT_ULL(55)
... these VMX_BASIC bit definitions across multiple files.
[...]
> +#define VMX_BASIC_MEM_TYPE_WB (MEM_TYPE_WB << 50);
Also, please fix this one.
next prev parent reply other threads:[~2024-01-15 11:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 9:34 [PATCH v4 1/2] KVM: VMX: Cleanup VMX basic information defines and usages Xin Li
2024-01-12 9:34 ` [PATCH v4 2/2] KVM: VMX: Cleanup VMX misc " Xin Li
2024-01-15 11:46 ` Huang, Kai [this message]
2024-01-16 4:13 ` [PATCH v4 1/2] KVM: VMX: Cleanup VMX basic " Li, Xin3
2024-01-16 7:46 ` Chao Gao
2024-01-17 16:34 ` Li, Xin3
2024-01-18 3:08 ` Huang, Kai
2024-01-18 5:15 ` Li, Xin3
2024-01-18 3:13 ` Huang, Kai
2024-01-18 5:16 ` Li, Xin3
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4374f38331e2c7261618f0bda5b50edc83077b8a.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=weijiang.yang@intel.com \
--cc=x86@kernel.org \
--cc=xin3.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox