This patch adds two changes to ioemu.
- Modify ioemu not to call xc_deassign_device()
- Remove power state transition of real device when ioemu initialise
PMCSR.
Thanks,
--
Yuji Shimada
Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
diff --git a/hw/pass-through.c b/hw/pass-through.c
index 710acbf..65e7634 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -2465,29 +2465,6 @@ static uint32_t pt_pmcsr_reg_init(struct pt_dev *ptdev,
ptdev->pm_state->no_soft_reset = (*(uint8_t *)(d->config + real_offset)
& (uint8_t)PCI_PM_CTRL_NO_SOFT_RESET);
- /* wake up real physical device */
- switch ( pci_read_word(ptdev->pci_dev, real_offset)
- & PCI_PM_CTRL_STATE_MASK )
- {
- case 0:
- break;
- case 1:
- PT_LOG("Power state transition D1 -> D0active\n");
- pci_write_word(ptdev->pci_dev, real_offset, 0);
- break;
- case 2:
- PT_LOG("Power state transition D2 -> D0active\n");
- pci_write_word(ptdev->pci_dev, real_offset, 0);
- usleep(200);
- break;
- case 3:
- PT_LOG("Power state transition D3hot -> D0active\n");
- pci_write_word(ptdev->pci_dev, real_offset, 0);
- usleep(10 * 1000);
- pt_init_pci_config(ptdev);
- break;
- }
-
return reg->init_val;
}
@@ -3963,13 +3940,6 @@ static int unregister_real_device(int slot)
/* unregister real device's MMIO/PIO BARs */
pt_unregister_regions(assigned_device);
- /* deassign the dev to dom0 */
- bdf |= (pci_dev->bus & 0xff) << 16;
- bdf |= (pci_dev->dev & 0x1f) << 11;
- bdf |= (pci_dev->func & 0x1f) << 8;
- if ( (rc = xc_deassign_device(xc_handle, domid, bdf)) != 0)
- PT_LOG("Error: Revoking the device failed! rc=%d\n", rc);
-
/* mark this slot as free */
php_dev->valid = 0;
php_dev->pt_dev = NULL;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|