mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: "Jérémy Fanguède" <j.fanguede@virtualopensystems.com>,
	"Christoffer Dall" <christoffer.dall@linaro.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org
Cc: tech@virtualopensystems.com, Alvise Rigo <a.rigo@virtualopensystems.com>
Subject: Re: [PATCH] KVM: arm64: Enable the EL1 physical timer for AArch32 guests
Date: Thu, 8 Feb 2018 12:08:10 +0000	[thread overview]
Message-ID: <51fa6f87-4d4d-0c14-9fb0-6ce0d2808ce3@arm.com> (raw)
In-Reply-To: <1518091039-17356-1-git-send-email-j.fanguede@virtualopensystems.com>

On 08/02/18 11:57, Jérémy Fanguède wrote:
> Some 32bits guest OS can use the CNTP timer, however KVM does not
> handle the accesses, injecting a fault instead.
> 
> Use the proper handlers to emulate the EL1 Physical Timer (CNTP)
> register accesses of AArch32 guests.
> 
> Signed-off-by: Jérémy Fanguède <j.fanguede@virtualopensystems.com>
> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
> ---
>  arch/arm64/kvm/sys_regs.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index 50a43c7..c0ab4f7 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -1545,6 +1545,11 @@ static const struct sys_reg_desc cp15_regs[] = {
>  
>  	{ Op1( 0), CRn(13), CRm( 0), Op2( 1), access_vm_reg, NULL, c13_CID },
>  
> +	/* CNTP_TVAL */
> +	{ Op1( 0), CRn(14), CRm( 2), Op2( 0), access_cntp_tval },
> +	/* CNTP_CTL */
> +	{ Op1( 0), CRn(14), CRm( 2), Op2( 1), access_cntp_ctl },
> +
>  	/* PMEVCNTRn */
>  	PMU_PMEVCNTR(0),
>  	PMU_PMEVCNTR(1),
> @@ -1618,6 +1623,7 @@ static const struct sys_reg_desc cp15_64_regs[] = {
>  	{ Op1( 0), CRn( 0), CRm( 9), Op2( 0), access_pmu_evcntr },
>  	{ Op1( 0), CRn( 0), CRm(12), Op2( 0), access_gic_sgi },
>  	{ Op1( 1), CRn( 0), CRm( 2), Op2( 0), access_vm_reg, NULL, c2_TTBR1 },
> +	{ Op1( 2), CRn( 0), CRm(14), Op2( 0), access_cntp_cval },
>  };
>  
>  /* Target specific emulation tables */
> 

Seems OK to me. Can you please update the corresponding 32bit code while
you're at it?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

      reply	other threads:[~2018-02-08 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 11:57 Jérémy Fanguède
2018-02-08 12:08 ` Marc Zyngier [this message]

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=51fa6f87-4d4d-0c14-9fb0-6ce0d2808ce3@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=j.fanguede@virtualopensystems.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tech@virtualopensystems.com \
    --cc=will.deacon@arm.com \
    /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

all inboxes | Powered by JetHome®