From dd78f65bc675cce0ad477d176bb05b7fb925a005 Mon Sep 17 00:00:00 2001 From: Tony Nguyen Date: Tue, 7 Jan 2020 18:19:26 -0500 Subject: [PATCH] memory: Introduce size_memop Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Backports commit 66b9b24375ac215cdcbdf9e14d665395360abff4 from qemu --- qemu/include/exec/memop.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qemu/include/exec/memop.h b/qemu/include/exec/memop.h index 7262ca3d..dfd76a16 100644 --- a/qemu/include/exec/memop.h +++ b/qemu/include/exec/memop.h @@ -107,4 +107,14 @@ typedef enum MemOp { MO_SSIZE = MO_SIZE | MO_SIGN, } MemOp; +/* Size in bytes to MemOp. */ +static inline unsigned size_memop(unsigned size) +{ + /* + * FIXME: No-op to aid conversion of memory_region_dispatch_{read|write} + * "unsigned size" operand into a "MemOp op". + */ + return size; +} + #endif