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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id ACF48EB64DA for ; Wed, 5 Jul 2023 15:15:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 68D836103C; Wed, 5 Jul 2023 15:15:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 68D836103C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1688570123; bh=Z9SfPBXEKp7JYvADX2DWzf41swYSY0gUeliJ0axh8ow=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=6e1epS5ZfgglvPa/Q/EemC1COnjGAWzk77NVXgxJNmwRbghhT+UwBJoa6alQ/cpYW MKgM6UYyVn+7JJVXDn9EoLRCKBQ0cbVdrKIXp3GWe1UNhaFlic0UkoeSa/geQ/7wcc tOahwa0/Ez3mIbBldK39YMUY7pfHxxFfJDB8lRnwJe/Qr90C8I24sUt1QIT9kN3cSi D0MI+paIjXGfyRC0W1nXuYVp2zO6Xo1AbeWPFyIr8G2ohAivX5v/9lCHDdLWXxiUd/ dJuLeIJdqs7qHb7OuQ92msTyArfYGHcR6pCrJxT1OZqI4IdtLzB8YhWTlFipIBuM/5 vpG/5Jytdbzxw== 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 fkt-n2ag79SN; Wed, 5 Jul 2023 15:15:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 29D9A61060; Wed, 5 Jul 2023 15:15:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 29D9A61060 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D78FD1BF228 for ; Tue, 4 Jul 2023 17:59:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id AF5944042B for ; Tue, 4 Jul 2023 17:59:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AF5944042B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P7Tc_rbfG9qk for ; Tue, 4 Jul 2023 17:59:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D576B400D9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id D576B400D9 for ; Tue, 4 Jul 2023 17:59:56 +0000 (UTC) Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-5-GxHoC5PPK3OebJgU3lDw-1; Tue, 04 Jul 2023 13:59:52 -0400 X-MC-Unique: 5-GxHoC5PPK3OebJgU3lDw-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-401df9d2dc4so13911151cf.0 for ; Tue, 04 Jul 2023 10:59:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688493592; x=1691085592; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4OJPbC0BqQ+AD3fMLftREevsgU5BDaBo7zNsHHsEvsU=; b=akIMdyoh9sX85sDNCgPLIDiZ281ra/8SL0RlU4NTJuCqHTrgxyejqKgnlbDB9N/4tY eo61JzC+yzOHmWLhKUtQD7QQeFnPQPeGK5azmdcwwTeM2vYModJdHLSKPRS67U9AyYR3 k6fTLOfKxP1TrGcDbAqp1GkYwsyxul9yo0UdBtHkzl/SvrOW6lr+91CqpkN069FtB++x W1fldy5G4eBate79fbHpkR4WQQEOfwkFtXGJHVYhway15nYDp2IN2wjGPOnREN86rL1L tTeM4T5YN1eIdGhnp6focVWVdQ79mZtfthb2YWCX+H/6XzvLRjD60nrp3y75SCgrpZNJ JgNQ== X-Gm-Message-State: AC+VfDybauHYOE9KzmpV+fQpXPLiGcKuiSxR+gyWfF5yboSeEmir98Zl v1oE0CQSJnWe1Fz013KO0LYn0HITXIj23a6YWYrfhg7EFRUzS3hzXz71AFNAggJ+cmS9amkzrq3 4YEfUrL9ZK1IxQM1cdhdEFuOQbiecOw== X-Received: by 2002:a05:622a:1819:b0:400:a9a4:8517 with SMTP id t25-20020a05622a181900b00400a9a48517mr17754258qtc.4.1688493591805; Tue, 04 Jul 2023 10:59:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/AxzCLZS210yn1AZ2mhjnSxtQMZ/9l2qP39Bp+Wr4byCgdHKG8XtD9eS98B7aBHJpp+NLYw== X-Received: by 2002:a05:622a:1819:b0:400:a9a4:8517 with SMTP id t25-20020a05622a181900b00400a9a48517mr17754233qtc.4.1688493591479; Tue, 04 Jul 2023 10:59:51 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id q9-20020a0cfa09000000b006364ae68f31sm5595668qvn.97.2023.07.04.10.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 10:59:51 -0700 (PDT) Date: Tue, 4 Jul 2023 13:59:49 -0400 From: Peter Xu To: "Tian, Kevin" Message-ID: References: <20230621091112.44945-1-lingyu.liu@intel.com> <20230621091112.44945-11-lingyu.liu@intel.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Mailman-Approved-At: Wed, 05 Jul 2023 15:14:37 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688493595; 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=4OJPbC0BqQ+AD3fMLftREevsgU5BDaBo7zNsHHsEvsU=; b=GhKNYshijePubb3vtX/ime1T8WyvVa5drTaqVHMtBvLmWQ7J5fu+XXWHSxX/JSbmvAiliZ Ww2cBsOUUiP9WVbFiFBDKIJpLTDyyb+y/sUI8rc+hlJw8W5GBhWGCXx9az7y7hV0oDVr/f bHUK/CwtG7g3p7SyTStZmVuqx1MnvlM= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GhKNYshi Subject: Re: [Intel-wired-lan] [PATCH iwl-next V2 10/15] ice: save and restore TX queue head X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Burra, Phani R" , "Liu, Yi L" , "intel-wired-lan@lists.osuosl.org" , Jason Gunthorpe Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, Jul 04, 2023 at 07:38:22AM +0000, Tian, Kevin wrote: > > From: Liu, Yi L > > Sent: Monday, July 3, 2023 8:54 PM > > > > > From: Jason Gunthorpe > > > Sent: Wednesday, June 28, 2023 8:39 PM > > > > > > On Wed, Jun 28, 2023 at 08:11:07AM +0000, Liu, Yi L wrote: > > > > > > > > You can't call VFIO functions from a netdev driver. All this code > > > > > needs to be moved into the varient driver. > > > > > > > > > > This design seems pretty wild to me, it doesn't seem too robust > > > > > against a hostile VM - eg these DMAs can all fail under guest control, > > > > > and then what? > > > > > > > > > > We also don't have any guarentees defined for the VFIO protocol about > > > > > what state the vIOMMU will be in prior to reaching RUNNING. > > > > > > > > For QEMU, vIOMMU is supposed to be restored prior to devices per > > > > the below patch. But indeed, there is no guarantee that all VMMs > > > > will do the same as QEMU does. > > > > > > That doesn't seem consistent with how the kernel interface is defined > > > to work, I wonder why it was done? > > > > Add Peter. Yi - I think I replied to your private email, I'm not 100% sure this is the same thing asked? I hope you received the email. > > > > > > > > Since it is 2017, I suppose it has to do with internal qemu devices? > > > > Do you mean the devices emulated by QEMU? > > > > This sounds counter-intuitive even for emulated devices. vIOMMU is > involved only when the device wants to access guest memory. But > by definition the RESUMING path should just restore the device to > the point where it is stopped. Why would such restore create a > dependency on vIOMMU state? For why QEMU migrates vIOMMU earlier than PCI generic devices, I can try to repeat here: IIRC it's because some device needs dma translations during post_load(), I forgot which device and why, but it can make some sense to me if recovering states of the pci device may need help from a translation. If someone wants to know the details, one can just make vIOMMU prio lower than pci devices and give it a shot and see what explodes first. Thanks, -- Peter Xu _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan