diff options
author | Lai Jiangshan <jiangshan.ljs@antfin.com> | 2020-03-26 02:57:25 +0000 |
---|---|---|
committer | Lai Jiangshan <laijs@linux.alibaba.com> | 2020-08-05 17:21:17 +0800 |
commit | d17425082d24109f79f5235dd6d1ced36ac2dd67 (patch) | |
tree | 33dee057f48711982661ca1f49f118dc0ee95221 /BUILD | |
parent | c4d364c7cea23e29befa5b708d14a7912f47ce37 (diff) |
amd64: don't check vcpu in bluepill()
m.Get() has guaranteed that if any OS thread TID is in guest,
m.vCPUs[TID] points to the vCPU in which the OS thread TID is running.
So if m.Get() returns with the corrent context in guest,
the vCPU of it must be the same as what Get() returns.
So bluepill() doesn't need to check if the vCPU is matched or not.
The check need to access to %gs register which will not points
to vCPU later when KPTI for gvisor is enabled. We can still
fetch the vCPU pointer from %gs later (when %gs points to kernelEntry),
but it needs the ENTRY_CPU_SELF which is generated by
ring0/offset_amd64.go. So we just simply remove the check.
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antfin.com>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Diffstat (limited to 'BUILD')
0 files changed, 0 insertions, 0 deletions