I'm currently developing a hypervisor feature.
I'm confused about what to do with TLB Invalidation when EPT Violation occurs
I'm developing on Linux, using an i7 CPU. My implementation:
- VPID and EPT Enabled
- Initially, every EPT entries' write access is cleared (read and execution access is set)
- If EPT Violation occurs(when tries to write), set write access and change entry to point another page(another hpa)
According to Intel Manual,
"An EPT Violation invalidates any guest-physical mappings (associated with the current EP4TA) that would be used to translate the guest-physical address that caused the EPT Violation. And also invalidates any combined mappings too"
I'm confused with this part.
Does it ensures that EPT Violation invalidates corresponding TLB Entry not only in the current core's TLB cache but also other core's TLB Cache?
If so, is it OK just setting write access and allocating new hpa without tlb shootdown?