All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Joao Martins <joao.m.martins@oracle.com>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xen.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: [PATCH RFC 2/3] x86/xen/time: setup vcpu 0 time info page
Date: Mon, 4 Jan 2016 11:07:53 -0500	[thread overview]
Message-ID: <568A98D9.9090501@oracle.com> (raw)
In-Reply-To: <1451339557-24473-3-git-send-email-joao.m.martins@oracle.com>

On 12/28/2015 04:52 PM, Joao Martins wrote:
> +
> +static int xen_setup_vsyscall_time_info(int cpu)
> +{
> +	struct pvclock_vsyscall_time_info *ti;
> +	struct vcpu_register_time_memory_area t;
> +	struct pvclock_vcpu_time_info *pvti;
> +	unsigned long mem;
> +	int ret, size;
> +	u8 flags;
> +
> +	ret = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_time_memory_area,
> +				 cpu, NULL);
> +	if (ret == -ENOSYS) {
> +		pr_debug("xen: vcpu_time_info placement not supported\n");
> +		return -ENOTSUPP;
> +	}

I don't think this is necessary.

> +
> +	size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info));
> +	mem = memblock_alloc(size, PAGE_SIZE);
> +	if (!mem)
> +		return -ENOMEM;
> +
> +	ti = __va(mem);
> +	memset(ti, 0, size);

Can you just use get_zeroed_page()? (struct pvclock_vsyscall_time_info 
is always less than a page, isn't it?).


-boris


  reply	other threads:[~2016-01-04 16:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 21:52 [PATCH RFC 0/3] x86/xen: pvclock vdso support Joao Martins
2015-12-28 21:52 ` [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va Joao Martins
2015-12-28 21:52 ` Joao Martins
2015-12-28 23:45   ` Andy Lutomirski
2015-12-28 23:45   ` Andy Lutomirski
2015-12-29 12:50     ` Joao Martins
2015-12-29 12:50     ` Joao Martins
2015-12-29 13:03       ` Andy Lutomirski
2015-12-29 13:03       ` Andy Lutomirski
2015-12-28 21:52 ` [PATCH RFC 2/3] x86/xen/time: setup vcpu 0 time info page Joao Martins
2016-01-04 16:07   ` Boris Ostrovsky [this message]
2016-01-04 20:41     ` Joao Martins
2016-01-04 21:34       ` Boris Ostrovsky
2016-01-04 21:34       ` Boris Ostrovsky
2016-01-05 12:20         ` Joao Martins
2016-01-05 12:20         ` Joao Martins
2016-01-04 20:41     ` Joao Martins
2016-01-04 16:07   ` Boris Ostrovsky
2015-12-28 21:52 ` Joao Martins
2015-12-28 21:52 ` [PATCH RFC 3/3] xen/Kconfig: add XEN_TIME_VSYSCALL option Joao Martins
2015-12-28 21:52 ` Joao Martins
2016-01-04 16:12   ` [Xen-devel] " David Vrabel
2016-01-04 16:15     ` Boris Ostrovsky
2016-01-04 20:41       ` Joao Martins
2016-01-04 20:41       ` Joao Martins
2016-01-04 16:15     ` Boris Ostrovsky
2016-01-04 16:12   ` David Vrabel

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=568A98D9.9090501@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=hpa@zytor.com \
    --cc=joao.m.martins@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --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.