<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/hyperv, branch releng/14.3</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()</title>
<updated>2025-04-15T02:25:24+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-03-31T10:45:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e6a3962d7dd7f302c094d5cea68a3d63a1b67eb6'/>
<id>e6a3962d7dd7f302c094d5cea68a3d63a1b67eb6</id>
<content type='text'>
whu@ cannot reproduce the assertion failure which led to these ifdefs
being added in the first place, and since they appear wrong, i.e., the
assertions ought to apply to all platforms, let's remove them.

This reverts commits 0af5a0cd2788efce9f444f4f781357d317bb0bb1 and
6f7b1310b6fe36f9bb653d3e97bc257adced3a2b.

PR:		285681
Tested by:	whu
MFC after:	2 weeks

(cherry picked from commit 54a3920dc9b3b5a47cdaaa3132b4fcf1c448a737)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
whu@ cannot reproduce the assertion failure which led to these ifdefs
being added in the first place, and since they appear wrong, i.e., the
assertions ought to apply to all platforms, let's remove them.

This reverts commits 0af5a0cd2788efce9f444f4f781357d317bb0bb1 and
6f7b1310b6fe36f9bb653d3e97bc257adced3a2b.

PR:		285681
Tested by:	whu
MFC after:	2 weeks

(cherry picked from commit 54a3920dc9b3b5a47cdaaa3132b4fcf1c448a737)
</pre>
</div>
</content>
</entry>
<entry>
<title>hyperv/storvsc: Fix busdma constraints</title>
<updated>2025-04-15T02:25:24+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-03-31T10:45:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=07c5a2486cc6f8e64715b5d7c31ccfa02f9f3745'/>
<id>07c5a2486cc6f8e64715b5d7c31ccfa02f9f3745</id>
<content type='text'>
- The BUS_DMA_KEEP_PG_OFFSET flag is needed, since
  storvsc_xferbuf_prepare() assumes that only the first segment may have
  a non-zero offset, and that all following segments are page-sized and
  -aligned.
- storvsc_xferbuf_prepare() handles 64-bit bus addresses, so avoid
  unneeded bouncing on i386.

PR:		285681
Reported by:	dim
Tested by:	dim, whu
MFC after:	2 weeks

(cherry picked from commit a319ba694538a38429115aaaf1d4b3946ea3a8b5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- The BUS_DMA_KEEP_PG_OFFSET flag is needed, since
  storvsc_xferbuf_prepare() assumes that only the first segment may have
  a non-zero offset, and that all following segments are page-sized and
  -aligned.
- storvsc_xferbuf_prepare() handles 64-bit bus addresses, so avoid
  unneeded bouncing on i386.

PR:		285681
Reported by:	dim
Tested by:	dim, whu
MFC after:	2 weeks

(cherry picked from commit a319ba694538a38429115aaaf1d4b3946ea3a8b5)
</pre>
</div>
</content>
</entry>
<entry>
<title>Hyper-V: hn: rewrite hn rsc swtich to avoid sysctl hang</title>
<updated>2025-03-12T08:18:01+00:00</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2025-02-04T13:39:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ec0c098369c8fb1acbe0b0566769dd8b98d75753'/>
<id>ec0c098369c8fb1acbe0b0566769dd8b98d75753</id>
<content type='text'>
Changing the rsc_switch flag using sysctl to turn rsc on or off
could hang. The orignal code sends request to host to get the
mtu setting. Sometimes the host fails to reply, causing
the thread to sleep forever waiting for the host response.

Use existing cached mtu from hn device instead to avoid calling
host.

Reported by:	whu
Tested by:	whu
MFC after:	1 week

(cherry picked from commit da1deb784d9ad3a4015a3f91fa1a5ce394fd3fdb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changing the rsc_switch flag using sysctl to turn rsc on or off
could hang. The orignal code sends request to host to get the
mtu setting. Sometimes the host fails to reply, causing
the thread to sleep forever waiting for the host response.

Use existing cached mtu from hn device instead to avoid calling
host.

Reported by:	whu
Tested by:	whu
MFC after:	1 week

(cherry picked from commit da1deb784d9ad3a4015a3f91fa1a5ce394fd3fdb)
</pre>
</div>
</content>
</entry>
<entry>
<title>hyperv vmbus_pcib: Use pci_domain_*_bus for PCI_RES_BUS resources</title>
<updated>2025-02-27T13:09:20+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-01-23T17:35:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d65f66c983376223b2a832e0cae71b7ec4dd38d5'/>
<id>d65f66c983376223b2a832e0cae71b7ec4dd38d5</id>
<content type='text'>
Specifically for bus_activate/adjust/deactivate_bus methods.

Differential Revision:	https://reviews.freebsd.org/D43431

(cherry picked from commit 9c4effb1063d49748b4b7da4cc54f508ccad41fc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Specifically for bus_activate/adjust/deactivate_bus methods.

Differential Revision:	https://reviews.freebsd.org/D43431

(cherry picked from commit 9c4effb1063d49748b4b7da4cc54f508ccad41fc)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Use the new arm_smccc_invoke macros</title>
<updated>2024-10-21T15:03:27+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2024-10-14T14:33:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=78b308e5a4a15f1dbf52c289b1f1ad4f4b980184'/>
<id>78b308e5a4a15f1dbf52c289b1f1ad4f4b980184</id>
<content type='text'>
Simplify the calls into the SMCCC firmware with the new
arm_smccc_invoke* macros.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46987

(cherry picked from commit b9cd72b06d795a8c7b39df1f520e866ad7f11aa8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify the calls into the SMCCC firmware with the new
arm_smccc_invoke* macros.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46987

(cherry picked from commit b9cd72b06d795a8c7b39df1f520e866ad7f11aa8)
</pre>
</div>
</content>
</entry>
<entry>
<title>hyperv: call smp_targeted_tlb_shootdown_native() with pin</title>
<updated>2024-10-05T07:08:57+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2024-10-01T11:45:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a67cc4b031ab01a2defcfb6f3d23cc0363f0c2ac'/>
<id>a67cc4b031ab01a2defcfb6f3d23cc0363f0c2ac</id>
<content type='text'>
(cherry picked from commit 6dcffb980fa3026092f79107ee7668918c9f5490)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 6dcffb980fa3026092f79107ee7668918c9f5490)
</pre>
</div>
</content>
</entry>
<entry>
<title>bpf: Add IfAPI analogue for bpf_peers_present()</title>
<updated>2024-09-24T04:30:48+00:00</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2023-10-04T20:56:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6c2430c72b4c3516752b7541b100847522ab2225'/>
<id>6c2430c72b4c3516752b7541b100847522ab2225</id>
<content type='text'>
An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference.  Solve
this by adding a new IfAPI that could deal with a NULL bpf, if such
could occur in the network stack.

Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42082

(cherry picked from commit 8f31b879ecaf9e738dba631df4606742ee404e8e)

bpf: Prefer the boolean form when calling bpf_peers_present()

Reviewed by:	markj, kp, #network
MFC with:	8f31b879ecaf
Differential Revision:	https://reviews.freebsd.org/D45509

(cherry picked from commit 89204d9dcbe28558fae65936a0e93f44d926b88f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference.  Solve
this by adding a new IfAPI that could deal with a NULL bpf, if such
could occur in the network stack.

Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42082

(cherry picked from commit 8f31b879ecaf9e738dba631df4606742ee404e8e)

bpf: Prefer the boolean form when calling bpf_peers_present()

Reviewed by:	markj, kp, #network
MFC with:	8f31b879ecaf
Differential Revision:	https://reviews.freebsd.org/D45509

(cherry picked from commit 89204d9dcbe28558fae65936a0e93f44d926b88f)
</pre>
</div>
</content>
</entry>
<entry>
<title>Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous</title>
<updated>2024-07-01T13:33:08+00:00</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2024-06-15T14:07:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d56a912f2fb6fb26a00e950a26e420729e6ef775'/>
<id>d56a912f2fb6fb26a00e950a26e420729e6ef775</id>
<content type='text'>
The allocation call could result in sleep lock violation if it is in
smp_rendezvous. Move it out. Also move the pcpu memory pointer to
vmbus_pcpu_data since it is only used on Hyper-V.

PR:		279738
Reported by:	gbe
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
MFC after:	2 weeks
Sponsored by:	Microsoft

(cherry picked from commit d0cb4674df97aa638d5d17861c364b1625f79401)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The allocation call could result in sleep lock violation if it is in
smp_rendezvous. Move it out. Also move the pcpu memory pointer to
vmbus_pcpu_data since it is only used on Hyper-V.

PR:		279738
Reported by:	gbe
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
MFC after:	2 weeks
Sponsored by:	Microsoft

(cherry picked from commit d0cb4674df97aa638d5d17861c364b1625f79401)
</pre>
</div>
</content>
</entry>
<entry>
<title>Hyper_V: add a boot parameter to tlb flush hypercall</title>
<updated>2024-07-01T13:32:37+00:00</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2024-06-11T10:05:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=451941677aba763db6f4410517960a45f2128f90'/>
<id>451941677aba763db6f4410517960a45f2128f90</id>
<content type='text'>
Add boot parameter hw.vmbus.tlb_hcall for tlb flush hypercall.
By default it is set to 1 to allow hyercall tlb flush. It can be
set to 0 in loader.conf to turn off hypercall and use system
provided tlb flush routine.

The change also changes flag in the per cpu contiguous memory
allocation to no wait to avoid panic happened some cases which there
are no enough contiguous memery available at boot time.

Reported by:	gbe
Tested by:	whu
MFC after:	1 week
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by:	Microsoft

(cherry picked from commit e02d20ddff7f9f9509b28095459327bc183dab8a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add boot parameter hw.vmbus.tlb_hcall for tlb flush hypercall.
By default it is set to 1 to allow hyercall tlb flush. It can be
set to 0 in loader.conf to turn off hypercall and use system
provided tlb flush routine.

The change also changes flag in the per cpu contiguous memory
allocation to no wait to avoid panic happened some cases which there
are no enough contiguous memery available at boot time.

Reported by:	gbe
Tested by:	whu
MFC after:	1 week
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by:	Microsoft

(cherry picked from commit e02d20ddff7f9f9509b28095459327bc183dab8a)
</pre>
</div>
</content>
</entry>
<entry>
<title>Hyper-V: remove unused alloc_pcpu_ptr()</title>
<updated>2024-07-01T13:31:55+00:00</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2024-06-10T12:33:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3c1f330088e781ff166314030202919e57aa8e27'/>
<id>3c1f330088e781ff166314030202919e57aa8e27</id>
<content type='text'>
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by:	Microsoft

(cherry picked from commit fd911ae609247ef5c91493fb5506e77aa6e497bc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:		2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by:	Microsoft

(cherry picked from commit fd911ae609247ef5c91493fb5506e77aa6e497bc)
</pre>
</div>
</content>
</entry>
</feed>
