From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP6Ub-0008JM-NU for qemu-devel@nongnu.org; Wed, 03 Sep 2014 05:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP6UW-0004SB-Js for qemu-devel@nongnu.org; Wed, 03 Sep 2014 05:04:41 -0400 Received: from [59.151.112.132] (port=63025 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP6UW-0004Qb-4d for qemu-devel@nongnu.org; Wed, 03 Sep 2014 05:04:36 -0400 Message-ID: <5406D9E2.5080807@cn.fujitsu.com> Date: Wed, 3 Sep 2014 17:05:38 +0800 From: tangchen MIME-Version: 1.0 References: <1409126988-22287-1-git-send-email-tangchen@cn.fujitsu.com> <53FD9362.8090404@cn.fujitsu.com> In-Reply-To: <53FD9362.8090404@cn.fujitsu.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, imammedo@redhat.com, mst@redhat.com, pbonzini@redhat.com Cc: hutao@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, zhugh.fnst@cn.fujitsu.com, tangchen@cn.fujitsu.com Hi, Would anyone help to review this patch-set ? I'm not quit sure if this is a suitable way solve this problem. Thanks. On 08/27/2014 04:14 PM, tangchen wrote: > > Forgot to mention, this patch-set is based on the following patch-set: > > [RESEND PATCH v3 0/8] QEmu memory hot unplug support. > https://www.mail-archive.com/qemu-devel@nongnu.org/msg253018.html > > Thanks. > > On 08/27/2014 04:09 PM, Tang Chen wrote: >> When doing memory hotplug, QEmu is not aware of guest OS error when >> hotplugging >> memory devices. Even if guest OS failed to hot-add memory, the pc-dimm >> device will be added to QEmu. Even if guest OS failed to hot-remove >> memory, >> QEmu will remove the pc-dimm device. >> >> An example is: for a Linux guest, the Linux kernel limited that the >> size of >> hot-added memory should be mutiple of memory section (128MB by default). >> If we add 130MB memory, the Linux kernel won't add it. We are not able >> to handle the size check in QEmu commmand line because different OS may >> have different limits. >> >> And also, QEmu outputs nothing but guest OS failed to hot-add memory >> will >> confuse users. We should at least report an error. >> >> So, we should report the error to users, and cancel the memory hotplug >> progress in QEmu. >> >> QEmu thread sends a SCI to guest OS and return immediately. The vcpu >> thread >> will emulate ACPI hardware operations. So this patch-set introduces a >> wait >> condition variable to synchronize these two threads. >> >> Tang Chen (4): >> Use macro to define ACPI notification event. >> Add event handling for memory device insertion. >> Introduce wait condition to catch guest OS memory hotplug error. >> Handle memory hotplug error from guest OS in QEmu. >> >> hw/acpi/memory_hotplug.c | 146 >> +++++++++++++++++++++++++++++++++++++++++++++-- >> include/hw/acpi/acpi.h | 15 ++++- >> 2 files changed, 153 insertions(+), 8 deletions(-) >> > > . >