On Wed, Aug 16, 2023, Binbin Wu wrote:OK, but only LASS here, since LAM only applies to addresses for data accesses, i.e, no need to distingush the two flag.
Just "features", i.e. no parentheses...
On 8/16/2023 6:51 AM, Sean Christopherson wrote:
Branch *targets*, not branch instructions.How about this:
On Wed, Jul 19, 2023, Zeng Guang wrote:
From: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>Eh, I'd just drop this paragraph, as evidenced by this code existing as-is for
Use the new flag X86EMUL_F_BRANCH instead of X86EMUL_F_FETCH in
assign_eip(), since strictly speaking it is not behavior of instruction
fetch.
years, we wouldn't introduce X86EMUL_F_BRANCH just because resolving a branch
target isn't strictly an instruction fetch.
Another reason is to distinguish instruction fetch and execution of branchSimilar to the shortlog, it's about computing the branch target, not executing a
instruction for feature(s) that handle differently on them.
branch instruction. That distinction matters, e.g. a Jcc that is not taken will
*not* follow the branch target, but the instruction is still *executed*. And there
exist instructions that compute branch targets, but aren't what most people would
typically consider a branch instruction, e.g. XBEGIN.
Branch instruction is not data access instruction, so skip checking againstRather than call out individual use case, I would simply state that as of this
execute-only code segment as instruction fetch.
patch, X86EMUL_F_BRANCH and X86EMUL_F_FETCH are identical as far as KVM is
concernered. That let's the reader know that (a) there's no intended change in
behavior and (b) that the intent is to effectively split all consumption of
X86EMUL_F_FETCH into (X86EMUL_F_FETCH | X86EMUL_F_BRANCH).
KVM: x86: Use a new flag for branch targets
Use the new flag X86EMUL_F_BRANCH instead of X86EMUL_F_FETCH in
assign_eip()
to distinguish instruction fetch and branch target computation for
feature(s)
that handle differently on them....and tack on ", e.g. LASS and LAM." at the end.
There's zero reason not to moreSure, I think the wrapping lines due to additional intendations I added, it should be OK in changelog.
explicitly call out why the flag is being added. Trying to predict the future in
changelogs is generally discouraged, but having understandable changelogs is more
important.
As of this patch, X86EMUL_F_BRANCH and X86EMUL_F_FETCH are identical asHeh, you need to fix whatever is forcefully wrapping lines, but other than the
far as
KVM is concernered.
No functional change intended.
nit above, the content itself is good.