Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3758427rwb; Sun, 7 Aug 2022 06:47:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR7b7yZSLkPvjA57MARc2W8j6NDorujx41K5cVyLLJ8QU/Xb8b7KlICS/ual8Vpgq+A0gi3q X-Received: by 2002:a05:6402:248f:b0:440:9bb3:5936 with SMTP id q15-20020a056402248f00b004409bb35936mr2186536eda.178.1659880066118; Sun, 07 Aug 2022 06:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659880066; cv=none; d=google.com; s=arc-20160816; b=mhM2AzT4WH0xovGz43wI0El9sYUxcPlsE3PEEKP5N3B/O1OyVOi1yLf9IpyAZ5ZIZE Hg19u4LFBNzJmexoRvOyUCffnrxSggpuFaM+umxNj92EEyrwII7b6KOcgp3nOL5UoApW vCJFtlvP+cmi2f1cbHroTVS6Cg1BS0NFx4vTHpruZTRxEtJsshBcubJDrywbbl18KNHz xENih2N6tFBb8eqc914Jl1vb/5zPHc5gwvwsb8CVJBNFYN4iXUMmSV8eE6iRs5UVsEhz eDssyqF9XM0Upq3rWHDyjD+Ntu+ViEMEQzaduMGmOo5cNhlFHHHu0UifHvy1B9NO39ON hggQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kWN2+XtBy7D+eIoeR0CwA7v9KmusYi195gp46RwIqnc=; b=Li4Z7NunwxPBBE+OLYy8c63JDtBbSUl7Tn+Y+jXuzwq/TB5LuSBzUEY2mw07eAP9nM nSEKA0lGpFopsBNu2kQO2Zjqvve1Q3UpDbdSNdq9rj8aj34TcjojNFxI8dahbgpeq7J7 POIEDTmwpB8n6qSnTZEZb0zhe86Vav1gXVNeWAqbupgpSTTw0lykYqZaETSRv50tdDcI m8ppIs+spzayrJGGHEkc7smpjQ4hw3O7YUlUJ7FXpsUvflxqUj/PYATGdvgQcsIPJNQ/ tprDst2XwzQ3qP4B9c1VEdHRgcK+KTAgfF8y9fdxRt/AHrFgcFH5D2eqTrbmgmlv1h+D uNQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="gQgXaS/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22-20020a170906795600b00726abd9108bsi6979381ejo.168.2022.08.07.06.47.20; Sun, 07 Aug 2022 06:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="gQgXaS/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234342AbiHGN1O (ORCPT + 99 others); Sun, 7 Aug 2022 09:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbiHGN1M (ORCPT ); Sun, 7 Aug 2022 09:27:12 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C273DA1AA for ; Sun, 7 Aug 2022 06:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659878830; 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=kWN2+XtBy7D+eIoeR0CwA7v9KmusYi195gp46RwIqnc=; b=gQgXaS/7yJ2D1IWEwJNyNpQH9K5d42xv5JQv+9PeCqZhYLovQMYBcvJxR6DkS4IU8ULpU5 63RYA+G/9J/dh4YkvPD6yizaXJd9XToFqfP9DB4oP8HoyDl0AkaTcPFhuLwDI/DJ5L3AJx QyiTclOMGs7Qiz1mp3aRfN9QSfWiDRM= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-492-4cJXRiB5PYGJyQ-l7JkbmQ-1; Sun, 07 Aug 2022 09:27:09 -0400 X-MC-Unique: 4cJXRiB5PYGJyQ-l7JkbmQ-1 Received: by mail-wm1-f72.google.com with SMTP id r10-20020a05600c284a00b003a2ff6c9d6aso6942317wmb.4 for ; Sun, 07 Aug 2022 06:27:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=kWN2+XtBy7D+eIoeR0CwA7v9KmusYi195gp46RwIqnc=; b=zxGsRkIUq3dvo3SnLZoN/Yo/smtt7+Fjec2tmhVMUJkIBCClE+mMIwl9qoYKZ526lf Fm/94p+kyiYVY1KalOLZ5AfCSaCJblWuZJipRvM5rg6hazPI2MayDRWoNuRAilxjYAdI GwomcCXRZCUr2UjaG7Dc618/JSCUaO8FaYldcpBryR3PHmhpy22bWU2u6xkGvDkgJY6i +JwxdwYW5UeYPfhXe6emkNXBqkdLmaPpNKjLQq82qZWZwm/KdqCRaAIxexUlk+eRMedU htbRLFGOSMKlhPd0u2FqJFimhDRpHxe0S5EY/JmRaAAdZUDfNwH3r3itTJxhz5g6KJyV RD7w== X-Gm-Message-State: ACgBeo0o9zopBO+Rk7PxgjBGvdBnuW3Oxq4LdcWxZhYgZMpax4rYt9mu UcEy9BcPPPO7q7JpnCqDf7HZZjVDiusu80N5/JErBBJdbi2DR5YmkBHyekw/EVNYzHEHpA46EKb FjXHgcqvZUwWMZIncK4H92MT+ X-Received: by 2002:a5d:4e52:0:b0:21f:15aa:1174 with SMTP id r18-20020a5d4e52000000b0021f15aa1174mr8959076wrt.106.1659878828292; Sun, 07 Aug 2022 06:27:08 -0700 (PDT) X-Received: by 2002:a5d:4e52:0:b0:21f:15aa:1174 with SMTP id r18-20020a5d4e52000000b0021f15aa1174mr8959067wrt.106.1659878828086; Sun, 07 Aug 2022 06:27:08 -0700 (PDT) Received: from redhat.com ([2.52.21.123]) by smtp.gmail.com with ESMTPSA id d14-20020adfe84e000000b0021badf3cb26sm10887722wrn.63.2022.08.07.06.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 06:27:07 -0700 (PDT) Date: Sun, 7 Aug 2022 09:27:03 -0400 From: "Michael S. Tsirkin" To: Linus Torvalds Cc: Will Deacon , stefanha@redhat.com, jasowang@redhat.com, ascull@google.com, maz@kernel.org, keirf@google.com, jiyong@google.com, kernel-team@android.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Stefano Garzarella Subject: Re: IOTLB support for vhost/vsock breaks crosvm on Android Message-ID: <20220807091455-mutt-send-email-mst@kernel.org> References: <20220805181105.GA29848@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 05, 2022 at 03:57:08PM -0700, Linus Torvalds wrote: > And hey, it's possible that the bit encoding is *so* incestuous that > it's really hard to split it into two. But it really sounds to me like > somebody mindlessly re-used a feature bit for a *completely* different > thing. Why? > > Why have feature bits at all, when you then re-use the same bit for > two different features? It kind of seems to defeat the whole purpose. What can I say? Hindsight is 20/20. The two things are *related* in that IOTLB in vhost is a way for userspace (the platform) to limit device access to guest memory. So we reused the feature bits (it's not the only one, just the one we changed most recently). It bothered me a bit but everyone seemed happy and was able to refer to virtio spec for documentation so there was less documentation to write for Linux. It's not that it's hard to split it generally, it's just that it's been there like this for a while so it's hard to change now - we need to find a way that does not break existing userspace. -- MST