[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address |
Date: |
Thu, 14 Aug 2014 18:08:50 +0200 |
From: Jan Kiszka <address@hidden>
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 <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
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
- [Qemu-devel] [PULL 02/12] pc: Create 2.2 machine type, (continued)
- [Qemu-devel] [PULL 02/12] pc: Create 2.2 machine type, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 05/12] pc-dimm: validate node property, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 06/12] pc-dimm: fix up error message, Michael S. Tsirkin, 2014/08/14
- [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
- [Qemu-devel] [PULL 08/12] acpi: align RSDP, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 09/12] ivshmem: fix building when debug mode is enabled, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 10/12] e1000: correctly handle phy_ctrl reserved & self-clearing bits, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 12/12] pc: Get rid of pci-info leftovers, Michael S. Tsirkin, 2014/08/14
- Re: [Qemu-devel] [PULL 00/12] post-2.1 bugfixes, Peter Maydell, 2014/08/15