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

Re: [Xen-devel] [RFC 09/16] xen/arm: arm64: Add helpers to decode and encode branch instructions



Hi Stefano,

On 09/05/16 14:04, Julien Grall wrote:
On 09/05/16 11:05, Stefano Stabellini wrote:
On Thu, 5 May 2016, Julien Grall wrote:
+u32 aarch64_insn_encode_immediate(enum aarch64_insn_imm_type type,
+                  u32 insn, u64 imm)
+{
+    u32 immlo, immhi, mask;
+    int shift;

Here Linux checks for insn == AARCH64_BREAK_FAULT. Shouldn't we do the
same?

I am not sure why I removed this check. I will re-add on the next version.

Actually the patch was based on Linux 4.6-rc3 (see in commit message) which does not contain the check. It has been added in 4.6-rc4.

I will re-sync the code with Linux 4.6.


diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h
new file mode 100644
index 0000000..fe9419c
--- /dev/null
+++ b/xen/include/asm-arm/insn.h
@@ -0,0 +1,22 @@
+#ifndef __ARCH_ARM_INSN
+#define __ARCH_ARM_INSN
+
+#include <xen/types.h>
+
+#if defined(CONFIG_ARM_32)
+# include <asm/arm32/insn.h>

This is missing

I will drop the include as I don't plan to implement instruction
patching for ARM32.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.