From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39AF6C4167B for ; Tue, 13 Dec 2022 15:41:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p57P6-0002B0-IV; Tue, 13 Dec 2022 10:41:12 -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 1p57P4-0002AH-4S for qemu-devel@nongnu.org; Tue, 13 Dec 2022 10:41:10 -0500 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p57P1-0003zj-4t for qemu-devel@nongnu.org; Tue, 13 Dec 2022 10:41:09 -0500 Received: by mail-ot1-x331.google.com with SMTP id q18-20020a056830441200b006704633f258so103223otv.0 for ; Tue, 13 Dec 2022 07:41:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Acg3Fdqwu0nHqtLhve8YrtqJHosmbovKLziTCkwR6EA=; b=KNFrEp1FtpNUgXhKB2QsSdPjtuzzAKve1nfW+8nop1HiGsB7zGMSfFPxqfSWNC+D5L zGRfNDFxXtV5z3qncjJQ4uuJ3yWOhmaRtoyPv/KsJMsE/mL5FNtBiCaGz/fOIICuJu5W gPVJwCTouvgSmvHOG2yuNklCa25uBT/ozrjYwkEsyauICJ14u1fpXf14FH0zLZrwCxkJ HVQBoKSHiaHvkQMdvFY0kSwXF7kK5ct/DWNVCt0fJsVULWI9pnD2HW1vJjmmoF5VsFhm t1UnjQD8XEjgA4juY7dbBt89LzaCKIYUkfe6IxYTB4Ktn3pfL7U75y80dulkmVU2Cdh+ Fiqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Acg3Fdqwu0nHqtLhve8YrtqJHosmbovKLziTCkwR6EA=; b=exqWLuO8/Xw6CMKlPacUfByQ5KoniIyNpXqkCTcd9o7UU2rkAAmalooynCj1obkyCW cde/JQGsu0wo+m0RVLteobf4nla7mK9Dg7MwEZKiXPeTrU0q2sEB28YTk9mh8dhTzDkb x4aIUOjeVaoAmXlIrpVjXVWygutzrFtx6He1TSnx8YCNqIX9O3XP35h3xZ+99VQPBcqD CW5xLwV/8FlKavB4clB+eFsWsziibH96eSrEnDnFe6y/YgYjPXYyyiT7fRoejLoR4ELF pfF5gIslBsNK8flNELX9374lIxcj2GokuS3JD3STHg6h+RhqVJXVMmuckuaKM7kzyVF9 22uQ== X-Gm-Message-State: ANoB5pmnMynXmxj+cBpw7mKeky7DuO+YsAsq9kXzn6d7D8KractlkY25 KFCT8Si2xwH70xaWLCkVLxx5uA== X-Google-Smtp-Source: AA0mqf51HSkAI68LZ+non6s4Lm2PTEDdVujvW5j3wufF3meuc2TJ3GCRPpXrxta9S6J7og30Wpi52g== X-Received: by 2002:a9d:161:0:b0:670:6615:a9e8 with SMTP id 88-20020a9d0161000000b006706615a9e8mr11560646otu.34.1670946064653; Tue, 13 Dec 2022 07:41:04 -0800 (PST) Received: from ?IPV6:2806:102e:18:2efc:c63:85ed:4256:8ad0? ([2806:102e:18:2efc:c63:85ed:4256:8ad0]) by smtp.gmail.com with ESMTPSA id h4-20020a056830164400b0066871c3adb3sm1327910otr.28.2022.12.13.07.41.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Dec 2022 07:41:04 -0800 (PST) Message-ID: Date: Tue, 13 Dec 2022 09:41:01 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state Content-Language: en-US To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org, Thomas Huth Cc: Greg Kurz , Stefan Hajnoczi , Kevin Wolf , qemu-block@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Jason Wang , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Christian Schoenebeck , Hanna Reitz References: <20221212230517.28872-1-philmd@linaro.org> <20221212230517.28872-7-philmd@linaro.org> <94c26d02-94d5-ec42-99bf-3fac080e567e@linaro.org> <8ed5aab1-402f-9d9b-c70e-5d8082d35d1e@linaro.org> From: Richard Henderson In-Reply-To: <8ed5aab1-402f-9d9b-c70e-5d8082d35d1e@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::331; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x331.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, NICE_REPLY_A=-0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 12/13/22 01:30, Philippe Mathieu-Daudé wrote: > On 13/12/22 01:14, Richard Henderson wrote: >> On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: >>> The device endianness doesn't change during runtime. >> >> What are you talking about?  Of course it does. > > The host CPU certainly does, but the virtio device doesn't... Does it? > > This check only consider the device, not the CPU: > >     bool virtio_access_is_big_endian(VirtIODevice *vdev) >     { >     #if defined(LEGACY_VIRTIO_IS_BIENDIAN) >         return virtio_is_big_endian(vdev); This is set for both ARM and PPC, which checks current cpu endianness in both cases. > and once the features are negotiated it doesn't seem to change. Incorrect. r~