From nobody Tue Feb 10 12:39:25 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769988069; cv=none; d=zohomail.com; s=zohoarc; b=VsFC3+3/d+kHYFjUddsn0CEOKCGr7ICvdRw3sgtYwAKYb+iv1xawUIJjQG6nRG1ZSRbUTcaRqST7DjSr4Um9iZTFCf+chB+f6fNDO41bDZoDNiQMbwtD2IpN9wggPn/6PO5/cePNG4lXNDMNrxit+kuzV9m+dFauOY7NAwx0y1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769988069; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EAuDEWjgtcjAI73PpDk9D1EoNYCz8v3TBHOpftqU/Uk=; b=BSRc/tnBS+3Sk9Qhc/iPG7+dCo46Ts0XabmecdQLcrMV7aIMPZRVkhOJQg/isJJ25KT9Y07SndCDIYT9jgdHdpLx5YadZl1z+5/I4uL2nU9udiUlm+zM6LlbliAVi44zF8naY5HF/AZB4PP3sBJ4jnVE1dXfcqM9u+v+6VEbEDA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769988069056935.3154634342076; Sun, 1 Feb 2026 15:21:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vmgk0-000531-Qo; Sun, 01 Feb 2026 18:20:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vmgjz-00051V-Ve for qemu-devel@nongnu.org; Sun, 01 Feb 2026 18:20:28 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vmgjy-0000H8-Fg for qemu-devel@nongnu.org; Sun, 01 Feb 2026 18:20:27 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-48068127f00so32306715e9.3 for ; Sun, 01 Feb 2026 15:20:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4806cddffe9sm507872655e9.4.2026.02.01.15.20.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 01 Feb 2026 15:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769988024; x=1770592824; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EAuDEWjgtcjAI73PpDk9D1EoNYCz8v3TBHOpftqU/Uk=; b=FOuft4NweEY+IbSuazrUqK5s4F32jHW0m9TGPbtPjfN6HaD5wWMBTyB26CP1x7T01j hTn1/nEFHEyKM0DPlD0pv4xFDVHv7havIAWuUvEYVlHUnIMQiGeuBpMIoUXweXdLjivs q3Q+U8l2J4L+6GaJSRsV/Z1GAwen878+qjhRsOdbK51iX5Ui4qzMuQiYjz9HsXh5Ls9e OVKZdLoRCPp6em4gZpL8rbptyPU8AciRBo9BZuWvMZIGmKUI+7gUq2qiBPLFG24JuAwr X4h4plgxkvfjV0w+EHbFiaAuSAMuqvnZ9C67UYEOp8xZeL0fclwPSNNmKFwZy48G8jns NnBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769988024; x=1770592824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EAuDEWjgtcjAI73PpDk9D1EoNYCz8v3TBHOpftqU/Uk=; b=wtg18l9Ypw0KJ1zpYOvPCjC9G1KkFqGDK5KYqRkpRg4Nf5Dax8z4LwZSdMyNnK4UFU uz+abIvbv8Dv9GK/diHRAVf8xu6pXKoH44YfXv3Y5bza1pbxAwZ/xVwCwc7Sdvosd2jn H3MN0gIYjg5Zq11KKX1jBaPYE4gQldAAU7YqeEpyCqgRqcXTBFK1izGnNfIbpbYe9ahd MwL7KYimu9r+Hz9H3L0XoHNyReKf9VeiIcPp9/N9XCvNByj6C8WIM+e1wdi0MNV/mdBI ZBCp0b5Puf7KEp4FrkD57UKTLznbAHPR1FPd7+Ie+McW0WriW0Giur8j+dp/kKQNa2nC m88A== X-Gm-Message-State: AOJu0Yw8Mp8SvmBuuKb2GrtYPpvvhYyzytb4fTlhPHMO6LYN9js5gPQU ToMahJPhHy8DcfLEfpy3MXUVw7dAvLWflSCFDm/703vrawHT1YI1uf8FEpnJDQI1QJi8Dg7L6CU ceATXkgc= X-Gm-Gg: AZuq6aLToHsHrs3ErzggvPuVAASOh5zP3dOzN+CyETxL290t4/XhGbaUhwAEJ/gB9MJ zE+Od5bqZGZAVfQGmOWNNImLR00HKw9BC+iS7cpUFTi0jeWkjgvz3B2sJm2E5MsCf/JZQwfpxnX Hhaj+0yLQRfZPVAMjx5cnqxFUILOCtMQBIpXq3kezWlHEtbFAE274Ba5tzrSbmuhxrMB/X7Rp2q 4wKml86Am8nWLZ3hzl3pROlHTR9gonw0B2SLQzo/u255KqL6dG1XnuUquHnbdJZ8lr7e5M5D6dg 2vWWId3EXSaqe7Ji3yGuTduyC8/3r/GnKvNAr31fhAERs7VLnQR7bVsQH1ftoJcSSgWWyQmSDWb iTdJKhM9jiUR0QBzqhMz+pkgyZ/3R+bztQatCZlw1rqQXXW2cZnayV4rnUdbz+kEXP2BlwXjJQ3 GLidjuGZSmhL7QtDs7XFfLkj9Blkad3X2OJpXJOgHR24FWorJDzHoUQeWSpBJ5 X-Received: by 2002:a05:600c:358d:b0:480:f27c:6335 with SMTP id 5b1f17b1804b1-482db499704mr137519085e9.25.1769988024354; Sun, 01 Feb 2026 15:20:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier , Stefano Garzarella Subject: [PATCH v2 03/10] hw/virtio: Introduce VirtIODevice::access_is_big_endian boolean field Date: Mon, 2 Feb 2026 00:19:52 +0100 Message-ID: <20260201231959.88559-4-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260201231959.88559-1-philmd@linaro.org> References: <20260201231959.88559-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769988070177158500 VirtIODevice::access_is_big_endian boolean field, initialized on device reset, represents whether load/store accesses are ordered using big endianness. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/virtio/virtio.h | 5 +++++ hw/virtio/virtio.c | 1 + 2 files changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 17b105c146d..7a4f7de7475 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -154,6 +154,11 @@ struct VirtIODevice VMChangeStateEntry *vmstate; char *bus_name; uint8_t device_endian; + /** + * @access_is_big_endian: whether load/store memory accesses are order= ed + * using big endianness. Might change during device resets. + */ + bool access_is_big_endian; /** * @user_guest_notifier_mask: gate usage of ->guest_notifier_mask() ca= llback. * This is used to suppress the masking of guest updates for diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 86fc0e262f7..242c207a591 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -3247,6 +3247,7 @@ void virtio_reset(VirtIODevice *vdev) /* System reset */ vdev->device_endian =3D virtio_default_endian(); } + vdev->access_is_big_endian =3D virtio_access_is_big_endian(vdev); =20 if (k->get_vhost) { struct vhost_dev *hdev =3D k->get_vhost(vdev); --=20 2.52.0