From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm@vger.kernel.org, joerg.roedel@amd.com,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 3/4] Nested SVM: Implement INVLPGA v2
Date: Tue, 19 May 2009 15:58:52 +0300 [thread overview]
Message-ID: <4A12AD0C.9030402@redhat.com> (raw)
In-Reply-To: <1242730443-15656-4-git-send-email-agraf@suse.de>
Alexander Graf wrote:
> SVM adds another way to do INVLPG by ASID which Hyper-V makes use of,
> so let's implement it!
>
> For now we just do the same thing invlpg does, as asid switching
> means we flush the mmu anyways. That might change one day though.
>
> v2 makes invlpga do the same as invlpg, not flush the whole mmu
>
>
> +static int invlpga_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
> +{
> + struct kvm_vcpu *vcpu = &svm->vcpu;
> + nsvm_printk("INVLPGA\n");
> +
> + /* Let's treat INVLPGA the same as INVLPG */
> + kvm_mmu_invlpg(vcpu, vcpu->arch.regs[VCPU_REGS_RAX]);
> +
> + svm->next_rip = kvm_rip_read(&svm->vcpu) + 3;
> + skip_emulated_instruction(&svm->vcpu);
> + return 1;
> +}
>
I think that for ASID!=0 you can actually do nothing. The guest entry
is a cr3 switch, so we'll both get a tlb flush and a resync on any
modified ptes.
For ASID==0 you can do the invlpg thing.
Marcelo?
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-05-19 12:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 10:53 [PATCH 0/4] Add rudimentary Hyper-V guest support v2 Alexander Graf
2009-05-19 10:54 ` [PATCH 1/4] Add definition for IGNNE MSR Alexander Graf
2009-05-19 10:54 ` [PATCH 2/4] Implement Hyper-V MSRs v2 Alexander Graf
2009-05-19 10:54 ` [PATCH 3/4] Nested SVM: Implement INVLPGA v2 Alexander Graf
2009-05-19 10:54 ` [PATCH 4/4] Nested SVM: Improve interrupt injection v2 Alexander Graf
2009-05-19 13:22 ` Gleb Natapov
2009-06-15 11:47 ` Alexander Graf
2009-06-15 11:56 ` Gleb Natapov
2009-05-19 12:58 ` Avi Kivity [this message]
2009-05-19 13:10 ` [PATCH 3/4] Nested SVM: Implement INVLPGA v2 Alexander Graf
2009-05-19 13:19 ` Avi Kivity
2009-05-19 13:54 ` Marcelo Tosatti
2009-05-19 13:56 ` Avi Kivity
2009-05-19 13:58 ` Marcelo Tosatti
2009-05-19 15:18 ` Alexander Graf
2009-05-19 16:33 ` Marcelo Tosatti
2009-05-19 16:35 ` Avi Kivity
2009-05-19 12:52 ` [PATCH 2/4] Implement Hyper-V MSRs v2 Avi Kivity
2009-06-15 11:45 ` Alexander Graf
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=4A12AD0C.9030402@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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).