From nobody Wed Nov 27 04:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=oracle.com); dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=2; a=rsa-sha256; t=1701731853; cv=pass; d=zohomail.com; s=zohoarc; b=lPZh3UV/M66WIpUJPmVP2TOewNaZVYUs3xzdB8eysSwbymLUeyl98UNpCby0CKACL40C5cibMvxJJO9flrKUUATryRkGbY06yIL8Fdyau3/rgRPVWZxsM7TQIWQxhmjlqkvY+McWTooy2HCK8QafzHB1P1tnMJ6SVAdlRGql0ng= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701731853; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JWoPemWX+ddCBvFFZOWOFw4Y+h7bgjS6zI46pz45x3c=; b=ez7kYhgKQgb6u7NIvL+JcOxUmMJ7pYHzbsPEonzfvov82L6SBtikwpwss2X48eJAezd9JrNzrDbR6X4yWtMkBPGWZ/a6oIaHNPlUKCHv2F7LdjHTS7POrSmKl3alo84JD12pnHgLQRd/35oT5gsUYrNz0F4G5c+0bUGHWUwgfYs= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=oracle.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701731852890258.19005487221114; Mon, 4 Dec 2023 15:17:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAIB9-0002NR-Nb; Mon, 04 Dec 2023 18:16:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAIB1-0002LX-PQ for qemu-devel@nongnu.org; Mon, 04 Dec 2023 18:16:35 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAIAz-0007Cj-BK for qemu-devel@nongnu.org; Mon, 04 Dec 2023 18:16:35 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MoCt4004747; Mon, 4 Dec 2023 23:16:27 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3usqnf02bh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 23:16:27 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4MIteK028635; Mon, 4 Dec 2023 23:16:26 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uqu1d18xm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Dec 2023 23:16:25 +0000 Received: from CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) by MN6PR10MB7466.namprd10.prod.outlook.com (2603:10b6:208:477::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Mon, 4 Dec 2023 23:16:24 +0000 Received: from CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::449f:4fd9:2d3e]) by CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::449f:4fd9:2d3e%4]) with mapi id 15.20.7046.033; Mon, 4 Dec 2023 23:16:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=JWoPemWX+ddCBvFFZOWOFw4Y+h7bgjS6zI46pz45x3c=; b=gP8b+GuZhXdYZ0JxrhCteKV/t057T9MZqZn6GawP9MbKcHKx4dFLCmJMM2Eqi9EsWWvN Rems3+6jbeOIcUG9D+vekA6ToN3e4nFhX1VZyYvcM1fR7cYsHJMYoxYL3wNbrbB7VhQy qnroMKtkgV/F05wxkiHIBGOVsfgeujFsXfIweXOTZncr7svDZQd5AT2HC0I9FbJCgeHj iCuv3H58eghtsCAoGEYSH+jePwhraGmTLS0CEe7DRd9q1t6QSh+XKo6Jwdg5B7oTSEyc QJ1wzmqTKqszffWU9whWL/xLMqlmTlifOfR7uOe2UoU7/9AB0iwoqpjhKX9n87XZXP1e uQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PCSbUjT7fX6wz/9Wqc0hhTAYwEiUmOVd3UmFa2Ml5I0uwLWj8J2zJQ7NLllVifp5DV3Ocm+NMAtREXCNM38MGPtEpV3cQXvvG4x7Eo9BbO85XmGFEkVm6hBJIGsi0wYqkLH0KmvVQ0OXkpR6oGkZ01RO8bSpa6/q5gCfvQVdc8JPHlTRfYGT0pRBT1fEHMSoR8WQE3EPrSA3XI+PXLqTSS0moicL8Oas768myKZ/k34Kg5f17ky6pHXp0jW3CymQotPYjY5ESBBF81aIhR4mDW9tTzGCEWo62jdX2uD4oWnBoFq0se+5EGQ3jsnpRGBt4ISFvJWdzTd6ZkNph4k9Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JWoPemWX+ddCBvFFZOWOFw4Y+h7bgjS6zI46pz45x3c=; b=USBsaurFmq2bmtZk7qMfrimquyrkbDVBFdrwmUtMoUhUwTbLRpVHd7kPC5gZ1dAmbbx2mthJQYANZPkFcXxvGhpZMWJtyWi9NbwpRIqla4uNbItZ9G4AqWBRtBuSfS2ieS7wOwwdFQcRnofIkFepC5lxVgSOdCHf2N3CI36xwllzpzs/2tVWgvMMDS2m90uLLueFu/PcL6kM8tXVqK/6PV8MREmwuyPlsd3cQA1jnjphLq08OHF/+TGSp8yWHD93gc/TnesmE3kEK2Gz9eF4eSTkSInAvMBgP+wowBLUOH0x6/ARa/dubPujuAa7xmfoWRU4GeeYtHuh1R9cyTYjSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JWoPemWX+ddCBvFFZOWOFw4Y+h7bgjS6zI46pz45x3c=; b=NCrrJTeNB98qfLqgyZeE3VQpsB3QvH6qr3tCqF7QJnjlXT443AGuoOmvF4gtGtDeOkcjQ4J/4Xz+1ZZFPo4JB/zWBn5+GvDHEsuqk+NR0XpdFqEbpTUXY42+9PFaGiwSmQdF14NOs7G/XhX4MqbQFx4/0vRmf6DmJxk6SeRXLfo= From: Mike Christie To: fam@euphon.net, stefanha@redhat.com, jasowang@redhat.com, mst@redhat.com, sgarzare@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org Cc: Mike Christie Subject: [PATCH v3 1/2] vhost: Add worker backend callouts Date: Mon, 4 Dec 2023 17:16:17 -0600 Message-Id: <20231204231618.21962-2-michael.christie@oracle.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231204231618.21962-1-michael.christie@oracle.com> References: <20231204231618.21962-1-michael.christie@oracle.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: DS7PR05CA0055.namprd05.prod.outlook.com (2603:10b6:8:2f::15) To CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB7243:EE_|MN6PR10MB7466:EE_ X-MS-Office365-Filtering-Correlation-Id: 173042d0-c949-4025-a3fa-08dbf51f0887 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MxVx5TFvHqTWgPIiPc1QUA5QZQ6pjUEPzSyWJhtHYzOpfwRoUwytrp629wPK9S4kv+3w8W3qKhhtNGwIN6T98rkBXM5n3ZEzcImyEvUkQwzbUJsuEUByVLAdOllm1J9UFa2c+ofaGfpJ7ssThriGEomOVtCFEh+1oLDT38KO3Uk6xWfAomHZ/ttPscXnrxaU7dd5kGdGF8zEHpqwtzTwHD9jX+KnunzI73p7MaMZFRQCoLz+iT9Ng9b1qaaR2qYcIYGBNRzCRh6fQw+YdlBmPU8H6onMXOnfmT9QA3sS25Cr2WezMq9wpYdr9IWnUf+ah5GascxrSkfKtG4VdHIUOOZG33TkpbH/p4+SG7ZTPIx+sAYx4/vs+0Bdt3XMPAHf+Nh2+Luprr9aU1TfdkU/gV0yCXVY9MDStk/q3QUrn8pQ4zE3p/xns6TslB4Q+vmFi0Vq9N6FiF6cePdJXgiBOuLb6gDL//ZX4cPi1jUXh2/5ZUbigYW03VKkebFMCuEzrc19m16/NnPafECkk8YB3HVhNJ8olgSdXX3djh8Ux//QJnaY4AdXf4gyk+v3PTxb X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR10MB7243.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(39860400002)(366004)(346002)(376002)(396003)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(66556008)(66476007)(66946007)(4326008)(8676002)(8936002)(316002)(6486002)(478600001)(6666004)(5660300002)(36756003)(41300700001)(2906002)(86362001)(2616005)(107886003)(26005)(1076003)(38100700002)(6506007)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?aWP4V8LZ60j9LQHHaMAej13SSFGQqAaKDVNK2JrXn6BrgO93lOnCHobPU6gJ?= =?us-ascii?Q?4ASzvp0TspmMTsWMHiSE344JV5MNm2l7cYCf/AxBcU8c3CmobfdEBu+KyFxQ?= =?us-ascii?Q?u9/U0tZLtFRr58qZaLTxRZmUB/C9TJIU30Qci7eG77/BwP0eQUMMKL3+OiKn?= =?us-ascii?Q?mqXB5bneMofPlzHSpkqIRoNBGl9sJ51QPgjQNwyYRevErA/Rk/SImfyyyWOP?= =?us-ascii?Q?JkgLvIK/OSxqbYDTcUTyoxksjJH7vE5JXhBCCsYAnnisqyZKMrS9PFuO5vY4?= =?us-ascii?Q?HFRPXviW1/goiDwP/YV5RCLnj8d/4SepyB5OHK9MZFDbZJbSlLDWd1Miyf+U?= =?us-ascii?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yMiTh9Nd/lUO9fyoQGuxjjqPiuSKlL8jQPxJe/xXWq9yP3jagdpNeV6W9vbWpsaAIUX4tMS0evXxve84XyraaE7gGsBvov6BIa+7/jS8whWxL9pqWfF3b1PlZq9CJe5gqA5vhn/nF1ObtSBSuHINyFZCzTi2GloICgt8uDeFjxavcTRVund+fD3WvBKvGyHaNvSIACWGxTTwId4C43OIFXwwu4MYeDhTQusE5v9uR8gcSFSuR/eQpgLhjNhr65TO8+UWWix5PN3o+m4WqvZP5g3kzyGSYe+FVwVwPiuGQ14oRDxE+f29ZkbBJDnKmyPsEdH54k8yu//OHIru8y X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 173042d0-c949-4025-a3fa-08dbf51f0887 X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB7243.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2023 23:16:24.0252 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7VUiDmH692U4t66Mn0xl6NKFpBW15MaMH9ygkqL2nAvI1GVmPqUFGhKx291G31RltLO/USIt9abZTy4Lw5A1irrSZ84DTvHOPRTF7U0ACrk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR10MB7466 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_21,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 spamscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040182 X-Proofpoint-ORIG-GUID: nDKB-0gEOB6wDXlL7UvDxGDv0k9QpLIG X-Proofpoint-GUID: nDKB-0gEOB6wDXlL7UvDxGDv0k9QpLIG Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.165.32; envelope-from=michael.christie@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @oracle.com) X-ZM-MESSAGEID: 1701731854095100001 Content-Type: text/plain; charset="utf-8" This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhost-backend.c | 28 ++++++++++++++++++++++++++++ include/hw/virtio/vhost-backend.h | 14 ++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c index 17f3fc6a0823..833804dd40f2 100644 --- a/hw/virtio/vhost-backend.c +++ b/hw/virtio/vhost-backend.c @@ -158,6 +158,30 @@ static int vhost_kernel_set_vring_busyloop_timeout(str= uct vhost_dev *dev, return vhost_kernel_call(dev, VHOST_SET_VRING_BUSYLOOP_TIMEOUT, s); } =20 +static int vhost_kernel_new_worker(struct vhost_dev *dev, + struct vhost_worker_state *worker) +{ + return vhost_kernel_call(dev, VHOST_NEW_WORKER, worker); +} + +static int vhost_kernel_free_worker(struct vhost_dev *dev, + struct vhost_worker_state *worker) +{ + return vhost_kernel_call(dev, VHOST_FREE_WORKER, worker); +} + +static int vhost_kernel_attach_vring_worker(struct vhost_dev *dev, + struct vhost_vring_worker *wor= ker) +{ + return vhost_kernel_call(dev, VHOST_ATTACH_VRING_WORKER, worker); +} + +static int vhost_kernel_get_vring_worker(struct vhost_dev *dev, + struct vhost_vring_worker *worker) +{ + return vhost_kernel_call(dev, VHOST_GET_VRING_WORKER, worker); +} + static int vhost_kernel_set_features(struct vhost_dev *dev, uint64_t features) { @@ -313,6 +337,10 @@ const VhostOps kernel_ops =3D { .vhost_set_vring_err =3D vhost_kernel_set_vring_err, .vhost_set_vring_busyloop_timeout =3D vhost_kernel_set_vring_busyloop_timeout, + .vhost_get_vring_worker =3D vhost_kernel_get_vring_worker, + .vhost_attach_vring_worker =3D vhost_kernel_attach_vring_worker, + .vhost_new_worker =3D vhost_kernel_new_worker, + .vhost_free_worker =3D vhost_kernel_free_worker, .vhost_set_features =3D vhost_kernel_set_features, .vhost_get_features =3D vhost_kernel_get_features, .vhost_set_backend_cap =3D vhost_kernel_set_backend_cap, diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-ba= ckend.h index a86d103f8245..70c2e8ffeee5 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -45,6 +45,8 @@ struct vhost_memory; struct vhost_vring_file; struct vhost_vring_state; struct vhost_vring_addr; +struct vhost_vring_worker; +struct vhost_worker_state; struct vhost_scsi_target; struct vhost_iotlb_msg; struct vhost_virtqueue; @@ -85,6 +87,14 @@ typedef int (*vhost_set_vring_err_op)(struct vhost_dev *= dev, struct vhost_vring_file *file); typedef int (*vhost_set_vring_busyloop_timeout_op)(struct vhost_dev *dev, struct vhost_vring_stat= e *r); +typedef int (*vhost_attach_vring_worker_op)(struct vhost_dev *dev, + struct vhost_vring_worker *wor= ker); +typedef int (*vhost_get_vring_worker_op)(struct vhost_dev *dev, + struct vhost_vring_worker *worker= ); +typedef int (*vhost_new_worker_op)(struct vhost_dev *dev, + struct vhost_worker_state *worker); +typedef int (*vhost_free_worker_op)(struct vhost_dev *dev, + struct vhost_worker_state *worker); typedef int (*vhost_set_features_op)(struct vhost_dev *dev, uint64_t features); typedef int (*vhost_get_features_op)(struct vhost_dev *dev, @@ -172,6 +182,10 @@ typedef struct VhostOps { vhost_set_vring_call_op vhost_set_vring_call; vhost_set_vring_err_op vhost_set_vring_err; vhost_set_vring_busyloop_timeout_op vhost_set_vring_busyloop_timeout; + vhost_new_worker_op vhost_new_worker; + vhost_free_worker_op vhost_free_worker; + vhost_get_vring_worker_op vhost_get_vring_worker; + vhost_attach_vring_worker_op vhost_attach_vring_worker; vhost_set_features_op vhost_set_features; vhost_get_features_op vhost_get_features; vhost_set_backend_cap_op vhost_set_backend_cap; --=20 2.34.1