qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/8] target-ppc: ppc64 target's virtio can be either


From: Rusty Russell
Subject: [Qemu-devel] [PATCH 2/8] target-ppc: ppc64 target's virtio can be either endian.
Date: Mon, 12 Aug 2013 17:29:22 +0930

We base it on the OS endian, as reflected by the endianness of the
interrupt vectors.

Suggested-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Rusty Russell <address@hidden>
---
 target-ppc/misc_helper.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c
index 616aab6..6c97c81 100644
--- a/target-ppc/misc_helper.c
+++ b/target-ppc/misc_helper.c
@@ -20,6 +20,7 @@
 #include "helper.h"
 
 #include "helper_regs.h"
+#include "hw/virtio/virtio.h"
 
 /*****************************************************************************/
 /* SPR accesses */
@@ -116,3 +117,11 @@ void ppc_store_msr(CPUPPCState *env, target_ulong value)
 {
     hreg_store_msr(env, value, 0);
 }
+
+bool virtio_get_byteswap(void)
+{
+    PowerPCCPU *cp = POWERPC_CPU(first_cpu);
+    CPUPPCState *env = &cp->env;
+
+    return env->spr[SPR_LPCR] & LPCR_ILE;
+}
-- 
1.8.1.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]