Nested EPT flushes on p2m change?
Hi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in hap_write_p2m_entry(), which detects that the domain has nested p2ms and calls p2m_flush_nestedp2m() if necessary.
But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses atomic_write_ept_entry() instead. AFAICS the only flushing done on that path is ept_sync_domain(), which doesn't do anything about nested p2ms.
Am I forgetting something?
Cheers,
Tim.
Quoted 13 lines
From: Tim Deegan [mailto:[email protected]]
Sent: Thursday, March 26, 2015 7:10 PMHi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in
hap_write_p2m_entry(), which detects that the domain has nested p2ms and callsp2m_flush_nestedp2m()if necessary.
Quoted 7 lines
But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses
atomic_write_ept_entry()instead. AFAICS the only flushing done on that path isept_sync_domain(), which doesn't do anything about nested p2ms.Am I forgetting something?
Add Yang who understands that detail better than me. :-)
Thanks
Kevin
Tian, Kevin wrote on 2015-04-03:
Quoted 13 lines
Quoted 13 lines
From: Tim Deegan [mailto:[email protected]]
Sent: Thursday, March 26, 2015 7:10 PMHi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in
hap_write_p2m_entry(), which detects that the domain has nested p2ms and callsp2m_flush_nestedp2m()if necessary.
Quoted 6 lines
Quoted 6 lines
But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses
atomic_write_ept_entry()instead. AFAICS the only flushing done on that path isept_sync_domain(), which doesn't do anything about nested p2ms.Am I forgetting something?
It looks like you are right. The original nested EPT doesn't consider it.
CC Xiantao who is the author of the nested EPT.
Quoted 6 lines
Quoted 1 line
Add Yang who understands that detail better than me. :-)
Thanks
Kevin
Best regards,
Yang
Quoted 19 lines · Yang Z
Tian, Kevin wrote on 2015-04-03:
Quoted 18 lines
Quoted 18 lines
From: Tim Deegan [mailto:[email protected]]
Sent: Thursday, March 26, 2015 7:10 PMHi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in
hap_write_p2m_entry(), which detects that the domain has nested p2ms and callsp2m_flush_nestedp2m()if necessary.But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses
atomic_write_ept_entry()instead. AFAICS the only flushing done on that path isept_sync_domain(), which doesn't do anything about nested p2ms.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Am I forgetting something?
It looks like you are right. The original nested EPT doesn't consider it.
CC Xiantao who is the author of the nested EPT.
Any progress? AFAICT nested VMX is not safe to use until this is fixed.
Tim.
Quoted 14 lines
Tian, Kevin wrote on 2015-04-03:
Quoted 13 lines
Quoted 13 lines
From: Tim Deegan [mailto:[email protected]]
Sent: Thursday, March 26, 2015 7:10 PMHi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in
hap_write_p2m_entry(), which detects that the domain has nested p2ms and callsp2m_flush_nestedp2m()if necessary.
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses
atomic_write_ept_entry()instead. AFAICS the only flushing done on that path isept_sync_domain(), which doesn't do anything about nested p2ms.Am I forgetting something?
It looks like you are right. The original nested EPT doesn't consider it.
I will take a look. If it's an issue, I will try to fix it.
Liang
Quoted 12 lines
CC Xiantao who is the author of the nested EPT.
Quoted 6 lines
Quoted 1 line
Add Yang who understands that detail better than me. :-)
Thanks
KevinBest regards,
Yang
Quoted 20 lines · Tim Deegan
Quoted 19 lines · Yang Z
Tian, Kevin wrote on 2015-04-03:
Quoted 18 lines
Quoted 18 lines
From: Tim Deegan [mailto:[email protected]]
Sent: Thursday, March 26, 2015 7:10 PMHi, VMX maintainers,
I was looking at the nested EPT code while following up on Ed's email about altp2m design, and I can't see where nested-EPT entries get removed when a host EPT entry is removed/changed.
On nested NPT, this is handled in
hap_write_p2m_entry(), which detects that the domain has nested p2ms and callsp2m_flush_nestedp2m()if necessary.But nested EPT doesn't use the ->write_p2m_entry() hook to update entries, it uses
atomic_write_ept_entry()instead. AFAICS the only flushing done on that path isept_sync_domain(), which doesn't do anything about nested p2ms.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Am I forgetting something?
It looks like you are right. The original nested EPT doesn't consider it.
CC Xiantao who is the author of the nested EPT.
Any progress? AFAICT nested VMX is not safe to use until this is fixed.
Ping...
Tim.