From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: <kvm@vger.kernel.org>
Cc: <alex.williamson@redhat.com>, <mtosatti@redhat.com>,
<weidong.huang@huawei.com>,
peter huangpeng <peter.huangpeng@huawei.com>
Subject: [Help] qemu abort when configure ivshmem size >=32M with kvm-3.6
Date: Sat, 11 Oct 2014 17:26:08 +0800 [thread overview]
Message-ID: <5438F7B0.6070408@huawei.com> (raw)
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
reply other threads:[~2014-10-11 9:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5438F7B0.6070408@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=weidong.huang@huawei.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 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).