From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a5d:4850:0:0:0:0:0 with SMTP id n16csp1932625wrs; Sun, 18 Aug 2019 14:44:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVv9LFFVkE+lwaaz9wz7jpJu4TI7hNOyVx0+Op1ALUFWGu9ZGcgAzsi7jr/pygpw4yZDBD X-Received: by 2002:a50:86bb:: with SMTP id r56mr21817735eda.217.1566164694865; Sun, 18 Aug 2019 14:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566164694; cv=none; d=google.com; s=arc-20160816; b=I4CgV9maEs0LPUT+ZL0JhAyQ0kosAbm8VtV20BE+TjQNXUafXGdRH/8nLjzZpllus4 BlPps6dYcjhQLXdZlQFwz+nXnxuna/quzqe2XjZKM/MBqNTCnxE8TLrmbtRCnka00cvo Pil8wC+TJkIPpTmOLcN7HOw7UvyjVNWgj5Q4Ay7P+aGCR4KHeJCeRbZBICC5k6NAcbax Pq7E68QxYVSIOZtowYURe3DUdmQrPXudx9T7aBysgaFRYtEYk181UhkR/+nh8WwS94Wp QO7L5SvpcUdyQsG+bxxQN5+WvqtWfM0zpcyq7d85PWq1DRC87Qc5h79vto1sVMdRYvpk xF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:openpgp:from:references:to; bh=1L5WpEZ7bZ0amyUDFMRC9OgGOx++Aizaen6GPvdVI8w=; b=qobYBmKefpM44K62OwW27x/zvplhSsItepYswlZwpImk1E3ebWp7tEdTGsjGMrncKK RydCWufKTGf/iY5xDKumCuczzB9C5VD3nMrr9gHv2LbCj1z2l4M8BEqhGr5/ysieZAFI lZD8Uv5EtwtaJKz2FHL8ENp094x79y8Ngdc5oIjmrHNC31/v6/XZMmfpa3k74rUxxpfS zeUeXZwjP8WV1OcrphPzX2aa/pr6plKd1zsVyBWpZLUlBDglR4Q40Ym7oqAbpdyO/K51 DQYSrMAd7cZXi6yOaoiNG7ZtkJJ27oixjV2PzHJC/OWY8v/TlbOstekrT0P5eI1PqmEb GSrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k40si7528436edb.14.2019.08.18.14.44.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Aug 2019 14:44:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:43086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzSyr-0004HZ-RM for alex.bennee@linaro.org; Sun, 18 Aug 2019 17:44:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40754) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzSyX-0004Gb-QV for qemu-arm@nongnu.org; Sun, 18 Aug 2019 17:44:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzSyW-0008Fl-AR for qemu-arm@nongnu.org; Sun, 18 Aug 2019 17:44:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45096) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hzSyW-0008Ep-3L for qemu-arm@nongnu.org; Sun, 18 Aug 2019 17:44:32 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C2C919CF92 for ; Sun, 18 Aug 2019 21:44:31 +0000 (UTC) Received: by mail-wr1-f70.google.com with SMTP id h8so4200327wrb.11 for ; Sun, 18 Aug 2019 14:44:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=h2xzjSFZNTWlCffgvGmqesSJuEHPH52iwk5nP49KPQY=; b=NFB7y/iHY2c7DuFQvmg5DSVSPibLOT4iI+qoeGrQGGeI4kBUcuuRIWuuR5YciTeGef o3sr3Czuf6UVnTdWIt6pPZo0ODsl+ov+jjDhostp8PbJtZ7judHkzBxNi4B8kHr5PeYO glJSL3J7XQexmHbtLficvo36O2qeg7pO2njYuXPzfYVzAtbvirLGvJ/IguqBeZTTpied TXFxF13PyeADnPA5TUI7fbgNAyrd6Mmr8eQGD9VZiqm218BcMt7z+1lqFCrblAnkt6R5 dGCp4a1+Yn7omY9lggsPZZ54TRZEFIYkFICmxDO8QmUmKUY4kZq68poTFNkCmxZQjTkw udEw== X-Gm-Message-State: APjAAAXL+Ac9dq5d5n00xqmX/aGIwZe4F5Lrygm74gPkeqkV17GQPQF/ WmUCDwtvKkG7AT3Ohr3a0Uyr4nebu4hnC0aIt9VtWrwer4O0+5fYuerZjpyzGKCPOKH/dun0FX9 5ZxYAcXQxnvpb X-Received: by 2002:adf:edc9:: with SMTP id v9mr22550666wro.125.1566164669524; Sun, 18 Aug 2019 14:44:29 -0700 (PDT) X-Received: by 2002:adf:edc9:: with SMTP id v9mr22550609wro.125.1566164669299; Sun, 18 Aug 2019 14:44:29 -0700 (PDT) Received: from [192.168.1.39] (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id f18sm13122174wrx.85.2019.08.18.14.44.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Aug 2019 14:44:28 -0700 (PDT) To: tony.nguyen@bt.com, qemu-devel@nongnu.org References: <43bc5e07ac614d0e8e740bf6007ff77b@tpw09926dag18e.domain1.systemhost.net> <1565940633026.69822@bt.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <3872a5ec-ccf1-2978-34b5-b0b5478d2b86@redhat.com> Date: Sun, 18 Aug 2019 23:44:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <1565940633026.69822@bt.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v7 11/42] memory: Access MemoryRegion with MemOp X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: frederic.konrad@adacore.com, berto@igalia.com, qemu-block@nongnu.org, arikalo@wavecomp.com, pasic@linux.ibm.com, hpoussin@reactos.org, anthony.perard@citrix.com, xen-devel@lists.xenproject.org, balrogg@gmail.com, jasowang@redhat.com, jiri@resnulli.us, ehabkost@redhat.com, b.galvani@gmail.com, eric.auger@redhat.com, alex.williamson@redhat.com, stefanha@redhat.com, jsnow@redhat.com, rth@twiddle.net, kwolf@redhat.com, andrew@aj.id.au, claudio.fontana@suse.com, crwulff@gmail.com, laurent@vivier.eu, sundeep.lkml@gmail.com, michael@walle.cc, qemu-ppc@nongnu.org, kbastian@mail.uni-paderborn.de, imammedo@redhat.com, fam@euphon.net, peter.maydell@linaro.org, david@redhat.com, palmer@sifive.com, balaton@eik.bme.hu, keith.busch@intel.com, jcmvbkbc@gmail.com, hare@suse.com, sstabellini@kernel.org, andrew.smirnov@gmail.com, deller@gmx.de, magnus.damm@gmail.com, marcel.apfelbaum@gmail.com, atar4qemu@gmail.com, minyard@acm.org, sw@weilnetz.de, yuval.shaia@oracle.com, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, jan.kiszka@web.de, clg@kaod.org, shorne@gmail.com, qemu-riscv@nongnu.org, i.mitsyanko@gmail.com, cohuck@redhat.com, amarkovic@wavecomp.com, peter.chubb@nicta.com.au, aurelien@aurel32.net, pburton@wavecomp.com, sagark@eecs.berkeley.edu, green@moxielogic.com, kraxel@redhat.com, gxt@mprc.pku.edu.cn, robh@kernel.org, borntraeger@de.ibm.com, joel@jms.id.au, antonynpavlov@gmail.com, chouteau@adacore.com, lersek@redhat.com, Andrew.Baumann@microsoft.com, mreitz@redhat.com, walling@linux.ibm.com, dmitry.fleytman@gmail.com, mst@redhat.com, mark.cave-ayland@ilande.co.uk, jslaby@suse.cz, marex@denx.de, proljc@gmail.com, marcandre.lureau@redhat.com, alistair@alistair23.me, paul.durrant@citrix.com, david@gibson.dropbear.id.au, xiaoguangrong.eric@gmail.com, huth@tuxfamily.org, jcd@tribudubois.net, pbonzini@redhat.com, stefanb@linux.ibm.com Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: z+sUdDsvfUht On 8/16/19 9:30 AM, tony.nguyen@bt.com wrote: > Convert memory_region_dispatch_{read|write} operand "unsigned size" > into a "MemOp op". >=20 > Signed-off-by: Tony Nguyen > Reviewed-by: Richard Henderson > --- > =C2=A0include/exec/memop.h =C2=A0| 20 ++++++++++++++------ > =C2=A0include/exec/memory.h | =C2=A09 +++++---- > =C2=A0memory.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0= 7 +++++-- > =C2=A03 files changed, 24 insertions(+), 12 deletions(-) >=20 > diff --git a/include/exec/memop.h b/include/exec/memop.h > index dfd76a1..0a610b7 100644 > --- a/include/exec/memop.h > +++ b/include/exec/memop.h > @@ -12,6 +12,8 @@ > =C2=A0#ifndef MEMOP_H > =C2=A0#define MEMOP_H > =C2=A0 > +#include "qemu/host-utils.h" > + > =C2=A0typedef enum MemOp { > =C2=A0 =C2=A0 =C2=A0MO_8 =C2=A0 =C2=A0 =3D 0, > =C2=A0 =C2=A0 =C2=A0MO_16 =C2=A0 =C2=A0=3D 1, > @@ -107,14 +109,20 @@ typedef enum MemOp { > =C2=A0 =C2=A0 =C2=A0MO_SSIZE =3D MO_SIZE | MO_SIGN, > =C2=A0} MemOp; > =C2=A0 > +/* MemOp to size in bytes. =C2=A0*/ > +static inline unsigned memop_size(MemOp op) > +{ > + =C2=A0 =C2=A0return 1 << (op & MO_SIZE); > +} > + > =C2=A0/* Size in bytes to MemOp. =C2=A0*/ > -static inline unsigned size_memop(unsigned size) > +static inline MemOp size_memop(unsigned size) > =C2=A0{ > - =C2=A0 =C2=A0/* > - =C2=A0 =C2=A0 * FIXME: No-op to aid conversion of > memory_region_dispatch_{read|write} > - =C2=A0 =C2=A0 * "unsigned size" operand into a "MemOp op". > - =C2=A0 =C2=A0 */ > - =C2=A0 =C2=A0return size; > +#ifdef CONFIG_DEBUG_TCG > + =C2=A0 =C2=A0/* Power of 2 up to 8. =C2=A0*/ > + =C2=A0 =C2=A0assert((size & (size - 1)) =3D=3D 0 && size >=3D 1 && si= ze <=3D 8); Easier to review as: assert(is_power_of_2(size) && size <=3D 8); (This can be cleaned later). > +#endif > + =C2=A0 =C2=A0return ctz32(size); > =C2=A0} > =C2=A0 > =C2=A0#endif > diff --git a/include/exec/memory.h b/include/exec/memory.h > index bb0961d..975b86a 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -19,6 +19,7 @@ > =C2=A0#include "exec/cpu-common.h" > =C2=A0#include "exec/hwaddr.h" > =C2=A0#include "exec/memattrs.h" > +#include "exec/memop.h" > =C2=A0#include "exec/ramlist.h" > =C2=A0#include "qemu/queue.h" > =C2=A0#include "qemu/int128.h" > @@ -1731,13 +1732,13 @@ void mtree_info(bool flatview, bool > dispatch_tree, bool owner); > =C2=A0 * @mr: #MemoryRegion to access > =C2=A0 * @addr: address within that region > =C2=A0 * @pval: pointer to uint64_t which the data is written to > - * @size: size of the access in bytes > + * @op: size, sign, and endianness of the memory operation > =C2=A0 * @attrs: memory transaction attributes to use for the access > =C2=A0 */ > =C2=A0MemTxResult memory_region_dispatch_read(MemoryRegion *mr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= hwaddr addr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= uint64_t *pval, > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uns= igned size, > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Mem= Op op, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= MemTxAttrs attrs); > =C2=A0/** > =C2=A0 * memory_region_dispatch_write: perform a write directly to the = specified > @@ -1746,13 +1747,13 @@ MemTxResult > memory_region_dispatch_read(MemoryRegion *mr, > =C2=A0 * @mr: #MemoryRegion to access > =C2=A0 * @addr: address within that region > =C2=A0 * @data: data to write > - * @size: size of the access in bytes > + * @op: size, sign, and endianness of the memory operation > =C2=A0 * @attrs: memory transaction attributes to use for the access > =C2=A0 */ > =C2=A0MemTxResult memory_region_dispatch_write(MemoryRegion *mr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= hwaddr addr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= uint64_t data, > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 un= signed size, > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Me= mOp op, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= MemTxAttrs attrs); > =C2=A0 > =C2=A0/** > diff --git a/memory.c b/memory.c > index 5d8c9a9..89ea4fb 100644 > --- a/memory.c > +++ b/memory.c > @@ -1439,9 +1439,10 @@ static MemTxResult > memory_region_dispatch_read1(MemoryRegion *mr, > =C2=A0MemTxResult memory_region_dispatch_read(MemoryRegion *mr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= hwaddr addr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= uint64_t *pval, > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uns= igned size, > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Mem= Op op, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= MemTxAttrs attrs) > =C2=A0{ > + =C2=A0 =C2=A0unsigned size =3D memop_size(op); > =C2=A0 =C2=A0 =C2=A0MemTxResult r; > =C2=A0 > =C2=A0 =C2=A0 =C2=A0if (!memory_region_access_valid(mr, addr, size, fal= se, attrs)) { > @@ -1483,9 +1484,11 @@ static bool > memory_region_dispatch_write_eventfds(MemoryRegion *mr, > =C2=A0MemTxResult memory_region_dispatch_write(MemoryRegion *mr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= hwaddr addr, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= uint64_t data, > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 un= signed size, > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Me= mOp op, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= MemTxAttrs attrs) > =C2=A0{ > + =C2=A0 =C2=A0unsigned size =3D memop_size(op); > + > =C2=A0 =C2=A0 =C2=A0if (!memory_region_access_valid(mr, addr, size, tru= e, attrs)) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unassigned_mem_write(mr, addr, data, = size); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return MEMTX_DECODE_ERROR; > --=C2=A0 > 1.8.3.1 >=20 > =E2=80=8B >=20 >=20