Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4577209ybb; Tue, 14 Apr 2020 09:58:02 -0700 (PDT) X-Google-Smtp-Source: APiQypLWZ2/vB5QGsAoPrG+A9+6rvnAFaEO+Qp0LfUnHeEypAMIiwshp6VWKQgfs2Oc9inBfLMvJ X-Received: by 2002:a17:906:7845:: with SMTP id p5mr1006804ejm.127.1586883482391; Tue, 14 Apr 2020 09:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586883482; cv=none; d=google.com; s=arc-20160816; b=LB5saTSWrRZa5MYvyAsJaHyPK5Nht7Lyr4IX4H6d7CrjID0R7JLlteIUa0w1kOcv3d xldpjQ4GAQvD5/4Yqb4syaoZjr/VvP1EB17ZuN0wuYj30UJXVM+cR15c4wDQPeznr/Ns 1a3g2amgODi+f4Z7yPBC86yF1zW7gtu5wui5iFvJDOMufILxS9+rtNu3NRvvFMVWV1Dq fTp112/q6Jph7DCUwvZud1aD30vAFbR3/Scje0HbvjnbIykKUIJ8JG0r4sftmr0Fwfzw NePCEgNKnpl2ZFn21222Uw4+V3aePHR8U4KZVomLablcmRmF6Q0p9OTmzulE0PHc9c0l LtAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4uusICaj5chFUiS9+8wGoa7fk5wdRNlUTkogWW4juVY=; b=prW/SwOHAatnNxvzkcapWbSVmlbZo6qm6LJCCHtluf0tNOuOJRH00mlY86SCBpzrqQ WnNAvB7+1bdy0kqiDhB9t/+jgJx5jOt+7vmr15jkUu8pjNncnP3WxCTbv66trZRr4DcL IsTbrkTLaz/GCchf+kK3nk+3sapR5svaDfJN2uZcMGR33h5vijGzQMifLprHds8eJkyM TDwIyYZO0oqF4UhMH9P0Zcidm/gGqS8nMdsBxi26yOEja6IXVMYxwDtUZyvSe26qJBE/ FU8pLGwyX2bks5soGA+QEW6qJoprU8WE/zYpCRyV8Yg3kQ5LUwy/upaTv0JJO6AUZDfY Ft4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W5n+Ul2F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si5782873edw.356.2020.04.14.09.57.38; Tue, 14 Apr 2020 09:58:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W5n+Ul2F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502164AbgDNQu6 (ORCPT + 99 others); Tue, 14 Apr 2020 12:50:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:55496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440428AbgDNQt0 (ORCPT ); Tue, 14 Apr 2020 12:49:26 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77F43208FE; Tue, 14 Apr 2020 16:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586882966; bh=e8sa2L9jrsFs8MZxmSzZtk35TsqpIfaY4VUQqf3DBa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W5n+Ul2F1XVNQ1AQAU6F1NPlDnGVsDUbcb1/j+DXUSV9YceAsnW+CCddjBCLLv89i 1UJSuvzjDufw+nhr94MMOtMFIJXGAyNw7hTR98uNmjss1PqCcjLE5vnumkGR75j+bq eTIndeL3qtd/C9LsTxs/gCwLcuqGfBnMplg+OieU= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , "Michael S . Tsirkin" , Tiwei Bie Subject: [PATCH 08/15] tools include UAPI: Sync linux/vhost.h with the kernel sources Date: Tue, 14 Apr 2020 13:48:47 -0300 Message-Id: <20200414164854.26026-9-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200414164854.26026-1-acme@kernel.org> References: <20200414164854.26026-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo To get the changes in: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h This automatically picks these new ioctls, making tools such as 'perf trace' aware of them and possibly allowing to use the strings in filters, etc: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after $ diff -u before after --- before 2020-04-14 09:12:28.559748968 -0300 +++ after 2020-04-14 09:12:38.781696242 -0300 @@ -24,9 +24,16 @@ [0x44] = "SCSI_GET_EVENTS_MISSED", [0x60] = "VSOCK_SET_GUEST_CID", [0x61] = "VSOCK_SET_RUNNING", + [0x72] = "VDPA_SET_STATUS", + [0x74] = "VDPA_SET_CONFIG", + [0x75] = "VDPA_SET_VRING_ENABLE", }; static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", [0x12] = "GET_VRING_BASE", [0x26] = "GET_BACKEND_FEATURES", + [0x70] = "VDPA_GET_DEVICE_ID", + [0x71] = "VDPA_GET_STATUS", + [0x73] = "VDPA_GET_CONFIG", + [0x76] = "VDPA_GET_VRING_NUM", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Michael S. Tsirkin Cc: Namhyung Kim Cc: Tiwei Bie Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/vhost.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/include/uapi/linux/vhost.h b/tools/include/uapi/linux/vhost.h index 40d028eed645..9fe72e4b1373 100644 --- a/tools/include/uapi/linux/vhost.h +++ b/tools/include/uapi/linux/vhost.h @@ -116,4 +116,28 @@ #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) +/* VHOST_VDPA specific defines */ + +/* Get the device id. The device ids follow the same definition of + * the device id defined in virtio-spec. + */ +#define VHOST_VDPA_GET_DEVICE_ID _IOR(VHOST_VIRTIO, 0x70, __u32) +/* Get and set the status. The status bits follow the same definition + * of the device status defined in virtio-spec. + */ +#define VHOST_VDPA_GET_STATUS _IOR(VHOST_VIRTIO, 0x71, __u8) +#define VHOST_VDPA_SET_STATUS _IOW(VHOST_VIRTIO, 0x72, __u8) +/* Get and set the device config. The device config follows the same + * definition of the device config defined in virtio-spec. + */ +#define VHOST_VDPA_GET_CONFIG _IOR(VHOST_VIRTIO, 0x73, \ + struct vhost_vdpa_config) +#define VHOST_VDPA_SET_CONFIG _IOW(VHOST_VIRTIO, 0x74, \ + struct vhost_vdpa_config) +/* Enable/disable the ring. */ +#define VHOST_VDPA_SET_VRING_ENABLE _IOW(VHOST_VIRTIO, 0x75, \ + struct vhost_vring_state) +/* Get the max ring size. */ +#define VHOST_VDPA_GET_VRING_NUM _IOR(VHOST_VIRTIO, 0x76, __u16) + #endif -- 2.21.1