Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp417241rdb; Tue, 31 Oct 2023 10:54:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2ozrT0m0GtGGGnAQbhPvf6MMkcVMVp7+8ra8vz+6jzXCE4VsrL//CJ6R4LDEBoZWl196p X-Received: by 2002:a17:903:2283:b0:1cc:6f51:b166 with SMTP id b3-20020a170903228300b001cc6f51b166mr1796458plh.65.1698774899123; Tue, 31 Oct 2023 10:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698774899; cv=none; d=google.com; s=arc-20160816; b=ROYKHPp3MLwyiEBWZZwVf9j1V+u28F4K7LXkALZpmVCSC/TNiERXNTYIsERlaOGrrq tVYAfXtkxk4AThPHX5ubV5gP47Ra1XHPTejLXE3yatJ006gwB2IQ1qN9MkJf7E7wBvr2 vZ2jJcYNte7/2yUqtfygVms6ThQow4wdtU7zqx12FEZ3x8II43JIyR++q3EP4weXFajm 3b06bOyZtYjJ1Fdt9PVOz+2gU5kwOWVHzp6aCfS4Ywj4b2iuNR3ZqnmT2nthP/RgG5qw Aqu26Z1zdFjaIIT5uxVwc6z+focnrpYMn0+wTdFHRwOUMhROWj8dtY1UKyv2wfI32mxY kbSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=6i1b+NqFN3idrUVla2WD0jWUDHt8ESgZlQ4YQJ+PSW0=; fh=QM3iHlraaSO0pdWZ76BAk5csxIday7UaEpSWJJKmvUI=; b=Y3U7jwGhroPzwVrRE9hQk7a5xtKBXEjiGaxORtn4XTlTmZpjPkz0ZHjKEg4LzXbeqm z8icAmxs5RCJ0vzYKoLffWJeZjFvDW4R8f4Ba5zc/NhXg6WOtJfmFvof4RmLOplX9IG7 TyIEm6mR/V0NoMCeZNiMarMpw9YkWptI15dF7sUxxsXJm5buAIqCKejxKfpAQsYp+M3r owdXgG48z/wChtxUCURCr7rnzFRNU/95/ynPVbOfdOj3TKanxeSpE1jXpvTw7Z1n26GU FZ4kyfVPbzX0cV815GN3Ki/0DfUC2LlDchUlCWQAHG2V4XBoXgS3ms+p5pKVEacSrgB/ +PCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jT4ujSKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id t4-20020a170902e84400b001bf0b29d935si1330960plg.34.2023.10.31.10.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jT4ujSKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5EE0C801B301; Tue, 31 Oct 2023 10:54:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347002AbjJaRyu (ORCPT + 99 others); Tue, 31 Oct 2023 13:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347017AbjJaRys (ORCPT ); Tue, 31 Oct 2023 13:54:48 -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 ESMTPS id 2D95FF9 for ; Tue, 31 Oct 2023 10:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698774844; 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; bh=6i1b+NqFN3idrUVla2WD0jWUDHt8ESgZlQ4YQJ+PSW0=; b=jT4ujSKsGJrfmeh4Wu+BU0phHRThuxFQCxeHQ10nppQIeaobrdR05q44lC3aOiGPbEOHsW B5Qk9XGCHlQ7OfUI5B9WWBPSGCMSdqRPDlPNBP4InQglznxySw6hQhY6Zzpomy6CCq+hT3 AJQJ/fS/mtoBrjW1HhKGAEHW6RsN1V4= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-232-IEEY26DBMV2KryHaovPTFg-1; Tue, 31 Oct 2023 13:54:02 -0400 X-MC-Unique: IEEY26DBMV2KryHaovPTFg-1 Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-786d9d4d9a6so519965439f.2 for ; Tue, 31 Oct 2023 10:54:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698774842; x=1699379642; h=content-transfer-encoding:mime-version:message-id:subject:cc:to :from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6i1b+NqFN3idrUVla2WD0jWUDHt8ESgZlQ4YQJ+PSW0=; b=XeQw4A6ytvi8bsY9hYxCaVMVUZcoXiLbbVZ0JDs9ATIuj8M+4UePyQn/WNhNXvQHUJ qDv1FK6AaaCkaAy6KS0vpBG33pvP1ahfJu1QpSJXjOB3ZiHLTkdWdC4U9xjEQ7UOFduo Yk47FTBEwCiWu9QR0765xGwkQbr9AljyhqPoseWQ3T6+1DSFmkQaePDPuxZK0hs71ItD MJlRIqXDxK2ff56lZMob243kWlLiHlYxP8PTDLnRPcnY1aCiUwVe+JhFgY38p//+CGGb 0LrSPzdjbCyf1YVV8dQOwNjy+SP7OcYEy084B8hhNR2lVFiX70AmiX22I1QFgjWwWh9z 58SA== X-Gm-Message-State: AOJu0Yzv6MVTou6xHdQKjb1TrXhabOLlDS0E47705dDb+WWBa83/bTfG uLNDtGUdf1QHso8EpQJlWmlO0pH4D1iDRCT4VCyIvsL3PGyLwdOrhLSgqEycbeRpZ/wUPLQN9jJ vYZVh6SqHtntiwrHFMN9sE10Q X-Received: by 2002:a05:6e02:1e02:b0:357:478f:a744 with SMTP id g2-20020a056e021e0200b00357478fa744mr20841439ila.10.1698774842196; Tue, 31 Oct 2023 10:54:02 -0700 (PDT) X-Received: by 2002:a05:6e02:1e02:b0:357:478f:a744 with SMTP id g2-20020a056e021e0200b00357478fa744mr20841429ila.10.1698774841988; Tue, 31 Oct 2023 10:54:01 -0700 (PDT) Received: from redhat.com ([38.15.60.12]) by smtp.gmail.com with ESMTPSA id fn25-20020a056638641900b0042b3bb542aesm458221jab.168.2023.10.31.10.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:54:01 -0700 (PDT) Date: Tue, 31 Oct 2023 11:54:00 -0600 From: Alex Williamson To: Linus Torvalds Cc: , "kvm@vger.kernel.org" Subject: [GIT PULL] VFIO updates for v6.7-rc1 Message-ID: <20231031115400.570e00d1.alex.williamson@redhat.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.35; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 10:54:56 -0700 (PDT) Hi Linus, The following changes since commit b6cd17050bc0817c79924f23716198b2e935556e: Merge tag 'vfio-v6.6-rc4' of https://github.com/awilliam/linux-vfio (2023-09-27 09:33:55 -0700) are available in the Git repository at: https://github.com/awilliam/linux-vfio.git tags/vfio-v6.7-rc1 for you to fetch changes up to 2b88119e35b00d8cb418d86abbace3b90a993bd7: vfio/mtty: Enable migration support (2023-10-24 15:03:10 -0600) ---------------------------------------------------------------- VFIO updates for v6.7 - Add support for "chunk mode" in the mlx5-vfio-pci variant driver, which allows both larger device image sizes for migration, beyond the previous 4GB limit, and also read-ahead support for improved migration performance. (Yishai Hadas) - A new bus master control interface for the CDX bus driver where there is no in-band mechanism to toggle device DMA as there is through config space on PCI devices. (Nipun Gupta) - Add explicit alignment directives to vfio data structures to reduce the chance of breaking 32-bit userspace. In most cases this is transparent and the remaining cases where data structures are padded work within the existing rules for extending data structures within vfio. (Stefan Hajnoczi) - Resolve a bug in the cdx bus driver noted when compiled with clang where missing parenthesis result in the wrong operation. (Nathan Chancellor) - Resolve errors reported by smatch for a function when dealing with invalid inputs. (Alex Williamson) - Add migration support to the mtty vfio/mdev sample driver for testing and integration purposes, allowing CI of migration without specific hardware requirements. Also resolve many of the short- comings of this driver relative to implementation of the vfio interrupt ioctl along the way. (Alex Williamson) ---------------------------------------------------------------- Alex Williamson (4): Merge branch 'mlx5-vfio' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into v6.7/vfio/next vfio: Fix smatch errors in vfio_combine_iova_ranges() vfio/mtty: Overhaul mtty interrupt handling vfio/mtty: Enable migration support Nathan Chancellor (1): vfio/cdx: Add parentheses between bitwise AND expression and logical NOT Nipun Gupta (3): cdx: add support for bus mastering vfio: add bus master feature to device feature ioctl vfio-cdx: add bus mastering device feature support Stefan Hajnoczi (3): vfio: trivially use __aligned_u64 for ioctl structs vfio: use __aligned_u64 in struct vfio_device_gfx_plane_info vfio: use __aligned_u64 in struct vfio_device_ioeventfd Yishai Hadas (9): net/mlx5: Introduce ifc bits for migration in a chunk mode vfio/mlx5: Wake up the reader post of disabling the SAVING migration file vfio/mlx5: Refactor the SAVE callback to activate a work only upon an error vfio/mlx5: Enable querying state size which is > 4GB vfio/mlx5: Rename some stuff to match chunk mode vfio/mlx5: Pre-allocate chunks for the STOP_COPY phase vfio/mlx5: Add support for SAVING in chunk mode vfio/mlx5: Add support for READING in chunk mode vfio/mlx5: Activate the chunk mode functionality drivers/cdx/cdx.c | 32 ++ drivers/cdx/controller/cdx_controller.c | 4 + drivers/cdx/controller/mcdi_functions.c | 58 +++ drivers/cdx/controller/mcdi_functions.h | 13 + drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- drivers/vfio/cdx/main.c | 57 ++- drivers/vfio/cdx/private.h | 2 + drivers/vfio/pci/mlx5/cmd.c | 103 ++-- drivers/vfio/pci/mlx5/cmd.h | 28 +- drivers/vfio/pci/mlx5/main.c | 283 ++++++++--- drivers/vfio/vfio_main.c | 10 + include/linux/cdx/cdx_bus.h | 18 + include/linux/mlx5/mlx5_ifc.h | 15 +- include/uapi/linux/vfio.h | 47 +- samples/vfio-mdev/mbochs.c | 2 +- samples/vfio-mdev/mdpy.c | 2 +- samples/vfio-mdev/mtty.c | 829 +++++++++++++++++++++++++++++--- 17 files changed, 1309 insertions(+), 196 deletions(-)