From: Paolo Bonzini <pbonzini@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
bsd@redhat.com, jmattson@google.com
Subject: Re: [PATCH] KVM: vmx: speed up MSR bitmap merge
Date: Mon, 18 Dec 2017 11:03:02 -0500 (EST) [thread overview]
Message-ID: <854645993.27733836.1513612982078.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <c4ca74eb-b738-310e-1240-df33565889ab@redhat.com>
> > - memset(msr_bitmap_l0, 0xff, PAGE_SIZE);
> > + msr_bitmap_l1 = (unsigned long *)kmap(page);
>
> Wouldn't it be easier to simply set everything to 0xff as before and
> then only handle the one special case where you don't do that? e.g. the
> complete else part would be gone.
It can change from one vmentry to the next, so I'm not sure how you'd
do that.
> > + nested_vmx_disable_intercept_for_msr(
> > + msr_bitmap_l1, msr_bitmap_l0,
> > + APIC_BASE_MSR + (APIC_TASKPRI >> 4),
> > + MSR_TYPE_W);
>
> I'd vote for indenting the parameters properly (even though we exceed 80
> chars by 1 then :) )
Ok, will do. Regarding the WARN, I'm undecided. I like the idea of not
calling a function that works on MSR bitmaps unless you have one...
Paolo
next prev parent reply other threads:[~2017-12-18 16:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 13:30 [PATCH] KVM: vmx: speed up MSR bitmap merge Paolo Bonzini
2017-12-18 8:45 ` David Hildenbrand
2017-12-18 15:51 ` Bandan Das
2017-12-18 16:03 ` Paolo Bonzini [this message]
2017-12-18 16:13 ` David Hildenbrand
2017-12-19 19:58 ` Jim Mattson
2017-12-19 21:13 ` Paolo Bonzini
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=854645993.27733836.1513612982078.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=david@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@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