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 1DE26C433EF for ; Tue, 28 Sep 2021 20:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E250E611C0 for ; Tue, 28 Sep 2021 20:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242714AbhI1UU2 (ORCPT ); Tue, 28 Sep 2021 16:20:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32027 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242698AbhI1UU2 (ORCPT ); Tue, 28 Sep 2021 16:20:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632860328; 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=6ty+2QJnNc2ErgiU8OvTWlQKFe+mg73c0FaGXapyCUI=; b=LvO954vo87napXaGvSpbesqcOibkIb+6cHx72+uulazBnROn7H5eO/l7YnhhXwOjgnvkbI 2lm3jPI+3cro4AU/kiE3nA3NkqZO3FTVrG5p5YvdiyXKYtXAJyWRSLqjpH0YdbbspJbwUV DSTxrbFwt7Aqf/JCyWhpSgxr0tYWmVQ= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-gg35dWn7M76HaDHVgieqDg-1; Tue, 28 Sep 2021 16:18:46 -0400 X-MC-Unique: gg35dWn7M76HaDHVgieqDg-1 Received: by mail-ot1-f72.google.com with SMTP id o12-20020a9d410c000000b00547056f6644so22116425ote.20 for ; Tue, 28 Sep 2021 13:18:46 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ty+2QJnNc2ErgiU8OvTWlQKFe+mg73c0FaGXapyCUI=; b=Z7LkROLqsrblO3Exwb41at+hdcrQyVEzrEIYKbL9T+eEAEsvAYOSfTecWTX1btmKp9 GDQnl5ybknRngrwLIn3104ewQQrNr8USdcZQ3MfokSJKUB1n7H8Kux9guSzjZsax06yB 9CTiyfiNBNg1tBtAHTtYFXZSEC8XlbaV+QIUsGsB7DQ3oLfQj+E2qesRw00AtIjxOIIc tFGR4fLCBJtOOxgpoI2R8ZUwOvOsrzuKLATUuG5S5fEgd+DoLfAh0aruRfKBhTiRKK9o W2OzYYfNUfsI2sqaQSmdFXZcUz8fVrMAhlQDvv2iXmjV3BwDqfv92NwuPCBnKWDjleqk O9Qg== X-Gm-Message-State: AOAM533qdhO5MBO8d6qiTJQ28g0asjDXQr89ZTmtVdl1DWdsqktcPBno RfqqFbzvlXCZh6QiH54oh60yqFxnGfWlK88VG2x+Ng5fShptAb/vltuxY7Go0wyf8PCS96xPH/e UWUXMr9PPYWeXYxyUy8BN0g== X-Received: by 2002:a05:6808:1911:: with SMTP id bf17mr4993802oib.91.1632860326165; Tue, 28 Sep 2021 13:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnEF+jm/cVpFs6w3fcZqtlMjJaCj4YFZYEjO6KmAyfvS+riQgxI4FMp9dgwGaUsxOL1EiLxA== X-Received: by 2002:a05:6808:1911:: with SMTP id bf17mr4993786oib.91.1632860325974; Tue, 28 Sep 2021 13:18:45 -0700 (PDT) Received: from redhat.com ([198.99.80.109]) by smtp.gmail.com with ESMTPSA id p18sm28234otk.7.2021.09.28.13.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 13:18:45 -0700 (PDT) Date: Tue, 28 Sep 2021 14:18:44 -0600 From: Alex Williamson To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , Yishai Hadas , Bjorn Helgaas , "David S. Miller" , Jakub Kicinski , Kirti Wankhede , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Saeed Mahameed , Cornelia Huck Subject: Re: [PATCH mlx5-next 2/7] vfio: Add an API to check migration state transition validity Message-ID: <20210928141844.15cea787.alex.williamson@redhat.com> In-Reply-To: <20210928193550.GR3544071@ziepe.ca> References: <20210927164648.1e2d49ac.alex.williamson@redhat.com> <20210927231239.GE3544071@ziepe.ca> <20210928131958.61b3abec.alex.williamson@redhat.com> <20210928193550.GR3544071@ziepe.ca> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, 28 Sep 2021 16:35:50 -0300 Jason Gunthorpe wrote: > On Tue, Sep 28, 2021 at 01:19:58PM -0600, Alex Williamson wrote: > > > In defining the device state, we tried to steer away from defining it > > in terms of the QEMU migration API, but rather as a set of controls > > that could be used to support that API to leave us some degree of > > independence that QEMU implementation might evolve. > > That is certainly a different perspective, it would have been > better to not express this idea as a FSM in that case... > > So each state in mlx5vf_pci_set_device_state() should call the correct > combination of (un)freeze, (un)quiesce and so on so each state > reflects a defined operation of the device? I'd expect so, for instance the implementation of entering the _STOP state presumes a previous state that where the device is apparently already quiesced. That doesn't support a direct _RUNNING -> _STOP transition where I argued in the linked threads that those states should be reachable from any other state. Thanks, Alex