kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Help] qemu abort when configure ivshmem size >=32M with kvm-3.6
@ 2014-10-11  9:26 zhanghailiang
  0 siblings, 0 replies; only message in thread
From: zhanghailiang @ 2014-10-11  9:26 UTC (permalink / raw)
  To: kvm; +Cc: alex.williamson, mtosatti, weidong.huang, peter huangpeng

Hi all,

We can't start VM when we configure ivshmem with its size >= 32M.
Its reports: kvm_set_phys_mem: error registering slot: File exists
Aborted (core dumped)

Qemu command:
#qemu-system-x86_64 -name suse10sp1 -enable-kvm -m 4096 -smp 4,sockets=1, \
cores=4,threads=1 -drive file=/home/sles10_sp1_64_2U,if=none,id=drive-ide0-0-0, \
format=raw,cache=none,aio=native -device ide-hd,bus=ide.0,unit=0, \
drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -vnc :10 \
-device ivshmem,id=ivshmem0,shm=vm-ivshmem,size=32m,role=master

We have made several tests, and the results are:
1.
Guest OS: suse10sp1
KVM version: 3.6
QEMU version:2.1.0
ivshmem size: 4M/8M/16M
result: OK
2.
Guest OS: sles10sp1
KVM version: 3.6
QEMU version: 2.1.0
ivshmem size: 32M/64M
result: fail
3.
Guest OS: sles10sp1
KVM version: *3.15*
QEMU version: 2.1.0
ivshmem size: 4M/8M/16M/32M/64M
result: OK

After a hard work, we found in kvm source, the commit b940413f5 can fix this problem.

     KVM: Fix user memslot overlap check

     Prior to memory slot sorting this loop compared all of the user memory
     slots for overlap with new entries.  With memory slot sorting, we're
     just checking some number of entries in the array that may or may not
     be user slots.  Instead, walk all the slots with kvm_for_each_memslot,
     which has the added benefit of terminating early when we hit the first
     empty slot, and skip comparison to private slots.

     Cc: stable@vger.kernel.org
     Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
     Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Since our project using kvm-3.6, we want to backport this patch to kvm-3.6.
But if there are any potential problems to backport this patch?

Actually we also tested other Guest OS, such as suse11sp2, suse11sp3, they are all OK with configuring
ivshmem >= 32M, so is it a bug of guest OS?

Any help will be appreciated.;)

Thanks,
zhanghailiang


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-11  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-11  9:26 [Help] qemu abort when configure ivshmem size >=32M with kvm-3.6 zhanghailiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).