All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Pavlo Suikov <pavlo.suikov@globallogic.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: xentrace, arm, hvm
Date: Mon, 03 Feb 2014 20:32:53 +0000	[thread overview]
Message-ID: <52EFFCF5.5070108@linaro.org> (raw)
In-Reply-To: <CAE4oM6wXAZxDjyNesDprUVYgwCcxH75qvYUiFY1hm4JMqU0ekw@mail.gmail.com>

On 02/03/2014 05:32 PM, Pavlo Suikov wrote:
> Hi,

Hello,

> has anyone used xentrace on arm with HVM domains? As far as I observe,
> it fails to map trace buffers from Xen restricted heap:

> xc_map_foreign_batch() call with DOMID_XEN permissions leads to
> xenmem_add_to_physmap_one() and then to rcu_lock_domain_by_any_id(),
> which fails to find DOMID_XEN in the domain hash (and it doesn't seem at
> all that dummy domains are added to this hash). Actually I don't see how
> this could work at all since there are no obvious checks for either arch
> or domain type (PV or HVM) along the way.

After a quick look to Xen, it seems that xentrace was only working for
x86 PV (the issue will be the same on PVH). It was working because PV
domain uses mmu_update hypercall. In this function, x86 has a specific
case for DOMID_XEN (see get_pg_owner).

To support xentrace on ARM, we will need at least:
  - to replace rcu_lock_domain_by_any_id() by a a similar function
  - to add stubs for trace in arm code

BTW, when I tried xentrace I have this following error in kernel log
messages:
Failed to map pfn to mfn rc:0:-3 pfn:1e9d0 mfn:fdfbe
xen_privcmd: unable to unmap MFN range: leaking 1 pages. rc=-2

Is it normal that Linux is trying to unmap a page that has failed to map
ealier?

Sincerely yours,

-- 
Julien Grall

  reply	other threads:[~2014-02-03 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 17:32 xentrace, arm, hvm Pavlo Suikov
2014-02-03 20:32 ` Julien Grall [this message]
2014-02-04 12:39   ` Pavlo Suikov
2014-02-04 13:31     ` Julien Grall
2014-02-04 13:57       ` Ian Campbell
2014-02-08 15:51         ` Pavlo Suikov
2014-02-08 16:53           ` Julien Grall
2014-02-08 21:04           ` Julien Grall

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=52EFFCF5.5070108@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=pavlo.suikov@globallogic.com \
    --cc=stefano.stabellini@eu.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.