qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org,
	Adam Lackorzynski <adam.lackorzynski@kernkonzept.com>
Subject: [Qemu-devel] [PATCH for-v3.1 0/3] Fix handling of HCR.VI and VF
Date: Fri,  9 Nov 2018 13:47:28 +0000	[thread overview]
Message-ID: <20181109134731.11605-1-peter.maydell@linaro.org> (raw)

This patchset reverts commit 8a0fc3a29fc2315325400, which tried
to implement HCR.VI and VF, and then reimplements it correctly.

The implementation of HCR.VI and VF in that commit is not
correct -- they do not track the overall "is there a pending
VIRQ or VFIQ" status, but whether there is a pending interrupt
due to "this mechanism", ie the hypervisor having set the VI/VF
bits. The overall pending state for VIRQ and VFIQ is effectively
the logical OR of the inbound lines from the GIC with the
VI and VF bits. Commit 8a0fc3a29fc231 would result in pending
VIRQ/VFIQ possibly being lost when the hypervisor wrote to HCR.

Patch 1 reverts the broken implementation.
Patch 2 adds tracking of the state of the input lines from the
GIC (most of the complexity here is from having to handle
inbound migration from older QEMU versions).
Patch 3 implements HCR.{VI,VF} correctly.

I plan to put the revert into rc1 at least, because it
fixes a regression.

thanks
-- PMM

Peter Maydell (3):
  Revert "target/arm: Implement HCR.VI and VF"
  target/arm: Track the state of our irq lines from the GIC explicitly
  target/arm: Correctly implement handling of HCR_EL2.{VI,VF}

 target/arm/cpu.h       |  3 ++
 target/arm/internals.h | 18 ++++++++++++
 target/arm/cpu.c       | 64 +++++++++++++++++++++++++++++++++++++++++-
 target/arm/helper.c    | 57 +++++++++++--------------------------
 target/arm/machine.c   | 51 +++++++++++++++++++++++++++++++++
 5 files changed, 152 insertions(+), 41 deletions(-)

-- 
2.19.1

             reply	other threads:[~2018-11-09 13:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 13:47 Peter Maydell [this message]
2018-11-09 13:47 ` [Qemu-devel] [PATCH for-v3.1 1/3] Revert "target/arm: Implement HCR.VI and VF" Peter Maydell
2018-11-12  0:15   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-11-12 11:54   ` Alex Bennée
2018-11-09 13:47 ` [Qemu-devel] [PATCH for-v3.1 2/3] target/arm: Track the state of our irq lines from the GIC explicitly Peter Maydell
2018-11-11 23:45   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-11-12 11:58   ` Alex Bennée
2018-11-09 13:47 ` [Qemu-devel] [PATCH for-v3.1 3/3] target/arm: Correctly implement handling of HCR_EL2.{VI, VF} Peter Maydell
2018-11-12  0:14   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé

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=20181109134731.11605-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=adam.lackorzynski@kernkonzept.com \
    --cc=patches@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).