Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-11 Thread Gonglei (Arei)
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of David Hildenbrand > Sent: Monday, June 11, 2018 8:36 PM > To: Gonglei (Arei) ; 浙大邮箱 > Subject: Re: An emulation failure occurs,if I hotplug vcpus immediately after > the > VM start >

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-11 Thread David Hildenbrand
On 11.06.2018 14:25, Gonglei (Arei) wrote: > > Hi David and Paolo, > >> -Original Message- >> From: David Hildenbrand [mailto:da...@redhat.com] >> Sent: Monday, June 11, 2018 6:44 PM >> To: 浙大邮箱 >> Cc: Paolo Bonzini ; Gonglei (Arei) >> ; Igor Mammedov ; >> xuyandong ; Zhanghailiang >> ;

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-11 Thread Gonglei (Arei)
Hi David and Paolo, > -Original Message- > From: David Hildenbrand [mailto:da...@redhat.com] > Sent: Monday, June 11, 2018 6:44 PM > To: 浙大邮箱 > Cc: Paolo Bonzini ; Gonglei (Arei) > ; Igor Mammedov ; > xuyandong ; Zhanghailiang > ; wangxin (U) > ; lidonglin ; > k...@vger.kernel.org;

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-11 Thread David Hildenbrand
On 07.06.2018 18:03, 浙大邮箱 wrote: > Hi,all > I still have a question after reading your discussion: Will seabios detect > the change of address space even if we add_region and del_region > automatically? I guess that seabios may not take this change into > consideration. Hi, We would just

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread 浙大邮箱
Hi,all I still have a question after reading your discussion: Will seabios detect the change of address space even if we add_region and del_region automatically? I guess that seabios may not take this change into consideration. Looking forward to your replies, Thanks >> On Jun 7, 2018, at

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread David Hildenbrand
On 07.06.2018 14:36, Paolo Bonzini wrote: > On 07/06/2018 13:36, David Hildenbrand wrote: >>> The dirty bitmap would be synced in kvm_region_del (so it's not true >>> that kvm_region_del would disappear, but almost :)). >> I was rather concerned when doing a KVM_SET_USER_MEMORY_REGIONS while >>

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread Paolo Bonzini
On 07/06/2018 13:36, David Hildenbrand wrote: >> The dirty bitmap would be synced in kvm_region_del (so it's not true >> that kvm_region_del would disappear, but almost :)). > I was rather concerned when doing a KVM_SET_USER_MEMORY_REGIONS while > some (already present) memory region is performing

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread Gonglei (Arei)
> -Original Message- > From: David Hildenbrand [mailto:da...@redhat.com] > Sent: Thursday, June 07, 2018 6:40 PM > Subject: Re: An emulation failure occurs,if I hotplug vcpus immediately after > the > VM start > > On 06.06.2018 15:57, Paolo Bonzini wrote: > > On 06/06/2018 15:28,

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread David Hildenbrand
On 07.06.2018 13:13, Gonglei (Arei) wrote: > >> -Original Message- >> From: David Hildenbrand [mailto:da...@redhat.com] >> Sent: Thursday, June 07, 2018 6:40 PM >> Subject: Re: An emulation failure occurs,if I hotplug vcpus immediately >> after the >> VM start >> >> On 06.06.2018 15:57,

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread David Hildenbrand
On 07.06.2018 13:02, Paolo Bonzini wrote: > On 07/06/2018 12:37, David Hildenbrand wrote: >> >> I have a related requirement, which would be to atomically grow a >> memory regions. So instead of region_del(old)+region_add(new), I would >> have to do it in one shot (atomically). >> >> AFAICS an

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread Paolo Bonzini
On 07/06/2018 12:37, David Hildenbrand wrote: > > I have a related requirement, which would be to atomically grow a > memory regions. So instead of region_del(old)+region_add(new), I would > have to do it in one shot (atomically). > > AFAICS an atomic replace of the memory map would work for

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread David Hildenbrand
On 06.06.2018 15:57, Paolo Bonzini wrote: > On 06/06/2018 15:28, Gonglei (Arei) wrote: >> gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, >> mem.userspace_addr=0x7fc343ec, mem.flags=0, memory_size=0x0 >> gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, >>

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-07 Thread David Hildenbrand
On 06.06.2018 15:57, Paolo Bonzini wrote: > On 06/06/2018 15:28, Gonglei (Arei) wrote: >> gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, >> mem.userspace_addr=0x7fc343ec, mem.flags=0, memory_size=0x0 >> gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, >>

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-06 Thread Paolo Bonzini
On 06/06/2018 16:18, xuyandong wrote: >> We don't. It's generally a guest bug if they do, but the problem here is >> that >> QEMU is splitting a memory region in two parts and that is not atomic. >> >> One fix could be to add a KVM_SET_USER_MEMORY_REGIONS ioctl that >> replaces the entire

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-06 Thread xuyandong
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Wednesday, June 06, 2018 9:58 PM > To: Gonglei (Arei) ; Igor Mammedov > ; xuyandong > Cc: Zhanghailiang ; wangxin (U) > ; lidonglin ; > k...@vger.kernel.org; qemu-devel@nongnu.org; Huangweidong (C) > >

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-06 Thread Paolo Bonzini
On 06/06/2018 15:28, Gonglei (Arei) wrote: > gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, > mem.userspace_addr=0x7fc343ec, mem.flags=0, memory_size=0x0 > gonglei: mem.slot: 3, mem.guest_phys_addr=0xc, > mem.userspace_addr=0x7fc343ec, mem.flags=0,

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-06 Thread Gonglei (Arei)
Hi Igor, Thanks for your response firstly. :) > -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: Friday, June 01, 2018 6:23 PM > > On Fri, 1 Jun 2018 08:17:12 + > xuyandong wrote: > > > Hi there, > > > > I am doing some test on qemu vcpu hotplug and I

Re: [Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-01 Thread Igor Mammedov
On Fri, 1 Jun 2018 08:17:12 + xuyandong wrote: > Hi there, > > I am doing some test on qemu vcpu hotplug and I run into some trouble. > An emulation failure occurs and qemu prints the following msg: > > KVM internal error. Suberror: 1 > emulation failure > EAX= EBX=

[Qemu-devel] An emulation failure occurs, if I hotplug vcpus immediately after the VM start

2018-06-01 Thread xuyandong
Hi there, I am doing some test on qemu vcpu hotplug and I run into some trouble. An emulation failure occurs and qemu prints the following msg: KVM internal error. Suberror: 1 emulation failure EAX= EBX= ECX= EDX=0600 ESI= EDI= EBP=