mirror of https://lore.kernel.org/lkml/
 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 16:34:11 -0500	[thread overview]
Message-ID: <568AE553.5030303@oracle.com> (raw)
In-Reply-To: <568AD8F3.2050600@oracle.com>

On 01/04/2016 03:41 PM, Joao Martins wrote:
>
> On 01/04/2016 04:07 PM, Boris Ostrovsky wrote:
>> On 12/28/2015 04:52 PM, Joao Martins wrote:
>>
>>> +
>>> +	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?).
> Yeah, I can use get_zeroed_page() (struct pvclock_vsyscall_time_info is always
> less than a page).
>
> Additionally perhaps this region shouldn't be freed if PVCLOCK_TSC_STABLE_BIT
> isn't supported, because otherwise I would end up corrupting data elsewhere
> since the pvti would still be periodically updated by Xen, right?

You could try setting it back to NULL. e.g.
     if (!HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_time_memory_area, cpu, 
NULL))
         free_page(..);

-boris

  reply	other threads:[~2016-01-04 21:34 UTC|newest]

Thread overview: 14+ 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 23:45   ` Andy Lutomirski
2015-12-29 12:50     ` Joao Martins
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
2016-01-04 20:41     ` Joao Martins
2016-01-04 21:34       ` Boris Ostrovsky [this message]
2016-01-05 12:20         ` Joao Martins
2015-12-28 21:52 ` [PATCH RFC 3/3] xen/Kconfig: add XEN_TIME_VSYSCALL option 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

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=568AE553.5030303@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome