<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/riscv/include, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Revert "pcb.h: mark struct pcb to be preserved"</title>
<updated>2026-02-09T18:55:57+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-02-09T18:25:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=24038d696e5030f622e87d6651e9dab1cd7fcb2a'/>
<id>24038d696e5030f622e87d6651e9dab1cd7fcb2a</id>
<content type='text'>
kgdb only uses the marked fields from dumppcb for initial frame
reconstruction.

This reverts commit 8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kgdb only uses the marked fields from dumppcb for initial frame
reconstruction.

This reverts commit 8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3.
</pre>
</div>
</content>
</entry>
<entry>
<title>pcb.h: mark struct pcb to be preserved</title>
<updated>2026-02-09T04:17:16+00:00</updated>
<author>
<name>Minsoo Choo</name>
<email>minsoochoo0122@proton.me</email>
</author>
<published>2026-02-06T20:03:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3'/>
<id>8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3</id>
<content type='text'>
There are programs that depend on this structure (e.g. kernel debuggers)
that breaks when the ABI changes.

Signed-off-by:	Minsoo Choo &lt;minsoochoo0122@proton.me&gt;
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55149
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are programs that depend on this structure (e.g. kernel debuggers)
that breaks when the ABI changes.

Signed-off-by:	Minsoo Choo &lt;minsoochoo0122@proton.me&gt;
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55149
</pre>
</div>
</content>
</entry>
<entry>
<title>STACKALIGN: Reimplement in terms of __align_down</title>
<updated>2026-02-06T15:30:50+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-02-06T15:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9a697bf20ccbb2a19f6ad01fa3e0c14e0390847'/>
<id>e9a697bf20ccbb2a19f6ad01fa3e0c14e0390847</id>
<content type='text'>
This changes STACKALIGN to be type-preserving when operating on
pointers.

Reviewed by:	brooks, kib
Effort:		CHERI upstreaming
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54920
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes STACKALIGN to be type-preserving when operating on
pointers.

Reviewed by:	brooks, kib
Effort:		CHERI upstreaming
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54920
</pre>
</div>
</content>
</entry>
<entry>
<title>riscv: implement kernel ifunc resolution</title>
<updated>2026-02-05T16:32:16+00:00</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2026-02-05T16:11:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cf41d1113377c44be5aad20c2f7ff2c5324ca89f'/>
<id>cf41d1113377c44be5aad20c2f7ff2c5324ca89f</id>
<content type='text'>
This completes the set of architectures implementing this feature.

Move the calls to sched_instance_select() and link_elf_ireloc() later in
initriscv(), after identify_cpu(0). There will be more information
available to any resolver functions at this time.

Reviewed by:	imp, kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This completes the set of architectures implementing this feature.

Move the calls to sched_instance_select() and link_elf_ireloc() later in
initriscv(), after identify_cpu(0). There will be more information
available to any resolver functions at this time.

Reviewed by:	imp, kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55082
</pre>
</div>
</content>
</entry>
<entry>
<title>arm, riscv: add a preprocessor symbol indicating missed support of ifunc</title>
<updated>2026-01-29T18:11:54+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-01-23T21:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=03d61fe9785793cce9324fd4e6019562586760fa'/>
<id>03d61fe9785793cce9324fd4e6019562586760fa</id>
<content type='text'>
in kernel.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in kernel.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54831
</pre>
</div>
</content>
</entry>
<entry>
<title>riscv: Add macro for hfence.gvma instruction</title>
<updated>2026-01-26T16:23:16+00:00</updated>
<author>
<name>Doongar Singh</name>
<email>doonbsd@gmail.com</email>
</author>
<published>2026-01-26T16:18:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=972c488bf4117d9eb29e5753c6c5a2250154df3d'/>
<id>972c488bf4117d9eb29e5753c6c5a2250154df3d</id>
<content type='text'>
Add an inline function hfence_gvma() for hfence.gvma instruction.

Signed-off-by:	Doongar Singh &lt;doonbsd@gmail.com&gt;
Reviewed by:	mhorne, markj
Differential Revision:	https://reviews.freebsd.org/D54857
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an inline function hfence_gvma() for hfence.gvma instruction.

Signed-off-by:	Doongar Singh &lt;doonbsd@gmail.com&gt;
Reviewed by:	mhorne, markj
Differential Revision:	https://reviews.freebsd.org/D54857
</pre>
</div>
</content>
</entry>
<entry>
<title>riscv: add (a dummy) acpica_machdep.h</title>
<updated>2026-01-14T18:08:38+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2026-01-13T20:33:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0fa7b3bee72e7cfedabe371c7082fbf44508ec05'/>
<id>0fa7b3bee72e7cfedabe371c7082fbf44508ec05</id>
<content type='text'>
We have reports that iwlwifi(4) works on RISC-V.  While we can turn off
full ACPI-specific files easily, intermittent code still relies on the
header files to be present.  In order to not need to completely #ifdef
everything out we want to include acpi.h from LinuxKPI and as a result
need this file.  With this the iwlwifi(4) code compiles just fine and
will do the right thing (given the functional ACPI parts are disabled/
unavailable).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	mhorne, emaste
Differential Revision: https://reviews.freebsd.org/D54691
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have reports that iwlwifi(4) works on RISC-V.  While we can turn off
full ACPI-specific files easily, intermittent code still relies on the
header files to be present.  In order to not need to completely #ifdef
everything out we want to include acpi.h from LinuxKPI and as a result
need this file.  With this the iwlwifi(4) code compiles just fine and
will do the right thing (given the functional ACPI parts are disabled/
unavailable).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	mhorne, emaste
Differential Revision: https://reviews.freebsd.org/D54691
</pre>
</div>
</content>
</entry>
<entry>
<title>vmm: Move common accessors and vm_eventinfo into sys/dev/vmm</title>
<updated>2026-01-08T21:54:16+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-01-08T21:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5f13d6b60740c021951ae0e4d096903cfa1679e2'/>
<id>5f13d6b60740c021951ae0e4d096903cfa1679e2</id>
<content type='text'>
Now that struct vm and struct vcpu are defined in headers, provide
inline accessors.  We could just remove the accessors outright, but they
don't hurt and it would result in unneeded churn.

As a part of this, consolidate definitions related to struct
vm_eventinfo as well.  I'm not sure if struct vm_eventinfo is really
needed anymore, now that vmmops_run implementations can directly access
vm and vcpu fields, but this can be resolved later.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that struct vm and struct vcpu are defined in headers, provide
inline accessors.  We could just remove the accessors outright, but they
don't hurt and it would result in unneeded churn.

As a part of this, consolidate definitions related to struct
vm_eventinfo as well.  I'm not sure if struct vm_eventinfo is really
needed anymore, now that vmmops_run implementations can directly access
vm and vcpu fields, but this can be resolved later.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53586
</pre>
</div>
</content>
</entry>
<entry>
<title>vmm: Deduplicate VM and vCPU state management code</title>
<updated>2026-01-08T21:54:06+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-01-08T21:54:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ed85203fb7a0334041db6da07e45ddda4caef13d'/>
<id>ed85203fb7a0334041db6da07e45ddda4caef13d</id>
<content type='text'>
Now that the machine-independent fields of struct vm and struct vcpu are
available in a header, we can move lots of duplicated code into
sys/dev/vmm/vmm_vm.c.  This change does exactly that.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53585
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the machine-independent fields of struct vm and struct vcpu are
available in a header, we can move lots of duplicated code into
sys/dev/vmm/vmm_vm.c.  This change does exactly that.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53585
</pre>
</div>
</content>
</entry>
<entry>
<title>vmm: Consolidate vm and vcpu definitions</title>
<updated>2026-01-08T21:53:31+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-01-08T21:53:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a6411f6b7df46edc7167a7844ed443db7a91a031'/>
<id>a6411f6b7df46edc7167a7844ed443db7a91a031</id>
<content type='text'>
There is quite a lot of duplication of code between amd64, arm64 and
riscv with respect to VM and vCPU state management.  This is a bit
tricky to resolve since struct vm and struct vcpu are private to vmm.c
and both structures contain a mix of machine-dependent and
machine-independent fields.

To allow deduplication without also introducing a lot of churn, follow
the approach of struct pcpu and 1) lift the definitions of those
structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define
machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which
lay out the machine-dependent fields.

One disadvantage of this approach is that the two structures are no
longer private to vmm.c, but I think this is acceptable.

No functional change intended.  A follow-up change will move a good deal
of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53584
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is quite a lot of duplication of code between amd64, arm64 and
riscv with respect to VM and vCPU state management.  This is a bit
tricky to resolve since struct vm and struct vcpu are private to vmm.c
and both structures contain a mix of machine-dependent and
machine-independent fields.

To allow deduplication without also introducing a lot of churn, follow
the approach of struct pcpu and 1) lift the definitions of those
structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define
machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which
lay out the machine-dependent fields.

One disadvantage of this approach is that the two structures are no
longer private to vmm.c, but I think this is acceptable.

No functional change intended.  A follow-up change will move a good deal
of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53584
</pre>
</div>
</content>
</entry>
</feed>
