Re: [RFC PATCH 04/18] virt/mshv: request version ioctl

2021-04-06 Thread Nuno Das Neves
On 3/5/2021 1:18 AM, Vitaly Kuznetsov wrote: > Nuno Das Neves writes: > >> On 2/9/2021 5:11 AM, Vitaly Kuznetsov wrote: >>> Nuno Das Neves writes: >>> > ... >>>> + >>>> +3.1 MSHV_REQUEST_VERSION >>>> +

Re: [RFC PATCH 16/18] virt/mshv: mmap vp register page

2021-03-25 Thread Nuno Das Neves
On 2/8/2021 11:49 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:31 PM >> >> Introduce mmap interface for a virtual processor, exposing a page for >> setting and getting common registers while the VP is suspended. >> >>

Re: [RFC PATCH 15/18] virt/mshv: get and set vp state ioctls

2021-03-11 Thread Nuno Das Neves
On 2/8/2021 11:48 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:31 PM >> To: linux-hyp...@vger.kernel.org >> Cc: virtualizat...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; >> Michael Kelley >> ; virem

Re: [RFC PATCH 11/18] virt/mshv: set up synic pages for intercept messages

2021-03-11 Thread Nuno Das Neves
On 2/8/2021 11:47 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:31 PM >> >> Same idea as synic setup in drivers/hv/hv.c:hv_synic_enable_regs() >> and hv_synic_disable_regs(). >> Setting up synic registers in both vmbus

Re: [RFC PATCH 10/18] virt/mshv: get and set vcpu registers ioctls

2021-03-08 Thread Nuno Das Neves
On 2/8/2021 11:47 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:30 PM >> >> Add ioctls for getting and setting virtual processor registers. >> >> Co-developed-by: Lillian Grassin-Drake >> Signed-off-by: Lillian Grass

Re: [RFC PATCH 08/18] virt/mshv: map and unmap guest memory

2021-03-08 Thread Nuno Das Neves
On 2/8/2021 11:45 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:30 PM >> >> Introduce ioctls for mapping and unmapping regions of guest memory. >> >> Uses a table of memory 'slots' similar to KVM, but the sl

Re: [RFC PATCH 07/18] virt/mshv: withdraw memory hypercall

2021-03-05 Thread Nuno Das Neves
On 2/8/2021 11:44 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:30 PM >> >> Withdraw the memory from a finalized partition and free the pages. >> The partition is now cleaned up correctly when the fd is released. >> >> Co

Re: [RFC PATCH 06/18] virt/mshv: create, initialize, finalize, delete partition hypercalls

2021-03-04 Thread Nuno Das Neves
On 2/8/2021 11:42 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:30 PM >> >> Add hypercalls for fully setting up and mostly tearing down a guest >> partition. >> The teardown operation will generate an error as the deposited &g

Re: [RFC PATCH 04/18] virt/mshv: request version ioctl

2021-03-04 Thread Nuno Das Neves
On 2/8/2021 11:41 AM, Michael Kelley wrote: > From: Nuno Das Neves Sent: Friday, > November 20, 2020 4:30 PM >> >> Reserve ioctl number in userpsace-api/ioctl/ioctl-number.rst >> Introduce MSHV_REQUEST_VERSION ioctl. >> Introduce documentation for /dev/m

Re: [RFC PATCH 05/18] virt/mshv: create partition ioctl

2021-03-04 Thread Nuno Das Neves
On 2/9/2021 5:15 AM, Vitaly Kuznetsov wrote: > Nuno Das Neves writes: > >> Add MSHV_CREATE_PARTITION, which creates an fd to track a new partition. >> Partition is not yet created in the hypervisor itself. >> Introduce header files for userspace-facing hyperv structure

Re: [RFC PATCH 04/18] virt/mshv: request version ioctl

2021-03-04 Thread Nuno Das Neves
On 2/9/2021 5:11 AM, Vitaly Kuznetsov wrote: > Nuno Das Neves writes: > >> Reserve ioctl number in userpsace-api/ioctl/ioctl-number.rst >> Introduce MSHV_REQUEST_VERSION ioctl. >> Introduce documentation for /dev/mshv in Documentation/virt/mshv >> &g

Re: [RFC PATCH 01/18] x86/hyperv: convert hyperv statuses to linux error codes

2021-03-04 Thread Nuno Das Neves
On 2/9/2021 5:04 AM, Vitaly Kuznetsov wrote: > Nuno Das Neves writes: > >> Return linux-friendly error codes from hypercall wrapper functions. >> This will be needed in the mshv module. >> >> Signed-off-by: Nuno Das Neves >> --- >&g

[RFC PATCH 01/18] x86/hyperv: convert hyperv statuses to linux error codes

2020-11-20 Thread Nuno Das Neves
Return linux-friendly error codes from hypercall wrapper functions. This will be needed in the mshv module. Signed-off-by: Nuno Das Neves --- arch/x86/hyperv/hv_proc.c | 30 ++--- arch/x86/include/asm/mshyperv.h | 1 + include/asm-generic/hyperv-tlfs.h | 32

[RFC PATCH 16/18] virt/mshv: mmap vp register page

2020-11-20 Thread Nuno Das Neves
Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 11 arch/x86/include/uapi/asm/hyperv-tlfs.h | 74 ++ include/asm-generic/hyperv-tlfs.h | 10 +++ include/linux/mshv.h| 1 + include

[RFC PATCH 13/18] virt/mshv: install intercept ioctl

2020-11-20 Thread Nuno Das Neves
Introduce ioctl for configuring intercept messages from a guest partition. Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 9 + arch/x86/include/uapi/asm/hyperv-tlfs.h | 43 ++ include/asm-generic/hyperv-tlfs.h | 8 include/uapi

[RFC PATCH 06/18] virt/mshv: create, initialize, finalize, delete partition hypercalls

2020-11-20 Thread Nuno Das Neves
: Nuno Das Neves --- include/asm-generic/hyperv-tlfs.h | 52 +++- include/uapi/asm-generic/hyperv-tlfs.h | 1 + include/uapi/linux/mshv.h | 1 + virt/mshv/mshv_main.c | 169 - 4 files changed, 220 insertions(+), 3 deletions

[RFC PATCH 17/18] virt/mshv: get and set partition property ioctls

2020-11-20 Thread Nuno Das Neves
Introduce ioctls for getting and setting properties of guest partitions. Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst| 8 +++ include/asm-generic/hyperv-tlfs.h | 17 ++ include/uapi/asm-generic/hyperv-tlfs.h | 59 include/uapi/linux

[RFC PATCH 15/18] virt/mshv: get and set vp state ioctls

2020-11-20 Thread Nuno Das Neves
Introduce ioctls for getting and setting guest vcpu emulated LAPIC state, and xsave data. Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 8 + arch/x86/include/uapi/asm/hyperv-tlfs.h | 59 ++ include/asm-generic/hyperv-tlfs.h | 41 include/uapi/asm

[RFC PATCH 18/18] virt/mshv: Add enlightenment bits to create partition ioctl

2020-11-20 Thread Nuno Das Neves
Introduce hv_partition_synthetic_processor features mask to MSHV_CREATE_PARTITION ioctl, which can be used to enable hypervisor enlightenments for exo partitions. Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 3 + arch/x86/include/uapi/asm/hyperv-tlfs.h | 125

[RFC PATCH 11/18] virt/mshv: set up synic pages for intercept messages

2020-11-20 Thread Nuno Das Neves
-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- arch/x86/include/asm/hyperv-tlfs.h | 29 --- arch/x86/include/uapi/asm/hyperv-tlfs.h | 264 include/asm-generic/hyperv-tlfs.h | 46 + include/linux/mshv.h| 1 + include

[RFC PATCH 12/18] virt/mshv: run vp ioctl and isr

2020-11-20 Thread Nuno Das Neves
-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 14 ++ arch/x86/kernel/cpu/mshyperv.c | 16 ++ include/asm-generic/mshyperv.h | 3 + include/linux/mshv.h| 7 + include/uapi/linux/mshv.h | 1 + virt/mshv/mshv_main.c | 270

[RFC PATCH 10/18] virt/mshv: get and set vcpu registers ioctls

2020-11-20 Thread Nuno Das Neves
Add ioctls for getting and setting virtual processor registers. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 11 + arch/x86/include/uapi/asm/hyperv-tlfs.h | 601

[RFC PATCH 14/18] virt/mshv: assert interrupt ioctl

2020-11-20 Thread Nuno Das Neves
Introduce ioctl for asserting an interrupt on a given APIC within a guest partition. Co-developed-by: Sunil Muthuswamy Signed-off-by: Sunil Muthuswamy Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 11 arch/x86/include/asm/hyperv-tlfs.h | 14

[RFC PATCH 09/18] virt/mshv: create vcpu ioctl

2020-11-20 Thread Nuno Das Neves
Introduce ioctl for creating a virtual processor in a partition. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst | 9 +++ include/linux/mshv.h| 10 +++ include/uapi/linux/mshv.h

[RFC PATCH 04/18] virt/mshv: request version ioctl

2020-11-20 Thread Nuno Das Neves
Reserve ioctl number in userpsace-api/ioctl/ioctl-number.rst Introduce MSHV_REQUEST_VERSION ioctl. Introduce documentation for /dev/mshv in Documentation/virt/mshv Signed-off-by: Nuno Das Neves --- .../userspace-api/ioctl/ioctl-number.rst | 2 + Documentation/virt/mshv/api.rst

[RFC PATCH 07/18] virt/mshv: withdraw memory hypercall

2020-11-20 Thread Nuno Das Neves
Withdraw the memory from a finalized partition and free the pages. The partition is now cleaned up correctly when the fd is released. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- include/asm-generic/hyperv-tlfs.h | 10

[RFC PATCH 05/18] virt/mshv: create partition ioctl

2020-11-20 Thread Nuno Das Neves
Add MSHV_CREATE_PARTITION, which creates an fd to track a new partition. Partition is not yet created in the hypervisor itself. Introduce header files for userspace-facing hyperv structures. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das

[RFC PATCH 08/18] virt/mshv: map and unmap guest memory

2020-11-20 Thread Nuno Das Neves
estriction, and implicitly overwrite any mappings on the pages in the specified regions. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- Documentation/virt/mshv/api.rst| 15 ++ include/asm-generic/hyperv-tlfs.h | 15 +

[RFC PATCH 00/18] Microsoft Hypervisor root partition ioctl interface

2020-11-20 Thread Nuno Das Neves
and userspace. Nuno Das Neves (18): x86/hyperv: convert hyperv statuses to linux error codes asm-generic/hyperv: convert hyperv statuses to strings virt/mshv: minimal mshv module (/dev/mshv/) virt/mshv: request version ioctl virt/mshv: create partition ioctl virt/mshv: create, initialize

[RFC PATCH 02/18] asm-generic/hyperv: convert hyperv statuses to strings

2020-11-20 Thread Nuno Das Neves
Allow hyperv hypercall failures to be debugged more easily with dmesg. This will be used in the mshv module. Signed-off-by: Nuno Das Neves --- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/hyperv/hv_proc.c | 10 +++--- include/asm-generic/hyperv-tlfs.h | 60

[RFC PATCH 03/18] virt/mshv: minimal mshv module (/dev/mshv/)

2020-11-20 Thread Nuno Das Neves
Introduce a barebones module file for the mshv API. Introduce CONFIG_HYPERV_ROOT_API for controlling compilation of mshv. Co-developed-by: Lillian Grassin-Drake Signed-off-by: Lillian Grassin-Drake Signed-off-by: Nuno Das Neves --- arch/x86/Kconfig | 2 ++ arch/x86/hyperv/Kconfig

Re: [RFC PATCH 1/2] sys-hypervisor: /sys/hypervisor/type for Hyper-V

2019-08-05 Thread Nuno Das Neves
On 7/29/2019 3:54 PM, Nuno Das Neves wrote: > *From:*Stephen Hemminger > *Sent:* Friday, 26 July 2019 5:43 PM > *To:* Nuno Das Neves ; Nuno Das Neves > ; gre...@linuxfoundation.org > ; Sasha Levin ; > Haiyang Zhang ; KY Srinivasan ; > Michael Kelley > *Cc:* linu

[RFC PATCH 0/2] Basic /sys/hypervisor information for Hyper-V

2019-07-26 Thread Nuno Das Neves
nformation. Nuno Das Neves (2): sys-hypervisor: /sys/hypervisor/type for Hyper-V sys-hypervisor: version information for Hyper-V .../ABI/stable/sysfs-hypervisor-hyperv| 61 drivers/hv/Kconfig| 10 ++ drivers/hv/Makefile

[RFC PATCH 1/2] sys-hypervisor: /sys/hypervisor/type for Hyper-V

2019-07-26 Thread Nuno Das Neves
Populate /sys/hypervisor with entries for Hyper-V. This patch adds /sys/hypervisor/type which contains "Hyper-V". Signed-off-by: Nuno Das Neves --- .../ABI/stable/sysfs-hypervisor-hyperv| 7 drivers/hv/Kconfig| 10 + drivers/h

[RFC PATCH 2/2] sys-hypervisor: version information for Hyper-V

2019-07-26 Thread Nuno Das Neves
This patch introduces the /sys/hypervisor/version directory, which contains files with version information about the underlying Windows hypervisor, namely: major, minor, build_number, service_number, service_pack, service_branch Signed-off-by: Nuno Das Neves --- .../ABI/stable/sysfs-hypervisor