All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Sheng" <sheng.yang@intel.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: VMX: Add ept_sync_context in flush_tlb
Date: Thu, 26 Jun 2008 08:47:14 +0800	[thread overview]
Message-ID: <200806260847.14386.sheng.yang@intel.com> (raw)
In-Reply-To: <486233C9.4060906@qumranet.com>

On Wednesday 25 June 2008 20:02:17 Avi Kivity wrote:
> Yang, Sheng wrote:
> > From 54dc26e44f1c0aa460bef409b799f36dae56a911 Mon Sep 17 00:00:00 2001
> > From: Sheng Yang <sheng.yang@intel.com>
> > Date: Wed, 18 Jun 2008 11:23:13 +0800
> > Subject: [PATCH] KVM: VMX: Add ept_sync_context in flush_tlb
> >
> > Fix a potention issue caused by kvm_mmu_slot_remove_write_access().
> > The old behavior don't sync EPT TLB with modified EPT entry, which
> > result in inconsistent content of EPT TLB and EPT table.
> >
> >
> > @@ -1407,6 +1408,8 @@ static void exit_lmode(struct kvm_vcpu *vcpu)
> >  static void vmx_flush_tlb(struct kvm_vcpu *vcpu)
> >  {
> >  	vpid_sync_vcpu_all(to_vmx(vcpu));
> > +	if (vm_need_ept())
> > +		ept_sync_context(to_vmx(vcpu));
> >  }
>
> So we're flushing both the vpid tlb and the ept context?  What does an
> ept context flush mean exactly?  tlb entries for gpa->hpa?

Yeah, the entries for gpa->hpa. So if we don't do this, cpu may see rw entry 
rather than ro, then write to it directly rather than fall into KVM. 

-- 
Thanks
Yang, Sheng

  reply	other threads:[~2008-06-26  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18  3:38 [PATCH] KVM: VMX: Add ept_sync_context in flush_tlb Yang, Sheng
2008-06-25 12:02 ` Avi Kivity
2008-06-26  0:47   ` Yang, Sheng [this message]
2008-06-29 10:09     ` Avi Kivity
2008-07-06 11:20       ` Yang, Sheng
2008-07-06 11:55         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806260847.14386.sheng.yang@intel.com \
    --to=sheng.yang@intel.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.