From nobody Fri Dec 19 07:15:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621508998; cv=none; d=zohomail.com; s=zohoarc; b=PUiI082KMPMP68cUPywpjcFtypgptxNUFly036RYXYWv5V/bPs1n7fGdsdxUYo9dfklyBnOPwaD3PInYrrGo6gxzptniqv6QvpRXGA5sJQK2MIBhlj+kCDe2irlVBuhCQAKwPYjLGLUHN6ibO+VPELp8GWxz0e4q+AE+2NQFFac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621508998; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=fXNvsUG+9jJQpscb+R8eaH4L2n3MJcy4IDVc87G545A=; b=Gds4Vm22sfo8CKpAXR81xFcpoqmcZ94BS6ZN6k27wiSCKjY7QsnYtQyi7+zXASZ4QtRYz5vNr/IPBWPxEp601KJkgZssvvqRPg8cn2n7ctf99CPI7dB8Lm24bzgh4+qEJxVM7+RIZ03nSxu+c0jQ4OT41VZsaPmXxyYNwBYZv1c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621508998476649.8503194851352; Thu, 20 May 2021 04:09:58 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-6lnvCAYlOFyxvb6JCPXpYA-1; Thu, 20 May 2021 07:09:53 -0400 Received: by mail-wm1-f71.google.com with SMTP id b206-20020a1c1bd70000b02901713122405eso1314326wmb.1 for ; Thu, 20 May 2021 04:09:53 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id l14sm2981326wrv.94.2021.05.20.04.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 04:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621508997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fXNvsUG+9jJQpscb+R8eaH4L2n3MJcy4IDVc87G545A=; b=ZnKS2UJAgh2F1eCE/+LYPEbQNIRcWW5I4WOc2BgFLvwTLa5ayCwGzHPIRb+QsnTkT00GYL hNecMAnA3Qs+yycd8gYXbIvZSTucpec+yVH+UJYOcNHl+sYL+lITzZGBDheT+cYuoiRFEo dbve8tKwNTbitYOoidz/yHndhWJ9nUI= X-MC-Unique: 6lnvCAYlOFyxvb6JCPXpYA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fXNvsUG+9jJQpscb+R8eaH4L2n3MJcy4IDVc87G545A=; b=Iak1qkTYwoA0PmHPabdSCCf9Yjtip8zdwPUrOV2UZ9dKHeOmZKH/SJ0xMiTjaXergo TXXIwpjSLEtFI3L0bJs1xYP1dl9njuZUf2EctIWa1M9XxMB1FmnrLa0e60RcKwMQ83Dq VPdQIgO+JlTwIHOp7e6+sXSDdpxYMg06HMrxPaa53Nmev1zGL1ztAHWkyZounKQDa/Rj XhYUpNE0dA2Q10Ra4Py/9UevbucxArJ+ChtkFSutlwcRncIDkoU2B+klrhgoiXR2yXkS 1qNDI/Sh4xKt6SWWwSHxnkwFtj3nS8bydqy/M6/uST74uRkPg7AqcuP4dmmcSnVAHBvi Enpg== X-Gm-Message-State: AOAM530z+R2MCZjW6ZbY0YwtdRlJsQQendopY54hmst9c1KH+20NhueE CyaEh7whMu7scw9ymNkcq9qfFgeJkaneaQr4NgLMK1Ut87qylsg8w2dgQ0v/WKMGQbADfP2YmmI Cv6XHWCxzz3KE3A== X-Received: by 2002:adf:b64b:: with SMTP id i11mr3726385wre.157.1621508992706; Thu, 20 May 2021 04:09:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTd7krMeYhURd9rrzhSkonYF7s2c7PAIqcYV+Pz2bB20+DP+TDoCedf1y+fERUFDwyh3WMFw== X-Received: by 2002:adf:b64b:: with SMTP id i11mr3726360wre.157.1621508992578; Thu, 20 May 2021 04:09:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , Peter Maydell , Peter Xu , Paolo Bonzini , Richard Henderson , Bibo Mao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 07/12] exec/memory_ldst_cached: Document aligned addresses are expected Date: Thu, 20 May 2021 13:09:14 +0200 Message-Id: <20210520110919.2483190-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210520110919.2483190-1-philmd@redhat.com> References: <20210520110919.2483190-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/memory_ldst_cached.h.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/exec/memory_ldst_cached.h.inc b/include/exec/memory_ld= st_cached.h.inc index a8f146251d4..515beb48f47 100644 --- a/include/exec/memory_ldst_cached.h.inc +++ b/include/exec/memory_ldst_cached.h.inc @@ -24,6 +24,7 @@ #define LD_P(size) \ glue(glue(ld, size), glue(ENDIANNESS, _p)) =20 +/* warning: addr must be aligned */ static inline uint16_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cach= e, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { @@ -39,6 +40,7 @@ static inline uint16_t ADDRESS_SPACE_LD_CACHED(uw)(Memory= RegionCache *cache, } } =20 +/* warning: addr must be aligned */ static inline uint32_t ADDRESS_SPACE_LD_CACHED(l)(MemoryRegionCache *cache, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { @@ -54,6 +56,7 @@ static inline uint32_t ADDRESS_SPACE_LD_CACHED(l)(MemoryR= egionCache *cache, } } =20 +/* warning: addr must be aligned */ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryRegionCache *cache, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { @@ -80,6 +83,7 @@ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryR= egionCache *cache, #define ST_P(size) \ glue(glue(st, size), glue(ENDIANNESS, _p)) =20 +/* warning: addr must be aligned */ static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache, hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result) { @@ -94,6 +98,7 @@ static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegio= nCache *cache, } } =20 +/* warning: addr must be aligned */ static inline void ADDRESS_SPACE_ST_CACHED(l)(MemoryRegionCache *cache, hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result) { @@ -108,6 +113,7 @@ static inline void ADDRESS_SPACE_ST_CACHED(l)(MemoryReg= ionCache *cache, } } =20 +/* warning: addr must be aligned */ static inline void ADDRESS_SPACE_ST_CACHED(q)(MemoryRegionCache *cache, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result) { --=20 2.26.3