All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm <kvm@vger.kernel.org>, Bandan Das <bsd@redhat.com>
Subject: [PATCH v2 5/5] KVM: nVMX: Fix returned value of MSR_IA32_VMX_VMCS_ENUM
Date: Mon, 16 Jun 2014 13:59:44 +0200	[thread overview]
Message-ID: <b18733d6800f3bb9a7f538e61900e2eccfa9d141.1402919981.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1402919981.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1402919981.git.jan.kiszka@siemens.com>

Many real CPUs get this wrong as well, but ours is totally off: bits 9:1
define the highest index value.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f20a5ee..eabd8d8 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2461,7 +2461,7 @@ static int vmx_get_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
 		*pdata = -1ULL;
 		break;
 	case MSR_IA32_VMX_VMCS_ENUM:
-		*pdata = 0x1f;
+		*pdata = 0x2e; /* highest index: VMX_PREEMPTION_TIMER_VALUE */
 		break;
 	case MSR_IA32_VMX_PROCBASED_CTLS2:
 		*pdata = vmx_control_msr(nested_vmx_secondary_ctls_low,
-- 
1.8.1.1.298.ge7eed54


  parent reply	other threads:[~2014-06-16 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 11:59 [PATCH v2 0/5] KVM: nVMX: Small fixes improving emulation accuracy Jan Kiszka
2014-06-16 11:59 ` [PATCH v2 1/5] KVM: nVMX: Advertise support for MSR_IA32_VMX_TRUE_*_CTLS Jan Kiszka
2014-06-16 16:54   ` Bandan Das
2014-06-17  6:13     ` Jan Kiszka
2014-06-16 11:59 ` [PATCH v2 2/5] KVM: nVMX: Allow to disable CR3 access interception Jan Kiszka
2014-06-16 11:59 ` [PATCH v2 3/5] KVM: nVMX: Fix returned value of MSR_IA32_VMX_PROCBASED_CTLS Jan Kiszka
2014-06-16 16:56   ` Bandan Das
2014-06-17  6:14     ` Jan Kiszka
2014-06-16 11:59 ` [PATCH v2 4/5] KVM: nVMX: Allow to disable VM_{ENTRY_LOAD,EXIT_SAVE}_DEBUG_CONTROLS Jan Kiszka
2014-06-16 17:02   ` Bandan Das
2014-06-17  5:18     ` Paolo Bonzini
2014-06-16 11:59 ` Jan Kiszka [this message]
2014-06-16 15:21 ` [PATCH v2 0/5] KVM: nVMX: Small fixes improving emulation accuracy 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=b18733d6800f3bb9a7f538e61900e2eccfa9d141.1402919981.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=bsd@redhat.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.