kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: sheng@linux.intel.com, kvm@vger.kernel.org
Subject: Re: [patch 1/4] KVM: MMU audit: update count_writable_mappings / count_rmaps
Date: Tue, 9 Jun 2009 09:33:41 -0300	[thread overview]
Message-ID: <20090609123341.GA6453@amt.cnet> (raw)
In-Reply-To: <4A2CD8B8.2050308@redhat.com>

On Mon, Jun 08, 2009 at 12:24:08PM +0300, Avi Kivity wrote:
>> +static void __mmu_spte_walk(struct kvm *kvm, struct kvm_mmu_page *sp,
>> +			    inspect_spte_fn fn)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < PT64_ENT_PER_PAGE; ++i) {
>> +		u64 ent = sp->spt[i];
>> +
>> +		if (is_shadow_present_pte(ent)) {
>> +			if (sp->role.level > 1) {
>>   
>
> I think this is broken wrt large pages.  We should recurse if role.level  
> > 1 or the G bit is set.

Yes, fixed. Plan to add largepages validity checks later.

> Semi-related: we should set up a new exit code to halt the VM so it can  
> be inspected, otherwise all those printks and dump_stack()s will quickly  
> overwhelm the logging facilities.

Can you clarify on the halt exit code?

Because for other exit codes which similar behaviour is wanted, say,
unhandled vm exit, the policy can be handled in userspace (and the
decision to halt or not seems better suited to happen there). So perhaps
KVM_EXIT_MMU_AUDIT_FAILED?

I wondered before whether it would be good to stop auditing on the first
error, but gave up on the idea.


  reply	other threads:[~2009-06-09 12:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 21:36 [patch 0/4] mmu audit update Marcelo Tosatti
2009-06-02 21:36 ` [patch 1/4] KVM: MMU audit: update count_writable_mappings / count_rmaps Marcelo Tosatti
2009-06-08  9:24   ` Avi Kivity
2009-06-09 12:33     ` Marcelo Tosatti [this message]
2009-06-09 12:40       ` Avi Kivity
2009-06-02 21:36 ` [patch 2/4] KVM: MMU audit: update audit_write_protection Marcelo Tosatti
2009-06-02 21:36 ` [patch 3/4] KVM: MMU audit: nontrapping ptes in nonleaf level Marcelo Tosatti
2009-06-02 21:36 ` [patch 4/4] KVM: MMU audit: audit_mappings tweaks Marcelo Tosatti
2009-06-08  9:29   ` Avi Kivity
2009-06-07  7:14 ` [patch 0/4] mmu audit update Avi Kivity
2009-06-10 15:27   ` [patch 0/6] mmu audit update v4 Marcelo Tosatti
2009-06-10 15:27     ` [patch 1/6] KVM: MMU: introduce is_last_spte helper Marcelo Tosatti
2009-06-10 15:27     ` [patch 2/6] KVM: MMU audit: update count_writable_mappings / count_rmaps Marcelo Tosatti
2009-06-10 15:27     ` [patch 3/6] KVM: MMU audit: update audit_write_protection Marcelo Tosatti
2009-06-10 15:27     ` [patch 4/6] KVM: MMU audit: nontrapping ptes in nonleaf level Marcelo Tosatti
2009-06-10 15:27     ` [patch 5/6] KVM: MMU audit: audit_mappings tweaks Marcelo Tosatti
2009-06-10 15:27     ` [patch 6/6] KVM: MMU audit: largepage handling Marcelo Tosatti
2009-06-11 14:24     ` [patch 0/6] mmu audit update v4 Avi Kivity
2009-06-09 13:13 ` [patch 0/4] mmu audit update v2 Marcelo Tosatti
2009-06-09 13:13   ` [patch 1/4] KVM: MMU audit: update count_writable_mappings / count_rmaps Marcelo Tosatti
2009-06-09 13:13   ` [patch 2/4] KVM: MMU audit: update audit_write_protection Marcelo Tosatti
2009-06-09 13:13   ` [patch 3/4] KVM: MMU audit: nontrapping ptes in nonleaf level Marcelo Tosatti
2009-06-09 13:13   ` [patch 4/4] KVM: MMU audit: audit_mappings tweaks 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=20090609123341.GA6453@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.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).