[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
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., (continued)
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Benjamin Herrenschmidt, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Peter Maydell, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Benjamin Herrenschmidt, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Peter Maydell, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Benjamin Herrenschmidt, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Peter Maydell, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Anthony Liguori, 2013/08/12
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Rusty Russell, 2013/08/13
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Benjamin Herrenschmidt, 2013/08/13
- Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio., Rusty Russell, 2013/08/13
[Qemu-devel] [PATCH 2/8] target-ppc: ppc64 target's virtio can be either endian.,
Rusty Russell <=
[Qemu-devel] [PATCH 3/8] virtio: allow byte swapping for vring and config access, Rusty Russell, 2013/08/12