From: Paolo Bonzini <pbonzini@redhat.com>
To: roy.qing.li@gmail.com, x86@kernel.org, kvm@vger.kernel.org,
yang.z.zhang@Intel.com
Subject: Re: [PATCH] KVM: VMX: fix the writing POSTED_INTR_NV
Date: Thu, 3 Dec 2015 14:58:18 +0100 [thread overview]
Message-ID: <56604A7A.7050206@redhat.com> (raw)
In-Reply-To: <1449120574-29893-1-git-send-email-roy.qing.li@gmail.com>
On 03/12/2015 06:29, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> POSTED_INTR_NV is 16bit, should not use 64bit write function
>
> [ 5311.676074] vmwrite error: reg 3 value 0 (err 12)
> [ 5311.680001] CPU: 49 PID: 4240 Comm: qemu-system-i38 Tainted: G I 4.1.13-WR8.0.0.0_standard #1
> [ 5311.689343] Hardware name: Intel Corporation S2600WT2/S2600WT2, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015
> [ 5311.699550] 00000000 00000000 e69a7e1c c1950de1 00000000 e69a7e38 fafcff45 fafebd24
> [ 5311.706924] 00000003 00000000 0000000c b6a06dfa e69a7e40 fafcff79 e69a7eb0 fafd5f57
> [ 5311.714296] e69a7ec0 c1080600 00000000 00000001 c0e18018 000001be 00000000 00000b43
> [ 5311.721651] Call Trace:
> [ 5311.722942] [<c1950de1>] dump_stack+0x4b/0x75
> [ 5311.726467] [<fafcff45>] vmwrite_error+0x35/0x40 [kvm_intel]
> [ 5311.731444] [<fafcff79>] vmcs_writel+0x29/0x30 [kvm_intel]
> [ 5311.736228] [<fafd5f57>] vmx_create_vcpu+0x337/0xb90 [kvm_intel]
> [ 5311.741600] [<c1080600>] ? dequeue_task_fair+0x2e0/0xf60
> [ 5311.746197] [<faf3b9ca>] kvm_arch_vcpu_create+0x3a/0x70 [kvm]
> [ 5311.751278] [<faf29e9d>] kvm_vm_ioctl+0x14d/0x640 [kvm]
> [ 5311.755771] [<c1129d44>] ? free_pages_prepare+0x1a4/0x2d0
> [ 5311.760455] [<c13e2842>] ? debug_smp_processor_id+0x12/0x20
> [ 5311.765333] [<c10793be>] ? sched_move_task+0xbe/0x170
> [ 5311.769621] [<c11752b3>] ? kmem_cache_free+0x213/0x230
> [ 5311.774016] [<faf29d50>] ? kvm_set_memory_region+0x60/0x60 [kvm]
> [ 5311.779379] [<c1199fa2>] do_vfs_ioctl+0x2e2/0x500
> [ 5311.783285] [<c11752b3>] ? kmem_cache_free+0x213/0x230
> [ 5311.787677] [<c104dc73>] ? __mmdrop+0x63/0xd0
> [ 5311.791196] [<c104dc73>] ? __mmdrop+0x63/0xd0
> [ 5311.794712] [<c104dc73>] ? __mmdrop+0x63/0xd0
> [ 5311.798234] [<c11a2ed7>] ? __fget+0x57/0x90
> [ 5311.801559] [<c11a2f72>] ? __fget_light+0x22/0x50
> [ 5311.805464] [<c119a240>] SyS_ioctl+0x80/0x90
> [ 5311.808885] [<c1957d30>] sysenter_do_call+0x12/0x12
> [ 5312.059280] kvm: zapping shadow pages for mmio generation wraparound
> [ 5313.678415] kvm [4231]: vcpu0 disabled perfctr wrmsr: 0xc2 data 0xffff
> [ 5313.726518] kvm [4231]: vcpu0 unhandled rdmsr: 0x570
>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
> Cc: Yang Zhang <yang.z.zhang@Intel.com>
> ---
> arch/x86/kvm/vmx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 5eb56ed..418e084 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -4780,7 +4780,7 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
>
> vmcs_write16(GUEST_INTR_STATUS, 0);
>
> - vmcs_write64(POSTED_INTR_NV, POSTED_INTR_VECTOR);
> + vmcs_write16(POSTED_INTR_NV, POSTED_INTR_VECTOR);
> vmcs_write64(POSTED_INTR_DESC_ADDR, __pa((&vmx->pi_desc)));
> }
>
> @@ -9505,7 +9505,7 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
> */
> vmx->nested.posted_intr_nv = vmcs12->posted_intr_nv;
> vmx->nested.pi_pending = false;
> - vmcs_write64(POSTED_INTR_NV, POSTED_INTR_VECTOR);
> + vmcs_write16(POSTED_INTR_NV, POSTED_INTR_VECTOR);
> vmcs_write64(POSTED_INTR_DESC_ADDR,
> page_to_phys(vmx->nested.pi_desc_page) +
> (unsigned long)(vmcs12->posted_intr_desc_addr &
>
Indeed this is a problem for 32-bit hosts.
Paolo
next prev parent reply other threads:[~2015-12-03 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 5:29 [PATCH] KVM: VMX: fix the writing POSTED_INTR_NV roy.qing.li
2015-12-03 13:58 ` Paolo Bonzini [this message]
2015-12-04 0:10 ` Li RongQing
2015-12-04 1:37 ` Yang Zhang
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=56604A7A.7050206@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=roy.qing.li@gmail.com \
--cc=x86@kernel.org \
--cc=yang.z.zhang@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 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.