qemu-e2k/include/hw
David Gibson 0a794529bd spapr: Simplify handling of host-serial and host-model values
27461d69a0 "ppc: add host-serial and host-model machine attributes
(CVE-2019-8934)" introduced 'host-serial' and 'host-model' machine
properties for spapr to explicitly control the values advertised to the
guest in device tree properties with the same names.

The previous behaviour on KVM was to unconditionally populate the device
tree with the real host serial number and model, which leaks possibly
sensitive information about the host to the guest.

To maintain compatibility for old machine types, we allowed those props
to be set to "passthrough" to take the value from the host as before.  Or
they could be set to "none" to explicitly omit the device tree items.

Special casing specific values on what's otherwise a user supplied string
is very ugly.  So, this patch simplifies things by implementing the
backwards compatibility in a different way: we have a machine class flag
set for the older machines, and we only load the host values into the
device tree if A) they're not set by the user and B) we have that flag set.

This does mean that the "passthrough" functionality is no longer available
with the current machine type.  That's ok though: if a user or management
layer really wants the information passed through they can read it
themselves (OpenStack Nova already does something similar for x86).

It also means the user can't explicitly ask for the values to be omitted
on the old machine types.  I think that's an acceptable trade-off: if you
care enough about not leaking the host information you can either move to
the new machine type, or use a dummy value for the properties.

For the new machine type, this also removes an odd inconsistency
between running on a POWER and non-POWER (or non-Linux) hosts: if the
host information couldn't be read from where we expect (in the host's
device tree as exposed by Linux), we'd fallback to omitting the guest
device tree items.

While we're there, improve some poorly worded comments, and the help text
for the properties.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
2019-03-29 10:25:50 +11:00
..
acpi i386, acpi: check acpi_memory_hotplug capacity in pre_plug 2019-03-12 22:31:21 -04:00
adc
arm hw/arm/virt: Dynamic memory map depending on RAM requirements 2019-03-05 15:55:09 +00:00
audio
block pflash: Require backend size to match device, improve errors 2019-03-26 08:16:24 +01:00
char hw/char/pl011: Support all interrupt lines 2019-02-21 18:17:46 +00:00
core
cpu
cris
display
dma
firmware hw/smbios: fix offset of type 3 sku field 2019-02-22 10:51:31 -05:00
gpio
hyperv
i2c i2c:smbus_slave: Add an SMBus vmstate structure 2019-02-27 21:06:08 -06:00
i386 intel-iommu: optimize nodmar memory regions 2019-03-20 11:44:13 +01:00
ide hw/ide: drop iov field from IDEDMA 2019-02-22 09:42:13 +00:00
input
intc hw/intc/bcm2836_control: Implement local timer 2019-03-15 11:12:28 +00:00
ipack
ipmi
isa
kvm
lm32
m68k
mem nvdimm: Rename AcpiNVDIMMState into NVDIMMState 2019-03-11 10:44:21 -03:00
mips
misc hw/arm/armsse: Unify init-svtor and cpuwait handling 2019-02-28 11:03:04 +00:00
net
nvram
pci gen_pcie_root_port: Add ACS (Access Control Services) capability 2019-03-12 22:31:21 -04:00
pci-bridge
pci-host spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
ppc spapr: Simplify handling of host-serial and host-model values 2019-03-29 10:25:50 +11:00
rdma {hmp, hw/pvrdma}: Expose device internals via monitor interface 2019-03-16 15:52:44 +02:00
riscv
s390x target/s390x: Split out s390-tod.h 2019-02-18 11:25:43 +01:00
scsi
sd
sh4
sparc
ssi
timer hw/timer/pl031: Allow use as an embedded-struct device 2019-02-21 18:17:46 +00:00
tricore
unicore32
usb
vfio VFIO updates 2019-03-11 2019-03-12 13:37:29 +00:00
virtio virtio-gpu: delay virglrenderer reset when blocked. 2019-03-18 13:10:57 +01:00
watchdog hw/arm/stellaris: Implement watchdog timer 2019-03-05 15:55:09 +00:00
xen
xtensa
boards.h machine: Move nvdimms state into struct MachineState 2019-03-11 10:44:25 -03:00
bt.h
devices.h hw/devices: Remove unused TC6393XB_RAM definition 2019-03-07 22:16:22 +01:00
elf_ops.h
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h
loader.h
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-core.h qom: Move compat_props machinery from qdev to QOM 2019-03-11 22:53:44 +01:00
qdev-dma.h
qdev-properties.h
qdev.h
register.h
registerfields.h
stream.h
sysbus.h
usb.h