Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Peter Teoh <htmldeveloper@gmail.com>
To: kvm@vger.kernel.org
Subject: tlb flushing after spin_unlock of mmu lock
Date: Sat, 11 Apr 2009 00:45:21 -0400	[thread overview]
Message-ID: <804dabb00904102145r446de3dfw6e2a287736fb170c@mail.gmail.com> (raw)

In this function, the TLB flushing comes before spin unlock,

void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)
{
       struct kvm_mmu_page *sp;

       spin_lock(&kvm->mmu_lock);

       kvm_flush_remote_tlbs(kvm);
       spin_unlock(&kvm->mmu_lock);
}


but in kvm_vm_ioctl_set_memory_alias():

       spin_unlock(&kvm->mmu_lock);
       kvm_mmu_zap_all(kvm);

it comes after inside kvm_mmu_zap_all().   Does it sound logical?


-- 
Regards,
Peter Teoh

             reply	other threads:[~2009-04-11  4:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11  4:45 Peter Teoh [this message]
2009-04-16 19:19 ` tlb flushing after spin_unlock of mmu lock Marcelo Tosatti

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=804dabb00904102145r446de3dfw6e2a287736fb170c@mail.gmail.com \
    --to=htmldeveloper@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox