From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>,
KVM list <kvm@vger.kernel.org>, Jim Mattson <jmattson@google.com>
Subject: Re: [PATCH 6/6 v5][kvm-unit-test nVMX]: Check "load IA32_PAT" on vmentry of L2 guests
Date: Wed, 10 Apr 2019 10:34:02 -0700 [thread overview]
Message-ID: <20190410173402.GB27321@linux.intel.com> (raw)
In-Reply-To: <fd865e4a-b763-d781-8146-ba2f11bcaec1@redhat.com>
On Wed, Apr 10, 2019 at 07:22:51PM +0200, Paolo Bonzini wrote:
> On 10/04/19 19:17, Sean Christopherson wrote:
> >> vmcs_write(ctrl_field, ctrl_saved & ~ctrl_bit);
> >> - for (i = 0; i <= PAT_VAL_LIMIT; i++) {
> >> + for (i = 0; i < 256; i = (i < PAT_VAL_LIMIT) ? i + 1 : i * 2) {
> >> /* Test PAT0..PAT7 fields */
> >> - for (j = 0; j < 8; j++) {
> >> + for (j = 0; j < (i ? 8 : 1); j++) {
> > I don't think "j < (i ? 8 : 1)" is what you intended. As-is only i==0,
> > i.e. UC memtype, gets shortcircuited to test PAT0 only. Did you perhaps
> > intend to test only PAT0 for i>8? E.g.:
>
> No, it is what I intended. The reason is that i == 0 gives the same "i
> << (j * 8)" for all values of j. Otherwise, the logs show 8 entries for
> GUEST_IA32_PAT = 0. :)
*sigh* Math is hard. Thanks!
prev parent reply other threads:[~2019-04-10 17:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 21:35 [KVM nVMX]: Check "load IA32_PAT" VM-exit{entry} controls on vmentry of L2 guests (v5) Krish Sadhukhan
2019-04-08 21:35 ` [PATCH 1/6 v5][KVM nVMX]: Check "load IA32_PAT" VM-exit control on vmentry Krish Sadhukhan
2019-04-10 9:42 ` Paolo Bonzini
2019-04-08 21:35 ` [PATCH 2/6 v5][KVM nVMX]: Check "load IA32_PAT" VM-entry " Krish Sadhukhan
2019-04-08 21:35 ` [PATCH 3/6 v5][KVM nVMX]: Move the checks for Guest Control Registers and Guest MSRs to a separate function Krish Sadhukhan
2019-04-08 21:35 ` [PATCH 4/6 v5][KVM nVMX]: nested_check_guest_cregs_dregs_msrs() should return -EINVAL for error conditions Krish Sadhukhan
2019-04-09 16:20 ` Sean Christopherson
2019-04-08 21:35 ` [PATCH 5/6 v5][KVM nVMX]: nested_vmx_check_vmentry_postreqs() should return VMX_EXIT_REASONS_FAILED_VMENTRY | EXIT_REASON_INVALID_STATE " Krish Sadhukhan
2019-04-09 16:20 ` Sean Christopherson
2019-04-10 9:50 ` Paolo Bonzini
2019-04-10 16:08 ` Sean Christopherson
2019-04-10 17:05 ` Paolo Bonzini
2019-04-10 17:55 ` Sean Christopherson
2019-04-11 0:15 ` Krish Sadhukhan
2019-04-11 12:14 ` Paolo Bonzini
2019-04-11 16:29 ` Sean Christopherson
2019-04-11 18:15 ` Krish Sadhukhan
2019-04-08 21:35 ` [PATCH 6/6 v5][kvm-unit-test nVMX]: Check "load IA32_PAT" on vmentry of L2 guests Krish Sadhukhan
2019-04-10 12:03 ` Paolo Bonzini
2019-04-10 17:17 ` Sean Christopherson
2019-04-10 17:22 ` Paolo Bonzini
2019-04-10 17:34 ` Sean Christopherson [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=20190410173402.GB27321@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=jmattson@google.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.