On Fri, Sep 29, 2023 at 11:01:41AM -0700, Nuno Das Neves wrote:
> --- /dev/null
> +++ b/include/uapi/linux/mshv.h
> @@ -0,0 +1,306 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Much better.
> +#ifndef _UAPI_LINUX_MSHV_H
> +#define _UAPI_LINUX_MSHV_H
> +
> +/*
> + * Userspac
On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote:
> These must be in uapi because they will be used in the mshv ioctl API.
>
> Version numbers for each file:
> hvhdk.h 25212
> hvhdk_mini.h 25294
> hvgdk.h 25125
> hvgdk_mini.h 25294
what are version numb
Hi Nuno,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arnd-asm-generic/master]
[also build test WARNING on arm64/for-next/core linus/master v6.6-rc3
next-20230929]
[cannot apply to tip/x86/core]
[If your patch is applied to the wrong git tree, kindly drop
rndis_filter uses utf8s_to_utf16s() which is provided by setting
NLS, so select NLS to fix the build error:
ERROR: modpost: "utf8s_to_utf16s" [drivers/net/hyperv/hv_netvsc.ko] undefined!
Fixes: 1ce09e899d28 ("hyperv: Add support for setting MAC from within guests")
Signed-off-by: Randy Dunlap
Cc
Hi Michael,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/master]
[also build test ERROR on tip/auto-latest linus/master v6.6-rc3 next-20230929]
[cannot apply to tip/x86/mm tip/x86/core]
[If your patch is applied to the wrong git tree, kindly drop us a note
Handle the case when GSO SKB linear length is too large.
MANA NIC requires GSO packets to put only the header part to SGE0,
otherwise the TX queue may stop at the HW level.
So, use 2 SGEs for the skb linear part which contains more than the
packet header.
Fixes: ca9c54d2d6a5 ("net: mana: Add a d
sizeof(struct hop_jumbo_hdr) is not part of tso_bytes, so remove
the subtraction from header size.
Cc: sta...@vger.kernel.org
Fixes: bd7fc6e1957c ("net: mana: Add new MANA VF performance counters for
easier troubleshooting")
Signed-off-by: Haiyang Zhang
Reviewed-by: Simon Horman
---
drivers/ne
For an unknown TX CQE error type (probably from a newer hardware),
still free the SKB, update the queue tail, etc., otherwise the
accounting will be wrong.
Also, TX errors can be triggered by injecting corrupted packets, so
replace the WARN_ONCE to ratelimited error logging.
Cc: sta...@vger.kerne
Fix TX processing bugs on error handling, tso_bytes calculation,
and sge0 size.
Haiyang Zhang (3):
net: mana: Fix TX CQE error handling
net: mana: Fix the tso_bytes calculation
net: mana: Fix oversized sge0 for GSO packets
drivers/net/ethernet/microsoft/mana/mana_en.c | 211 ---
In a CoCo VM when a page transitions from encrypted to decrypted, or vice
versa, attributes in the PTE must be updated *and* the hypervisor must
be notified of the change. Because there are two separate steps, there's
a window where the settings are inconsistent. Normally the code that
initiates t
__set_memory_enc_pgtable() is only called from __set_memory_enc_dec()
after doing a simple validation check. Prior to commit 812b0597fb40,
__set_memory_enc_dec() did more complex checking, but now the code
can be simplified by collapsing the two functions.
No functional change.
Signed-off-by: Mic
The functions set_memory_decrypted()/encrypted() may leave the input
memory range in an inconsistent state if an error occurs. Add comments
describing the situation and what callers must be aware of. Also add
comments in __set_memory_enc_dec() with more details on the issues and
why further inves
The core function __change_page_attr() currently sets up a TLB flush if
a PTE is changed. But if the old value of the PTE doesn't include the
PRESENT flag, the PTE won't be in the TLB, so a flush isn't needed.
Avoid an unnecessary TLB flush by conditioning the flush on the old
PTE value including
In preparation for temporarily marking pages not present during a
transition between encrypted and decrypted, use slow_virt_to_phys()
in the hypervisor callbacks. As long as the PFN is correct,
slow_virt_to_phys() works even if the leaf PTE is not present.
The existing functions that depends on vma
In a CoCo VM when a page transitions from encrypted to decrypted, or vice
versa, attributes in the PTE must be updated *and* the hypervisor must
be notified of the change. Because there are two separate steps, there's
a window where the settings are inconsistent. Normally the code that
initiates t
These must be in uapi because they will be used in the mshv ioctl API.
Version numbers for each file:
hvhdk.h 25212
hvhdk_mini.h25294
hvgdk.h 25125
hvgdk_mini.h25294
These are unstable interfaces and as such must be compiled independently
from published interfaces found in
hv_status_to_errno translates hyperv statuses to linux error codes.
This is useful for returning something linux-friendly from a hypercall
helper function.
hv_status_to_string improves clarity of error messages.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/x86/hyperv/hv_init.c
This is a more flexible approach for determining whether to allocate the
output page.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
drivers/hv/hv_common.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_comm
x86_64 and arm64 implementations to get the hypervisor version
information. Store these in hv_hypervisor_version_info structure to
simplify parsing the fields.
Replace the existing parsing when printing the version numbers at boot.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/arm64
Add asm-generic/hyperv-defs.h. It includes hyperv-tlfs.h or hvhdk.h
depending on compile-time constant HV_HYPERV_DEFS which will be defined in
the mshv driver.
This is needed to keep unstable Hyper-V interfaces independent of
hyperv-tlfs.h. This ensures hvhdk.h replaces hyperv-tlfs.h in the mshv
d
These hypercalls are not arch-specific. Move them to common code.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/x86/hyperv/hv_proc.c | 152
arch/x86/include/asm/mshyperv.h | 1 -
drivers/hv/hv_common.c | 147 ++
In x86 hyperv-tlfs, HV_REGISTER_ prefix is used to indicate MSRs
accessed via rdmsrl/wrmsrl. But in ARM64, HV_REGISTER_ instead indicates
VP registers accessed via get/set vp registers hypercall.
This is due to HV_REGISTER_* names being used by hv_set/get_register,
with the arch-specific version d
This will handle SYNIC interrupts such as intercepts, doorbells, and
scheduling messages intended for the mshv driver.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
Reviewed-by: Tianyu Lan
---
arch/x86/kernel/cpu/mshyperv.c | 9 +
drivers/hv/hv_common.c | 5 +
include/
Signed-off-by: Nuno Das Neves
Acked-by: Jonathan Corbet
Acked-by: Wei Liu
---
Documentation/userspace-api/ioctl/ioctl-number.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst
b/Documentation/userspace-api/ioctl/ioctl-number.rst
index 4
These will be used by the mshv_vtl driver.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
drivers/hv/hv.c | 2 ++
drivers/hv/hyperv_vmbus.h | 1 +
drivers/hv/vmbus_drv.c| 3 ++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
in
Factor out logic for determining if we should set the auto eoi flag in SINT
register.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
drivers/hv/hv.c| 12 +---
include/asm-generic/mshyperv.h | 13 +
2 files changed, 14 insertions(+), 11 deletions(-)
d
The definition conflicts with one added in hvgdk.h as part of the mshv
driver so must be moved to hyperv-tlfs.h.
This structure should be in hyperv-tlfs.h anyway, since it is part of
the TLFS document.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
include/asm-generic/hyperv-tlfs.h | 9 ++
Factor out logic for converting numa node to proximity domain info into
a helper function, and export it.
Change hv_proximity_domain_info to a struct to simplify the code.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
arch/x86/hyperv/hv_proc.c | 8 ++--
drivers/acpi/numa/
Add a pointer hv_synic_eventring_tail to track the tail pointer for the
SynIC event ring buffer for each SINT.
This will be used by the mshv driver, but must be tracked independently
since the driver module could be removed and re-inserted.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
This series introduces support for creating and running guest machines
while running on the Microsoft Hypervisor. [0]
This is done via an IOCTL interface accessed through /dev/mshv, similar to
/dev/kvm. Another series introducing this support was previously posted.
[1]
These interfaces support VMM
> -Original Message-
> From: Simon Horman
> Sent: Friday, September 29, 2023 4:57 AM
> To: Haiyang Zhang
> Cc: linux-hyperv@vger.kernel.org; net...@vger.kernel.org; Dexuan Cui
> ; KY Srinivasan ; Paul Rosswurm
> ; o...@aepfle.de; vkuznets ;
> da...@davemloft.net; wei@kernel.org; ed
> -Original Message-
> From: Simon Horman
> Sent: Friday, September 29, 2023 1:51 AM
> To: Haiyang Zhang
> Cc: linux-hyperv@vger.kernel.org; net...@vger.kernel.org; Dexuan Cui
> ; KY Srinivasan ; Paul Rosswurm
> ; o...@aepfle.de; vkuznets
> ; da...@davemloft.net; wei@kernel.org;
>
On Sat, Sep 23, 2023 at 06:31:47PM -0700, Haiyang Zhang wrote:
> Handle the case when GSO SKB linear length is too large.
>
> MANA NIC requires GSO packets to put only the header part to SGE0,
> otherwise the TX queue may stop at the HW level.
>
> So, use 2 SGEs for the skb linear part which cont
33 matches
Mail list logo