diff options
author | Yi Min Zhao <zyimin@linux.vnet.ibm.com> | 2015-12-16 17:36:31 +0800 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:28:24 -0600 |
commit | ec8d3620b126c7e3ef93d2bca22ae8bbad541814 (patch) | |
tree | 6bb6a73e0af1c4a8ca885fa8ac7fa6169d66dfb2 /hw/s390x | |
parent | 3727c249373b355c47229879f0b7bf7b233404f1 (diff) | |
download | hqemu-ec8d3620b126c7e3ef93d2bca22ae8bbad541814.zip hqemu-ec8d3620b126c7e3ef93d2bca22ae8bbad541814.tar.gz |
s390x/pci: return real state during listing PCI
At present, list_pci() shows all PCI devices as being in configured
state. As devices can be deconfigured by the guest, we need to show
the real configuration status instead.
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r-- | hw/s390x/s390-pci-inst.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index d521b2b..1a6a3e7 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -105,7 +105,8 @@ static int list_pci(ClpReqRspListPci *rrb, uint8_t *cc) pci_get_word(pbdev->pdev->config + PCI_DEVICE_ID)); stw_p(&rrb->response.fh_list[idx - resume_token].vendor_id, pci_get_word(pbdev->pdev->config + PCI_VENDOR_ID)); - stl_p(&rrb->response.fh_list[idx - resume_token].config, 0x80000000); + stl_p(&rrb->response.fh_list[idx - resume_token].config, + pbdev->configured << 31); stl_p(&rrb->response.fh_list[idx - resume_token].fid, pbdev->fid); stl_p(&rrb->response.fh_list[idx - resume_token].fh, pbdev->fh); |