for clarity
Changes since v1:
* Clean up formatting, capitalization in commit messages
* Add detail to commit message for patch 15
* Remove errant lines in Makefile and Kconfig in patch 15
* Move a reference to CONFIG_MSHV_VTL from patch 9 to 15
Nuno Das Neves (15):
hyperv
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
---
arch/arm64/hyperv/mshyperv.c
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
can be reserved for VP registers.
2. Change the non-arch-specific alias used by hv_set/get_register to
HV_MSR_. This is also happens to be the same name HyperV uses for this
purpose.
Signed-off-by: Nuno Das Neves
---
arch/arm64/include/asm/hyperv-tlfs.h | 25 +
arch/x86/include/asm
driver, even via indirect includes.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/arm64/include/asm/mshyperv.h | 2 +-
arch/x86/include/asm/mshyperv.h | 3 +--
drivers/hv/hyperv_vmbus.h | 1 -
include/asm-generic/hyperv-defs.h | 26 ++
include/asm
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 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
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
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
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
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
Signed-off-by: Nuno Das Neves
Acked-by: Jonathan Corbet
---
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 4ea5b837399a
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
in hyperv-tlfs.h.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
include/uapi/hyperv/hvgdk.h | 41 +
include/uapi/hyperv/hvgdk_mini.h | 1076
include/uapi/hyperv/hvhdk.h | 1342 ++
include/uapi/hyperv/hvhdk_mini.h | 160
Resend in plain text instead of HTML - oops!
On 9/23/2023 12:58 AM, Greg KH wrote:
On Fri, Sep 22, 2023 at 11:38:35AM -0700, Nuno Das Neves wrote:
+static int mshv_vtl_get_vsm_regs(void)
+{
+ struct hv_register_assoc registers[2];
+ union hv_input_vtl input_vtl;
+ int ret
:07:24PM -0700, Nuno Das Neves wrote:
On 9/23/2023 12:58 AM, Greg KH wrote:
Also, drivers should never call pr_*() calls, always use the proper
dev_*() calls instead.
We only use struct device in one place in this driver, I think that is the
only place it makes sense to use dev_*() over pr_
On 9/27/2023 1:33 AM, Greg KH wrote:
On Wed, Sep 27, 2023 at 08:04:42AM +, Wei Liu wrote:
So, the driver is supposed to stash a pointer to struct device in
private_data. That's what I alluded to in my previous reply. The core
driver framework or the VFS doesn't give us a reference to struct
n to struct for clarity
Changes since v1:
* Clean up formatting, capitalization in commit messages
* Add detail to commit message for patch 15
* Remove errant lines in Makefile and Kconfig in patch 15
* Move a reference to CONFIG_MSHV_VTL from patch 9 to 15
Nuno Das Neves (15
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
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
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
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
can be reserved for VP registers.
2. Change the non-arch-specific alias used by hv_set/get_register to
HV_MSR_. This is also happens to be the same name Hyper-V uses for this
purpose.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
arch/arm64/include/asm/hyperv-tlfs.h | 25
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
driver, even via indirect includes.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/arm64/include/asm/mshyperv.h | 2 +-
arch/x86/include/asm/mshyperv.h | 3 +--
drivers/hv/hyperv_vmbus.h | 1 -
include/asm-generic/hyperv-defs.h | 26 ++
include/asm
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
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
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_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
in hyperv-tlfs.h.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
include/uapi/hyperv/hvgdk.h | 41 +
include/uapi/hyperv/hvgdk_mini.h | 1076
include/uapi/hyperv/hvhdk.h | 1342 ++
include/uapi/hyperv/hvhdk_mini.h | 160
ly duplicate, but also MODIFY some structures
in hyperv-tlfs.h. e.g., The struct is in hyperv-tlfs.h, but a particular
field or bitfield is not.
Thanks,
Nuno
Thank you for your consideration.
Best regards,
Alex Ionescu
On Fri, Sep 29, 2023 at 2:02 PM Nuno Das Neves
wrote:
Add asm-generic/h
On 9/30/2023 11:19 PM, Greg KH wrote:
On Sat, Sep 30, 2023 at 10:01:58PM +, Wei Liu wrote:
On Sat, Sep 30, 2023 at 08:09:19AM +0200, Greg KH wrote:
On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote:
+/* Define connection identifier type. */
+union hv_connection_id
On 10/4/2023 10:50 AM, Greg KH wrote:
On Wed, Oct 04, 2023 at 05:36:32PM +, Dexuan Cui wrote:
From: Greg KH
Sent: Tuesday, October 3, 2023 11:10 PM
[...]
On Tue, Oct 03, 2023 at 04:37:01PM -0700, Nuno Das Neves wrote:
On 9/30/2023 11:19 PM, Greg KH wrote:
On Sat, Sep 30, 2023 at 10:01
hat do you think?
Thanks,
Nuno
Best regards,
Alex Ionescu
On Fri, Sep 29, 2023 at 2:02 PM Nuno Das Neves
wrote:
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_com
On 8/25/2023 11:24 AM, Nuno Das Neves wrote:
On 8/19/2023 3:26 AM, Greg KH wrote:
My "strong" opinion is the one kernel development rule that we have,
"you can not break userspace". So, if you change these
values/structures/whatever in the future, and userspace tools brea
On 10/5/2023 12:52 PM, Alex Ionescu wrote:
3) Truly making hypertv-tlfs the "documented" header, and then > removing any
duplication from HDK so that it remains the
"undocumented" header file. In this manner, one would include
hyperv-tlfs to use the stable ABI, and they would include HDK (which
On 10/10/2023 11:42 PM, Greg KH wrote:
On Tue, Oct 10, 2023 at 03:49:48PM -0700, Nuno Das Neves wrote:
On 8/25/2023 11:24 AM, Nuno Das Neves wrote:
On 8/19/2023 3:26 AM, Greg KH wrote:
My "strong" opinion is the one kernel development rule that we have,
"you can not break user
On 10/16/2023 4:49 AM, Alex Ionescu wrote:
Hi,
In arch/x86/include/asm/hyperv-tlfs.h, the following definition at
line 786 (in Linus' tree), I believe to be incorrect.
struct hv_enable_vp_vtl {
u64partition_id;
u32vp_index;
union hv_input_vtl
(), hv_get/set_nested_msr(), etc. These are only used for
Hyper-V MSRs and this naming makes that clear.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
arch/arm64/include/asm/hyperv-tlfs.h | 45 -
arch/arm64/include/asm/mshyperv.h| 4 +-
arch/x86/hyperv/hv_init.c| 8 +-
On 2/10/2024 2:37 AM, Michael Kelley wrote:
>
> Overall, this looks good to me. It cleans up the mess I made five
> years ago when first separating x86 from ARM64. :-(
>
> See one comment below, but otherwise,
>
> Reviewed-by: Michael Kelley
>
Thanks! Responded to your comment below.
>> #i
(), hv_get/set_nested_msr(), etc. These are only used for
Hyper-V MSRs and this naming makes that clear.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
Reviewed-by: Michael Kelley
---
Changes in v2:
* Use HV_X64_MSR_ instead of HV_MSR_ in arch/x86/kernel/cpu/mshyperv.c
---
arch/arm64/include/asm/hyp
code to hv_common_init() so it is not duplicated.
Signed-off-by: Nuno Das Neves
Acked-by: Wei Liu
---
arch/arm64/hyperv/mshyperv.c | 19 -
arch/x86/kernel/cpu/mshyperv.c| 35 ++-
drivers/hv/hv_common.c| 9
include/asm
On 3/7/2024 11:22 AM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Wednesday,
> March 6, 2024 4:48 PM
>>
>> Introduce x86_64 and arm64 functions for getting the hypervisor version
>> information and storing it in a structure for simpler parsing.
>>
>> U
Introduce x86_64 and arm64 functions to get the hypervisor version
information and store it in a structure for simpler parsing.
Use the new function to get and parse the version at boot time. While at
it, move the printing code to hv_common_init() so it is not duplicated.
Signed-off-by: Nuno Das
On 3/7/2024 3:03 PM, Nuno Das Neves wrote:
> Introduce x86_64 and arm64 functions to get the hypervisor version
> information and store it in a structure for simpler parsing.
>
> Use the new function to get and parse the version at boot time. While at
> it, move the p
document more accurately, i.e. HvRegisterGuestCrash*.
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv/hv_core.c | 14 +++---
arch/arm64/hyperv/mshyperv.c | 2 +-
arch/arm64/include/asm/hyperv-tlfs.h | 12 ++--
arch/x86/kernel/cpu/mshyperv.c | 2
On 3/18/2024 8:54 AM, mhkelle...@gmail.com wrote:
> From: Michael Kelley
>
> A Hyper-V host provides its guest VMs with entropy in a custom ACPI
> table named "OEM0". The entropy bits are updated each time Hyper-V
> boots the VM, and are suitable for seeding the Linux guest random
> number gener
not
present in the ABI.
Signed-off-by: Nuno Das Neves
Reviewed-by: Wei Liu
---
Changes in v3:
* Shorten function name to hv_numa_node_to_pxm_info()
* Correct hv_add_logical_processor_* naming, and remove flags
Changes in v2:
* Change hv_proximity_domain_info from union to struct to improve
urabh Sengar
> ---
> drivers/hv/vmbus_drv.c | 33 ++---
> 1 file changed, 30 insertions(+), 3 deletions(-)
>
LGTM otherwise.
Reviewed-by: Nuno Das Neves
On 10/4/2024 8:58 AM, Stanislav Kinsburskii wrote:
> Hi Nuno,
>
> On Thu, Oct 03, 2024 at 12:51:04PM -0700, Nuno Das Neves wrote:
>> diff --git a/arch/arm64/hyperv/hv_core.c b/arch/arm64/hyperv/hv_core.c
>> index 9d1969b875e9..bb7f28f74bf4 100644
>> --- a/arch/arm64/hyp
On 10/4/2024 12:11 PM, Simon Horman wrote:
> Hi,
>
> With this change in place I see allmodconfig x86_64 builds reporting that
> HV_REGISTER_FEATURES is undeclared.
>
> arch/arm64/hyperv/mshyperv.c: In function 'hyperv_init':
> arch/arm64/hyperv/mshyperv.c:53:26: error: 'HV_REGISTER_FEATURES' und
between Hyper-V code and non-Hyper-V code (KVM for example). This
will allow switching to the new headers in Hyper-V code only.
Signed-off-by: Nuno Das Neves
---
arch/arm64/include/asm/mshyperv.h | 2 +-
arch/x86/include/asm/mshyperv.h| 2 +-
arch/x86/include/asm/svm.h | 2
This definition is in the wrong file; it is part of the TLFS doc.
Signed-off-by: Nuno Das Neves
---
include/asm-generic/hyperv-tlfs.h | 9 +
include/linux/hyperv.h| 9 -
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/asm-generic/hyperv-tlfs.h
ew headers (hvhdk.h, etc..) in include/hyperv/
Patch 4: Add hv_defs.h and use it in mshyperv.h, svm.h,
hyperv_timer.h
Patch 5: Switch to the new headers, only in Hyper-V code
Nuno Das Neves (5):
hyperv: Move hv_connection_id to hyperv-tlfs.h
hyperv: Remove unnecessary #includes
hyper
asm/hyperv-tlfs.h is already included implicitly wherever mshyperv.h
or linux/hyperv.h is included. Remove those redundancies.
Remove includes of linux/hyperv.h and mshyperv.h where they are not
needed.
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv/hv_core.c| 2 --
arch/x86
Add definitions needed for privileged Hyper-V partitions.
These files are derived from headers exported from the hypervisor code.
This is a step toward importing headers directly, similar to Xen public
files in include/xen/interface/.
Signed-off-by: Nuno Das Neves
---
include/hyperv/hvgdk.h
.
Replace hyperv-tlfs.h with hvhdk.h directly in linux/hyperv.h, and
define HYPERV_NONTLFS_HEADERS there, since it is only used in
Hyper-V device code.
Update a couple of definitions to updated names found in the new
headers: HV_EXT_MEM_HEAT_HINT, HV_SUBNODE_TYPE_ANY.
Signed-off-by: Nuno Das Neves
Michael - sorry for the delay, I just got back from vacation.
On 10/10/2024 6:34 PM, MUKESH RATHOR wrote:
>
>
> On 10/10/24 11:21, Michael Kelley wrote:
> > From: Nuno Das Neves Sent:
> Thursday, October 3, 2024 12:51 PM
> >>
> >> To support Hyper-V Dom0
On 10/10/2024 11:21 AM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Thursday,
> October 3, 2024 12:51 PM
>>>> An intermediary header "hv_defs.h" is introduced to conditionally
>> include either hyperv-tlfs.h or hvhdk.h. This is required because
>
On 10/10/2024 11:21 AM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Thursday,
> October 3, 2024 12:51 PM
>>
>> asm/hyperv-tlfs.h is already included implicitly wherever mshyperv.h
>> or linux/hyperv.h is included. Remove those redundancies.
>
> I've b
On 11/10/2024 8:13 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Thursday,
> November 7, 2024 2:32 PM
>>
>> These headers contain definitions for regular Hyper-V guests (as in
>> hyperv-tlfs.h), as well as interfaces for more privileged guests like
>> Dom0
On 11/7/2024 9:59 PM, Naman Jain wrote:
>
>
> On 11/8/2024 4:02 AM, Nuno Das Neves wrote:
>> These headers contain definitions for regular Hyper-V guests (as in
>> hyperv-tlfs.h), as well as interfaces for more privileged guests like
>> Dom0.
>>
>> These
On 11/10/2024 8:12 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Thursday,
> November 7, 2024 2:32 PM
>>
>> To support Hyper-V Dom0 (aka Linux as root partition), many new
>> definitions are required.
>
> Using "dom0" terminology here an
On 10/31/2024 12:05 PM, Easwar Hariharan wrote:
> On 10/3/2024 12:50 PM, Nuno Das Neves wrote:
>> To support Hyper-V Dom0 (aka Linux as root partition), many new
>> definitions are required.
>>
>> The plan going forward is to directly import headers from
>> Hyper-V
milar to Xen public files in include/xen/interface/.
Signed-off-by: Nuno Das Neves
---
include/hyperv/hvgdk.h | 303
include/hyperv/hvgdk_ext.h | 46 ++
include/hyperv/hvgdk_mini.h | 1295 +++
include/hyperv/hvhdk.h | 733
functional change is expected.
Summary:
Patch 1-2: Minor cleanup patches
Patch 3: Add the new headers (hvhdk.h, etc..) in include/hyperv/
Patch 4: Switch to the new headers
Signed-off-by: Nuno Das Neves
---
Changelog:
v2:
- Rework the series to simply use the new headers everywhere
instead of
: Nuno Das Neves
---
arch/arm64/hyperv/hv_core.c| 2 +-
arch/arm64/hyperv/mshyperv.c | 4 ++--
arch/arm64/include/asm/mshyperv.h | 2 +-
arch/x86/hyperv/hv_init.c | 20 ++--
arch/x86/hyperv/hv_proc.c | 2 +-
arch/x86/hyperv/nested.c | 2
This definition is in the wrong file; it is part of the TLFS doc.
Acked-by: Wei Liu
Signed-off-by: Nuno Das Neves
---
include/asm-generic/hyperv-tlfs.h | 9 +
include/linux/hyperv.h| 9 -
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/asm
Remove includes of linux/hyperv.h, mshyperv.h, and hyperv-tlfs.h where
they are not used.
Acked-by: Wei Liu
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv/hv_core.c | 1 -
arch/x86/hyperv/hv_apic.c | 1 -
arch/x86/hyperv/hv_init.c | 1 -
arch/x86/hyperv/hv_proc.c | 1
On 11/10/2024 8:13 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Thursday,
> November 7, 2024 2:32 PM
>>
>> Switch to using hvhdk.h everywhere in the kernel. This header includes
>> all the new Hyper-V headers in include/hyperv, which form a superset of
>
On 11/11/2024 11:31 AM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Monday,
> November 11, 2024 10:45 AM
>>
>> On 11/10/2024 8:13 PM, Michael Kelley wrote:
>>> From: Nuno Das Neves Sent: Thursday,
>> November 7, 2024 2:32 PM
>>>>
>>>&
On 11/25/2024 9:59 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Monday,
> November 25, 2024 3:25 PM
>>
>> Remove all hyperv-tlfs.h files. These are no longer included
>> anywhere. hyperv/hvhdk.h serves the same role, but with an easier
>> path for adding
Remove includes of linux/hyperv.h, mshyperv.h, and hyperv-tlfs.h where
they are not used.
Acked-by: Wei Liu
Reviewed-by: Michael Kelley
Reviewed-by: Easwar Hariharan
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv/hv_core.c | 1 -
arch/x86/hyperv/hv_apic.c | 1 -
arch/x86
This definition is in the wrong file; it is part of the TLFS doc.
Acked-by: Wei Liu
Reviewed-by: Easwar Hariharan
Reviewed-by: Michael Kelley
Signed-off-by: Nuno Das Neves
---
include/asm-generic/hyperv-tlfs.h | 9 +
include/linux/hyperv.h| 9 -
2 files changed, 9
functional change is expected.
Summary:
Patch 1-2: Minor cleanup patches
Patch 3: Add the new headers (hvhdk.h, etc..) in include/hyperv/
Patch 4: Switch to the new headers
Patch 5: Delete hyperv-tlfs.h files
Signed-off-by: Nuno Das Neves
---
Changelog:
v3:
- Add patch (#5) to delete the hyperv
to their own files in
arch/x86/ and arch/arm64/.
These headers are a step toward importing headers directly from Hyper-V
in the future, similar to Xen public files in include/xen/interface/.
Signed-off-by: Nuno Das Neves
---
MAINTAINERS |5 +
include/hyperv/hvgdk.h | 3
Remove all hyperv-tlfs.h files. These are no longer included
anywhere. hyperv/hvhdk.h serves the same role, but with an easier
path for adding new definitions.
Remove the relevant lines in MAINTAINERS.
Signed-off-by: Nuno Das Neves
---
MAINTAINERS | 3 -
arch/arm64
hyperv-tlfs.h).
To be more consistent with the original Hyper-V code, the names of
some definitions are changed slightly. Update those where needed.
Update comments in mshyperv.h files to point to include/hyperv for
adding new definitions.
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv
On 12/7/2024 6:59 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Friday,
> December 6, 2024 2:22 PM
>>
>> There are several bits of Hyper-V-related code that today live in
>> arch/x86 but are not really specific to x86_64 and will work on arm64
>> too.
>
On 12/8/2024 4:07 PM, Wei Liu wrote:
> On Mon, Nov 25, 2024 at 03:24:40PM -0800, Nuno Das Neves wrote:
>> This definition is in the wrong file; it is part of the TLFS doc.
>>
>> Acked-by: Wei Liu
>> Reviewed-by: Easwar Hariharan
>> Reviewed-by: Michael Kelley
id to hv_output_get_partition_id, to
make it distinct from the function hv_get_partition_id(), and match
the original Hyper-V struct name.
Remove the BUG()s. Failing to get the id need not crash the machine.
Signed-off-by: Nuno Das Neves
---
arch/arm64/hyperv/mshyperv.c| 3 +++
arch/x86/h
These helpers are not specific to x86_64 and will be needed by common code.
Remove some unnecessary #includes.
Reviewed-by: Michael Kelley
Signed-off-by: Nuno Das Neves
---
arch/x86/hyperv/Makefile | 2 +-
arch/x86/include/asm/mshyperv.h | 4
drivers/hv/Makefile
.
Signed-off-by: Nuno Das Neves
---
Changes in v3:
* Just use percpu input page for the hypercall [Michael Kelley]
* Move the calls to hv_get_partition_id() back to arch code [Michael Kelley]
* Rename struct hv_get_partition_id to hv_output_get_partition_id
[Michael Kelley]
Changes in v2:
* Fix
kinds in future), and hv_identify_partition_type()
to it up early in Hyper-V initialization.
Signed-off-by: Nuno Das Neves
---
Depends on
https://lore.kernel.org/linux-hyperv/1738955002-20821-3-git-send-email-nunodasne...@linux.microsoft.com/
arch/arm64/hyperv/mshyperv.c | 2 ++
arch/x86
On 12/7/2024 7:01 PM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Friday,
> December 6, 2024 2:22 PM
>>
>> Make hv_current_partition_id available in both x86_64 and arm64.
>> This feature isn't specific to x86_64 and will be needed by common
>> code.
&g
On 12/18/2024 12:54 PM, Roman Kisel wrote:
> Commit bc905fa8b633 ("hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h")
> changed the type of the output pointer to `struct hv_register_assoc` from
> `struct hv_get_vp_registers_output`. That leads to an incorrect computation,
> and leaves the system
On 12/19/2024 11:13 AM, Easwar Hariharan wrote:
> On 12/19/2024 10:40 AM, Nuno Das Neves wrote:
>> On 12/18/2024 12:54 PM, Roman Kisel wrote:
>>> Commit bc905fa8b633 ("hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h")
>>> changed the type of the output
From: Nuno Das Neves
These are not specific to x86_64 and will be needed by common code.
Signed-off-by: Nuno Das Neves
---
arch/x86/hyperv/hv_proc.c | 144 ---
arch/x86/include/asm/mshyperv.h | 2 -
drivers/hv/hv_common.c | 145
From: Nuno Das Neves
Make hv_current_partition_id available in both x86_64 and arm64.
This feature isn't specific to x86_64 and will be needed by common
code.
While at it, replace the BUG()s with WARN()s. Failing to get the id
need not crash the machine (although it is a very bad sign).
S
.
Signed-off-by: Nuno Das Neves
Nuno Das Neves (2):
hyperv: Move hv_current_partition_id to arch-generic code
hyperv: Move create_vp and deposit_pages hvcalls to hv_common.c
arch/arm64/hyperv/mshyperv.c| 3 +
arch/x86/hyperv/hv_init.c | 25 +
arch/x86/hyperv/hv_proc.c
_init get_vtl(void)
>
> ret = hv_do_hypercall(control, input, output);
> if (hv_result_success(ret)) {
> - ret = output->value.reg8 & HV_X64_VTL_MASK;
> + ret = output->values[0].reg8 & HV_X64_VTL_MASK;
> } else {
> pr_err("Failed to get VTL(error: %lld) exiting...\n", ret);
> BUG();
Reviewed-by: Nuno Das Neves
On 1/6/2025 9:37 AM, Michael Kelley wrote:
> From: Roman Kisel Sent: Monday, December 30,
> 2024 10:10 AM
>>
>> There is no definition of the output structure for the
>> GetVpRegisters hypercall. Hence, using the hypercall
>> is not possible when the output value has some structure
>> to it. Even
On 12/6/2024 11:36 PM, Wei Liu wrote:
> On Fri, Dec 06, 2024 at 02:21:46PM -0800, Nuno Das Neves wrote:
>> From: Nuno Das Neves
>>
>> Make hv_current_partition_id available in both x86_64 and arm64.
>> This feature isn't specific to x86_64 and will be needed by c
On 12/17/2024 9:48 AM, Michael Kelley wrote:
> From: Nuno Das Neves Sent: Monday,
> December 9, 2024 12:20 PM
>>
>> On 12/7/2024 6:59 PM, Michael Kelley wrote:
>>> From: Nuno Das Neves Sent: Friday,
>>> December 6, 2024 2:22 PM
>>>>
>>
These helpers are not specific to x86_64 and will be needed by common code.
Remove some unnecessary #includes.
Signed-off-by: Nuno Das Neves
---
arch/x86/hyperv/Makefile | 2 +-
arch/x86/include/asm/mshyperv.h | 4
drivers/hv/Makefile | 2
.
Signed-off-by: Nuno Das Neves
---
Changes in v2:
* Fix dependence on percpu output page by using a stack variable for the
hypercall output [Michael Kelley]
* Remove unnecessary WARN()s [Michael Kelley]
* Define hv_current_partition_id in hv_common.c [Michael Kelley]
* Move entire hv_proc.c to
From: Nuno Das Neves
Move hv_current_partition_id and hv_get_partition_id() to hv_common.c.
These aren't specific to x86_64 and will be needed by common code.
Set hv_current_partition_id to HV_PARTITION_ID_SELF by default.
Use a stack variable for the output of the hypercall. This a
1 - 100 of 161 matches
Mail list logo