All of lore.kernel.org
 help / color / mirror / Atom feed
* Nested EPT flushes on p2m change?
@ 2015-03-26 11:09 Tim Deegan
  2015-04-03  8:19 ` Tian, Kevin
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Deegan @ 2015-03-26 11:09 UTC (permalink / raw)
  To: Jun Nakajima, Eddie Dong, Kevin Tian; +Cc: xen-devel, Ed White, Zhang Xiantao

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Nested EPT flushes on p2m change?
  2015-03-26 11:09 Nested EPT flushes on p2m change? Tim Deegan
@ 2015-04-03  8:19 ` Tian, Kevin
  2015-04-10  5:43   ` Zhang, Yang Z
  0 siblings, 1 reply; 6+ messages in thread
From: Tian, Kevin @ 2015-04-03  8:19 UTC (permalink / raw)
  To: Tim Deegan, Nakajima, Jun, Dong, Eddie
  Cc: Zhang, Yang Z, xen-devel, White, Edmund H, Zhang Xiantao

> From: Tim Deegan [mailto:tim@xen.org]
> Sent: Thursday, March 26, 2015 7:10 PM
> 
> 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?
> 

Add Yang who understands that detail better than me. :-)

Thanks
Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Nested EPT flushes on p2m change?
  2015-04-03  8:19 ` Tian, Kevin
@ 2015-04-10  5:43   ` Zhang, Yang Z
  2015-04-23  8:47     ` Tim Deegan
  2015-04-29 14:50     ` Li, Liang Z
  0 siblings, 2 replies; 6+ messages in thread
From: Zhang, Yang Z @ 2015-04-10  5:43 UTC (permalink / raw)
  To: Tian, Kevin, Tim Deegan, Nakajima, Jun, Dong, Eddie
  Cc: xen-devel, White, Edmund H, xiantao.zxt

Tian, Kevin wrote on 2015-04-03:
>> From: Tim Deegan [mailto:tim@xen.org]
>> Sent: Thursday, March 26, 2015 7:10 PM
>> 
>> 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?

It looks like you are right. The original nested EPT doesn't consider it. 

CC Xiantao who is the author of the nested EPT.

>> 
> 
> Add Yang who understands that detail better than me. :-)
> 
> Thanks
> Kevin


Best regards,
Yang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Nested EPT flushes on p2m change?
  2015-04-10  5:43   ` Zhang, Yang Z
@ 2015-04-23  8:47     ` Tim Deegan
  2015-05-14 15:57       ` Tim Deegan
  2015-04-29 14:50     ` Li, Liang Z
  1 sibling, 1 reply; 6+ messages in thread
From: Tim Deegan @ 2015-04-23  8:47 UTC (permalink / raw)
  To: Zhang, Yang Z
  Cc: Tian, Kevin, Dong, Eddie, White, Edmund H, Nakajima, Jun,
	xiantao.zxt, xen-devel

At 05:43 +0000 on 10 Apr (1428644619), Zhang, Yang Z wrote:
> Tian, Kevin wrote on 2015-04-03:
> >> From: Tim Deegan [mailto:tim@xen.org]
> >> Sent: Thursday, March 26, 2015 7:10 PM
> >> 
> >> 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?
> 
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Nested EPT flushes on p2m change?
  2015-04-10  5:43   ` Zhang, Yang Z
  2015-04-23  8:47     ` Tim Deegan
@ 2015-04-29 14:50     ` Li, Liang Z
  1 sibling, 0 replies; 6+ messages in thread
From: Li, Liang Z @ 2015-04-29 14:50 UTC (permalink / raw)
  To: Zhang, Yang Z, Tian, Kevin, Tim Deegan, Nakajima, Jun, Dong, Eddie
  Cc: xen-devel, White, Edmund H, xiantao.zxt

> Tian, Kevin wrote on 2015-04-03:
> >> From: Tim Deegan [mailto:tim@xen.org]
> >> Sent: Thursday, March 26, 2015 7:10 PM
> >>
> >> 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?
> 
> 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

> CC Xiantao who is the author of the nested EPT.
> 
> >>
> >
> > Add Yang who understands that detail better than me. :-)
> >
> > Thanks
> > Kevin
> 
> 
> Best regards,
> Yang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Nested EPT flushes on p2m change?
  2015-04-23  8:47     ` Tim Deegan
@ 2015-05-14 15:57       ` Tim Deegan
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Deegan @ 2015-05-14 15:57 UTC (permalink / raw)
  To: Zhang, Yang Z
  Cc: Tian, Kevin, Dong, Eddie, White, Edmund H, Nakajima, Jun,
	xen-devel, xiantao.zxt

At 09:47 +0100 on 23 Apr (1429782448), Tim Deegan wrote:
> At 05:43 +0000 on 10 Apr (1428644619), Zhang, Yang Z wrote:
> > Tian, Kevin wrote on 2015-04-03:
> > >> From: Tim Deegan [mailto:tim@xen.org]
> > >> Sent: Thursday, March 26, 2015 7:10 PM
> > >> 
> > >> 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?
> > 
> > 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-14 15:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 11:09 Nested EPT flushes on p2m change? Tim Deegan
2015-04-03  8:19 ` Tian, Kevin
2015-04-10  5:43   ` Zhang, Yang Z
2015-04-23  8:47     ` Tim Deegan
2015-05-14 15:57       ` Tim Deegan
2015-04-29 14:50     ` Li, Liang Z

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.