From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHAkj-0004ej-4c for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:37:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHAkg-0001Si-Gg for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:37:21 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:41729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHAkg-0001S6-7D for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:37:18 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jan 2016 13:37:17 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id D5863219005E for ; Thu, 7 Jan 2016 13:37:04 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u07DbFDL55836696 for ; Thu, 7 Jan 2016 13:37:15 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u07DbEOD026712 for ; Thu, 7 Jan 2016 06:37:15 -0700 From: Cornelia Huck Date: Thu, 7 Jan 2016 14:36:58 +0100 Message-Id: <1452173818-13661-10-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1452173818-13661-1-git-send-email-cornelia.huck@de.ibm.com> References: <1452173818-13661-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH v2 9/9] s390x/pci: return real state during listing PCI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Yi Min Zhao , agraf@suse.de 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.6.4