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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 973A4C433EF for ; Tue, 5 Oct 2021 11:20:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71F2C615E6 for ; Tue, 5 Oct 2021 11:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233812AbhJELWX (ORCPT ); Tue, 5 Oct 2021 07:22:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21824 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234333AbhJELWW (ORCPT ); Tue, 5 Oct 2021 07:22:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633432831; 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: in-reply-to:in-reply-to:references:references; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=O3J0BYrh/6MyaVfuUIqwey05Wno9o4wV0wIYo5hPl+Dg7K8+IoUWXk+oz71QwbFYYmMYZg JWgDGlkU60YzTP7uFwK9xiLYYsIc4wtgk8vRUKRL9uAQyfqx4HJoXnX2R8Tdpymo+qrDEH yTJW/mJv9z/eX6w4y7JScjJ1SWg4mWc= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-529-eb_Dh-YPO3GLtKvPW1krmg-1; Tue, 05 Oct 2021 07:20:27 -0400 X-MC-Unique: eb_Dh-YPO3GLtKvPW1krmg-1 Received: by mail-ed1-f72.google.com with SMTP id 2-20020a508e02000000b003d871759f5dso20294325edw.10 for ; Tue, 05 Oct 2021 04:20:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=tSUoAJ/Ecg3nubzvjGBXDcz3dRCttpSnKyhGo4Yj7qSPRb4AkGnDpN7wPEbtICXJ1d FxdhDRPfGRMcAmdpy2F6KwF77eYa/Iwe8Qjr1hJigWyipspRWDmWDlg+r9uWH9zzKGUV X7ABZ+OGwbi2/rD7jhblcFfbZoxhWGkKBzsg5XPwDdOumL9thmz6WBN8C1mEYDzKbCwv zigDLY5YSrtiRVS3bKc5+7hSpRj0nuKFFGrB08dsi1ybMIqs6c9eBx8p3jnP+vStYzvh 3WT16APtqvyCS5Ha+1JeOlCcHL2234gD6QlCZMo46uTA9QqOzuX6UioLfoEDtcxAHSNz VJMg== X-Gm-Message-State: AOAM531wwgwhWUQA+k65E9Ydgnr28ZU6CDER4NFtfCSZiNqnKmr34vpk i9d55pk6QkP1kGTtLyzbudFXKzkbAL2fgOsHGZ0RIRKde0UGtu/yrLWD6vIAGK6Qp8HUq1h2Gma Ls03nYM/dlPqaFJ62MPPTGg== X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655452eje.111.1633432825628; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX7CkJhv+B6EpESQjJAlERsSi/L6SFxie1MuYGz7XrNTrZeHjtBwjO3hp8O2z35qxUHeEJOQ== X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655428eje.111.1633432825464; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) Received: from redhat.com ([2.55.147.134]) by smtp.gmail.com with ESMTPSA id b2sm8650876edv.73.2021.10.05.04.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 04:20:24 -0700 (PDT) Date: Tue, 5 Oct 2021 07:20:20 -0400 From: "Michael S. Tsirkin" To: Cornelia Huck Cc: Halil Pasic , linux-s390@vger.kernel.org, markver@us.ibm.com, Christian Borntraeger , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Xie Yongji , stefanha@redhat.com, Raphael Norwitz Subject: Re: [RFC PATCH 1/1] virtio: write back features before verify Message-ID: <20211005072006-mutt-send-email-mst@kernel.org> References: <87r1d64dl4.fsf@redhat.com> <20210930130350.0cdc7c65.pasic@linux.ibm.com> <87ilyi47wn.fsf@redhat.com> <20211001162213.18d7375e.pasic@linux.ibm.com> <87v92g3h9l.fsf@redhat.com> <20211002082128-mutt-send-email-mst@kernel.org> <20211004042323.730c6a5e.pasic@linux.ibm.com> <20211004040937-mutt-send-email-mst@kernel.org> <20211005124303.3abf848b.pasic@linux.ibm.com> <87lf372084.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lf372084.fsf@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On Tue, Oct 05, 2021 at 01:13:31PM +0200, Cornelia Huck wrote: > On Tue, Oct 05 2021, Halil Pasic wrote: > > > On Mon, 4 Oct 2021 05:07:13 -0400 > > "Michael S. Tsirkin" wrote: > >> Well we established that we can know. Here's an alternative explanation: > > > > > > I thin we established how this should be in the future, where a transport > > specific mechanism is used to decide are we operating in legacy mode or > > in modern mode. But with the current QEMU reality, I don't think so. > > Namely currently the switch native-endian config -> little endian config > > happens when the VERSION_1 is negotiated, which may happen whenever > > the VERSION_1 bit is changed, or only when FEATURES_OK is set > > (vhost-user). > > > > This is consistent with device should detect a legacy driver by checking > > for VERSION_1, which is what the spec currently says. > > > > So for transitional we start out with native-endian config. For modern > > only the config is always LE. > > > > The guest can distinguish between a legacy only device and a modern > > capable device after the revision negotiation. A legacy device would > > reject the CCW. > > > > But both a transitional device and a modern only device would accept > > a revision > 0. So the guest does not know for ccw. > > Well, for pci I think the driver knows that it is using either legacy or > modern, no? > > And for ccw, the driver knows at that point in time which revision it > negotiated, so it should know that a revision > 0 will use LE (and the > device will obviously know that as well.) > > Or am I misunderstanding what you're getting at? Exactly what I'm saying. 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E43A3C433F5 for ; Tue, 5 Oct 2021 11:20:36 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ECA961425 for ; Tue, 5 Oct 2021 11:20:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8ECA961425 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4632060AE7; Tue, 5 Oct 2021 11:20:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 608szgIQGu_v; Tue, 5 Oct 2021 11:20:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id E9A5A60903; Tue, 5 Oct 2021 11:20:34 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CD850C000F; Tue, 5 Oct 2021 11:20:34 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7C6ABC000D for ; Tue, 5 Oct 2021 11:20:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6B382407C1 for ; Tue, 5 Oct 2021 11:20:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8oimjPfht0Ip for ; Tue, 5 Oct 2021 11:20:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 98CF2407B8 for ; Tue, 5 Oct 2021 11:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633432831; 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: in-reply-to:in-reply-to:references:references; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=O3J0BYrh/6MyaVfuUIqwey05Wno9o4wV0wIYo5hPl+Dg7K8+IoUWXk+oz71QwbFYYmMYZg JWgDGlkU60YzTP7uFwK9xiLYYsIc4wtgk8vRUKRL9uAQyfqx4HJoXnX2R8Tdpymo+qrDEH yTJW/mJv9z/eX6w4y7JScjJ1SWg4mWc= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-93-NZjlwbotMjW3yjbGuB8Efg-1; Tue, 05 Oct 2021 07:20:26 -0400 X-MC-Unique: NZjlwbotMjW3yjbGuB8Efg-1 Received: by mail-ed1-f69.google.com with SMTP id 14-20020a508e4e000000b003d84544f33eso20335176edx.2 for ; Tue, 05 Oct 2021 04:20:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=KWWQoqZR+jQ18bwWITM2n3r4ilOdsWKSPBS0TyxCopy7daGhQYWTmHpgZvHAXXzZPQ C6hniQWytIhcGDon5ju6K81aFYG+NZy2LPtgOls7PWFeTnnGvuXGDuWYoRW+pVV/BvYG ZtSPD7rlCLgffYI3nFpNCgS6sx34PnkdsLtJZikk0ukOyweWWaHMYkkD4lZWPgYvz6cz SNNjwPPXDzoRbYOnIC5HbkYocGgPe7uRI7r/i/OgsOmIEqtTKT38xl06a9YZuoQ20/Ux F10s6WTv4oEv2TliPECpDGC+des8YwyC5dV1f1VvDhu2DRa6vM9/GCKtQ9M176UmJ3Wy N67A== X-Gm-Message-State: AOAM532E/dw+ndwdcN+HYN8s9K/degjq7z1s2rYJijpPSbGmWta694op xblvCwSisgh8aDR+cToAqVSeyx0MzfXo8YoO9BVoHUppD+QRT9uXWrwFTeqo+VW/0JZhPxYqE3b C61zQsuPa7GvbXyEHWVmPNV2UrXtwE1VINOe4Is6Uhg== X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655450eje.111.1633432825628; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX7CkJhv+B6EpESQjJAlERsSi/L6SFxie1MuYGz7XrNTrZeHjtBwjO3hp8O2z35qxUHeEJOQ== X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655428eje.111.1633432825464; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) Received: from redhat.com ([2.55.147.134]) by smtp.gmail.com with ESMTPSA id b2sm8650876edv.73.2021.10.05.04.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 04:20:24 -0700 (PDT) Date: Tue, 5 Oct 2021 07:20:20 -0400 From: "Michael S. Tsirkin" To: Cornelia Huck Subject: Re: [RFC PATCH 1/1] virtio: write back features before verify Message-ID: <20211005072006-mutt-send-email-mst@kernel.org> References: <87r1d64dl4.fsf@redhat.com> <20210930130350.0cdc7c65.pasic@linux.ibm.com> <87ilyi47wn.fsf@redhat.com> <20211001162213.18d7375e.pasic@linux.ibm.com> <87v92g3h9l.fsf@redhat.com> <20211002082128-mutt-send-email-mst@kernel.org> <20211004042323.730c6a5e.pasic@linux.ibm.com> <20211004040937-mutt-send-email-mst@kernel.org> <20211005124303.3abf848b.pasic@linux.ibm.com> <87lf372084.fsf@redhat.com> MIME-Version: 1.0 In-Reply-To: <87lf372084.fsf@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: linux-s390@vger.kernel.org, markver@us.ibm.com, Xie Yongji , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, Halil Pasic , Christian Borntraeger , Raphael Norwitz , stefanha@redhat.com, virtualization@lists.linux-foundation.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Tue, Oct 05, 2021 at 01:13:31PM +0200, Cornelia Huck wrote: > On Tue, Oct 05 2021, Halil Pasic wrote: > > > On Mon, 4 Oct 2021 05:07:13 -0400 > > "Michael S. Tsirkin" wrote: > >> Well we established that we can know. Here's an alternative explanation: > > > > > > I thin we established how this should be in the future, where a transport > > specific mechanism is used to decide are we operating in legacy mode or > > in modern mode. But with the current QEMU reality, I don't think so. > > Namely currently the switch native-endian config -> little endian config > > happens when the VERSION_1 is negotiated, which may happen whenever > > the VERSION_1 bit is changed, or only when FEATURES_OK is set > > (vhost-user). > > > > This is consistent with device should detect a legacy driver by checking > > for VERSION_1, which is what the spec currently says. > > > > So for transitional we start out with native-endian config. For modern > > only the config is always LE. > > > > The guest can distinguish between a legacy only device and a modern > > capable device after the revision negotiation. A legacy device would > > reject the CCW. > > > > But both a transitional device and a modern only device would accept > > a revision > 0. So the guest does not know for ccw. > > Well, for pci I think the driver knows that it is using either legacy or > modern, no? > > And for ccw, the driver knows at that point in time which revision it > negotiated, so it should know that a revision > 0 will use LE (and the > device will obviously know that as well.) > > Or am I misunderstanding what you're getting at? Exactly what I'm saying. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62D29C433F5 for ; Tue, 5 Oct 2021 11:25:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 21BBC610C7 for ; Tue, 5 Oct 2021 11:25:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 21BBC610C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:60382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXiZB-0006Rb-9u for qemu-devel@archiver.kernel.org; Tue, 05 Oct 2021 07:25:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXiUs-000860-Jo for qemu-devel@nongnu.org; Tue, 05 Oct 2021 07:20:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXiUq-0002FJ-AS for qemu-devel@nongnu.org; Tue, 05 Oct 2021 07:20:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633432831; 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: in-reply-to:in-reply-to:references:references; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=O3J0BYrh/6MyaVfuUIqwey05Wno9o4wV0wIYo5hPl+Dg7K8+IoUWXk+oz71QwbFYYmMYZg JWgDGlkU60YzTP7uFwK9xiLYYsIc4wtgk8vRUKRL9uAQyfqx4HJoXnX2R8Tdpymo+qrDEH yTJW/mJv9z/eX6w4y7JScjJ1SWg4mWc= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-VbDaKcMoPQC-3KXezNGPFA-1; Tue, 05 Oct 2021 07:20:26 -0400 X-MC-Unique: VbDaKcMoPQC-3KXezNGPFA-1 Received: by mail-ed1-f70.google.com with SMTP id t28-20020a508d5c000000b003dad7fc5caeso10386310edt.11 for ; Tue, 05 Oct 2021 04:20:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8DxNvJPCW0wWRkzK7is2TKN8eqfqYzj6jjWzgoTSkB0=; b=T3QDc+VIhJD4j7dKFwqw0EJ8k6LDAMCkIsGu4p4eeAwu4rsxG5wamSeGk12tkuxpLh oHWkqmlmj4W12TShBI+xZ+G2fPTxFDRV5GQQLGSdcPY8dtMRrmeeo7LeMMUwTd2V9gEw uZlyKkt6KmiReaOkxgxN4CEVmt90TwhhS3Ndkzjz0R6CUW+rT6xXPhbB3+Kb0SizAC6c LZweQgnCxSYkHTIH0s/tnaN0vklyQabu8zg0IlTZZG92fNdh8iEEzBtuZmYRijPaYwK6 yP/z5gWoVixw4ryqaZttOctnIQDHYZB8+/4GO6Akd2Gd1ndpVFCEH2UH2cKLfl1UgmQ0 5SQA== X-Gm-Message-State: AOAM531Aotba4NJH4iXpC39p2uB87xAIW2FGk3jiBq1299nyOvkZag7p 9ItUwevh7W5dW1Q0yQ1RKcw9UrP4YB/fL1ft01aiADFcycWWh/SRn9ADxPUy8ivQQxvhBl1n5rh esSh50DYNk2EelfI= X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655461eje.111.1633432825654; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX7CkJhv+B6EpESQjJAlERsSi/L6SFxie1MuYGz7XrNTrZeHjtBwjO3hp8O2z35qxUHeEJOQ== X-Received: by 2002:a17:906:3a0a:: with SMTP id z10mr12655428eje.111.1633432825464; Tue, 05 Oct 2021 04:20:25 -0700 (PDT) Received: from redhat.com ([2.55.147.134]) by smtp.gmail.com with ESMTPSA id b2sm8650876edv.73.2021.10.05.04.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 04:20:24 -0700 (PDT) Date: Tue, 5 Oct 2021 07:20:20 -0400 From: "Michael S. Tsirkin" To: Cornelia Huck Subject: Re: [RFC PATCH 1/1] virtio: write back features before verify Message-ID: <20211005072006-mutt-send-email-mst@kernel.org> References: <87r1d64dl4.fsf@redhat.com> <20210930130350.0cdc7c65.pasic@linux.ibm.com> <87ilyi47wn.fsf@redhat.com> <20211001162213.18d7375e.pasic@linux.ibm.com> <87v92g3h9l.fsf@redhat.com> <20211002082128-mutt-send-email-mst@kernel.org> <20211004042323.730c6a5e.pasic@linux.ibm.com> <20211004040937-mutt-send-email-mst@kernel.org> <20211005124303.3abf848b.pasic@linux.ibm.com> <87lf372084.fsf@redhat.com> MIME-Version: 1.0 In-Reply-To: <87lf372084.fsf@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, markver@us.ibm.com, Xie Yongji , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, Halil Pasic , Christian Borntraeger , Raphael Norwitz , stefanha@redhat.com, virtualization@lists.linux-foundation.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Oct 05, 2021 at 01:13:31PM +0200, Cornelia Huck wrote: > On Tue, Oct 05 2021, Halil Pasic wrote: > > > On Mon, 4 Oct 2021 05:07:13 -0400 > > "Michael S. Tsirkin" wrote: > >> Well we established that we can know. Here's an alternative explanation: > > > > > > I thin we established how this should be in the future, where a transport > > specific mechanism is used to decide are we operating in legacy mode or > > in modern mode. But with the current QEMU reality, I don't think so. > > Namely currently the switch native-endian config -> little endian config > > happens when the VERSION_1 is negotiated, which may happen whenever > > the VERSION_1 bit is changed, or only when FEATURES_OK is set > > (vhost-user). > > > > This is consistent with device should detect a legacy driver by checking > > for VERSION_1, which is what the spec currently says. > > > > So for transitional we start out with native-endian config. For modern > > only the config is always LE. > > > > The guest can distinguish between a legacy only device and a modern > > capable device after the revision negotiation. A legacy device would > > reject the CCW. > > > > But both a transitional device and a modern only device would accept > > a revision > 0. So the guest does not know for ccw. > > Well, for pci I think the driver knows that it is using either legacy or > modern, no? > > And for ccw, the driver knows at that point in time which revision it > negotiated, so it should know that a revision > 0 will use LE (and the > device will obviously know that as well.) > > Or am I misunderstanding what you're getting at? Exactly what I'm saying.