From patchwork Wed Oct 25 09:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 117038 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp628245qgn; Wed, 25 Oct 2017 02:29:24 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Rl5k1nZl5QHAzlknLyu56j+DtcI34WAfoUaexWokQShzBVquYu7o9H9if8BPpGe/GX/sFp X-Received: by 10.107.27.7 with SMTP id b7mr13483204iob.136.1508923764764; Wed, 25 Oct 2017 02:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508923764; cv=none; d=google.com; s=arc-20160816; b=BhhjGuhv85WiLsraNuldAl3IwKA2ryiivjP+V7n+FbTjoDGX+d13clj91sitziGG11 UZB53lhbevhzqbpNKQvUupyF5R2Bpr+81rpjirLsSGDelrfmqRLKl4wdLUF4amKvzAOv uumM+gCYbUsrlHlVRfOb/Z5PnGQtrP3ancZhy0FF4WsurViZteV++kgnWvuqr42OnIRq 4qICUAOlydaTNcIp4q1u0XlkDjZAMvSoC8b0kGxGExhnwmfLLXYII34hvEcEZ5/1Ebz6 eCtOVKhy63r341FPYfJxl6KZWNzQXzLjlZaMBZvM81wD7mFdF2NETaEUJ51qWfbRBx9Y ZWsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=HvyvD/oZenYRuFJWpIrEaLLBuGlQiPtybpgSH5rK/84=; b=yw6EuRG1WLzJVKza/IMuOGyVmNUEehoU6m3iyV6j1KyxPyumNpAwWQGdQnn27V81p1 mXrbsNAvxUhWZDhFCRUtijYXgGUatHQrsHH9PYu4U77AEruyZtIIEbKrFSzvfYd6czQD I4xqBFCuKmGvcMPFUhsaEAwRnci5YxaErTW0Xx9nPHK/H0GIBFS5QSqnUDxcB3Fj0fK8 Nk6zK2gqSgdaPQopog+b3y5HxqqvH1L08vROG5yqmIu/s7y02HL6yeKqhUDigMHffjOu W8evDP7JQ1bkmiho+iC33d4NbWAs3VsP4WaVHc5zskoxPo8Ie4m/AY3Ilez3VPDuYPfk FC9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U4rrQw99; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id k198si1723864itk.47.2017.10.25.02.29.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 02:29:24 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U4rrQw99; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Hy5-0003eb-JJ; Wed, 25 Oct 2017 09:27:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Hy4-0003eV-Sa for xen-devel@lists.xenproject.org; Wed, 25 Oct 2017 09:27:20 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 7C/FB-11148-8F850F95; Wed, 25 Oct 2017 09:27:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDIsWRWlGSWpSXmKPExsXiVRvsrPs94kO kwbVFqhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bLxqksBV+EK97+2snUwPiBv4uRi0NIYCaj xMo3a1hAHBaBecwSf++vZOxi5OSQEOhnldj6U6+LkQPIzpOYs9IIIpwm0XPnHSuEXSnxZPImN hBbSEBL4uip2awQdguTxOatgSCtbAImErM6JEDCIgJKEvdWTWYCWcUsMJ9RomlSL1ivsICXxJ wP58DWsgioSsx/towFxOYV8JaYc/wp1C45iZvnOplBbE4BH4lPN0EGgezylrjybQHjBEbBBYw Mqxg1ilOLylKLdA3N9JKKMtMzSnITM3N0DQ1M9XJTi4sT01NzEpOK9ZLzczcxAsONAQh2ME59 H3eIUZKDSUmUN9zjQ6QQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd6n4UA5waLU9NSKtMwcYODDp CU4eJREeF+BpHmLCxJzizPTIVKnGO05jm26/IeJY9+eW0Cy4+ZdIPls5usGZiGWvPy8VClx3v 0gbQIgbRmleXBDYZF6iVFWSpiXEehMIZ6C1KLczBJU+VeM4hyMSsK8v0Gm8GTmlcDtfgV0FhP QWU2qYGeVJCKkpBoYnbb/M+eMmFZ6NasqePKNK5MMl1YKzVJROLLyYvR+SekSkfYu9/vK+0W3 TWAWVri17nz9urdyM1gMeeUnll5Yer35LUtw4XWtybxXNrk+Wzn1i82JoN+vXqmfnShiLCXHx 185V/zVebVfpxfLiZx1Z9t7aVfin+kzjsd9+n+5Pl7baoru36olb5RYijMSDbWYi4oTAQ/UgU LPAgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-13.tower-206.messagelabs.com!1508923638!93065632!1 X-Originating-IP: [74.125.83.67] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33376 invoked from network); 25 Oct 2017 09:27:19 -0000 Received: from mail-pg0-f67.google.com (HELO mail-pg0-f67.google.com) (74.125.83.67) by server-13.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 25 Oct 2017 09:27:19 -0000 Received: by mail-pg0-f67.google.com with SMTP id a192so16833754pge.9 for ; Wed, 25 Oct 2017 02:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vmXW/yEVPRL28MxJoHo7m81XwfWAj+rhLKzNFO1BwlQ=; b=U4rrQw99KRh8Er8nzIs64U50wmbiGoCxtlrCwlyXFB4RTAcqidvglsfFe8RDtpjhyD vxJlzBQVF8JUbURdtBBDSPfDsKBQ7ZVQZCDdsYfjuLXOLV39OS+WJRZmbKhbjd8j90BD eY/eMAwj8cadlLeI6zRr1miK83YTdbKUdcnS4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vmXW/yEVPRL28MxJoHo7m81XwfWAj+rhLKzNFO1BwlQ=; b=QOvEZZo54afnUeabTe2H7x4bUAnRyB4Ww72scgdjVHzcGJSgpWb5CVLpqCBZdqEnrz /GlDOT34dgfoN/WBlwEWUJTaYI9j4mZW02iaHXUuhUBEOGFxUQycXRLL53Aee1xlCMgC fi24aoAo/HGs96V+xmaYnZNQbb8RqNjrZ2HUjEi7BYXZv1Fm9yN2R1ivfXkTY8YexomL Sb4/Y4JhDyCr9qQU8dGya+hmpYEsMRdF9MnU6hvwRMqZUoNmEG3HibpFnI7joFQJfSAl e8m337efUBusNjI/RnRkvI4OGKokLpTTFZ+Ri9O5G+KjqUX6+iB7JTRAjmy1vlh+d7Sm GTKw== X-Gm-Message-State: AMCzsaXXSM9Tk0s80fbnFnUaSstVrCj4vDilo/Yna78YWSc8oH3oz484 bPpc8v9Bip7qL7Nt4KTf5VgDrNlybxU= X-Received: by 10.98.200.85 with SMTP id z82mr1574073pff.313.1508923637870; Wed, 25 Oct 2017 02:27:17 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id m17sm4022861pfh.28.2017.10.25.02.27.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Oct 2017 02:27:17 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Wed, 25 Oct 2017 14:57:05 +0530 Message-Id: <1508923628-26446-2-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508923628-26446-1-git-send-email-bhupinder.thakur@linaro.org> References: <1508923628-26446-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 2/5 v2] libxl: Change the type of console_mfn to xen_pfn_t X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Currently the type of console mfn is unsigned long in libxl. This may be an issue for 32-bit toolstack running on 64-bit Xen, where the pfn are 64 bit. To ensure that console_mfn can hold any valid 64-bit pfn, the type of console_mfn is changed to xen_pfn_t. Signed-off-by: Bhupinder Thakur Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall This patch is as per the review of commit fa1f157 libxl: Fix the bug introduced in commit "libxl: use correct type tools/libxl/libxl_console.c | 2 +- tools/libxl/libxl_dom.c | 2 +- tools/libxl/libxl_internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c index 6bfc0e5..f2ca689 100644 --- a/tools/libxl/libxl_console.c +++ b/tools/libxl/libxl_console.c @@ -329,7 +329,7 @@ int libxl__device_console_add(libxl__gc *gc, uint32_t domid, flexarray_append(ro_front, "port"); flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->console_port)); flexarray_append(ro_front, "ring-ref"); - flexarray_append(ro_front, GCSPRINTF("%lu", state->console_mfn)); + flexarray_append(ro_front, GCSPRINTF("%"PRIu_xen_pfn, state->console_mfn)); } else { flexarray_append(front, "state"); flexarray_append(front, GCSPRINTF("%d", XenbusStateInitialising)); diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index ef834e6..a58e74f 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -869,7 +869,7 @@ out: static int hvm_build_set_params(xc_interface *handle, uint32_t domid, libxl_domain_build_info *info, int store_evtchn, unsigned long *store_mfn, - int console_evtchn, unsigned long *console_mfn, + int console_evtchn, xen_pfn_t *console_mfn, domid_t store_domid, domid_t console_domid) { struct hvm_info_table *va_hvm; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 45e6df6..f52aeb3 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1128,7 +1128,7 @@ typedef struct { uint32_t console_port; uint32_t console_domid; - unsigned long console_mfn; + xen_pfn_t console_mfn; char *console_tty; char *saved_state;