pci, pc, virtio: fixes, features

pci resource capability + misc fixes everywhere.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJbkvKuAAoJECgfDbjSjVRpJ5MIALC60skYR6gyu8NCqma1NNod
 F1xEtlA2lkWOS6C5ohoHLm9EJ6pBT/dIqhZxzhw2eVKYLqJpXQbshkXTZFshFmUt
 RQy7rNlI4N5yzxU6RyYn2zXtSI1HN3YxKrpeB+WEUETi6eqor8ZHijWNJIDwIq+9
 By44CFaEisoqhFDSQp+PAUhzLnRretn6CyRLTKSfYQull2ZAJk1SVYc9FOQkq/M6
 +QlOtTsADVyu7veZabaj+/Noqndc4yCtV3uvyAfmO6j+DNxDo1sN/9DwWq7GROIs
 Y4R/ena+yOsmWDUh5f7Xkhgc1BqIJc0UjEx8Q4lIRBe1AI4VV9kjvvPXwMRlWWw=
 =a+iV
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pci, pc, virtio: fixes, features

pci resource capability + misc fixes everywhere.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Fri 07 Sep 2018 22:50:38 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  tests: update acpi expected files
  vhost: fix invalid downcast
  pc: make sure that guest isn't able to unplug the first cpu
  hw/pci: add PCI resource reserve capability to legacy PCI bridge
  hw/pci: factor PCI reserve resources to a separate structure
  virtio: update MemoryRegionCaches when guest negotiates features
  pc: acpi: revert back to 1 SRAT entry for hotpluggable area

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2018-09-24 18:49:11 +01:00
commit 7c823bc581
26 changed files with 103 additions and 112 deletions

View file

@ -117,7 +117,7 @@ static void cpu_hotplug_wr(void *opaque, hwaddr addr, uint64_t data,
DeviceState *dev = NULL;
HotplugHandler *hotplug_ctrl = NULL;
if (!cdev->cpu) {
if (!cdev->cpu || cdev->cpu == first_cpu) {
trace_cpuhp_acpi_ejecting_invalid_cpu(cpu_st->selector);
break;
}
@ -541,9 +541,11 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data)));
g_array_free(madt_buf, true);
method = aml_method("_EJ0", 1, AML_NOTSERIALIZED);
aml_append(method, aml_call1(CPU_EJECT_METHOD, uid));
aml_append(dev, method);
if (CPU(arch_ids->cpus[i].cpu) != first_cpu) {
method = aml_method("_EJ0", 1, AML_NOTSERIALIZED);
aml_append(method, aml_call1(CPU_EJECT_METHOD, uid));
aml_append(dev, method);
}
method = aml_method("_OST", 3, AML_SERIALIZED);
aml_append(method,