qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS.
@ 2014-08-27  8:09 Tang Chen
  2014-08-27  8:09 ` [Qemu-devel] [RFC PATCH v1 1/4] Use macro to define ACPI notification event Tang Chen
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Tang Chen @ 2014-08-27  8:09 UTC (permalink / raw)
  To: qemu-devel, imammedo, mst, pbonzini
  Cc: hutao, isimatu.yasuaki, zhugh.fnst, tangchen

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(-)

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-03  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27  8:09 [Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS Tang Chen
2014-08-27  8:09 ` [Qemu-devel] [RFC PATCH v1 1/4] Use macro to define ACPI notification event Tang Chen
2014-08-27  8:09 ` [Qemu-devel] [RFC PATCH v1 2/4] Add event handling for memory device insertion Tang Chen
2014-08-27  8:09 ` [Qemu-devel] [RFC PATCH v1 3/4] Introduce wait condition to catch guest OS memory hotplug error Tang Chen
2014-08-27  8:09 ` [Qemu-devel] [RFC PATCH v1 4/4] Handle memory hotplug error from guest OS in QEmu Tang Chen
2014-08-27  8:14 ` [Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS tangchen
2014-09-03  9:05   ` tangchen

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).