All of lore.kernel.org
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: KVM: Fix HCR_EL2 and VTCR_EL2 configuration bits
Date: Thu, 09 May 2013 13:35:14 +0100	[thread overview]
Message-ID: <518B9802.1080505@arm.com> (raw)
In-Reply-To: <1368099611-4738-1-git-send-email-pranavkumar@linaro.org>

Hi Pranav,

On 09/05/13 12:40, Pranavkumar Sawargaonkar wrote:
> This patch does following fixes:
> 
> 1. Make HCR_* flags as unsigned long long constants
> Reason : By default, compiler assumes numeric constants as
> signed hence sign extending it when assigned to unsigned variable
> such as hcr_el2 (in VCPU context). This accidently sets HCR_ID and
> HCR_CD making entire guest memory non-cacheable. On real HW, this
> breaks Stage2 ttbl walks and also breaks VirtIO.

Ah. Nice one. I fixed a couple of similar bugs already, but didn't
notice that one yet, for obvious reasons...

I'll probably rewrite that patch to use the UL(x) macro instead of
_AC(), as we don't need to have an unsigned long long, and that makes
the code look much nicer (sort of).

> 2. VTCR_EL2_ORGN0_WBWA and VTCR_EL2_IRGN0_WBWA macros.

Blah. Copy paste. Fucks me all the time.

> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
> Signed-off-by: Anup Patel <anup.patel@linaro.org>
> ---
>  arch/arm64/include/asm/kvm_arm.h |   73 +++++++++++++++++++-------------------
>  1 file changed, 37 insertions(+), 36 deletions(-)

Thanks a lot,

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

  reply	other threads:[~2013-05-09 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 11:40 [PATCH] arm64: KVM: Fix HCR_EL2 and VTCR_EL2 configuration bits Pranavkumar Sawargaonkar
2013-05-09 12:35 ` Marc Zyngier [this message]
2013-05-09 15:51   ` Pranavkumar Sawargaonkar

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=518B9802.1080505@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.