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: 10026193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 418C460375 for ; Wed, 25 Oct 2017 09:29:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 254B1269B2 for ; Wed, 25 Oct 2017 09:29:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1869E280B0; Wed, 25 Oct 2017 09:29:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FD2F269B2 for ; Wed, 25 Oct 2017 09:29:43 +0000 (UTC) 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-Google-Smtp-Source: ABhQp+SPFXoszzOyZ94KoPBNDTedRN4/6VampC5QCwyDQ80gHfqsTFkT8uG553Ysq6o4C3i3UHLArw== 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" X-Virus-Scanned: ClamAV using ClamSMTP 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;