All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH v4 09/15] xen: arm: Handle CP15 register traps from userspace
Date: Fri, 27 Mar 2015 16:39:13 +0000	[thread overview]
Message-ID: <551587B1.3060505@linaro.org> (raw)
In-Reply-To: <1427466824-31967-9-git-send-email-ian.campbell@citrix.com>

Hi Ian,

On 27/03/15 14:33, Ian Campbell wrote:
> Previously userspace access to PM* would have been incorrectly (but
> benignly) implemented as RAZ/WI when running on a 32-bit kernel and
> would cause a hypervisor exception (host crash) when running a 64-bit
> kernel (this was already solved via the fix to XSA-102).
> 
> PMINTENSET, PMINTENCLR are EL1 only, but it is not clear whether
> attempts to access from EL0 will trap to EL1 or EL2, be conservative
> and handle EL0 access with an undef injection.
> 
> ACTLR is EL1 only and the ARM ARM states that HCR_EL2.TACR causes
> accesses from EL1 to trap. However remain conservative even here and
> handle accesses from EL0 by injecting an undef injection.
> 
> PMUSERENR is R/O at EL0 and we implement as RAZ/WI at EL1 as before.
> 
> The remaining PM* registers are accessible to EL0 only if
> PMUSERENR_EL0.EN is set, since we emulate this as RAZ/WI the bit is
> never set so we inject a trap on attempted access. We weren't
> previously handling PMCCNTR.
> 
> HSR_EC_CP15_32 should never be seen from a 64-bit guest, so BUG_ON if
> that occurs.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-03-27 16:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 14:33 [PATCH v4 0/15] xen: arm: reenable support for 32-bit userspace running in 64-bit guest Ian Campbell
2015-03-27 14:33 ` [PATCH v4 01/15] xen: arm: Correct PMXEV cp register definitions Ian Campbell
2015-03-27 14:33 ` [PATCH v4 02/15] xen: arm: Factor out psr_mode_is_user Ian Campbell
2015-03-27 14:33 ` [PATCH v4 03/15] xen: arm: correctly handle vtimer traps from userspace Ian Campbell
2015-03-27 15:57   ` Julien Grall
2015-03-27 14:33 ` [PATCH v4 04/15] xen: arm: handle accesses to CNTP_CVAL_EL0 Ian Campbell
2015-03-27 15:58   ` Julien Grall
2015-03-27 14:33 ` [PATCH v4 05/15] xen: arm: Use ARMv8 names for CNTHCTL_EL2 bits Ian Campbell
2015-03-27 14:33 ` [PATCH v4 06/15] xen: arm: Handle 32-bit EL0 on 64-bit EL1 when advancing PC after trap Ian Campbell
2015-03-27 14:33 ` [PATCH v4 07/15] xen: arm: do not handle traps accessing CLIDR_EL1 or CCSIDR_EL1 Ian Campbell
2015-03-27 16:09   ` Julien Grall
2015-03-27 14:33 ` [PATCH v4 08/15] xen: arm: don't pretend to handle cache maintenance by set/way Ian Campbell
2015-03-27 16:36   ` Julien Grall
2015-03-27 17:05     ` Ian Campbell
2015-03-30 12:17       ` Julien Grall
2015-03-30 13:30         ` Ian Campbell
2015-03-30 13:45           ` Processed: " xen
2015-03-27 14:33 ` [PATCH v4 09/15] xen: arm: Handle CP15 register traps from userspace Ian Campbell
2015-03-27 16:39   ` Julien Grall [this message]
2015-03-27 14:33 ` [PATCH v4 10/15] xen: arm: Handle CP14 32-bit register accesses " Ian Campbell
2015-03-27 14:33 ` [PATCH v4 11/15] xen: arm: correctly handle sysreg " Ian Campbell
2015-03-27 16:40   ` Julien Grall
2015-03-27 14:33 ` [PATCH v4 12/15] xen: arm: handle remaining traps " Ian Campbell
2015-03-27 14:33 ` [PATCH v4 13/15] xen: arm: Dump guest state when invalid trap state is detected Ian Campbell
2015-03-27 14:33 ` [PATCH v4 14/15] xen: arm: Allow traps from 32 bit userspace on 64 bit hypervisors again Ian Campbell
2015-03-27 14:33 ` [PATCH v4 15/15] xen: arm: always omit guest user stack in vcpu_show_execution_state Ian Campbell
2015-03-27 16:42   ` 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=551587B1.3060505@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.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.