QEMU-Devel 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: [RFC PATCH 3/5] target/ppc: Allow virtual hypervisor on CPU without HV
Date: Sun, 06 Jun 2021 17:46:35 +0200	[thread overview]
Message-ID: <72781d9157bf771bbf1c777f77ba95ae6d214094.1622994395.git.balaton@eik.bme.hu> (raw)
In-Reply-To: <cover.1622994395.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-06 16:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 15:46 [RFC PATCH 0/5] ppc/Pegasos2 VOF BALATON Zoltan
2021-06-06 15:46 ` BALATON Zoltan [this message]
2021-06-06 15:46 ` [RFC PATCH 5/5] ppc/pegasos2: Implement some RTAS functions with VOF BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 1/5] Misc VOF fixes BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 4/5] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement BALATON Zoltan
2021-06-15  7:09   ` Alexey Kardashevskiy
2021-06-15  9:44     ` BALATON Zoltan
2021-06-16  4:58       ` Alexey Kardashevskiy
2021-06-16 10:38         ` BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure BALATON Zoltan
2021-06-06 19:04   ` Philippe Mathieu-Daudé
2021-06-06 20:35     ` BALATON Zoltan
2021-06-09  7:39 ` [RFC PATCH 0/5] ppc/Pegasos2 VOF Alexey Kardashevskiy
2021-06-09 10:28   ` BALATON Zoltan
2021-06-10  7:14     ` Alexey Kardashevskiy
2021-06-10  8:25       ` David Gibson
2021-06-10 10:04         ` BALATON Zoltan
2021-06-10 10:37           ` David Gibson
2021-06-10 12:33           ` R: " luigi burdo
2021-06-10 12:52             ` BALATON Zoltan

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=72781d9157bf771bbf1c777f77ba95ae6d214094.1622994395.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 read-only IMAP folder(s) and NNTP newsgroup(s).