qemu/include/hw
Dou Liyang 7b8be49d36 NUMA: Enable adding NUMA node implicitly
Linux and Windows need ACPI SRAT table to make memory hotplug work properly,
however currently QEMU doesn't create SRAT table if numa options aren't present
on CLI.

Which breaks both linux and windows guests in certain conditions:
 * Windows: won't enable memory hotplug without SRAT table at all
 * Linux: if QEMU is started with initial memory all below 4Gb and no SRAT table
   present, guest kernel will use nommu DMA ops, which breaks 32bit hw drivers
   when memory is hotplugged and guest tries to use it with that drivers.

Fix above issues by automatically creating a numa node when QEMU is started with
memory hotplug enabled but without '-numa' options on CLI.
(PS: auto-create numa node only for new machine types so not to break migration).

Which would provide SRAT table to guests without explicit -numa options on CLI
and would allow:
 * Windows: to enable memory hotplug
 * Linux: switch to SWIOTLB DMA ops, to bounce DMA transfers to 32bit allocated
   buffers that legacy drivers/hw can handle.

[Rewritten by Igor]

Reported-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Alistair Francis <alistair23@gmail.com>
Cc: Takao Indoh <indou.takao@jp.fujitsu.com>
Cc: Izumi Taku <izumi.taku@jp.fujitsu.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-11-16 17:46:53 +02:00
..
acpi vmgenid: replace x-write-pointer-available hack 2017-09-08 16:15:17 +03:00
adc
arm arm: fix armv7m_init() declaration to match definition 2017-10-12 13:20:07 +01:00
audio audio: Rename hw/audio/audio.h to hw/audio/soundhw.h 2017-05-19 10:48:54 +02:00
block hw/block: Introduce share-rw qdev property 2017-02-28 20:40:36 +01:00
char hw/char/cmsdk-apb-uart.c: Implement CMSDK APB UART 2017-07-17 13:36:08 +01:00
core
cpu
cris
display
dma
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c ppc4xx_i2c: QOMify 2017-09-08 09:30:55 +10:00
i386 hw/pci-host: Fix x86 Host Bridges 64bit PCI hole 2017-11-16 17:46:53 +02:00
ide ide: support reporting of rotation rate 2017-10-12 12:10:37 +02:00
input ps2: add and use PS2State typedef 2017-06-23 11:51:50 +02:00
intc nvic: Implement NVIC_ITNS<n> registers 2017-09-21 16:29:27 +01:00
ipack
ipmi ipmi: introduce an ipmi_bmc_gen_event() API 2017-04-26 12:41:55 +10:00
isa isa: use get_uint() for "io-base" 2017-06-20 14:31:32 +02:00
kvm
lm32
m68k hw/char/mcf_uart: QOMify the ColdFire UART 2017-02-16 14:06:56 +01:00
mem qmp: introduce query-memory-size-summary command 2017-09-14 15:52:10 +01:00
mips mips: malta/boston: replace cpu_model with cpu_type 2017-10-27 16:04:28 +02:00
misc hw/misc: add vmcoreinfo device 2017-10-15 05:54:40 +03:00
net lance: move TYPE_LANCE and SysBusPCNetState from lance.c to lance.h 2017-10-31 17:25:36 +00:00
nvram fw_cfg: add write callback 2017-10-15 05:54:40 +03:00
pci Add new PCI ID for i82559a 2017-11-13 15:48:54 +08:00
pci-host hw/pci-host: Fix x86 Host Bridges 64bit PCI hole 2017-11-16 17:46:53 +02:00
ppc xics/kvm: synchonize state before 'info pic' 2017-11-14 11:12:42 +11:00
s390x s390x/kvm: use cpu model for gscb on compat machines 2017-10-30 09:03:45 +01:00
scsi esp: move TYPE_ESP and SysBusESPState from esp.c to esp.h 2017-10-31 17:25:36 +00:00
sd hw/sd: add card-reparenting function 2017-02-28 17:10:00 +00:00
sh4
smbios
sparc sun4m: change TYPE_SUN4M_IOMMU macro from "iommu" to "sun4m-iommu" 2017-10-31 17:25:37 +00:00
ssi msf2: Add Smartfusion2 SPI controller 2017-09-21 16:36:56 +01:00
timer msf2: Add Smartfusion2 System timer 2017-09-21 16:36:56 +01:00
tricore
unicore32
usb
vfio memory/iommu: QOM'fy IOMMU MemoryRegion 2017-07-14 12:04:41 +02:00
virtio virtio-input: send rel-wheel events for wheel buttons 2017-09-29 10:36:33 +02:00
watchdog watchdog: wdt_aspeed: Add support for the reset width register 2017-09-04 15:21:54 +01:00
xen xen: add a global indicator for grant copy being available 2017-10-26 14:23:06 -07:00
boards.h NUMA: Enable adding NUMA node implicitly 2017-11-16 17:46:53 +02:00
bt.h
compat.h Add new PCI ID for i82559a 2017-11-13 15:48:54 +08:00
devices.h sm501: QOMify 2017-04-24 12:32:12 +01:00
elf_ops.h loader: Ignore zero-sized ELF segments 2017-09-04 15:21:53 +01:00
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
ide.h
irq.h
loader-fit.h loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
loader.h fw_cfg: rename read callback 2017-09-08 16:15:17 +03:00
nmi.h
or-irq.h include/hw/or-irq.h: Drop unused in_irqs field 2017-10-16 21:09:15 +03:00
pcmcia.h
platform-bus.h
ptimer.h include/hw/ptimer.h: Add documentation comments 2017-07-11 17:44:27 +03:00
qdev-core.h qdev: store DeviceState's canonical path to use when unparenting 2017-10-18 10:34:17 +02:00
qdev-dma.h
qdev-properties.h qdev: provide DEFINE_PROP_INT64() 2017-07-18 17:36:19 +02:00
qdev.h
register.h
registerfields.h
stream.h
sysbus.h
usb.h usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00