mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw/virtio: fix Link Control Register for PCI Express virtio devices
Make several Link Control Register flags writable to conform with the PCI Express spec. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
c2cabb3422
commit
d584f1b9ca
5 changed files with 33 additions and 0 deletions
|
@ -223,6 +223,20 @@ void pcie_cap_deverr_reset(PCIDevice *dev)
|
|||
PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE);
|
||||
}
|
||||
|
||||
void pcie_cap_lnkctl_init(PCIDevice *dev)
|
||||
{
|
||||
uint32_t pos = dev->exp.exp_cap;
|
||||
pci_long_test_and_set_mask(dev->wmask + pos + PCI_EXP_LNKCTL,
|
||||
PCI_EXP_LNKCTL_CCC | PCI_EXP_LNKCTL_ES);
|
||||
}
|
||||
|
||||
void pcie_cap_lnkctl_reset(PCIDevice *dev)
|
||||
{
|
||||
uint8_t *lnkctl = dev->config + dev->exp.exp_cap + PCI_EXP_LNKCTL;
|
||||
pci_long_test_and_clear_mask(lnkctl,
|
||||
PCI_EXP_LNKCTL_CCC | PCI_EXP_LNKCTL_ES);
|
||||
}
|
||||
|
||||
static void hotplug_event_update_event_status(PCIDevice *dev)
|
||||
{
|
||||
uint32_t pos = dev->exp.exp_cap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue