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 X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81587C2D0A3 for ; Mon, 2 Nov 2020 02:56:15 +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 BDCE3221FF for ; Mon, 2 Nov 2020 02:56:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g55o+pJ9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDCE3221FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZQ0z-0002Vi-O5 for qemu-devel@archiver.kernel.org; Sun, 01 Nov 2020 21:56:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZQ0D-00022C-LQ for qemu-devel@nongnu.org; Sun, 01 Nov 2020 21:55:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kZQ0B-00035X-Jf for qemu-devel@nongnu.org; Sun, 01 Nov 2020 21:55:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604285721; 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=GQ1vyx/6nHjdiKeWpxAMR8ulmQxAywW+b/iL3UAhtaY=; b=g55o+pJ9rSiRatGo9NspzjTq03yLB8KGiEVNFVuQYb+K2PXubpNw1oDqGcgkbizP0dT1kV ecLZHjAP7AbkXiH8NOSzKNOQ2rHr7NkjUM5yD8uSg8ELuc/0OvSH/brJaUr69H0hNnWeQi LCMGDdjvS3PM4PGwugJspT2EY5kUOCk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-555-eGTpxtx9Mhm9X8bJD-2iUQ-1; Sun, 01 Nov 2020 21:55:20 -0500 X-MC-Unique: eGTpxtx9Mhm9X8bJD-2iUQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9EF741868405; Mon, 2 Nov 2020 02:55:17 +0000 (UTC) Received: from [10.72.13.33] (ovpn-13-33.pek2.redhat.com [10.72.13.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0210362A14; Mon, 2 Nov 2020 02:54:37 +0000 (UTC) Subject: Re: Out-of-Process Device Emulation session at KVM Forum 2020 To: Paolo Bonzini , "Michael S. Tsirkin" References: <20201029083130.0617a28f@w520.home> <20201029094603.15382476@w520.home> <20201029210407.33d6f008@x1.home> <04179584-3324-994e-d793-04be18d2dab2@redhat.com> <20201031174726-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <1953f27f-b20b-d557-1b2a-a11ef200da40@redhat.com> Date: Mon, 2 Nov 2020 10:54:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jasowang@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=216.205.24.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/01 21:52:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, 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, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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: Elena Ufimtseva , John G Johnson , Janosch Frank , Stefan Hajnoczi , qemu-devel , Kirti Wankhede , Gerd Hoffmann , Yan Vugenfirer , Jag Raman , =?UTF-8?Q?Eugenio_P=c3=a9rez?= , Anup Patel , Claudio Imbrenda , Christian Borntraeger , Roman Kagan , Felipe Franciosi , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Jens Freimann , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Stefano Garzarella , Eduardo Habkost , Sergio Lopez , Kashyap Chamarthy , Darren Kenny , Alex Williamson , Liran Alon , Stefan Hajnoczi , =?UTF-8?Q?Alex_Benn=c3=a9e?= , David Gibson , Kevin Wolf , Halil Pasic , "Daniel P. Berrange" , Christophe de Dinechin , Thanos Makatos , fam Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 2020/11/1 下午4:26, Paolo Bonzini wrote: > > > Il sab 31 ott 2020, 22:49 Michael S. Tsirkin > ha scritto: > > > > I still don't get why it must be opaque. > > > > If the device state format needs to be in the VMM then each device > > needs explicit enablement in each VMM (QEMU, cloud-hypervisor, etc). > > And QEMU cares why exactly? > > > QEMU cares for another reason. It is more code to review, and it's > worth spending the time to reviewing it only if we can do a decent job > at reviewing it. > > There are several cases in which drivers migrate non-architectural, > implementation-dependent state. There are some examples in nested > virtualization (the deadline of the VMX preemption timer) or device > emulation (the RTC has quite a few example also of how those changed > through the years). We probably don't have anyway the knowledge of the > innards of the drivers to do a decent job at reviewing patches that > affect those. > > > Let's invert the question: why does the VMM need to understand the > > device state of a _passthrough_ device? > > To support cross version migration and compatibility checks. > > > That doesn't have to be in the VMM. We should give guidance but that > can be in terms of documentation. I doubt this can work well if we don't force it via ABI. Thanks > Also, in QEMU we chose the path of dropping sections on the source > when migrating to older versions, but that can also be considered a > deficiency of vmstate---a self-synchronizing format (Anthony many > years ago wanted to use X509 as the migration format) would be much > better. And for some specific device types we could define standard > formats, just like PCI has standard classes. > > Paolo > > This problem is harder than it appears, I don't think vendors > will do a good job of it without any guidance and standards. > > -- > MST >