Re: [PATCH] proc: added ept_ad flag to /proc/cpuinfo

From: Thomas Gleixner
Date: Mon Jul 30 2018 - 18:12:25 EST


On Mon, 30 Jul 2018, Peter Shier wrote:

> Subject: [PATCH] proc: added ept_ad flag to /proc/cpuinfo

The 'proc:' prefix is misleading here. x86/cpufeatures is the right
choice. The /proc/cpuinfo display is a side effect.

Also please avoid 'added'. Changelogs should be written in imperative
mood. Something like this:

x86/cpufeatures: Add EPT_AD feature bit

> The Intel Haswell architecture has an EPT feature whereby the access &
> dirty bits in EPT entries are updated without taking a guest exit.

Why would this be Haswell specific?

Aside of that I don't see what this has to do with exits. From the SDM:

" * If bit 21 is read as 1, accessed and dirty flags for EPT are
supported (see Section 28.2.4)"

And nothing in 28.2.4 says anything about exits. It's all about whether the
feature is supported or not. If it is supported it can be enabled in EPTP.

> This patch adds the "ept_ad" flag to /proc/cpuinfo if this feature is
> available.

See Documentation/process/submitting-patches.rst and search for 'This
patch'.

The other question is why is this new feature bit not used in the VMX code?
It needs to be checked to enable the AD bit in EPTP ....

Thanks,

tglx