From nobody Mon May 6 14:46:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510060833037890.7085769264608; Tue, 7 Nov 2017 05:20:33 -0800 (PST) Received: from localhost ([::1]:53394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC3nc-0003dS-PX for importer@patchew.org; Tue, 07 Nov 2017 08:20:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC3md-0003Fq-TX for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:19:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC3md-0008O6-1I for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:19:15 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eC3mc-0008Ll-PJ for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:19:14 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA7DIm1i110472 for ; Tue, 7 Nov 2017 08:19:08 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e3b239ed5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 08:19:08 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 13:19:05 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 13:19:02 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA7DJ3lA38600814; Tue, 7 Nov 2017 13:19:03 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2476B42047; Tue, 7 Nov 2017 13:14:08 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 580834203F; Tue, 7 Nov 2017 13:14:06 +0000 (GMT) Received: from oc1548405160.in.ibm.com (unknown [9.79.219.75]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 7 Nov 2017 13:14:06 +0000 (GMT) From: Seeteena Thoufeek To: david@gibson.dropbear.id.au, agraf@suse.de, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Date: Tue, 7 Nov 2017 18:48:58 +0530 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 17110713-0040-0000-0000-0000040B7DE7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110713-0041-0000-0000-000020AE18BB Message-Id: <1510060738-25975-1-git-send-email-s1seetee@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-07_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711070183 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v1] spapr_pci: fix the path while fetching loc-code from host DT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: s1seetee@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The function spapr_phb_vfio_get_loc_code uses wrong path for fetching loc-code from host DT this is the call that needs to be fixed: /* Construct and read from host device tree the loc-code */ path =3D g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf); Signed-off-by: Seeteena Thoufeek --- hw/ppc/spapr_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 5a3122a..ae86322 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -762,7 +762,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState = *sphb, PCIDevice *pdev) g_free(path); =20 /* Construct and read from host device tree the loc-code */ - path =3D g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf); + path =3D g_strdup_printf("/proc/device-tree/%s/ibm,loc-code", buf); g_free(buf); if (!g_file_get_contents(path, &buf, NULL, NULL)) { goto err_out; --=20 1.8.3.1