#
9a73b5b1 |
| 01-Oct-2024 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: remove PV suspend/resume support copyright
Thew code for PV suspend/resume support has long been removed, also remove the copyright notice associated with it.
There are still two copyright blo
xen: remove PV suspend/resume support copyright
Thew code for PV suspend/resume support has long been removed, also remove the copyright notice associated with it.
There are still two copyright blocks with (to my understanding) slightly different wordings of the BSD 2 clause license. I however don't feel like merging them due to those wording differences.
The removal of the PV suspend/resume code was done in ed95805e90ec0f61683cd402a42e6f915339de7d.
Sponsored by: Cloud Software Group Reviewed by: imp Differential revision: https://reviews.freebsd.org/D46860
show more ...
|
#
9dd5105f |
| 30-Sep-2024 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: expose support for poweroff/reboot/suspend on xenbus
Some toolstacks won't attempt the signal power actions on xenbus unless the VM explicitly exposes support for them. FreeBSD supports all po
xen: expose support for poweroff/reboot/suspend on xenbus
Some toolstacks won't attempt the signal power actions on xenbus unless the VM explicitly exposes support for them. FreeBSD supports all power actions, hence signal on xenbus such support by setting the nodes to the value of "1".
Sponsored by: Cloud Software Group Reviewed by: markj Differential review: https://reviews.freebsd.org/D46859
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
d48760ff |
| 27-Sep-2023 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
xen/dev: remove __unused from driver argument of identify functions
The driver argument is most certainly now used by these functions. When originally implemented it might have been unused, but not
xen/dev: remove __unused from driver argument of identify functions
The driver argument is most certainly now used by these functions. When originally implemented it might have been unused, but not now.
Reviewed by: royger
show more ...
|
#
9e0b0f5d |
| 23-Nov-2023 |
Mitchell Horne <mhorne@FreeBSD.org> |
xen: improve shutdown hook
Make better use of the shutdown flags. In particular this now handles standard reboot where RB_POWERCYCLE is not set, and indicates a crash when the system has panicked.
xen: improve shutdown hook
Make better use of the shutdown flags. In particular this now handles standard reboot where RB_POWERCYCLE is not set, and indicates a crash when the system has panicked.
While here, give the function a prefix.
Reviewed by: royger, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42343
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
a6c80304 |
| 26-Jul-2022 |
Dimitry Andric <dim@FreeBSD.org> |
Adjust function definitions in xen's control.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/dev/xen/control/control.c:188:15: error: a function dec
Adjust function definitions in xen's control.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/dev/xen/control/control.c:188:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_poweroff() ^ void sys/dev/xen/control/control.c:194:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_reboot() ^ void sys/dev/xen/control/control.c:207:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_suspend() ^ void sys/dev/xen/control/control.c:344:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_crash() ^ void
This is because xctrl_poweroff(), xctrl_reboot(), xctrl_suspend(), and xctrl_crash() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations.
MFC after: 3 days
show more ...
|
Revision tags: release/13.1.0 |
|
#
f929eb1e |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
xen: Remove unused devclass arguments to DRIVER_MODULE.
|
Revision tags: release/12.3.0 |
|
#
ad7dd514 |
| 13-Oct-2021 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
xen: switch to use headers in contrib
These headers originate with the Xen project and shouldn't be mixed with the main portion of the FreeBSD kernel. Notably they shouldn't be the target of clean-u
xen: switch to use headers in contrib
These headers originate with the Xen project and shouldn't be mixed with the main portion of the FreeBSD kernel. Notably they shouldn't be the target of clean-up commits.
Switch to use the headers in sys/contrib/xen.
Reviewed by: royger
show more ...
|
#
ca46f328 |
| 13-Jan-2022 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: use an hypercall for shutdown and reboot
When running as a Xen guest it's easier to use an hypercall in order to do power management operations (power off, power cycle). Do this for all support
xen: use an hypercall for shutdown and reboot
When running as a Xen guest it's easier to use an hypercall in order to do power management operations (power off, power cycle). Do this for all supported guest types (HVM and PVH). Note that for HVM the power operation could also be done using ACPI, but there's no reason to differentiate between PVH and HVM.
While there fix the shutdown handler to properly differentiate between power cycle and power off requests.
Reported by: Freddy DISSAUX MFC: 1 week Sponsored by: Citrix Systems R&D
show more ...
|
#
c6df6f53 |
| 10-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlock
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlocked with bus_topo_unlock(). If you need the topology lock for some reason, bus_topo_mtx() will provide that.
Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D31831
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0 |
|
#
46c46edd |
| 14-Jan-2014 |
Julien Grall <julien@xen.org> |
xen/control: print warning on call of xctrl_suspend()
Presently suspend/resume and migration aren't supported on Xen/ARM. As such this shouldn't ever occur.
This likely applies to future Xen archi
xen/control: print warning on call of xctrl_suspend()
Presently suspend/resume and migration aren't supported on Xen/ARM. As such this shouldn't ever occur.
This likely applies to future Xen architectures (RISC-V) and xctrl_suspend() needs dependency on intr_machdep.h fixed.
Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D29599
show more ...
|
#
0b4f30c2 |
| 05-Apr-2014 |
Julien Grall <julien@xen.org> |
xen/control: introduce xen_pv_shutdown_handler()
While x86 only register PV shutdown handler for PV guests. ARM guests are always using HVM and requires the PV shutdown handler.
Submitted by: Ellio
xen/control: introduce xen_pv_shutdown_handler()
While x86 only register PV shutdown handler for PV guests. ARM guests are always using HVM and requires the PV shutdown handler.
Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D29406
show more ...
|
#
d3705b5a |
| 06-Apr-2021 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
xen/control: gate x86 specific code in the preprocessor
Commit 152265223048 was implemented strictly for x86. Unfortunately one of the pieces was mixed into a common area breaking other architectur
xen/control: gate x86 specific code in the preprocessor
Commit 152265223048 was implemented strictly for x86. Unfortunately one of the pieces was mixed into a common area breaking other architectures. For now disable these bits on !x86, this should be cleaned up later.
Fixes: 152265223048 ('xen: fix dropping bitmap IPIs during resume') Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D29306
show more ...
|
#
4e4e43dc |
| 25-Nov-2020 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: allow limiting the amount of duplicated pending xenstore watches
Xenstore watches received are queued in a list and processed in a deferred thread. Such queuing was done without any checking, s
xen: allow limiting the amount of duplicated pending xenstore watches
Xenstore watches received are queued in a list and processed in a deferred thread. Such queuing was done without any checking, so a guest could potentially trigger a resource starvation against the FreeBSD kernel if such kernel is watching any user-controlled xenstore path.
Allowing limiting the amount of pending events a watch can accumulate to prevent a remote guest from triggering this resource starvation issue.
For the PV device backends and frontends this limitation is only applied to the other end /state node, which is limited to 1 pending event, the rest of the watched paths can still have unlimited pending watches because they are either local or controlled by a privileged domain.
The xenstore user-space device gets special treatment as it's not possible for the kernel to know whether the paths being watched by user-space processes are controlled by a guest domain. For this reason watches set by the xenstore user-space device are limited to 1000 pending events. Note this can be modified using the max_pending_watch_events sysctl of the device.
This is XSA-349.
Sponsored by: Citrix Systems R&D MFC after: 3 days
show more ...
|
#
f1084587 |
| 05-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Suspend all writeable local filesystems on power suspend.
This ensures that no writes are pending in memory, either metadata or user data, but not including dirty pages not yet converted to fs write
Suspend all writeable local filesystems on power suspend.
This ensures that no writes are pending in memory, either metadata or user data, but not including dirty pages not yet converted to fs writes.
Only filesystems declared local are suspended.
Note that this does not guarantee absence of the metadata errors or leaks if resume is not done: for instance, on UFS unlinked but opened inodes are leaked and require fsck to gc.
Reviewed by: markj Discussed with: imp Tested by: imp (previous version), pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D27054
show more ...
|
#
6c7cae4a |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
dev/xen: clean up empty lines in .c and .h files
|
#
4149c6a3 |
| 11-Jun-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove double-calls to tc_get_timecount() to warm timecounters.
It seems that second call does not add any useful state change for all implemented timecounters.
Discussed with: bde Sponsored by: Th
Remove double-calls to tc_get_timecount() to warm timecounters.
It seems that second call does not add any useful state change for all implemented timecounters.
Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
show more ...
|
#
06592d60 |
| 28-May-2020 |
Roger Pau Monné <royger@FreeBSD.org> |
xen/control: short circuit xctrl_on_watch_event on spurious event
If there's no data to read from xenstore short-circuit xctrl_on_watch_event to return early, there's no reason to continue since the
xen/control: short circuit xctrl_on_watch_event on spurious event
If there's no data to read from xenstore short-circuit xctrl_on_watch_event to return early, there's no reason to continue since the lack of data would prevent matching against any known event type.
Sponsored by: Citrix Systems R&D MFC with: r352925 MFC after: 1 week
show more ...
|
#
8b3bc70a |
| 08-Oct-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352764 through r353315.
|
#
06798cf5 |
| 01-Oct-2019 |
Roger Pau Monné <royger@FreeBSD.org> |
xen/ctrl: acknowledge all control requests
Currently only suspend requests are acknowledged by writing an empty string back to the xenstore control node, but poweroff or reboot requests are not ackn
xen/ctrl: acknowledge all control requests
Currently only suspend requests are acknowledged by writing an empty string back to the xenstore control node, but poweroff or reboot requests are not acknowledged and FreeBSD simply proceeds to perform the desired action.
Fix this by acknowledging all requests, and remove the suspend specific ack done in the handler.
Sponsored by: Citrix Systems R&D MFC after: 3 days
show more ...
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
#
41716b8d |
| 07-Mar-2017 |
Roger Pau Monné <royger@FreeBSD.org> |
xenstore: fix suspension when using the xenstore device
Lock the xenstore request mutex when suspending user-space processes, in order to prevent any process from holding this lock when going into s
xenstore: fix suspension when using the xenstore device
Lock the xenstore request mutex when suspending user-space processes, in order to prevent any process from holding this lock when going into suspension, or else the xenstore suspend process is going to deadlock.
Submitted by: Liuyingdong <liuyingdong@huawei.com> Reviewed by: royger MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D9638
show more ...
|
#
8dee0e9b |
| 07-Mar-2017 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: add support for canceled suspend
When running on Xen, it's possible that a suspend request to the hypervisor fails (return from HYPERVISOR_suspend different than 0). This means that the suspend
xen: add support for canceled suspend
When running on Xen, it's possible that a suspend request to the hypervisor fails (return from HYPERVISOR_suspend different than 0). This means that the suspend hasn't succeed, and the resume procedure needs to properly handle this case.
First of all, when such situation happens there's no need to reset the vector callback, hypercall page, shared info, event channels or grant table, because it's state is preserved. Also, the PV drivers don't need to be reset to the initial state, since the connection with the backed has not been interrupted.
Submitted by: Liuyingdong <liuyingdong@huawei.com> Reviewed by: royger MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D9635
show more ...
|
#
fdce57a0 |
| 14-May-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add an EARLY_AP_STARTUP option to start APs earlier during boot.
Currently, Application Processors (non-boot CPUs) are started by MD code at SI_SUB_CPU, but they are kept waiting in a "pen" until SI
Add an EARLY_AP_STARTUP option to start APs earlier during boot.
Currently, Application Processors (non-boot CPUs) are started by MD code at SI_SUB_CPU, but they are kept waiting in a "pen" until SI_SUB_SMP at which point they are released to run kernel threads. SI_SUB_SMP is one of the last SYSINIT levels, so APs don't enter the scheduler and start running threads until fairly late in the boot.
This change moves SI_SUB_SMP up to just before software interrupt threads are created allowing the APs to start executing kernel threads much sooner (before any devices are probed). This allows several initialization routines that need to perform initialization on all CPUs to now perform that initialization in one step rather than having to defer the AP initialization to a second SYSINIT run at SI_SUB_SMP. It also permits all CPUs to be available for handling interrupts before any devices are probed.
This last feature fixes a problem on with interrupt vector exhaustion. Specifically, in the old model all device interrupts were routed onto the boot CPU during boot. Later after the APs were released at SI_SUB_SMP, interrupts were redistributed across all CPUs.
However, several drivers for multiqueue hardware allocate N interrupts per CPU in the system. In a system with many CPUs, just a few drivers doing this could exhaust the available pool of interrupt vectors on the boot CPU as each driver was allocating N * mp_ncpu vectors on the boot CPU. Now, drivers will allocate interrupts on their desired CPUs during boot meaning that only N interrupts are allocated from the boot CPU instead of N * mp_ncpu.
Some other bits of code can also be simplified as smp_started is now true much earlier and will now always be true for these bits of code. This removes the need to treat the single-CPU boot environment as a special case.
As a transition aid, the new behavior is available under a new kernel option (EARLY_AP_STARTUP). This will allow the option to be turned off if need be during initial testing. I plan to enable this on x86 by default in a followup commit in the next few days and to have all platforms moved over before 11.0. Once the transition is complete, the option will be removed along with the !EARLY_AP_STARTUP code.
These changes have only been tested on x86. Other platform maintainers are encouraged to port their architectures over as well. The main things to check for are any uses of smp_started in MD code that can be simplified and SI_SUB_SMP SYSINITs in MD code that can be removed in the EARLY_AP_STARTUP case (e.g. the interrupt shuffling).
PR: kern/199321 Reviewed by: markj, gnn, kib Sponsored by: Netflix
show more ...
|