qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 2/4] target/ppc: Allow virtual hypervisor on CPU without HV
Date: Sun, 27 Jun 2021 18:27:13 +0200	[thread overview]
Message-ID: <21c7745aabbb68fcc50bb2ffaf16b939ba21261c.1624811233.git.balaton@eik.bme.hu> (raw)
In-Reply-To: <cover.1624811233.git.balaton@eik.bme.hu>

Change the assert in ppc_store_sdr1() to allow vhyp to be set on CPUs
without HV bit. This allows using the vhyp interface for firmware
emulation on pegasos2.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 target/ppc/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c
index 19d67b5b07..a29299882a 100644
--- a/target/ppc/cpu.c
+++ b/target/ppc/cpu.c
@@ -72,7 +72,7 @@ void ppc_store_sdr1(CPUPPCState *env, target_ulong value)
 {
     PowerPCCPU *cpu = env_archcpu(env);
     qemu_log_mask(CPU_LOG_MMU, "%s: " TARGET_FMT_lx "\n", __func__, value);
-    assert(!cpu->vhyp);
+    assert(!cpu->env.has_hv_mode || !cpu->vhyp);
 #if defined(TARGET_PPC64)
     if (mmu_is_64bit(env->mmu_model)) {
         target_ulong sdr_mask = SDR_64_HTABORG | SDR_64_HTABSIZE;
-- 
2.21.4



  reply	other threads:[~2021-06-27 16:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 16:27 [PATCH 0/4] ppc/Pegasos2: Firmware replacement using VOF BALATON Zoltan
2021-06-27 16:27 ` BALATON Zoltan [this message]
2021-07-08  2:48   ` [PATCH 2/4] target/ppc: Allow virtual hypervisor on CPU without HV David Gibson
2021-06-27 16:27 ` [PATCH 1/4] ppc/pegasos2: Introduce Pegasos2MachineState structure BALATON Zoltan
2021-07-08  2:47   ` David Gibson
2021-06-27 16:27 ` [PATCH 4/4] ppc/pegasos2: Implement some RTAS functions with VOF BALATON Zoltan
2021-07-08  4:37   ` David Gibson
2021-07-08 22:25     ` BALATON Zoltan
2021-06-27 16:27 ` [PATCH 3/4] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement BALATON Zoltan
2021-07-01 11:35 ` [PATCH 0/4] ppc/Pegasos2: Firmware replacement using VOF BALATON Zoltan
2021-07-05 19:17   ` Philippe Mathieu-Daudé
2021-07-08  4:37 ` David Gibson

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=21c7745aabbb68fcc50bb2ffaf16b939ba21261c.1624811233.git.balaton@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).