<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/hyperv, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-01T08:51:24Z</updated>
<entry>
<title>x86/hyperv: Fix usage of cpu_online_mask to get valid cpu</title>
<updated>2025-08-01T08:51:24Z</updated>
<author>
<name>Nuno Das Neves</name>
</author>
<published>2025-07-03T22:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a5ad614da20a19ba0747d009b9a09d0cc8450f8'/>
<id>urn:sha1:9a5ad614da20a19ba0747d009b9a09d0cc8450f8</id>
<content type='text'>
[ Upstream commit bb169f80ed5a156ec3405e0e49c6b8e9ae264718 ]

Accessing cpu_online_mask here is problematic because the cpus read lock
is not held in this context.

However, cpu_online_mask isn't needed here since the effective affinity
mask is guaranteed to be valid in this callback. So, just use
cpumask_first() to get the cpu instead of ANDing it with cpus_online_mask
unnecessarily.

Fixes: e39397d1fd68 ("x86/hyperv: implement an MSI domain for root partition")
Reported-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Closes: https://lore.kernel.org/linux-hyperv/SN6PR02MB4157639630F8AD2D8FD8F52FD475A@SN6PR02MB4157.namprd02.prod.outlook.com/
Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Nuno Das Neves &lt;nunodasneves@linux.microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Link: https://lore.kernel.org/r/1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap()</title>
<updated>2025-06-19T13:41:07Z</updated>
<author>
<name>Roman Kisel</name>
</author>
<published>2025-05-07T18:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb002d6c8f06d6061e84b2109cb84416107a9fb9'/>
<id>urn:sha1:cb002d6c8f06d6061e84b2109cb84416107a9fb9</id>
<content type='text'>
commit 86c48271e0d60c82665e9fd61277002391efcef7 upstream.

To start an application processor in SNP-isolated guest, a hypercall
is used that takes a virtual processor index. The hv_snp_boot_ap()
function uses that START_VP hypercall but passes as VP index to it
what it receives as a wakeup_secondary_cpu_64 callback: the APIC ID.

As those two aren't generally interchangeable, that may lead to hung
APs if the VP index and the APIC ID don't match up.

Update the parameter names to avoid confusion as to what the parameter
is. Use the APIC ID to the VP index conversion to provide the correct
input to the hypercall.

Cc: stable@vger.kernel.org
Fixes: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
Signed-off-by: Roman Kisel &lt;romank@linux.microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Link: https://lore.kernel.org/r/20250507182227.7421-2-romank@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250507182227.7421-2-romank@linux.microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'hyperv-next-signed-20250324' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux</title>
<updated>2025-03-25T21:47:04Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2025-03-25T21:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5b3d8660b049779880c790549ff3fef02f6922c'/>
<id>urn:sha1:a5b3d8660b049779880c790549ff3fef02f6922c</id>
<content type='text'>
Pull hyperv updates from Wei Liu:

 - Add support for running as the root partition in Hyper-V (Microsoft
   Hypervisor) by exposing /dev/mshv (Nuno and various people)

 - Add support for CPU offlining in Hyper-V (Hamza Mahfooz)

 - Misc fixes and cleanups (Roman Kisel, Tianyu Lan, Wei Liu, Michael
   Kelley, Thorsten Blum)

* tag 'hyperv-next-signed-20250324' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (24 commits)
  x86/hyperv: fix an indentation issue in mshyperv.h
  x86/hyperv: Add comments about hv_vpset and var size hypercall input args
  Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs
  hyperv: Add definitions for root partition driver to hv headers
  x86: hyperv: Add mshv_handler() irq handler and setup function
  Drivers: hv: Introduce per-cpu event ring tail
  Drivers: hv: Export some functions for use by root partition module
  acpi: numa: Export node_to_pxm()
  hyperv: Introduce hv_recommend_using_aeoi()
  arm64/hyperv: Add some missing functions to arm64
  x86/mshyperv: Add support for extended Hyper-V features
  hyperv: Log hypercall status codes as strings
  x86/hyperv: Fix check of return value from snp_set_vmsa()
  x86/hyperv: Add VTL mode callback for restarting the system
  x86/hyperv: Add VTL mode emergency restart callback
  hyperv: Remove unused union and structs
  hyperv: Add CONFIG_MSHV_ROOT to gate root partition support
  hyperv: Change hv_root_partition into a function
  hyperv: Convert hypercall statuses to linux error codes
  drivers/hv: add CPU offlining support
  ...
</content>
</entry>
<entry>
<title>x86/hyperv: Add comments about hv_vpset and var size hypercall input args</title>
<updated>2025-03-21T18:24:22Z</updated>
<author>
<name>Michael Kelley</name>
</author>
<published>2025-03-18T21:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=999ad14259a0d45cb3b616e2e95a7c8b622a7ecd'/>
<id>urn:sha1:999ad14259a0d45cb3b616e2e95a7c8b622a7ecd</id>
<content type='text'>
Current code varies in how the size of the variable size input header
for hypercalls is calculated when the input contains struct hv_vpset.
Surprisingly, this variation is correct, as different hypercalls make
different choices for what portion of struct hv_vpset is treated as part
of the variable size input header. The Hyper-V TLFS is silent on these
details, but the behavior has been confirmed with Hyper-V developers.

To avoid future confusion about these differences, add comments to
struct hv_vpset, and to hypercall call sites with input that contains
a struct hv_vpset. The comments describe the overall situation and
the calculation that should be used at each particular call site.

No functional change as only comments are updated.

Signed-off-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Link: https://lore.kernel.org/r/20250318214919.958953-1-mhklinux@outlook.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250318214919.958953-1-mhklinux@outlook.com&gt;
</content>
</entry>
<entry>
<title>hyperv: Log hypercall status codes as strings</title>
<updated>2025-03-20T21:23:03Z</updated>
<author>
<name>Nuno Das Neves</name>
</author>
<published>2025-03-14T19:28:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3817854ba892016ddb03ee31208e9f8e440f5bee'/>
<id>urn:sha1:3817854ba892016ddb03ee31208e9f8e440f5bee</id>
<content type='text'>
Introduce hv_status_printk() macros as a convenience to log hypercall
errors, formatting them with the status code (HV_STATUS_*) as a raw hex
value and also as a string, which saves some time while debugging.

Create a table of HV_STATUS_ codes with strings and mapped errnos, and
use it for hv_result_to_string() and hv_result_to_errno().

Use the new hv_status_printk()s in hv_proc.c, hyperv-iommu.c, and
irqdomain.c hypercalls to aid debugging in the root partition.

Signed-off-by: Nuno Das Neves &lt;nunodasneves@linux.microsoft.com&gt;
Reviewed-by: Stanislav Kinsburskii &lt;skinsburskii@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/1741980536-3865-2-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;1741980536-3865-2-git-send-email-nunodasneves@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>x86/hyperv: Fix check of return value from snp_set_vmsa()</title>
<updated>2025-03-20T21:23:03Z</updated>
<author>
<name>Tianyu Lan</name>
</author>
<published>2025-03-13T08:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e792d843aa3c9d039074cdce728d5803262e57a7'/>
<id>urn:sha1:e792d843aa3c9d039074cdce728d5803262e57a7</id>
<content type='text'>
snp_set_vmsa() returns 0 as success result and so fix it.

Cc: stable@vger.kernel.org
Fixes: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
Signed-off-by: Tianyu Lan &lt;tiala@microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Link: https://lore.kernel.org/r/20250313085217.45483-1-ltykernel@gmail.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250313085217.45483-1-ltykernel@gmail.com&gt;
</content>
</entry>
<entry>
<title>x86/hyperv: Add VTL mode callback for restarting the system</title>
<updated>2025-03-20T21:23:03Z</updated>
<author>
<name>Roman Kisel</name>
</author>
<published>2025-02-27T21:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07b74192e6170571892c09bf5c4352a85db22557'/>
<id>urn:sha1:07b74192e6170571892c09bf5c4352a85db22557</id>
<content type='text'>
The kernel runs as a firmware in the VTL mode, and the only way
to restart in the VTL mode on x86 is to triple fault. Thus, one
has to always supply "reboot=t" on the kernel command line in the
VTL mode, and missing that renders rebooting not working.

Define the machine restart callback to always use the triple
fault to provide the robust configuration by default.

Signed-off-by: Roman Kisel &lt;romank@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/20250227214728.15672-3-romank@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250227214728.15672-3-romank@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>x86/hyperv: Add VTL mode emergency restart callback</title>
<updated>2025-03-20T21:23:03Z</updated>
<author>
<name>Roman Kisel</name>
</author>
<published>2025-02-27T21:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ced518ad55b4118dd77f8a455a06801b89f2f877'/>
<id>urn:sha1:ced518ad55b4118dd77f8a455a06801b89f2f877</id>
<content type='text'>
By default, X86(-64) systems use the emergecy restart routine
in the course of which the code unconditionally writes to
the physical address of 0x472 to indicate the boot mode
to the firmware (BIOS or UEFI).

When the kernel itself runs as a firmware in the VTL mode,
that write corrupts the memory of the guest upon emergency
restarting. Preserving the state intact in that situation
is important for debugging, at least.

Define the specialized machine callback to avoid that write
and use the triple fault to perform emergency restart.

Signed-off-by: Roman Kisel &lt;romank@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/20250227214728.15672-2-romank@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250227214728.15672-2-romank@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.14-rc7' into x86/core, to pick up fixes</title>
<updated>2025-03-19T10:03:06Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2025-03-19T10:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89771319e0f11314fcf6d22fcdd0c41e2d157ddc'/>
<id>urn:sha1:89771319e0f11314fcf6d22fcdd0c41e2d157ddc</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/hyperv: Fix output argument to hypercall that changes page visibility</title>
<updated>2025-03-10T00:21:07Z</updated>
<author>
<name>Michael Kelley</name>
</author>
<published>2025-02-26T20:06:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09beefefb57bbc3a06d98f319d85db4d719d7bcb'/>
<id>urn:sha1:09beefefb57bbc3a06d98f319d85db4d719d7bcb</id>
<content type='text'>
The hypercall in hv_mark_gpa_visibility() is invoked with an input
argument and an output argument. The output argument ostensibly returns
the number of pages that were processed. But in fact, the hypercall does
not provide any output, so the output argument is spurious.

The spurious argument is harmless because Hyper-V ignores it, but in the
interest of correctness and to avoid the potential for future problems,
remove it.

Signed-off-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Reviewed-by: Nuno Das Neves &lt;nunodasneves@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/20250226200612.2062-2-mhklinux@outlook.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Message-ID: &lt;20250226200612.2062-2-mhklinux@outlook.com&gt;
</content>
</entry>
</feed>
