From patchwork Mon Jan 7 17:54:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venu Busireddy X-Patchwork-Id: 10750955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 549C36C5 for ; Mon, 7 Jan 2019 18:01:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 460AE289A2 for ; Mon, 7 Jan 2019 18:01:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AA6428997; Mon, 7 Jan 2019 18:01:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3DCB28986 for ; Mon, 7 Jan 2019 18:01:15 +0000 (UTC) Received: from localhost ([127.0.0.1]:36795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggZD8-0004TS-1x for patchwork-qemu-devel@patchwork.kernel.org; Mon, 07 Jan 2019 13:01:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggZ7D-0006g7-Ki for qemu-devel@nongnu.org; Mon, 07 Jan 2019 12:55:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggZ7C-0002g5-1z for qemu-devel@nongnu.org; Mon, 07 Jan 2019 12:55:07 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:41524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ggZ7B-0002dd-MH for qemu-devel@nongnu.org; Mon, 07 Jan 2019 12:55:05 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x07Hs6hB051603; Mon, 7 Jan 2019 17:55:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=BMD9p/anwBszQBbFxS+ndM6lSXwZOBqCYtyAPruzgIU=; b=K64W7MbT3DrEFTIMUNIWkFTA4shgafyW+ooNXAzfKSGUN1hFnIda9THdbhPFLWP3R1Ip O8bgbrTW7x0wv75/uX0EGinBh1w3EI4YL0K2+3C2JlkQU2Jy05xfJvZZnJLzvn/F3bsT gzwk3iy93zh7v2JrI1zIks1gWdBqL6A390lB4nS6TrxSbZtpLPy2VCL+ipR23wt+UkoI 4rC79ADjPVR375wPxUVzxIMV9rPwu8PT+cL4iFQSY6xbaCHzhg2mRwTeKIfCk1gLHb1U 7WEtzN9AwRE4eygR19YKTNwh65GJs06TXYfzEXHGqIpmGFc+OA24mSorpiULxbP8ggLy pg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2ptj3dqeam-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Jan 2019 17:55:02 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x07Ht1W1021273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Jan 2019 17:55:01 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x07Ht0mO029791; Mon, 7 Jan 2019 17:55:00 GMT Received: from ban25x6uut28.us.oracle.com (/10.153.73.28) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Jan 2019 09:55:00 -0800 From: Venu Busireddy To: venu.busireddy@oracle.com, "Michael S. Tsirkin" , Marcel Apfelbaum Date: Mon, 7 Jan 2019 12:54:45 -0500 Message-Id: <1546883690-17798-1-git-send-email-venu.busireddy@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9129 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=716 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901070153 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 Subject: [Qemu-devel] [PATCH v2 0/5] Support for datapath switching during live migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Implement the infrastructure to support datapath switching during live migration involving SR-IOV devices. 1. This patch is based off on the current VIRTIO_NET_F_STANDBY feature bit and MAC address device pairing. 2. This set of events will be consumed by userspace management software to orchestrate all the hot plug and datapath switching activities. This scheme has the least QEMU modifications while allowing userspace software to build its own intelligence to control the whole process of SR-IOV live migration. 3. While the hidden device model (viz. coupled device model) is still being explored for automatic hot plugging (QEMU) and automatic datapath switching (host-kernel), this series provides a supplemental set of interfaces if management software wants to drive the SR-IOV live migration on its own. It should not conflict with the hidden device model but just offers simplicity of implementation. Si-Wei Liu (2): vfio-pci: Add FAILOVER_PRIMARY_CHANGED event to shorten downtime during failover pci: query command extension to check the bus master enabling status of the failover-primary device Sridhar Samudrala (1): virtio_net: Add VIRTIO_NET_F_STANDBY feature bit. Venu Busireddy (2): virtio_net: Add support for "Data Path Switching" during Live Migration. virtio_net: Add a query command for FAILOVER_STANDBY_CHANGED event. --- Changes in v2: Added a query command for FAILOVER_STANDBY_CHANGED event. Added a query command for FAILOVER_PRIMARY_CHANGED event. hmp.c | 5 +++ hw/acpi/pcihp.c | 27 +++++++++++ hw/net/virtio-net.c | 42 +++++++++++++++++ hw/pci/pci.c | 5 +++ hw/vfio/pci.c | 60 +++++++++++++++++++++++++ hw/vfio/pci.h | 1 + include/hw/pci/pci.h | 1 + include/hw/virtio/virtio-net.h | 1 + include/net/net.h | 2 + net/net.c | 59 ++++++++++++++++++++++++ qapi/misc.json | 5 ++- qapi/net.json | 100 +++++++++++++++++++++++++++++++++++++++++ 12 files changed, 307 insertions(+), 1 deletion(-)