From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tim@xen.org, wei.liu2@citrix.com,
stefano.stabellini@eu.citrix.com,
Andrew Cooper <andrew.cooper3@citrix.com>,
julien.grall@linaro.org, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, stefano.stabellini@citrix.com,
keir@xen.org, Tamas K Lengyel <tklengyel@sec.in.tum.de>
Subject: Re: [PATCH V15 5/9] xen: Make gpfn related memops compatible with wider return values
Date: Tue, 21 Apr 2015 15:24:53 +0100 [thread overview]
Message-ID: <1429626293.4743.115.camel@citrix.com> (raw)
In-Reply-To: <5536777B0200007800074579@mail.emea.novell.com>
On Tue, 2015-04-21 at 15:14 +0100, Jan Beulich wrote:
> >>> On 21.04.15 at 15:23, <ian.campbell@citrix.com> wrote:
> > On Mon, 2015-04-20 at 16:22 +0100, Andrew Cooper wrote:
> >> On 20/04/15 16:06, Tamas K Lengyel wrote:
> >> > The current implementation of three memops, XENMEM_current_reservation,
> >> > XENMEM_maximum_reservation and XENMEM_maximum_gpfn return values as an
> >> > int. However, in ARM64 we could potentially have 36-bit pfn's, thus
> >> > in preparation for the ARM patch, in this patch we update the existing
> >> > memop routines to use a struct, xen_get_gpfn, to exchange the gpfn info
> >> > as a uin64_t.
> >> >
> >> > This patch also adds error checking on the toolside in case the memop
> >> > fails.
> >> >
> >> > Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
> >>
> >> XENMEM, unlikely domctls/sysctls is a guest-visible stable ABI/API.
> >>
> >> You cannot make adjustments like this, but you can add a brand new op
> >> with appropriate parameters and list the old ops as deprecated.
> >
> > Right. For the benefit of callers using the old API it seems what we
> > usually do is rename the old op XENMEM_foo_compat and use the name with
> > a new number for the new functionality, then use a
> > __XEN_INTERFACE_VERSION__ to #define back to the old name.
> >
> > The handling of __HYPERVISOR_sched_op in public/xen.h seems like a
> > reasonable example, I couldn't find one specifically for the memory ops.
>
> And there's no need to afaict: This complication isn't needed in the
> first place. The patch's context already makes this clear:
>
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -838,12 +838,16 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
>
> Note the "long" return type. Yet the patch description, for
> whatever reason, claims the hypercall to only return an "int".
> Maybe because (as pointed out before) the respective Linux
> hypercall stub wrongly an "int" return type?
Isn't this still an issue for 32-bit toolstack (long == 4 bytes) on a 64
bit host (maximum pfn more than 2^32)?
next prev parent reply other threads:[~2015-04-21 14:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 15:06 [PATCH V15 0/9] Mem_access for ARM Tamas K Lengyel
2015-04-20 15:06 ` [PATCH V15 1/9] xen/arm: groundwork for mem_access support on ARM Tamas K Lengyel
2015-04-20 15:06 ` [PATCH V15 2/9] xen/arm: Allow hypervisor access to mem_access protected pages Tamas K Lengyel
2015-04-21 13:14 ` Ian Campbell
2015-04-21 14:10 ` Tamas K Lengyel
2015-04-21 14:22 ` Ian Campbell
2015-04-20 15:06 ` [PATCH V15 3/9] xen/arm: Data abort exception (R/W) mem_access events Tamas K Lengyel
2015-04-21 13:16 ` Ian Campbell
2015-04-20 15:06 ` [PATCH V15 4/9] xen/arm: Instruction prefetch abort (X) mem_access event handling Tamas K Lengyel
2015-04-21 13:19 ` Ian Campbell
2015-04-20 15:06 ` [PATCH V15 5/9] xen: Make gpfn related memops compatible with wider return values Tamas K Lengyel
2015-04-20 15:22 ` Andrew Cooper
2015-04-20 15:25 ` Tamas K Lengyel
2015-04-21 13:23 ` Ian Campbell
2015-04-21 14:14 ` Jan Beulich
2015-04-21 14:24 ` Ian Campbell [this message]
2015-04-21 14:29 ` Jan Beulich
2015-04-21 14:42 ` Tamas K Lengyel
2015-04-21 15:13 ` Jan Beulich
2015-04-21 15:21 ` Tamas K Lengyel
2015-04-25 16:54 ` Julien Grall
2015-04-27 7:02 ` Jan Beulich
2015-04-27 10:18 ` Julien Grall
2015-04-21 14:47 ` Ian Campbell
2015-04-21 14:33 ` Tamas K Lengyel
2015-04-21 14:41 ` Jan Beulich
2015-04-20 15:06 ` [PATCH V15 6/9] xen/arm: Implement domain_get_maximum_gpfn Tamas K Lengyel
2015-04-21 13:24 ` Ian Campbell
2015-04-20 15:06 ` [PATCH V15 7/9] tools/libxc: Allocate magic page for mem access on ARM Tamas K Lengyel
2015-04-20 15:06 ` [PATCH V15 8/9] tools/tests: Enable xen-access " Tamas K Lengyel
2015-04-21 13:28 ` Ian Campbell
2015-04-21 14:13 ` Tamas K Lengyel
2015-04-20 15:06 ` [PATCH V15 9/9] xen/arm: Enable mem_access " Tamas K Lengyel
2015-04-22 13:29 ` [PATCH V15 0/9] Mem_access for ARM Ian Campbell
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=1429626293.4743.115.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@linaro.org \
--cc=keir@xen.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=tklengyel@sec.in.tum.de \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.