提交 9ed5dacb 编写于 作者: A Anthony Liguori

Merge remote-tracking branch 'sstabellini/xen-2013-12-01' into staging

# By Paul Durrant (1) and Wei Liu (1)
# Via Stefano Stabellini
* sstabellini/xen-2013-12-01:
  xen-pvdevice: make device-id property compulsory
  xen: fix two errors when debug is enabled

Message-id: alpine.DEB.2.02.1312011829000.3198@kaball.uk.xensource.com
Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
...@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, ...@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
if (args.rc) { if (args.rc) {
XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
", len: %#"FMT_PCIBUS") is overlapped.\n", ", len: %#"FMT_PCIBUS") is overlapped.\n",
bar, sec->offset_within_address_space, sec->size); bar, sec->offset_within_address_space,
int128_get64(sec->size));
} }
if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) { if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
......
...@@ -74,6 +74,10 @@ static int xen_pv_init(PCIDevice *pci_dev) ...@@ -74,6 +74,10 @@ static int xen_pv_init(PCIDevice *pci_dev)
XenPVDevice *d = XEN_PV_DEVICE(pci_dev); XenPVDevice *d = XEN_PV_DEVICE(pci_dev);
uint8_t *pci_conf; uint8_t *pci_conf;
/* device-id property must always be supplied */
if (d->device_id == 0xffff)
return -1;
pci_conf = pci_dev->config; pci_conf = pci_dev->config;
pci_set_word(pci_conf + PCI_VENDOR_ID, d->vendor_id); pci_set_word(pci_conf + PCI_VENDOR_ID, d->vendor_id);
...@@ -99,7 +103,7 @@ static int xen_pv_init(PCIDevice *pci_dev) ...@@ -99,7 +103,7 @@ static int xen_pv_init(PCIDevice *pci_dev)
static Property xen_pv_props[] = { static Property xen_pv_props[] = {
DEFINE_PROP_UINT16("vendor-id", XenPVDevice, vendor_id, PCI_VENDOR_ID_XEN), DEFINE_PROP_UINT16("vendor-id", XenPVDevice, vendor_id, PCI_VENDOR_ID_XEN),
DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, PCI_DEVICE_ID_XEN_PVDEVICE), DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, 0xffff),
DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01), DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01),
DEFINE_PROP_UINT32("size", XenPVDevice, size, 0x400000), DEFINE_PROP_UINT32("size", XenPVDevice, size, 0x400000),
DEFINE_PROP_END_OF_LIST() DEFINE_PROP_END_OF_LIST()
......
...@@ -146,7 +146,6 @@ ...@@ -146,7 +146,6 @@
#define PCI_VENDOR_ID_XEN 0x5853 #define PCI_VENDOR_ID_XEN 0x5853
#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001 #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
#define PCI_DEVICE_ID_XEN_PVDEVICE 0x0002
#define PCI_VENDOR_ID_NEC 0x1033 #define PCI_VENDOR_ID_NEC 0x1033
#define PCI_DEVICE_ID_NEC_UPD720200 0x0194 #define PCI_DEVICE_ID_NEC_UPD720200 0x0194
......
...@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state, ...@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
phys_offset = physmap->phys_offset; phys_offset = physmap->phys_offset;
size = physmap->size; size = physmap->size;
DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ", DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
"%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr); "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
size >>= TARGET_PAGE_BITS; size >>= TARGET_PAGE_BITS;
start_addr >>= TARGET_PAGE_BITS; start_addr >>= TARGET_PAGE_BITS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册