All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@dlhnet.de>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Jan Kiszka <jan.kiszka@web.de>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1
Date: Thu, 05 Jul 2012 14:42:42 +0200	[thread overview]
Message-ID: <4FF58BC2.3090303@dlhnet.de> (raw)
In-Reply-To: <4FF555A8.3000601@linux.vnet.ibm.com>

On 05.07.2012 10:51, Xiao Guangrong wrote:
> On 06/28/2012 05:11 PM, Peter Lieven wrote:
>
>> that here is bascially whats going on:
>>
>>    qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>
> There are two mmio emulation after user-space-exit, it is caused by mmio
> read access which spans two pages. But it should be fixed by:
>
> commit f78146b0f9230765c6315b2e14f56112513389ad
> Author: Avi Kivity<avi@redhat.com>
> Date:   Wed Apr 18 19:22:47 2012 +0300
>
>      KVM: Fix page-crossing MMIO
>
>      MMIO that are split across a page boundary are currently broken - the
>      code does not expect to be aborted by the exit to userspace for the
>      first MMIO fragment.
>
>      This patch fixes the problem by generalizing the current code for handling
>      16-byte MMIOs to handle a number of "fragments", and changes the MMIO
>      code to create those fragments.
>
>      Signed-off-by: Avi Kivity<avi@redhat.com>
>      Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> Could you please pull the code from:
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git
> and trace it again?
Thank you very much, this fixes the issue I have seen.

Thanks,
Peter


WARNING: multiple messages have this Message-ID (diff)
From: Peter Lieven <pl@dlhnet.de>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Gleb Natapov <gleb@redhat.com>, Jan Kiszka <jan.kiszka@web.de>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1
Date: Thu, 05 Jul 2012 14:42:42 +0200	[thread overview]
Message-ID: <4FF58BC2.3090303@dlhnet.de> (raw)
In-Reply-To: <4FF555A8.3000601@linux.vnet.ibm.com>

On 05.07.2012 10:51, Xiao Guangrong wrote:
> On 06/28/2012 05:11 PM, Peter Lieven wrote:
>
>> that here is bascially whats going on:
>>
>>    qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio read len 3 gpa 0xa0000 val 0x10ff
>>      qemu-kvm-1.0-2506  [010] 60996.908000: vcpu_match_mmio:      gva 0xa0000 gpa 0xa0000 Read GPA
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_mmio:             mmio unsatisfied-read len 1 gpa 0xa0000 val 0x0
>>      qemu-kvm-1.0-2506  [010] 60996.908000: kvm_userspace_exit:   reason KVM_EXIT_MMIO (6)
>>
> There are two mmio emulation after user-space-exit, it is caused by mmio
> read access which spans two pages. But it should be fixed by:
>
> commit f78146b0f9230765c6315b2e14f56112513389ad
> Author: Avi Kivity<avi@redhat.com>
> Date:   Wed Apr 18 19:22:47 2012 +0300
>
>      KVM: Fix page-crossing MMIO
>
>      MMIO that are split across a page boundary are currently broken - the
>      code does not expect to be aborted by the exit to userspace for the
>      first MMIO fragment.
>
>      This patch fixes the problem by generalizing the current code for handling
>      16-byte MMIOs to handle a number of "fragments", and changes the MMIO
>      code to create those fragments.
>
>      Signed-off-by: Avi Kivity<avi@redhat.com>
>      Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> Could you please pull the code from:
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git
> and trace it again?
Thank you very much, this fixes the issue I have seen.

Thanks,
Peter

  reply	other threads:[~2012-07-05 12:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 15:39 race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1 Peter Lieven
2012-06-27 16:54 ` Jan Kiszka
2012-06-28  9:11   ` Peter Lieven
2012-06-28  9:21     ` Jan Kiszka
2012-06-28  9:31       ` Peter Lieven
2012-06-28  9:38         ` Peter Lieven
2012-07-02 15:05           ` Avi Kivity
2012-07-02 15:05             ` [Qemu-devel] " Avi Kivity
2012-07-02 15:57             ` Peter Lieven
2012-07-02 15:57               ` [Qemu-devel] " Peter Lieven
2012-07-03 13:01             ` Peter Lieven
2012-07-03 13:01               ` [Qemu-devel] " Peter Lieven
2012-07-03 13:13               ` Avi Kivity
2012-07-03 13:13                 ` [Qemu-devel] " Avi Kivity
2012-07-03 13:15                 ` Peter Lieven
2012-07-03 13:15                   ` [Qemu-devel] " Peter Lieven
2012-07-03 13:25                   ` Avi Kivity
2012-07-03 13:25                     ` [Qemu-devel] " Avi Kivity
2012-07-04 14:57                     ` Peter Lieven
2012-07-04 14:57                       ` [Qemu-devel] " Peter Lieven
2012-07-04 23:12                 ` Peter Lieven
2012-07-04 23:12                   ` [Qemu-devel] " Peter Lieven
2012-07-05  6:48                   ` Xiao Guangrong
2012-07-05  6:48                     ` [Qemu-devel] " Xiao Guangrong
2012-06-28  9:39         ` Jan Kiszka
2012-06-28 10:13           ` Peter Lieven
2012-06-28 10:34           ` Peter Lieven
2012-07-05  8:51     ` Xiao Guangrong
2012-07-05  8:51       ` [Qemu-devel] " Xiao Guangrong
2012-07-05 12:42       ` Peter Lieven [this message]
2012-07-05 12:42         ` Peter Lieven

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=4FF58BC2.3090303@dlhnet.de \
    --to=pl@dlhnet.de \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoguangrong@linux.vnet.ibm.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.