From: Wei Liu <wei.liu2@citrix.com>
To: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Julien Grall <julien.grall@arm.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/5 v2] libxl: Change the type of console_mfn to xen_pfn_t
Date: Mon, 30 Oct 2017 10:33:47 +0000 [thread overview]
Message-ID: <20171030103347.qpbn74ltu6ajbyte@citrix.com> (raw)
In-Reply-To: <CACtJ1JRd+4MQEbpnupEbwYg5GxOW-PP-gUkEKAuvpzwJL_w7Lg@mail.gmail.com>
On Mon, Oct 30, 2017 at 02:42:57PM +0530, Bhupinder Thakur wrote:
> Hi,
>
> On 26 October 2017 at 16:47, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > On 26/10/17 12:13, Wei Liu wrote:
> >> On Wed, Oct 25, 2017 at 02:57:05PM +0530, Bhupinder Thakur wrote:
> >>> 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 <bhupinder.thakur@linaro.org>
> >>> ---
> >>> CC: Ian Jackson <ian.jackson@eu.citrix.com>
> >>> CC: Wei Liu <wei.liu2@citrix.com>
> >>> CC: Stefano Stabellini <sstabellini@kernel.org>
> >>> CC: Julien Grall <julien.grall@arm.com>
> >>>
> >>> 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));
> >> Actually, please consider changing console_mfn to console_pfn.
> >
> > If you are going to make this change, then it is a gfn, not a pfn.
> > (console_pfn would be as equally wrong for PV guests as console_mfn is
> > currently wrong for HVM guest.)
>
> Changing console_mfn to console_gfn will require changes in many
> files. Should I go ahead and change all the files?
>
$ cd libxl && git grep \\bconsole_mfn | wc -l
14
Not too bad, so please go ahead.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-10-30 10:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 9:27 [PATCH 1/5 v2] libxl: Fix the bug introduced in commit "libxl: use correct type modifier for vuart_gfn" Bhupinder Thakur
2017-10-25 9:27 ` [PATCH 2/5 v2] libxl: Change the type of console_mfn to xen_pfn_t Bhupinder Thakur
2017-10-26 11:05 ` Wei Liu
2017-10-26 11:13 ` Wei Liu
2017-10-26 11:17 ` Andrew Cooper
2017-10-30 9:12 ` Bhupinder Thakur
2017-10-30 10:33 ` Wei Liu [this message]
2017-10-25 9:27 ` [PATCH 3/5 v2] libxc: Fix the data type of mfn parameter passed to xc_map_foreign_range() Bhupinder Thakur
2017-10-26 11:19 ` Wei Liu
2017-10-25 9:27 ` [PATCH 4/5 v2] xenconsole: Change the type of ring_ref to xen_pfn_t in console_create_ring Bhupinder Thakur
2017-10-26 11:24 ` Wei Liu
2017-10-25 9:27 ` [PATCH 5/5 v2] xenconsole: Define and use a macro XEN_INVALID_PFN instead of -1 Bhupinder Thakur
2017-10-26 11:26 ` Wei Liu
2017-10-27 7:04 ` Bhupinder Thakur
2017-10-27 7:07 ` Bhupinder Thakur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171030103347.qpbn74ltu6ajbyte@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=bhupinder.thakur@linaro.org \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.