summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-pci-inst.c
diff options
context:
space:
mode:
authorYi Min Zhao2015-12-16 10:36:31 +0100
committerCornelia Huck2016-01-13 10:53:42 +0100
commit88bfa2166ac0b14483a2a2c667499bf3617aebf0 (patch)
tree05d97e4765873ca0af73c54b5db96cf84931bb67 /hw/s390x/s390-pci-inst.c
parentvirtio-ccw: fix sanity check for vector (diff)
downloadqemu-88bfa2166ac0b14483a2a2c667499bf3617aebf0.tar.gz
qemu-88bfa2166ac0b14483a2a2c667499bf3617aebf0.tar.xz
qemu-88bfa2166ac0b14483a2a2c667499bf3617aebf0.zip
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/s390-pci-inst.c')
-rw-r--r--hw/s390x/s390-pci-inst.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index d521b2b389..1a6a3e781d 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);