From patchwork Sat May 18 07:24:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanchu Xie X-Patchwork-Id: 13667501 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA93C25B74 for ; Sat, 18 May 2024 07:24:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B9606B007B; Sat, 18 May 2024 03:24:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 540A56B0083; Sat, 18 May 2024 03:24:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3BA816B0088; Sat, 18 May 2024 03:24:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1328B6B007B for ; Sat, 18 May 2024 03:24:44 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A896BC05E1 for ; Sat, 18 May 2024 07:24:42 +0000 (UTC) X-FDA: 82130679204.12.8E365BF Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf26.hostedemail.com (Postfix) with ESMTP id D568114000A for ; Sat, 18 May 2024 07:24:39 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=LOeBUcQV; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf26.hostedemail.com: domain of 3tldIZgcKCL83zfshmzlttlqj.htrqnsz2-rrp0fhp.twl@flex--yuanchu.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3tldIZgcKCL83zfshmzlttlqj.htrqnsz2-rrp0fhp.twl@flex--yuanchu.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716017079; h=from:from:sender: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:in-reply-to: references:dkim-signature; bh=YWoU7/TDYh+qqWoyJg5P+V+etxc5DOvuEandyX7gTIw=; b=w0VoKaZAl7EKQcIsdl+GE2plVNmavx5QnVoIZ7/gLLeTlLQ6E6f5QpSJROUG6Pe229XZe0 FEjjxe5Mc1uLt4Jx5g+ryPG/d16WQuFTWNqzjlt6sowf58qd9rpQKh7Hgh8jVXn2ANHZiq z3/VMynMtCzizbnD07yc/Th1EO3ouq0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=LOeBUcQV; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf26.hostedemail.com: domain of 3tldIZgcKCL83zfshmzlttlqj.htrqnsz2-rrp0fhp.twl@flex--yuanchu.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3tldIZgcKCL83zfshmzlttlqj.htrqnsz2-rrp0fhp.twl@flex--yuanchu.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716017079; a=rsa-sha256; cv=none; b=36ZH+0fJfkoaZe0XclHLyEScmDHtQGnWi45KUTB92YTS3KCE5qQIgdPA3xy4QhK+dvcqA8 GQSWMhvKs4y/YlHvMd5l0yjvYGu6Nnng9brTcq8/nC528AR2SjY/YDxJK1PczcN07edTld lqBVMfQ5HtHzNIaHEbY649rXjhr6tFo= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-61be325413eso122706357b3.1 for ; Sat, 18 May 2024 00:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716017079; x=1716621879; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=YWoU7/TDYh+qqWoyJg5P+V+etxc5DOvuEandyX7gTIw=; b=LOeBUcQVtDD/I/cHpBPFRjEkjyXfkQVWirQGNuwMrdOri2iostIbjBXJPR6cudvjUj ob9KM949yoj159b/WkWT3doP6lnfHhlkRixTTnxk9VWTyU9G7nlXFqhAOBOtC7UEakCW ymoKTzLzSyj/nQOv/Mz5WsdkMG2rUAa3GqhGJYFa1G43rcay4yoF5QvcWxrNxthS1nF/ VJQZSW7/7/Is4SbhKRrH2Gq/UgRtbwy8o8Hk8bVby7ABni+GBfWn0X5p9gSJq2OpBJHr nSMjbMk0PbTP/jToxf2v3aD68NNBh3YOdVFBgWLmfedlPYjXKysbDn41JO5z+nF3FNON RlRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716017079; x=1716621879; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YWoU7/TDYh+qqWoyJg5P+V+etxc5DOvuEandyX7gTIw=; b=K39tpu4O9tWdx0W5pi60oXipAf4ntKVSrjUYlFjRxlrukaFxwZMwpSIVkopLibA8NR T8a1QstbISERXFtq/V6ET0ozCayPnXusvBr+VR1qQq0oYH4Z6KDtai+FJ+Hw7XUuqk49 JZCDjbpJ0msd09ZIStxdh7z1y1V7wm7qLZL4h6jUI67PZjo4UCTxJUYaq7GeYrdV5NV/ 4Nm4uJz6mdR/otHRRMlwBvROV6ulS0mrVLuw3ZG0uy4dnFAuJz27oSGb61P3FwogiM/2 UvnYIcwTWj3pKiMf2DUhr/6RlhDQjcjb+8ZK0mFvVmayT0vWsSMnfqMbzdjaC9R26KrE LIjQ== X-Forwarded-Encrypted: i=1; AJvYcCXhfnIaWU7w4BEFdOVV986GLwy82E93OfZ0eE+uFihmOQr9R3v41uZ80QVuUSc1mTgwCWLhmC9atfRye+p1dqEzyBM= X-Gm-Message-State: AOJu0YxOwaXhgWqUtHvJpTnzk2HFWHOLK9WOmgZz96EVMmB9a3+wQlNg g02YMimoehqOgCFUgurZfzs8f9dMZuqQ63C0P87U1MYOMO1Q7nNOVGwCvK7/dWnM2TZ4nIFpfRD RAfO2HQ== X-Google-Smtp-Source: AGHT+IH3sb8s1qX6CdKVTb53U1vYD2vcobBAOm3KPVVv8vHGITHRR3rz1fwWCmhxXsPTY2smDa4eZfgrAKf6 X-Received: from yuanchu-desktop.svl.corp.google.com ([2620:15c:2a3:200:97d6:5b37:f65f:971e]) (user=yuanchu job=sendgmr) by 2002:a0d:cc49:0:b0:620:32ea:e1d4 with SMTP id 00721157ae682-62796f7769fmr2702007b3.0.1716017078797; Sat, 18 May 2024 00:24:38 -0700 (PDT) Date: Sat, 18 May 2024 00:24:21 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240518072422.771698-1-yuanchu@google.com> Subject: [PATCH v1 1/2] virt: pvmemcontrol: control guest physical memory properties From: Yuanchu Xie To: Wei Liu , Rob Bradford , Greg Kroah-Hartman Cc: "Theodore Ts'o" , Pasha Tatashin , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux.dev, dev@lists.cloudhypervisor.org, Yuanchu Xie X-Rspamd-Queue-Id: D568114000A X-Stat-Signature: ribkkwztkexub95f478brnt6zdonuaud X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1716017079-821728 X-HE-Meta: U2FsdGVkX1/5sDiyNwjujQkagXWGQs7q6b6anKuXiccB/6ESqvxmWjYOW/HsYWIcM5AvxD1n+a7DdOS4ZqSbIlByz/MfLfwIpppEIULpBc2y2EIHq9sqPVrbOP17QNkvtXk4i+eMldrFNkdi77on1TE4Dk5NLcjK1vJD1qlWGhsoOMZtPCSc7s1Ajo7u4T0XrOoLjqBP3MbvM86TN1G+GPikiILYei66DUTu44jb86PVrVogiXpB+/Xwn7kCQrqVia9hIEUXvYr2oYfiqNq/ztEXyMades/V2M05HdLO3F43zXvNms2g3rHpF+et/d9NaHtiFd/ZGDt4ipBSiAM/uLZTynnk4KNwBdpQ2R0ik+v2tGbww7fxkIgZb+altDyzJN8KqgqzyjIf/qF61gPTFSRtGQaZfU9+eXOvWk8N4CXO7RLT0PkYg/TiLY0EVHM+MF4Atj1RHMxjB2PgfW3Qju6jQ2t/DYMOxyBXjeHDLJQalRrJ9N0JPHJ50TCoatjuvBn7PeuOsUNlHZOGDYMKxfycLMGI4+8d1AO671oLzYiebr7s7+SeJUTi3mU8gQ5eaKuqYLnescxFCQyw3HkR2ZaNq0xOoKeXAAZPm8mo9kCkrtnF7Bgl1pcfcD+6Jy07JN0kOTuWHK3SxnsqXrjmtab/lGv/vTqBKzV0ItQrDccRf0KpOZv1RqOSadJls9f3xjl+et+MLBJzqx6td6Ee42kmunwZy50iexVhW3F5qJOxPaAcvUHLB0zPrPbEsRUnknc77wvscS81486sWWFuwCKQgwExnUcZWaelwrEaeyqd8nGMicwnvkvhGXRHtu8pXPQyz4zJ0iSc7B+7aplg2FlEa1kjL7Cmo1pQBsqXEKW3uELkNusUrkKtAvph+GgAu2hw0Ge8KxVv6F3peq28ssq1y51PbKYczMv7+BAG8h0JHmWZeyrge0LGC0G7yleMe/8eNyrOvcsOmGUd7TJ 6MR0FTPT y0fOcasA9dAvEdC2IuiaWHhqvcbFTwjYxU+KznzzqPFBFHBytmD/kLsyl2jyviSBGm70movdG18dLn9sGSCEoh15046i7vRrdnRNKz8QGiXIhSEaJYzanlYPA9fsb8j79/fLP1nCYCxJu2tfwon+TaMPRDJdxnhRa652ZPH9za2vY/J/saEPTDD0tB6vuxY9TIt/YPLuWQ7I1dOyyZGCyiz/ToCkgxKg+FZNzGbC3PpdOeUAv79FvJwFm+JwuOxAFA90ngvQ1W7N/jkyfI0nrAP4bgi1LpksvRHjXMA9pYzaj98I4zRFlgC09GeRfk/b+pug82XN3KipVcDZBL22uZypz7uTPrvfXbxwvHfponT8mqa6ctguyuOp0XNgFmUn/o7a13fW6ajevvTrrtvtLa/40gsfWGseUXfjLCEq1xQv4I+kkHc7RMeHgE+HaexazcAIjv7tDDLSr1WDbetBdjPe6qag3zb4ev+Gn9p1fhmED2V9muRS4gjxEc1O83eoXFOHk6AE71whnvBPf0KX47nfWtr1nTP/eBLvCHImUYrO8AfqscJQ35juJ6F6KnpPxwvXADFtkzQJPcfJWpr9UKKY/mcOCQq+8GydqfOD23rQBb3IqqHo7uY8LepsXPUG6NmxcMduyqwDYkhkeQ/8ONhhHuFlWc16jy8MW+03UPvFS4FZkYQI3mgwfNMXXXlwOLCL0s+LNeO47YirdWNF49aIbLQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Pvmemcontrol provides a way for the guest to control its physical memory properties, and enables optimizations and security features. For example, the guest can provide information to the host where parts of a hugepage may be unbacked, or sensitive data may not be swapped out, etc. Pvmemcontrol allows guests to manipulate its gPTE entries in the SLAT, and also some other properties of the memory map the back's host memory. This is achieved by using the KVM_CAP_SYNC_MMU capability. When this capability is available, the changes in the backing of the memory region on the host are automatically reflected into the guest. For example, an mmap() or madvise() that affects the region will be made visible immediately. There are two components of the implementation: the guest Linux driver and Virtual Machine Monitor (VMM) device. A guest-allocated shared buffer is negotiated per-cpu through a few PCI MMIO registers, the VMM device assigns a unique command for each per-cpu buffer. The guest writes its pvmemcontrol request in the per-cpu buffer, then writes the corresponding command into the command register, calling into the VMM device to perform the pvmemcontrol request. The synchronous per-cpu shared buffer approach avoids the kick and busy waiting that the guest would have to do with virtio virtqueue transport. User API From the userland, the pvmemcontrol guest driver is controlled via ioctl(2) call. It requires CAP_SYS_ADMIN. ioctl(fd, PVMEMCONTROL_IOCTL, struct pvmemcontrol_buf *buf); Guest userland applications can tag VMAs and guest hugepages, or advise the host on how to handle sensitive guest pages. Supported function codes and their use cases: PVMEMCONTROL_FREE/REMOVE/DONTNEED/PAGEOUT. For the guest. One can reduce the struct page and page table lookup overhead by using hugepages backed by smaller pages on the host. These pvmemcontrol commands can allow for partial freeing of private guest hugepages to save memory. They also allow kernel memory, such as kernel stacks and task_structs to be paravirtualized if we expose kernel APIs. PVMEMCONTROL_UNMERGEABLE is useful for security, when the VM does not want to share its backing pages. The same with PVMEMCONTROL_DONTDUMP, so sensitive pages are not included in a dump. MLOCK/UNLOCK can advise the host that sensitive information is not swapped out on the host. PVMEMCONTROL_MPROTECT_NONE/R/W/RW. For guest stacks backed by hugepages, stack guard pages can be handled in the host and memory can be saved in the hugepage. PVMEMCONTROL_SET_VMA_ANON_NAME is useful for observability and debugging how guest memory is being mapped on the host. Sample program making use of PVMEMCONTROL_DONTNEED: https://github.com/Dummyc0m/pvmemcontrol-user The VMM implementation is being proposed for Cloud Hypervisor: https://github.com/Dummyc0m/cloud-hypervisor/ Cloud Hypervisor issue: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/6318 - Changelog RFC v1 -> PATCH v1 - renamed memctl to pvmemcontrol - defined device endianness as little endian Signed-off-by: Yuanchu Xie --- .../userspace-api/ioctl/ioctl-number.rst | 2 + drivers/virt/Kconfig | 2 + drivers/virt/Makefile | 1 + drivers/virt/pvmemcontrol/Kconfig | 10 + drivers/virt/pvmemcontrol/Makefile | 2 + drivers/virt/pvmemcontrol/pvmemcontrol.c | 460 ++++++++++++++++++ include/uapi/linux/pvmemcontrol.h | 75 +++ 7 files changed, 552 insertions(+) create mode 100644 drivers/virt/pvmemcontrol/Kconfig create mode 100644 drivers/virt/pvmemcontrol/Makefile create mode 100644 drivers/virt/pvmemcontrol/pvmemcontrol.c create mode 100644 include/uapi/linux/pvmemcontrol.h diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index c472423412bf..65bef09406d5 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -370,6 +370,8 @@ Code Seq# Include File Comments 0xCD 01 linux/reiserfs_fs.h 0xCE 01-02 uapi/linux/cxl_mem.h Compute Express Link Memory Devices 0xCF 02 fs/smb/client/cifs_ioctl.h +0xDA 00 uapi/linux/pvmemcontrol.h Pvmemcontrol Device + 0xDB 00-0F drivers/char/mwave/mwavepub.h 0xDD 00-3F ZFCP device driver see drivers/s390/scsi/ diff --git a/drivers/virt/Kconfig b/drivers/virt/Kconfig index 40129b6f0eca..9e242216cde8 100644 --- a/drivers/virt/Kconfig +++ b/drivers/virt/Kconfig @@ -50,4 +50,6 @@ source "drivers/virt/acrn/Kconfig" source "drivers/virt/coco/Kconfig" +source "drivers/virt/pvmemcontrol/Kconfig" + endif diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile index f29901bd7820..3a1fd6e076ad 100644 --- a/drivers/virt/Makefile +++ b/drivers/virt/Makefile @@ -10,3 +10,4 @@ obj-y += vboxguest/ obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves/ obj-$(CONFIG_ACRN_HSM) += acrn/ obj-y += coco/ +obj-$(CONFIG_PVMEMCONTROL) += pvmemcontrol/ diff --git a/drivers/virt/pvmemcontrol/Kconfig b/drivers/virt/pvmemcontrol/Kconfig new file mode 100644 index 000000000000..9fe16da23bd8 --- /dev/null +++ b/drivers/virt/pvmemcontrol/Kconfig @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 +config PVMEMCONTROL + tristate "pvmemcontrol Guest Service Module" + depends on KVM_GUEST + help + pvmemcontrol is a guest kernel module that allows to communicate + with hypervisor / VMM and control the guest memory backing. + + To compile as a module, choose M, the module will be called + pvmemcontrol. If unsure, say N. diff --git a/drivers/virt/pvmemcontrol/Makefile b/drivers/virt/pvmemcontrol/Makefile new file mode 100644 index 000000000000..2fc087ef3ef5 --- /dev/null +++ b/drivers/virt/pvmemcontrol/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_PVMEMCONTROL) := pvmemcontrol.o diff --git a/drivers/virt/pvmemcontrol/pvmemcontrol.c b/drivers/virt/pvmemcontrol/pvmemcontrol.c new file mode 100644 index 000000000000..3ab980c4ccf9 --- /dev/null +++ b/drivers/virt/pvmemcontrol/pvmemcontrol.c @@ -0,0 +1,460 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Control guest physical memory properties by sending + * madvise-esque requests to the host VMM. + * + * Author: Yuanchu Xie + * Author: Pasha Tatashin + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PCI_VENDOR_ID_GOOGLE 0x1ae0 +#define PCI_DEVICE_ID_GOOGLE_PVMEMCONTROL 0x0087 + +#define PVMEMCONTROL_COMMAND_OFFSET 0x08 +#define PVMEMCONTROL_REQUEST_OFFSET 0x00 +#define PVMEMCONTROL_RESPONSE_OFFSET 0x00 + +/* + * Magic values that perform the action specified when written to + * the command register. + */ +enum pvmemcontrol_transport_command { + PVMEMCONTROL_TRANSPORT_RESET = 0x060FE6D2, + PVMEMCONTROL_TRANSPORT_REGISTER = 0x0E359539, + PVMEMCONTROL_TRANSPORT_READY = 0x0CA8D227, + PVMEMCONTROL_TRANSPORT_DISCONNECT = 0x030F5DA0, + PVMEMCONTROL_TRANSPORT_ACK = 0x03CF5196, + PVMEMCONTROL_TRANSPORT_ERROR = 0x01FBA249, +}; + +/* Contains the function code and arguments for specific function */ +struct pvmemcontrol_vmm_call_le { + __le64 func_code; /* pvmemcontrol set function code */ + __le64 addr; /* hyper. page size aligned guest phys. addr */ + __le64 length; /* hyper. page size aligned length */ + __le64 arg; /* function code specific argument */ +}; + +/* Is filled on return to guest from VMM from most function calls */ +struct pvmemcontrol_vmm_ret_le { + __le32 ret_errno; /* on error, value of errno */ + __le32 ret_code; /* pvmemcontrol internal error code, on success 0 */ + __le64 ret_value; /* return value from the function call */ + __le64 arg0; /* currently unused */ + __le64 arg1; /* currently unused */ +}; + +struct pvmemcontrol_buf_le { + union { + struct pvmemcontrol_vmm_call_le call; + struct pvmemcontrol_vmm_ret_le ret; + }; +}; + +struct pvmemcontrol_percpu_channel { + struct pvmemcontrol_buf_le buf; + u64 buf_phys_addr; + u32 command; +}; + +struct pvmemcontrol { + void __iomem *base_addr; + struct device *device; + /* cache the info call */ + struct pvmemcontrol_vmm_ret pvmemcontrol_vmm_info; + struct pvmemcontrol_percpu_channel __percpu *pcpu_channels; +}; + +static DEFINE_RWLOCK(pvmemcontrol_lock); +static struct pvmemcontrol *pvmemcontrol __read_mostly; + +static void pvmemcontrol_write_command(void __iomem *base_addr, u32 command) +{ + iowrite32(cpu_to_le32(command), + base_addr + PVMEMCONTROL_COMMAND_OFFSET); +} + +static u32 pvmemcontrol_read_command(void __iomem *base_addr) +{ + return le32_to_cpu(ioread32(base_addr + PVMEMCONTROL_COMMAND_OFFSET)); +} + +static void pvmemcontrol_write_reg(void __iomem *base_addr, u64 buf_phys_addr) +{ + iowrite64_lo_hi(cpu_to_le64(buf_phys_addr), + base_addr + PVMEMCONTROL_REQUEST_OFFSET); +} + +static u32 pvmemcontrol_read_resp(void __iomem *base_addr) +{ + return le32_to_cpu(ioread32(base_addr + PVMEMCONTROL_RESPONSE_OFFSET)); +} + +static void pvmemcontrol_buf_call_to_le(struct pvmemcontrol_buf_le *le, + const struct pvmemcontrol_buf *buf) +{ + le->call.func_code = cpu_to_le64(buf->call.func_code); + le->call.addr = cpu_to_le64(buf->call.addr); + le->call.length = cpu_to_le64(buf->call.length); + le->call.arg = cpu_to_le64(buf->call.arg); +} + +static void pvmemcontrol_buf_ret_from_le(struct pvmemcontrol_buf *buf, + const struct pvmemcontrol_buf_le *le) +{ + buf->ret.ret_errno = le32_to_cpu(le->ret.ret_errno); + buf->ret.ret_code = le32_to_cpu(le->ret.ret_code); + buf->ret.ret_value = le64_to_cpu(le->ret.ret_value); + buf->ret.arg0 = le64_to_cpu(le->ret.arg0); + buf->ret.arg1 = le64_to_cpu(le->ret.arg1); +} + +static void pvmemcontrol_send_request(struct pvmemcontrol *pvmemcontrol, + struct pvmemcontrol_buf *buf) +{ + struct pvmemcontrol_percpu_channel *channel; + + preempt_disable(); + channel = this_cpu_ptr(pvmemcontrol->pcpu_channels); + + pvmemcontrol_buf_call_to_le(&channel->buf, buf); + pvmemcontrol_write_command(pvmemcontrol->base_addr, channel->command); + pvmemcontrol_buf_ret_from_le(buf, &channel->buf); + + preempt_enable(); +} + +static int __pvmemcontrol_vmm_call(struct pvmemcontrol_buf *buf) +{ + int err = 0; + + if (!pvmemcontrol) + return -EINVAL; + + read_lock(&pvmemcontrol_lock); + if (!pvmemcontrol) { + err = -EINVAL; + goto unlock; + } + if (buf->call.func_code == PVMEMCONTROL_INFO) { + memcpy(&buf->ret, &pvmemcontrol->pvmemcontrol_vmm_info, + sizeof(buf->ret)); + goto unlock; + } + + pvmemcontrol_send_request(pvmemcontrol, buf); + +unlock: + read_unlock(&pvmemcontrol_lock); + return err; +} + +static int pvmemcontrol_init_info(struct pvmemcontrol *dev, + struct pvmemcontrol_buf *buf) +{ + buf->call.func_code = PVMEMCONTROL_INFO; + + pvmemcontrol_send_request(dev, buf); + if (buf->ret.ret_code) + return buf->ret.ret_code; + + /* Initialize global pvmemcontrol_vmm_info */ + memcpy(&dev->pvmemcontrol_vmm_info, &buf->ret, + sizeof(dev->pvmemcontrol_vmm_info)); + dev_info(dev->device, + "pvmemcontrol_vmm_info.ret_errno = %u\n" + "pvmemcontrol_vmm_info.ret_code = %u\n" + "pvmemcontrol_vmm_info.major_version = %llu\n" + "pvmemcontrol_vmm_info.minor_version = %llu\n" + "pvmemcontrol_vmm_info.page_size = %llu\n", + dev->pvmemcontrol_vmm_info.ret_errno, + dev->pvmemcontrol_vmm_info.ret_code, + dev->pvmemcontrol_vmm_info.arg0, + dev->pvmemcontrol_vmm_info.arg1, + dev->pvmemcontrol_vmm_info.ret_value); + + return 0; +} + +static int pvmemcontrol_open(struct inode *inode, struct file *filp) +{ + struct pvmemcontrol_buf *buf = NULL; + + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + + /* Do not allow exclusive open */ + if (filp->f_flags & O_EXCL) + return -EINVAL; + + buf = kzalloc(sizeof(struct pvmemcontrol_buf), GFP_KERNEL); + if (!buf) + return -ENOMEM; + + /* Overwrite the misc device set by misc_register */ + filp->private_data = buf; + return 0; +} + +static int pvmemcontrol_release(struct inode *inode, struct file *filp) +{ + kfree(filp->private_data); + filp->private_data = NULL; + return 0; +} + +static long pvmemcontrol_ioctl(struct file *filp, unsigned int cmd, + unsigned long ioctl_param) +{ + struct pvmemcontrol_buf *buf = filp->private_data; + int err; + + if (cmd != PVMEMCONTROL_IOCTL_VMM) + return -EINVAL; + + if (copy_from_user(&buf->call, (void __user *)ioctl_param, + sizeof(struct pvmemcontrol_buf))) + return -EFAULT; + + err = __pvmemcontrol_vmm_call(buf); + if (err) + return err; + + if (copy_to_user((void __user *)ioctl_param, &buf->ret, + sizeof(struct pvmemcontrol_buf))) + return -EFAULT; + + return 0; +} + +static const struct file_operations pvmemcontrol_fops = { + .owner = THIS_MODULE, + .open = pvmemcontrol_open, + .release = pvmemcontrol_release, + .unlocked_ioctl = pvmemcontrol_ioctl, + .compat_ioctl = compat_ptr_ioctl, +}; + +static struct miscdevice pvmemcontrol_dev = { + .minor = MISC_DYNAMIC_MINOR, + .name = KBUILD_MODNAME, + .fops = &pvmemcontrol_fops, +}; + +static int pvmemcontrol_connect(struct pvmemcontrol *pvmemcontrol) +{ + int cpu; + u32 cmd; + + pvmemcontrol_write_command(pvmemcontrol->base_addr, + PVMEMCONTROL_TRANSPORT_RESET); + cmd = pvmemcontrol_read_command(pvmemcontrol->base_addr); + if (cmd != PVMEMCONTROL_TRANSPORT_ACK) { + dev_err(pvmemcontrol->device, + "failed to reset device, cmd 0x%x\n", cmd); + return -EINVAL; + } + + for_each_possible_cpu(cpu) { + struct pvmemcontrol_percpu_channel *channel = + per_cpu_ptr(pvmemcontrol->pcpu_channels, cpu); + + pvmemcontrol_write_reg(pvmemcontrol->base_addr, + channel->buf_phys_addr); + pvmemcontrol_write_command(pvmemcontrol->base_addr, + PVMEMCONTROL_TRANSPORT_REGISTER); + + cmd = pvmemcontrol_read_command(pvmemcontrol->base_addr); + if (cmd != PVMEMCONTROL_TRANSPORT_ACK) { + dev_err(pvmemcontrol->device, + "failed to register pcpu buf, cmd 0x%x\n", cmd); + return -EINVAL; + } + channel->command = + pvmemcontrol_read_resp(pvmemcontrol->base_addr); + } + + pvmemcontrol_write_command(pvmemcontrol->base_addr, + PVMEMCONTROL_TRANSPORT_READY); + cmd = pvmemcontrol_read_command(pvmemcontrol->base_addr); + if (cmd != PVMEMCONTROL_TRANSPORT_ACK) { + dev_err(pvmemcontrol->device, + "failed to ready device, cmd 0x%x\n", cmd); + return -EINVAL; + } + return 0; +} + +static int pvmemcontrol_disconnect(struct pvmemcontrol *pvmemcontrol) +{ + u32 cmd; + + pvmemcontrol_write_command(pvmemcontrol->base_addr, + PVMEMCONTROL_TRANSPORT_DISCONNECT); + + cmd = pvmemcontrol_read_command(pvmemcontrol->base_addr); + if (cmd != PVMEMCONTROL_TRANSPORT_ERROR) { + dev_err(pvmemcontrol->device, + "failed to disconnect device, cmd 0x%x\n", cmd); + return -EINVAL; + } + return 0; +} + +static int pvmemcontrol_alloc_percpu_channels(struct pvmemcontrol *pvmemcontrol) +{ + int cpu; + + pvmemcontrol->pcpu_channels = alloc_percpu_gfp( + struct pvmemcontrol_percpu_channel, GFP_ATOMIC | __GFP_ZERO); + if (!pvmemcontrol->pcpu_channels) + return -ENOMEM; + + for_each_possible_cpu(cpu) { + struct pvmemcontrol_percpu_channel *channel = + per_cpu_ptr(pvmemcontrol->pcpu_channels, cpu); + phys_addr_t buf_phys = per_cpu_ptr_to_phys(&channel->buf); + + channel->buf_phys_addr = buf_phys; + } + return 0; +} + +static int pvmemcontrol_init(struct device *device, void __iomem *base_addr) +{ + struct pvmemcontrol_buf *buf = NULL; + struct pvmemcontrol *dev = NULL; + int err = 0; + + err = misc_register(&pvmemcontrol_dev); + if (err) + return err; + + /* We take a spinlock for a long time, but this is only during init. */ + write_lock(&pvmemcontrol_lock); + if (READ_ONCE(pvmemcontrol)) { + dev_warn(device, "multiple pvmemcontrol devices present\n"); + err = -EEXIST; + goto fail_free; + } + + dev = kzalloc(sizeof(struct pvmemcontrol), GFP_ATOMIC); + buf = kzalloc(sizeof(struct pvmemcontrol_buf), GFP_ATOMIC); + if (!dev || !buf) { + err = -ENOMEM; + goto fail_free; + } + + dev->base_addr = base_addr; + dev->device = device; + + err = pvmemcontrol_alloc_percpu_channels(dev); + if (err) + goto fail_free; + + err = pvmemcontrol_connect(dev); + if (err) + goto fail_free; + + err = pvmemcontrol_init_info(dev, buf); + if (err) + goto fail_free; + + WRITE_ONCE(pvmemcontrol, dev); + write_unlock(&pvmemcontrol_lock); + return 0; + +fail_free: + write_unlock(&pvmemcontrol_lock); + kfree(dev); + kfree(buf); + misc_deregister(&pvmemcontrol_dev); + return err; +} + +static int pvmemcontrol_pci_probe(struct pci_dev *dev, + const struct pci_device_id *id) +{ + void __iomem *base_addr; + int err; + + err = pcim_enable_device(dev); + if (err < 0) + return err; + + base_addr = pcim_iomap(dev, 0, 0); + if (!base_addr) + return -ENOMEM; + + err = pvmemcontrol_init(&dev->dev, base_addr); + if (err) + pci_disable_device(dev); + + return err; +} + +static void __exit pvmemcontrol_pci_remove(struct pci_dev *pci_dev) +{ + int err; + struct pvmemcontrol *dev; + + write_lock(&pvmemcontrol_lock); + dev = READ_ONCE(pvmemcontrol); + if (!dev) { + err = -EINVAL; + dev_err(&pci_dev->dev, "cleanup called when uninitialized\n"); + write_unlock(&pvmemcontrol_lock); + return; + } + + /* disconnect */ + err = pvmemcontrol_disconnect(dev); + if (err) + dev_err(&pci_dev->dev, "device did not ack disconnect\n"); + /* free percpu channels */ + free_percpu(dev->pcpu_channels); + + kfree(dev); + WRITE_ONCE(pvmemcontrol, NULL); + write_unlock(&pvmemcontrol_lock); + misc_deregister(&pvmemcontrol_dev); +} + +static const struct pci_device_id pvmemcontrol_pci_id_tbl[] = { + { PCI_DEVICE(PCI_VENDOR_ID_GOOGLE, PCI_DEVICE_ID_GOOGLE_PVMEMCONTROL) }, + { 0 } +}; +MODULE_DEVICE_TABLE(pci, pvmemcontrol_pci_id_tbl); + +static struct pci_driver pvmemcontrol_pci_driver = { + .name = "pvmemcontrol", + .id_table = pvmemcontrol_pci_id_tbl, + .probe = pvmemcontrol_pci_probe, + .remove = pvmemcontrol_pci_remove, +}; +module_pci_driver(pvmemcontrol_pci_driver); + +MODULE_AUTHOR("Yuanchu Xie "); +MODULE_DESCRIPTION("pvmemcontrol Guest Service Module"); +MODULE_LICENSE("GPL"); diff --git a/include/uapi/linux/pvmemcontrol.h b/include/uapi/linux/pvmemcontrol.h new file mode 100644 index 000000000000..f802ede0daed --- /dev/null +++ b/include/uapi/linux/pvmemcontrol.h @@ -0,0 +1,75 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Userspace interface for /dev/pvmemcontrol + * pvmemcontrol Guest Memory Service Module + * + * Copyright (c) 2024, Google LLC. + * Yuanchu Xie + * Pasha Tatashin + */ + +#ifndef _UAPI_PVMEMCONTROL_H +#define _UAPI_PVMEMCONTROL_H + +#include +#include +#include + +/* Contains the function code and arguments for specific function */ +struct pvmemcontrol_vmm_call { + __u64 func_code; /* pvmemcontrol set function code */ + __u64 addr; /* hyper. page size aligned guest phys. addr */ + __u64 length; /* hyper. page size aligned length */ + __u64 arg; /* function code specific argument */ +}; + +/* Is filled on return to guest from VMM from most function calls */ +struct pvmemcontrol_vmm_ret { + __u32 ret_errno; /* on error, value of errno */ + __u32 ret_code; /* pvmemcontrol internal error code, on success 0 */ + __u64 ret_value; /* return value from the function call */ + __u64 arg0; /* major version for func_code INFO */ + __u64 arg1; /* minor version for func_code INFO */ +}; + +struct pvmemcontrol_buf { + union { + struct pvmemcontrol_vmm_call call; + struct pvmemcontrol_vmm_ret ret; + }; +}; + +/* The ioctl type, documented in ioctl-number.rst */ +#define PVMEMCONTROL_IOCTL_TYPE 0xDA + +#define PVMEMCONTROL_IOCTL_VMM _IOWR(PVMEMCONTROL_IOCTL_TYPE, 0x00, struct pvmemcontrol_buf) + +/* + * Returns the host page size in ret_value. + * major version in arg0. + * minor version in arg1. + */ +#define PVMEMCONTROL_INFO 0 + +/* Pvmemcontrol calls, pvmemcontrol_vmm_return is returned */ +#define PVMEMCONTROL_DONTNEED 1 /* madvise(addr, len, MADV_DONTNEED); */ +#define PVMEMCONTROL_REMOVE 2 /* madvise(addr, len, MADV_MADV_REMOVE); */ +#define PVMEMCONTROL_FREE 3 /* madvise(addr, len, MADV_FREE); */ +#define PVMEMCONTROL_PAGEOUT 4 /* madvise(addr, len, MADV_PAGEOUT); */ + +#define PVMEMCONTROL_UNMERGEABLE 5 /* madvise(addr, len, MADV_UNMERGEABLE); */ +#define PVMEMCONTROL_DONTDUMP 6 /* madvise(addr, len, MADV_DONTDUMP); */ + +#define PVMEMCONTROL_MLOCK 7 /* mlock2(addr, len, 0) */ +#define PVMEMCONTROL_MUNLOCK 8 /* munlock(addr, len) */ + +#define PVMEMCONTROL_MPROTECT_NONE 9 /* mprotect(addr, len, PROT_NONE) */ +#define PVMEMCONTROL_MPROTECT_R 10 /* mprotect(addr, len, PROT_READ) */ +#define PVMEMCONTROL_MPROTECT_W 11 /* mprotect(addr, len, PROT_WRITE) */ +/* mprotect(addr, len, PROT_READ | PROT_WRITE) */ +#define PVMEMCONTROL_MPROTECT_RW 12 + +/* prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, addr, len, arg) */ +#define PVMEMCONTROL_SET_VMA_ANON_NAME 13 + +#endif /* _UAPI_PVMEMCONTROL_H */ From patchwork Sat May 18 07:24:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanchu Xie X-Patchwork-Id: 13667502 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDF43C25B77 for ; Sat, 18 May 2024 07:24:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73ECB6B0088; Sat, 18 May 2024 03:24:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EFBA6B008A; Sat, 18 May 2024 03:24:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 541966B008C; Sat, 18 May 2024 03:24:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 30E246B0088 for ; Sat, 18 May 2024 03:24:47 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 77D57160656 for ; Sat, 18 May 2024 07:24:46 +0000 (UTC) X-FDA: 82130679372.03.19680D6 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf14.hostedemail.com (Postfix) with ESMTP id B333710000D for ; Sat, 18 May 2024 07:24:44 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=UDL0BsjT; spf=pass (imf14.hostedemail.com: domain of 3u1dIZgcKCMQ84kxmr4qyyqvo.mywvsx47-wwu5kmu.y1q@flex--yuanchu.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3u1dIZgcKCMQ84kxmr4qyyqvo.mywvsx47-wwu5kmu.y1q@flex--yuanchu.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716017084; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Uw4IQYxb+uDF+mWfJsVcG+5UtKWGYyO2JjMy9dD17Z8=; b=Ye2ENkDgL1jpu45sVN2AT+iHcfHoFxP2THqbNkTBDes85oA4z+A+XAwmjZnEI82ru3q5Rs Bed/k9js9Uw5dJCmY7ReEr+MrZt6PDxymiefbxKz8CFwpFUBHdGKoy9k+uAsXPD+CkYqCB 7vhy5OHfVXFvqV0omHa7jTg4AiNuV1s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716017084; a=rsa-sha256; cv=none; b=TLEa611aP9UU6dHogvoHM4thHjv7RqVsK1CLHedE2at+Jc/Bbq79pr40rHNINCrlN9Z0Ya RBoeJ7IExna1q+xS/94c3t/uEzw4UihrN6UimisHAM7xcCMhHVLnzYic0VjfCsU6p9BVUy YXRG/Copki7gTaq1bm3ec9T7hwV/8Eo= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=UDL0BsjT; spf=pass (imf14.hostedemail.com: domain of 3u1dIZgcKCMQ84kxmr4qyyqvo.mywvsx47-wwu5kmu.y1q@flex--yuanchu.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3u1dIZgcKCMQ84kxmr4qyyqvo.mywvsx47-wwu5kmu.y1q@flex--yuanchu.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-61c9e36888bso172633047b3.2 for ; Sat, 18 May 2024 00:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716017084; x=1716621884; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Uw4IQYxb+uDF+mWfJsVcG+5UtKWGYyO2JjMy9dD17Z8=; b=UDL0BsjTkzgyyOEebog3zajvrCr75xfzWLMdiyYuZ4vFaPVFs99NiRrX5btH6QDwSM +FIOA+LlnuFcDr/rCtxmFP6FbQOVX83r4lr5BgPaItvqPjjpaDHWKopCsI+OiJXRW0cL TEW+kmIH8imCJ3NdMzRE10oyH83Whw0N95yBcSA8NA3aXTKmKXe85YArE0U5o0lJB7a3 jLIX6Sit6qycBNY/kkvq3IOLHjxxLrJobenlddTqfy0uDeU6CZuoc6RGI5DgEENisPyA jM9PrAif8BaeOQWp29HzNYxf7I1SlvTuMrW1s28UVHHQT3JYgsTc7INJ463SPofwfW8P dRbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716017084; x=1716621884; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Uw4IQYxb+uDF+mWfJsVcG+5UtKWGYyO2JjMy9dD17Z8=; b=cALZ3bPxZOQQZTkcQshBkqbokeVMLdjAAmgQPBGgCD4xlvfT1bjlOA0fzl7OUj6i/t Io1afEwS3UEgee7eO+Qes6Uu3h0Jel7T4buBuHP8qEEkOQspsvy7INaMtDVnHefZTB+n zkEhn1NSMSt6V4fVde+qMBQkboH0PiU8zL6PF2Wrhgm98t04Jt2q0rt5/Rdvfnk+u05w XUwivLb0fL+Dhko1AbTZjTGqlyECKWXxyRbWSWtFN/Ec4/nwCt9ucoHPzFaxjxUmeSys gIHySrkcYSE5KPwXcAqEm1eytEksAjjMNufobckkw1sbmc7eoaCDPSZthFL4ZtrE5YQO g6wQ== X-Forwarded-Encrypted: i=1; AJvYcCWquG9yKfgtbKEp8mrAtGV8gdTyHBoYTm8Ka58UBIKlPnSsoZ4FxigGg3fqCoLx/eGUgD7MhB0unEy94/LL754rcPk= X-Gm-Message-State: AOJu0YwwrKh+MISc1TeJhJylP5Pdmu4oFVenYCn4lqfceRhKnSQfg0qG HSxs2hPzezvjJx811L7Uq8udI4f2TSdjnkLLBfwyIV2NXda4Q8oWHdQSYkcy3TokHZUy95ZSWm/ 3iSiGtA== X-Google-Smtp-Source: AGHT+IE94WyeH6RLcAAIOJcTGdhrJI64gxY6uGfhyG5sUnknlOWcMCOVqt5FlhysOWO0+Z0nlFbjELjLHqB7 X-Received: from yuanchu-desktop.svl.corp.google.com ([2620:15c:2a3:200:97d6:5b37:f65f:971e]) (user=yuanchu job=sendgmr) by 2002:a05:6902:1082:b0:de5:a1c9:7a7a with SMTP id 3f1490d57ef6-dee4f1903fdmr1751333276.4.1716017083829; Sat, 18 May 2024 00:24:43 -0700 (PDT) Date: Sat, 18 May 2024 00:24:22 -0700 In-Reply-To: <20240518072422.771698-1-yuanchu@google.com> Mime-Version: 1.0 References: <20240518072422.771698-1-yuanchu@google.com> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240518072422.771698-2-yuanchu@google.com> Subject: [PATCH v1 2/2] virt: pvmemcontrol: add Yuanchu and Pasha as maintainers From: Yuanchu Xie To: Wei Liu , Rob Bradford , Greg Kroah-Hartman Cc: "Theodore Ts'o" , Pasha Tatashin , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux.dev, dev@lists.cloudhypervisor.org, Yuanchu Xie X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B333710000D X-Rspam-User: X-Stat-Signature: fx8tbm34zyao5ft47ynohz75457dag6q X-HE-Tag: 1716017084-704996 X-HE-Meta: U2FsdGVkX1/P83zyFFqBDjW+3zvEEgF2KztF7vYovl6aaB/HVTp9/byQMWK3vKmfOMitLk2JDy2rcNwEZzU62M3iKdApC7P8R1m9drLHb35HzOR7mi5HcKOK3vJUMFUo2UJ6uCIp0CUh6+1gZ1stMLsHZIk3R3Sw82sUBjTWOMFbccbt4GIFji7OTzuX6YN2Z+HKh+z7XEzKB9hDqUHoMHteWXyR0kvXPnU/0aslX+ioBUH02AeDfTcKdCqm7JpdB2Sgy2jejxvR+KKIpxu/bXd/K88t4MFW6ARLF/ghbJR4TzsZUvegSThCfk5DSw056dqWinrQaQJcGDeHGrjBBPNqLlZhz0nMWBOgXwVFTg4t46SCX6RiQ1e/OuVdO6vJmJobxA6wfbAk1dCXmdYBMQqpMQNyzAR5pjIhwZL122kLjacwrP3eJMRd4jFOoV8h/NZzuuQWVqQIttOYbQyBGozUOnHI7kKbWkgILuBdTYwiWRM+e6nNA6JB8IKDR7fhn3goKw1H9xE4xqa1g7+6fIm+ZAQ9gbMFFarFVvcx4dDfrrwgupE06omhLu8Oco4GJBCu1Ubxg9Zo1pf0kq87lA3H/iEXHMVjEWDc2bOkOyOUUVz+8PbZOB9adjBR6QYqATgD9VTe5MvubM9g0p4B6Vhz0Pbs7Wr/nzPSao8TKWkR+8nbDrkVrw/FpeH1WzTEDMCF8BToTPxp13pIIQphSAQ6vUMTn4Ke73VwhcoLy7loM+RIX5dK/Mq/+r4dFLZK7Ikbc3uyguT5c90qZkc0sqeRTKGbK+kRer5As5dCw4E2Zl8Up14phUkr/ayJLoXvr5Kp/ECA5OB5tswZWEMS6Q6YkFY9UsW+idNw7oTjWnu0d/LrG3AjWZlVTKWSSfdOI2S8+WcEoXxz8psI9vuaWpw25IWB6U1kdt/UMBCl1cIuim9TfwrqN2f/z/5FAvSuB3UY2ya2Zreb6NYfU8D 24/FYPfc 6jjpsQ/CWrgYW7+slRZeFWPxV8oeOsZatomK4BRLFFgtj0i16biCtdOECtBBbkLdhOTU3hZ7EO8exBS9kW+NLqmKmz6zqhS40f/L+M/74ZLXJFHyP9GxLr/6RVwytdpcJCPoNN02KTdOZux8e0uYqCa0seMIXuxBXzxFp3g7JC/VfCQ6Y2Prz0X+0U+SNutfV1kykEw59RFSUj01+8TR9BU7zOPHfCcdoQD+IGH6JERdon5pPQrJCOSmEspMMAOEsq8GAMFmrTSEXbS43hxujZHAj/8uFx9a/HzixweW3RTpyloqTsz9ZlFFW1idj7VyV/Dt/BQblUAsVIx9CPUJeJSj2untTSvK2FgduT3KKLqZUIVWxeVe5DC56gxnij2u9fxZqBj47+R+ugmJNLljNW/qCCpQ5inO7PWe/kTPUdwCIin/7cqxdmhjzqpL3FlW+eax1VmbaU/Tq3s76sxze7AWMXXf6aoTyXB0rx5gDAcfv6bTLg57eqvudt0mYiv95ufgrOu/ck4yCFcP/c4QwV7S+lLCHD5oztDuMPJBmB5pnZXNKm2wyVTOXhwL853B4gcQpmRrAsuOO/9NGke9nLdT3ZfUscEqN7WeqbBOazPFYp7YoG8zR5BtozYGwgRt9k2a3cJBMAPtkYV6uOiAu6Gywy/m6c2WVS93M6xga3CSLAsMhHe8V4rqQuTleLofQvFrr/oXGUVgCnuxvRk+/Gj3WGi3kqDhzombtGuM8BrIfTT/L/H5X7H9fBAORqD83/Y5X4EpxhsQvNYTVjUk8u7jvuTKypDj9HX/eTBB3dT8W2jLFNarq8Y0keQWRK93vril45++ASD4+JdPu5AAjlgkaAv6sx/7fxZdA X-Bogosity: Ham, tests=bogofilter, spamicity=0.000025, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The pvmemcontrol driver lives under drivers/virt/pvmemcontrol. We specify maintainers for the driver. Signed-off-by: Yuanchu Xie --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3fdc3b09c171..fd77ce0c1328 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18048,6 +18048,13 @@ L: linux-wireless@vger.kernel.org S: Supported F: drivers/net/wireless/purelifi/plfxlc/ +PVMEMCONTROL GUEST DRIVER +M: Yuanchu Xie +M: Pasha Tatashin +L: linux-kernel@vger.kernel.org +S: Supported +F: drivers/virt/pvmemcontrol/ + PVRUSB2 VIDEO4LINUX DRIVER M: Mike Isely L: pvrusb2@isely.net (subscribers-only)