From: Avi Kivity <avi@redhat.com>
To: Xin Tong <xerox.time.tech@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, KVM list <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] INVLPG and IPI emulation in KVM
Date: Sun, 13 Nov 2011 14:44:41 +0200 [thread overview]
Message-ID: <4EBFBBB9.60106@redhat.com> (raw)
In-Reply-To: <CALKntY3qmMQcMhFy9pSqQrRgYyzRo0A1_bkQ+=z4Mx-QQsECew@mail.gmail.com>
On 11/13/2011 02:27 PM, Xin Tong wrote:
> I am investigating how INVLPG is emulated in kvm.
You're on the wrong list.
> It turns out that it calls
>
> kvm_mmu_invlpg
> kvm_mmu_flush_tlb
> kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
>
> and the kvm_make_request set the vcpu->requests bit to high, when the
> guest os resumes, it handles the bit. I have 2 questions
>
>
> 1. How does the make_request mechanism work ?
See vcpu_enter_guest().
> how does the guest
> handle the requests ?
The guest never sees them, this is all internal to kvm.
> 2. INVLPG invalidates a tlb entry, it is typically used when the page
> table changes. However, an ipi is typically used to invalidate the tlb
> entries in other processor cores, However, i can not find the
> emulation code for IPI instruction.
There is no IPI instruction, see lapic.c:apic_send_ipi().
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2011-11-13 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 12:27 [Qemu-devel] INVLPG and IPI emulation in KVM Xin Tong
2011-11-13 12:44 ` Avi Kivity [this message]
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=4EBFBBB9.60106@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=xerox.time.tech@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).