Received: from eggs.gnu.org ([2001:4830:134:3::10]:52926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJMwD-0002Ro-NR for qemu-devel@nongnu.org; Wed, 13 Jan 2016 10:02:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJMvr-0006D4-4f for qemu-devel@nongnu.org; Wed, 13 Jan 2016 10:02:17 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:45218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJMvq-0006Cs-Q9 for qemu-devel@nongnu.org; Wed, 13 Jan 2016 10:01:55 -0500 Received: from localhost by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 13 Jan 2016 15:01:53 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1E93617D8062 for ; Wed, 13 Jan 2016 15:01:53 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0DF1oDr786716 for ; Wed, 13 Jan 2016 15:01:50 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0DF1oHc011835 for ; Wed, 13 Jan 2016 08:01:50 -0700 From: Cornelia Huck Date: Wed, 13 Jan 2016 16:01:44 +0100 Message-Id: <1452697304-29695-10-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1452697304-29695-1-git-send-email-cornelia.huck@de.ibm.com> References: <1452697304-29695-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL 9/9] s390x/pci: return real state during listing PCI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Yi Min Zhao , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Cornelia Huck From: Yi Min Zhao 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 Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-inst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.7.0