* [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
@ 2014-08-14 16:08 ` Michael S. Tsirkin
2014-09-08 13:32 ` Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 02/12] pc: Create 2.2 machine type Michael S. Tsirkin
` (11 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, qemu-stable, Anthony Liguori, Jan Kiszka
From: Jan Kiszka <jan.kiszka@siemens.com>
The spec says (and real HW confirms this) that, if the bus master bit
is 0, the device will not generate any PCI accesses. MSI and MSI-X
messages fall among these, so we should use the corresponding address
space to deliver them. This will prevent delivery if bus master support
is disabled.
Cc: qemu-stable@nongnu.org
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci/msi.c | 2 +-
hw/pci/msix.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index a4a3040..52d2313 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)
"notify vector 0x%x"
" address: 0x%"PRIx64" data: 0x%"PRIx32"\n",
vector, msg.address, msg.data);
- stl_le_phys(&address_space_memory, msg.address, msg.data);
+ stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
}
/* Normally called by pci_default_write_config(). */
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 5c49bfc..20ae476 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector)
msg = msix_get_message(dev, vector);
- stl_le_phys(&address_space_memory, msg.address, msg.data);
+ stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
}
void msix_reset(PCIDevice *dev)
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages
2014-08-14 16:08 ` [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages Michael S. Tsirkin
@ 2014-09-08 13:32 ` Michael S. Tsirkin
0 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-09-08 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, qemu-stable, Anthony Liguori, Jan Kiszka
On Thu, Aug 14, 2014 at 06:08:44PM +0200, Michael S. Tsirkin wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> The spec says (and real HW confirms this) that, if the bus master bit
> is 0, the device will not generate any PCI accesses. MSI and MSI-X
> messages fall among these, so we should use the corresponding address
> space to deliver them. This will prevent delivery if bus master support
> is disabled.
>
> Cc: qemu-stable@nongnu.org
This is reported to break old guests which incorrectly don't enable
bus mastering.
Worth fixing (virtio needs a work-around) but please drop the patch from qemu-stable.
Thanks!
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/pci/msi.c | 2 +-
> hw/pci/msix.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci/msi.c b/hw/pci/msi.c
> index a4a3040..52d2313 100644
> --- a/hw/pci/msi.c
> +++ b/hw/pci/msi.c
> @@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)
> "notify vector 0x%x"
> " address: 0x%"PRIx64" data: 0x%"PRIx32"\n",
> vector, msg.address, msg.data);
> - stl_le_phys(&address_space_memory, msg.address, msg.data);
> + stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
> }
>
> /* Normally called by pci_default_write_config(). */
> diff --git a/hw/pci/msix.c b/hw/pci/msix.c
> index 5c49bfc..20ae476 100644
> --- a/hw/pci/msix.c
> +++ b/hw/pci/msix.c
> @@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector)
>
> msg = msix_get_message(dev, vector);
>
> - stl_le_phys(&address_space_memory, msg.address, msg.data);
> + stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
> }
>
> void msix_reset(PCIDevice *dev)
> --
> MST
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 02/12] pc: Create 2.2 machine type
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages Michael S. Tsirkin
@ 2014-08-14 16:08 ` Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address Michael S. Tsirkin
` (10 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Anthony Liguori, Jan Kiszka
From: Jan Kiszka <jan.kiszka@siemens.com>
Yet identical to 2.1.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/i386/pc.h | 3 +++
hw/i386/pc_piix.c | 19 ++++++++++++++++---
hw/i386/pc_q35.c | 17 +++++++++++++++--
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 863eefb..dc3058b 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -300,7 +300,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
int e820_get_num_entries(void);
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
+#define PC_COMPAT_2_1
+
#define PC_COMPAT_2_0 \
+ PC_COMPAT_2_1, \
{\
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 4f22be8..2b3a3ce 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -457,16 +457,28 @@ static void pc_xen_hvm_init(MachineState *machine)
.desc = "Standard PC (i440FX + PIIX, 1996)", \
.hot_add_cpu = pc_hot_add_cpu
-#define PC_I440FX_2_1_MACHINE_OPTIONS \
+#define PC_I440FX_2_2_MACHINE_OPTIONS \
PC_I440FX_MACHINE_OPTIONS, \
.default_machine_opts = "firmware=bios-256k.bin"
+static QEMUMachine pc_i440fx_machine_v2_2 = {
+ PC_I440FX_2_2_MACHINE_OPTIONS,
+ .name = "pc-i440fx-2.2",
+ .alias = "pc",
+ .init = pc_init_pci,
+ .is_default = 1,
+};
+
+#define PC_I440FX_2_1_MACHINE_OPTIONS PC_I440FX_2_2_MACHINE_OPTIONS
+
static QEMUMachine pc_i440fx_machine_v2_1 = {
PC_I440FX_2_1_MACHINE_OPTIONS,
.name = "pc-i440fx-2.1",
- .alias = "pc",
.init = pc_init_pci,
- .is_default = 1,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_1,
+ { /* end of list */ }
+ },
};
#define PC_I440FX_2_0_MACHINE_OPTIONS PC_I440FX_2_1_MACHINE_OPTIONS
@@ -903,6 +915,7 @@ static QEMUMachine xenfv_machine = {
static void pc_machine_init(void)
{
+ qemu_register_pc_machine(&pc_i440fx_machine_v2_2);
qemu_register_pc_machine(&pc_i440fx_machine_v2_1);
qemu_register_pc_machine(&pc_i440fx_machine_v2_0);
qemu_register_pc_machine(&pc_i440fx_machine_v1_7);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index c39ee98..fcc3ad7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -348,15 +348,27 @@ static void pc_q35_init_1_4(MachineState *machine)
.desc = "Standard PC (Q35 + ICH9, 2009)", \
.hot_add_cpu = pc_hot_add_cpu
-#define PC_Q35_2_1_MACHINE_OPTIONS \
+#define PC_Q35_2_2_MACHINE_OPTIONS \
PC_Q35_MACHINE_OPTIONS, \
.default_machine_opts = "firmware=bios-256k.bin"
+static QEMUMachine pc_q35_machine_v2_2 = {
+ PC_Q35_2_2_MACHINE_OPTIONS,
+ .name = "pc-q35-2.2",
+ .alias = "q35",
+ .init = pc_q35_init,
+};
+
+#define PC_Q35_2_1_MACHINE_OPTIONS PC_Q35_2_2_MACHINE_OPTIONS
+
static QEMUMachine pc_q35_machine_v2_1 = {
PC_Q35_2_1_MACHINE_OPTIONS,
.name = "pc-q35-2.1",
- .alias = "q35",
.init = pc_q35_init,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_1,
+ { /* end of list */ }
+ },
};
#define PC_Q35_2_0_MACHINE_OPTIONS PC_Q35_2_1_MACHINE_OPTIONS
@@ -421,6 +433,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
static void pc_q35_machine_init(void)
{
+ qemu_register_pc_machine(&pc_q35_machine_v2_2);
qemu_register_pc_machine(&pc_q35_machine_v2_1);
qemu_register_pc_machine(&pc_q35_machine_v2_0);
qemu_register_pc_machine(&pc_q35_machine_v1_7);
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 02/12] pc: Create 2.2 machine type Michael S. Tsirkin
@ 2014-08-14 16:08 ` Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE Michael S. Tsirkin
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:08 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Vassili Karpov (malc), Gerd Hoffmann,
Anthony Liguori, Jan Kiszka
From: Jan Kiszka <jan.kiszka@siemens.com>
According to ICH9 spec, the MSI capability is located at 0x60. This is
important for guest drivers that do not parse the capability chain and
use absolute addresses instead.
CC: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/i386/pc.h | 7 ++++++-
hw/audio/intel-hda.c | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index dc3058b..895b415 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -300,7 +300,12 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
int e820_get_num_entries(void);
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
-#define PC_COMPAT_2_1
+#define PC_COMPAT_2_1 \
+ {\
+ .driver = "intel-hda",\
+ .property = "old_msi_addr",\
+ .value = "on",\
+ }
#define PC_COMPAT_2_0 \
PC_COMPAT_2_1, \
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index aa49b47..0ac911e 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -187,6 +187,7 @@ struct IntelHDAState {
/* properties */
uint32_t debug;
uint32_t msi;
+ bool old_msi_addr;
};
#define TYPE_INTEL_HDA_GENERIC "intel-hda-generic"
@@ -1141,7 +1142,7 @@ static int intel_hda_init(PCIDevice *pci)
"intel-hda", 0x4000);
pci_register_bar(&d->pci, 0, 0, &d->mmio);
if (d->msi) {
- msi_init(&d->pci, 0x50, 1, true, false);
+ msi_init(&d->pci, d->old_msi_addr ? 0x50 : 0x60, 1, true, false);
}
hda_codec_bus_init(DEVICE(pci), &d->codecs, sizeof(d->codecs),
@@ -1236,6 +1237,7 @@ static const VMStateDescription vmstate_intel_hda = {
static Property intel_hda_properties[] = {
DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1),
+ DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false),
DEFINE_PROP_END_OF_LIST(),
};
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (2 preceding siblings ...)
2014-08-14 16:08 ` [Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address Michael S. Tsirkin
@ 2014-08-14 16:08 ` Michael S. Tsirkin
2014-08-14 16:08 ` [Qemu-devel] [PULL 05/12] pc-dimm: validate node property Michael S. Tsirkin
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:08 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Peter Crosthwaite, Hu Tao, qemu-stable,
Vasilis Liaskovitis, Anthony Liguori, Igor Mammedov, Laszlo Ersek
From: Hu Tao <hutao@cn.fujitsu.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/acpi/pc-hotplug.h | 2 +-
hw/i386/acpi-dsdt.dsl | 4 ++--
hw/i386/acpi-dsdt.hex.generated | 8 ++++----
hw/i386/q35-acpi-dsdt.dsl | 4 ++--
hw/i386/ssdt-mem.dsl | 16 ++++++++--------
hw/i386/ssdt-misc.dsl | 2 +-
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h
index bf5157d..b9db295 100644
--- a/include/hw/acpi/pc-hotplug.h
+++ b/include/hw/acpi/pc-hotplug.h
@@ -32,7 +32,7 @@
#define ACPI_MEMORY_HOTPLUG_IO_LEN 24
#define ACPI_MEMORY_HOTPLUG_BASE 0x0a00
-#define MEMORY_HOPTLUG_DEVICE MHPD
+#define MEMORY_HOTPLUG_DEVICE MHPD
#define MEMORY_SLOTS_NUMBER MDNR
#define MEMORY_HOTPLUG_IO_REGION HPMR
#define MEMORY_SLOT_ADDR_LOW MRBL
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 6ba0170..559f4b6 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -302,7 +302,7 @@ DefinitionBlock (
/****************************************************************
* General purpose events
****************************************************************/
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
Scope(\_GPE) {
Name(_HID, "ACPI0006")
@@ -321,7 +321,7 @@ DefinitionBlock (
}
Method(_E03) {
// Memory hotplug event
- \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
+ \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
}
Method(_L04) {
}
diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386/acpi-dsdt.hex.generated
index 6c8a1fc..a21bf41 100644
--- a/hw/i386/acpi-dsdt.hex.generated
+++ b/hw/i386/acpi-dsdt.hex.generated
@@ -8,7 +8,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x0,
0x0,
0x1,
-0x2e,
+0x1f,
0x42,
0x58,
0x50,
@@ -31,9 +31,9 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x4e,
0x54,
0x4c,
-0x13,
-0x9,
-0x12,
+0x28,
+0x5,
+0x10,
0x20,
0x10,
0x49,
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 8c3eae7..054b035 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -410,7 +410,7 @@ DefinitionBlock (
/****************************************************************
* General purpose events
****************************************************************/
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
Scope(\_GPE) {
Name(_HID, "ACPI0006")
@@ -425,7 +425,7 @@ DefinitionBlock (
}
Method(_E03) {
// Memory hotplug event
- \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
+ \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
}
Method(_L04) {
}
diff --git a/hw/i386/ssdt-mem.dsl b/hw/i386/ssdt-mem.dsl
index 8e17bd1..22ff5dd 100644
--- a/hw/i386/ssdt-mem.dsl
+++ b/hw/i386/ssdt-mem.dsl
@@ -39,10 +39,10 @@ ACPI_EXTRACT_ALL_CODE ssdm_mem_aml
DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
{
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj)
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj)
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj)
- External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj)
+ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj)
Scope(\_SB) {
/* v------------------ DO NOT EDIT ------------------v */
@@ -58,19 +58,19 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
Name(_HID, EISAID("PNP0C80"))
Method(_CRS, 0) {
- Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID))
+ Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID))
}
Method(_STA, 0) {
- Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID))
+ Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID))
}
Method(_PXM, 0) {
- Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID))
+ Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID))
}
Method(_OST, 3) {
- \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2)
+ \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2)
}
}
}
diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/ssdt-misc.dsl
index d329b8b..0fd4480 100644
--- a/hw/i386/ssdt-misc.dsl
+++ b/hw/i386/ssdt-misc.dsl
@@ -120,7 +120,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj)
Scope(\_SB.PCI0) {
- Device(MEMORY_HOPTLUG_DEVICE) {
+ Device(MEMORY_HOTPLUG_DEVICE) {
Name(_HID, "PNP0A06")
Name(_UID, "Memory hotplug resources")
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 05/12] pc-dimm: validate node property
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (3 preceding siblings ...)
2014-08-14 16:08 ` [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE Michael S. Tsirkin
@ 2014-08-14 16:08 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 06/12] pc-dimm: fix up error message Michael S. Tsirkin
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:08 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Peter Crosthwaite, Hu Tao, qemu-stable,
Vasilis Liaskovitis, Anthony Liguori, Igor Mammedov
From: Hu Tao <hutao@cn.fujitsu.com>
If user specifies a node number that exceeds the available numa nodes in
emulated system for pc-dimm device, the device will report an invalid _PXM
to OSPM. Fix this by checking the node property value.
Cc: qemu-stable@nongnu.org
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/mem/pc-dimm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 08f49ed..92e276f 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -252,6 +252,11 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");
return;
}
+ if (dimm->node >= nb_numa_nodes) {
+ error_setg(errp, "'" PC_DIMM_NODE_PROP
+ "' exceeds numa node number: %" PRId32, nb_numa_nodes);
+ return;
+ }
}
static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm)
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 06/12] pc-dimm: fix up error message
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (4 preceding siblings ...)
2014-08-14 16:08 ` [Qemu-devel] [PULL 05/12] pc-dimm: validate node property Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x Michael S. Tsirkin
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Peter Crosthwaite, qemu-stable,
Vasilis Liaskovitis, Anthony Liguori, Igor Mammedov
- int should be printed using %d
- print actual wrong value for property
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/mem/pc-dimm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 92e276f..5bfc5b7 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -253,8 +253,9 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
return;
}
if (dimm->node >= nb_numa_nodes) {
- error_setg(errp, "'" PC_DIMM_NODE_PROP
- "' exceeds numa node number: %" PRId32, nb_numa_nodes);
+ error_setg(errp, "'DIMM property " PC_DIMM_NODE_PROP " has value %"
+ PRIu32 "' which exceeds the number of numa nodes: %d",
+ dimm->node, nb_numa_nodes);
return;
}
}
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (5 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 06/12] pc-dimm: fix up error message Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 18:57 ` Eduardo Habkost
2014-08-14 16:09 ` [Qemu-devel] [PULL 08/12] acpi: align RSDP Michael S. Tsirkin
` (5 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eduardo Habkost, Hu Tao, qemu-stable,
Anthony Liguori, Igor Mammedov, Paolo Bonzini
From: Hu Tao <hutao@cn.fujitsu.com>
The error messages before and after patch are:
before:
qemu-system-x86_64: total memory for NUMA nodes (134217728) should equal RAM size (20000000)
after:
qemu-system-x86_64: total memory for NUMA nodes (0x8000000) should equal RAM size (0x20000000)
Cc: qemu-stable@nongnu.org
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
numa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/numa.c b/numa.c
index 7bf7834..c78cec9 100644
--- a/numa.c
+++ b/numa.c
@@ -210,8 +210,8 @@ void set_numa_nodes(void)
numa_total += numa_info[i].node_mem;
}
if (numa_total != ram_size) {
- error_report("total memory for NUMA nodes (%" PRIu64 ")"
- " should equal RAM size (" RAM_ADDR_FMT ")",
+ error_report("total memory for NUMA nodes (0x%" PRIx64 ")"
+ " should equal RAM size (0x" RAM_ADDR_FMT ")",
numa_total, ram_size);
exit(1);
}
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x
2014-08-14 16:09 ` [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x Michael S. Tsirkin
@ 2014-08-14 18:57 ` Eduardo Habkost
2014-08-14 19:22 ` Michael S. Tsirkin
0 siblings, 1 reply; 17+ messages in thread
From: Eduardo Habkost @ 2014-08-14 18:57 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, Hu Tao, qemu-stable, qemu-devel, Anthony Liguori,
Igor Mammedov, Paolo Bonzini
On Thu, Aug 14, 2014 at 06:09:03PM +0200, Michael S. Tsirkin wrote:
> From: Hu Tao <hutao@cn.fujitsu.com>
>
> The error messages before and after patch are:
>
> before:
> qemu-system-x86_64: total memory for NUMA nodes (134217728) should equal RAM size (20000000)
>
> after:
> qemu-system-x86_64: total memory for NUMA nodes (0x8000000) should equal RAM size (0x20000000)
Why hex? Why not change both to decimal?
--
Eduardo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x
2014-08-14 18:57 ` Eduardo Habkost
@ 2014-08-14 19:22 ` Michael S. Tsirkin
0 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 19:22 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Peter Maydell, Hu Tao, qemu-stable, qemu-devel, Anthony Liguori,
Igor Mammedov, Paolo Bonzini
On Thu, Aug 14, 2014 at 03:57:53PM -0300, Eduardo Habkost wrote:
> On Thu, Aug 14, 2014 at 06:09:03PM +0200, Michael S. Tsirkin wrote:
> > From: Hu Tao <hutao@cn.fujitsu.com>
> >
> > The error messages before and after patch are:
> >
> > before:
> > qemu-system-x86_64: total memory for NUMA nodes (134217728) should equal RAM size (20000000)
> >
> > after:
> > qemu-system-x86_64: total memory for NUMA nodes (0x8000000) should equal RAM size (0x20000000)
>
> Why hex? Why not change both to decimal?
Reasonable number is usually very large and a power of 2,
hex is easier to read.
> --
> Eduardo
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 08/12] acpi: align RSDP
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (6 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 09/12] ivshmem: fix building when debug mode is enabled Michael S. Tsirkin
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Laszlo Ersek, qemu-stable, Anthony Liguori
RSDP should be aligned at a 16-byte boundary.
This would by chance at the moment, fix up acpi build
to make it robust.
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
hw/i386/acpi-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 816c6d9..10b84d0 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1393,7 +1393,7 @@ build_rsdp(GArray *rsdp_table, GArray *linker, unsigned rsdt)
{
AcpiRsdpDescriptor *rsdp = acpi_data_push(rsdp_table, sizeof *rsdp);
- bios_linker_loader_alloc(linker, ACPI_BUILD_RSDP_FILE, 1,
+ bios_linker_loader_alloc(linker, ACPI_BUILD_RSDP_FILE, 16,
true /* fseg memory */);
memcpy(&rsdp->signature, "RSD PTR ", 8);
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 09/12] ivshmem: fix building when debug mode is enabled
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (7 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 08/12] acpi: align RSDP Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 10/12] e1000: correctly handle phy_ctrl reserved & self-clearing bits Michael S. Tsirkin
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Levente Kurusa, Marcel Apfelbaum, Luiz Capitulino,
Anthony Liguori, Cole Robinson, Paolo Bonzini
From: Levente Kurusa <lkurusa@redhat.com>
ivsmem_offset was removed, however this debug statement was not updated.
Modify the statement to fit the new mechanic.
Signed-off-by: Levente Kurusa <lkurusa@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/misc/ivshmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 768e528..7133002 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -479,8 +479,8 @@ static void ivshmem_read(void *opaque, const uint8_t * buf, int flags)
"ivshmem.bar2", s->ivshmem_size, map_ptr);
vmstate_register_ram(&s->ivshmem, DEVICE(s));
- IVSHMEM_DPRINTF("guest h/w addr = %" PRIu64 ", size = %" PRIu64 "\n",
- s->ivshmem_offset, s->ivshmem_size);
+ IVSHMEM_DPRINTF("guest h/w addr = %p, size = %" PRIu64 "\n",
+ map_ptr, s->ivshmem_size);
memory_region_add_subregion(&s->bar, 0, &s->ivshmem);
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 10/12] e1000: correctly handle phy_ctrl reserved & self-clearing bits
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (8 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 09/12] ivshmem: fix building when debug mode is enabled Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers Michael S. Tsirkin
` (2 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Anthony Liguori, Gabriel Somlo, Gabriel L. Somlo,
Stefan Hajnoczi, Amos Kong
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
Make phyreg_writeops responsible for actually writing their
respective phy registers, rather than rely on set_mdic() to
do it on their behalf.
The only current instance of phyreg_writeops is set_phy_ctrl();
modify it to write the register on its own, while also correctly
handling reserved and self-clearing bits.
have_autoneg() does not need to check for MII_CR_RESTART_AUTO_NEG,
since the only time the flag comes into play is during set_phy_ctrl(),
and, following this patch, never actually gets written to the phy
control register.
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/net/e1000.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 0fc29a0..04c0f91 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -186,21 +186,31 @@ e1000_link_up(E1000State *s)
s->phy_reg[PHY_STATUS] |= MII_SR_LINK_STATUS;
}
+static bool
+have_autoneg(E1000State *s)
+{
+ return (s->compat_flags & E1000_FLAG_AUTONEG) &&
+ (s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN);
+}
+
static void
set_phy_ctrl(E1000State *s, int index, uint16_t val)
{
+ /* bits 0-5 reserved; MII_CR_[RESTART_AUTO_NEG,RESET] are self clearing */
+ s->phy_reg[PHY_CTRL] = val & ~(0x3f |
+ MII_CR_RESET |
+ MII_CR_RESTART_AUTO_NEG);
+
/*
* QEMU 1.3 does not support link auto-negotiation emulation, so if we
* migrate during auto negotiation, after migration the link will be
* down.
*/
- if (!(s->compat_flags & E1000_FLAG_AUTONEG)) {
- return;
- }
- if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {
+ if (have_autoneg(s) && (val & MII_CR_RESTART_AUTO_NEG)) {
e1000_link_down(s);
DBGOUT(PHY, "Start link auto negotiation\n");
- timer_mod(s->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
+ timer_mod(s->autoneg_timer,
+ qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
}
}
@@ -446,8 +456,9 @@ set_mdic(E1000State *s, int index, uint32_t val)
} else {
if (addr < NPHYWRITEOPS && phyreg_writeops[addr]) {
phyreg_writeops[addr](s, index, data);
+ } else {
+ s->phy_reg[addr] = data;
}
- s->phy_reg[addr] = data;
}
}
s->mac_reg[MDIC] = val | E1000_MDIC_READY;
@@ -848,14 +859,6 @@ receive_filter(E1000State *s, const uint8_t *buf, int size)
return 0;
}
-static bool
-have_autoneg(E1000State *s)
-{
- return (s->compat_flags & E1000_FLAG_AUTONEG) &&
- (s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN) &&
- (s->phy_reg[PHY_CTRL] & MII_CR_RESTART_AUTO_NEG);
-}
-
static void
e1000_set_link_status(NetClientState *nc)
{
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (9 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 10/12] e1000: correctly handle phy_ctrl reserved & self-clearing bits Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-14 16:09 ` [Qemu-devel] [PULL 12/12] pc: Get rid of pci-info leftovers Michael S. Tsirkin
2014-08-15 17:43 ` [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Peter Maydell
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Anthony Liguori, Gabriel Somlo, Gabriel L. Somlo,
Stefan Hajnoczi, Amos Kong
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/net/e1000.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 04c0f91..a2c4608 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -233,13 +233,30 @@ static const char phy_regcap[0x20] = {
/* PHY_ID2 documented in 8254x_GBe_SDM.pdf, pp. 250 */
static const uint16_t phy_reg_init[] = {
- [PHY_CTRL] = 0x1140,
- [PHY_STATUS] = 0x794d, /* link initially up with not completed autoneg */
- [PHY_ID1] = 0x141, /* [PHY_ID2] configured per DevId, from e1000_reset() */
- [PHY_1000T_CTRL] = 0x0e00, [M88E1000_PHY_SPEC_CTRL] = 0x360,
- [M88E1000_EXT_PHY_SPEC_CTRL] = 0x0d60, [PHY_AUTONEG_ADV] = 0xde1,
- [PHY_LP_ABILITY] = 0x1e0, [PHY_1000T_STATUS] = 0x3c00,
+ [PHY_CTRL] = MII_CR_SPEED_SELECT_MSB |
+ MII_CR_FULL_DUPLEX |
+ MII_CR_AUTO_NEG_EN,
+
+ [PHY_STATUS] = MII_SR_EXTENDED_CAPS |
+ MII_SR_LINK_STATUS | /* link initially up */
+ MII_SR_AUTONEG_CAPS |
+ /* MII_SR_AUTONEG_COMPLETE: initially NOT completed */
+ MII_SR_PREAMBLE_SUPPRESS |
+ MII_SR_EXTENDED_STATUS |
+ MII_SR_10T_HD_CAPS |
+ MII_SR_10T_FD_CAPS |
+ MII_SR_100X_HD_CAPS |
+ MII_SR_100X_FD_CAPS,
+
+ [PHY_ID1] = 0x141,
+ /* [PHY_ID2] configured per DevId, from e1000_reset() */
+ [PHY_AUTONEG_ADV] = 0xde1,
+ [PHY_LP_ABILITY] = 0x1e0,
+ [PHY_1000T_CTRL] = 0x0e00,
+ [PHY_1000T_STATUS] = 0x3c00,
+ [M88E1000_PHY_SPEC_CTRL] = 0x360,
[M88E1000_PHY_SPEC_STATUS] = 0xac00,
+ [M88E1000_EXT_PHY_SPEC_CTRL] = 0x0d60,
};
static const uint32_t mac_reg_init[] = {
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Qemu-devel] [PULL 12/12] pc: Get rid of pci-info leftovers
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (10 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers Michael S. Tsirkin
@ 2014-08-14 16:09 ` Michael S. Tsirkin
2014-08-15 17:43 ` [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Peter Maydell
12 siblings, 0 replies; 17+ messages in thread
From: Michael S. Tsirkin @ 2014-08-14 16:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Markus Armbruster, Anthony Liguori
From: Markus Armbruster <armbru@redhat.com>
pc_fw_cfg_guest_info() never does anything, because has_pci_info is
always false.
Introduced in commit f8c457b "pc: pass PCI hole ranges to Guests",
disabled in commit 9604f70 "pc: disable pci-info for 1.6", and hasn't
been enabled since. Obviously a dead end. Get of it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/i386/pc.h | 1 -
hw/i386/pc.c | 30 ------------------------------
hw/i386/pc_piix.c | 4 ----
hw/i386/pc_q35.c | 3 ---
4 files changed, 38 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 895b415..0fca9e3 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -85,7 +85,6 @@ typedef struct PcPciInfo {
#define ACPI_PM_PROP_GPE0_BLK_LEN "gpe0_blk_len"
struct PcGuestInfo {
- bool has_pci_info;
bool isapc_ram_fw;
hwaddr ram_size, ram_size_below_4g;
unsigned apic_id_limit;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 9e58982..8fa8d2f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1066,35 +1066,6 @@ typedef struct PcRomPciInfo {
uint64_t w64_max;
} PcRomPciInfo;
-static void pc_fw_cfg_guest_info(PcGuestInfo *guest_info)
-{
- PcRomPciInfo *info;
- Object *pci_info;
- bool ambiguous = false;
-
- if (!guest_info->has_pci_info || !guest_info->fw_cfg) {
- return;
- }
- pci_info = object_resolve_path_type("", TYPE_PCI_HOST_BRIDGE, &ambiguous);
- g_assert(!ambiguous);
- if (!pci_info) {
- return;
- }
-
- info = g_malloc(sizeof *info);
- info->w32_min = cpu_to_le64(object_property_get_int(pci_info,
- PCI_HOST_PROP_PCI_HOLE_START, NULL));
- info->w32_max = cpu_to_le64(object_property_get_int(pci_info,
- PCI_HOST_PROP_PCI_HOLE_END, NULL));
- info->w64_min = cpu_to_le64(object_property_get_int(pci_info,
- PCI_HOST_PROP_PCI_HOLE64_START, NULL));
- info->w64_max = cpu_to_le64(object_property_get_int(pci_info,
- PCI_HOST_PROP_PCI_HOLE64_END, NULL));
- /* Pass PCI hole info to guest via a side channel.
- * Required so guest PCI enumeration does the right thing. */
- fw_cfg_add_file(guest_info->fw_cfg, "etc/pci-info", info, sizeof *info);
-}
-
typedef struct PcGuestInfoState {
PcGuestInfo info;
Notifier machine_done;
@@ -1106,7 +1077,6 @@ void pc_guest_info_machine_done(Notifier *notifier, void *data)
PcGuestInfoState *guest_info_state = container_of(notifier,
PcGuestInfoState,
machine_done);
- pc_fw_cfg_guest_info(&guest_info_state->info);
acpi_setup(&guest_info_state->info);
}
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 2b3a3ce..47ac1b5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -59,7 +59,6 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
-static bool has_pci_info;
static bool has_acpi_build = true;
static int legacy_acpi_table_size;
static bool smbios_defaults = true;
@@ -166,7 +165,6 @@ static void pc_init1(MachineState *machine,
guest_info->has_acpi_build = has_acpi_build;
guest_info->legacy_acpi_table_size = legacy_acpi_table_size;
- guest_info->has_pci_info = has_pci_info;
guest_info->isapc_ram_fw = !pci_enabled;
guest_info->has_reserved_memory = has_reserved_memory;
@@ -340,7 +338,6 @@ static void pc_compat_1_7(MachineState *machine)
static void pc_compat_1_6(MachineState *machine)
{
pc_compat_1_7(machine);
- has_pci_info = false;
rom_file_has_mr = false;
has_acpi_build = false;
}
@@ -422,7 +419,6 @@ static void pc_init_pci_no_kvmclock(MachineState *machine)
static void pc_init_isa(MachineState *machine)
{
- has_pci_info = false;
has_acpi_build = false;
smbios_defaults = false;
gigabyte_align = false;
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index fcc3ad7..43350d7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -49,7 +49,6 @@
/* ICH9 AHCI has 6 ports */
#define MAX_SATA_PORTS 6
-static bool has_pci_info;
static bool has_acpi_build = true;
static bool smbios_defaults = true;
static bool smbios_legacy_mode;
@@ -150,7 +149,6 @@ static void pc_q35_init(MachineState *machine)
}
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
- guest_info->has_pci_info = has_pci_info;
guest_info->isapc_ram_fw = false;
guest_info->has_acpi_build = has_acpi_build;
guest_info->has_reserved_memory = has_reserved_memory;
@@ -296,7 +294,6 @@ static void pc_compat_1_7(MachineState *machine)
static void pc_compat_1_6(MachineState *machine)
{
pc_compat_1_7(machine);
- has_pci_info = false;
rom_file_has_mr = false;
has_acpi_build = false;
}
--
MST
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] post-2.1 bugfixes
2014-08-14 16:08 [Qemu-devel] [PULL 00/12] post-2.1 bugfixes Michael S. Tsirkin
` (11 preceding siblings ...)
2014-08-14 16:09 ` [Qemu-devel] [PULL 12/12] pc: Get rid of pci-info leftovers Michael S. Tsirkin
@ 2014-08-15 17:43 ` Peter Maydell
12 siblings, 0 replies; 17+ messages in thread
From: Peter Maydell @ 2014-08-15 17:43 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: QEMU Developers, Anthony Liguori
On 14 August 2014 17:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> The following changes since commit 2d591ce2aeebf9620ff527c7946844a3122afeec:
>
> Merge remote-tracking branch 'remotes/mdroth/qga-pull-2014-08-08' into staging (2014-08-08 14:16:05 +0100)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>
> for you to fetch changes up to 260cb1c409f6b41fc284ece95462e458d7fda6c4:
>
> pc: Get rid of pci-info leftovers (2014-08-14 13:22:25 +0200)
>
> ----------------------------------------------------------------
> post-2.1 bugfixes
>
> A bunch of fixes that missed 2.1 by a small margin.
> If we do 2.1.1, some of these would be good candidates,
> added Cc qemu-stable as appropriate.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread