Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
af610cab |
| 21-Apr-2021 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
xen/intr: adjust xen_intr_handle_upcall() to match driver filter
xen_intr_handle_upcall() has two interfaces. It needs to be called by the x86 assembly code invoked by the APIC. Second, it needs t
xen/intr: adjust xen_intr_handle_upcall() to match driver filter
xen_intr_handle_upcall() has two interfaces. It needs to be called by the x86 assembly code invoked by the APIC. Second, it needs to be called as a driver_filter_t for the XenPCI code and for architectures besides x86.
Unfortunately the driver_filter_t interface was implemented as a wrapper around the x86-APIC interface. Now create a simple wrapper for the x86-APIC code, which calls an architecture-independent xen_intr_handle_upcall().
When called via intr_event_handle(), driver_filter_t functions expect preemption to be disabled. This removes the need for critical_enter()/critical_exit() when called this way.
The lapic_eoi() call is only needed on x86 in some cases when invoked directly as an APIC vector handler.
Additionally driver_filter_t functions have no need to handle interrupt counters. The intrcnt_add() calling function was reworked to match the current situation. intrcnt_add() is now only called via one path.
The increment/decrement of curthread->td_intr_nesting_level had previously been left out. Appears this was mostly harmless, but this was noticed during implementation and has been added.
CONFIG_X86 is a leftover from use with Linux. While the barrier isn't needed for FreeBSD on x86, it will be needed for FreeBSD on other architectures.
Copyright note. xen_intr_intrcnt_add() was introduced at 76acc41fb7c7 by Justin T. Gibbs. xen_intrcnt_init() was introduced at fd036deac1695 by John Baldwin.
sys/x86/xen/xen_arch_intr.c was originally created by Julien Grall in 2015 for the purpose of holding the x86 interrupt interface. Later it was found xen_intr_handle_upcall() was better earlier, and the x86 interrupt interface better later. As such the filename and header list belong to Julien Grall, but what those were created for is later.
Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D30006
show more ...
|
#
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 ...
|
#
ac3ede53 |
| 12-May-2021 |
Roger Pau Monné <royger@FreeBSD.org> |
x86/xen: remove PVHv1 code
PVHv1 was officially removed from Xen in 4.9, so just axe the related code from FreeBSD.
Note FreeBSD supports PVHv2, which is the replacement for PVHv1.
Sponsored by: C
x86/xen: remove PVHv1 code
PVHv1 was officially removed from Xen in 4.9, so just axe the related code from FreeBSD.
Note FreeBSD supports PVHv2, which is the replacement for PVHv1.
Sponsored by: Citrix Systems R&D Reviewed by: kib, Elliott Mitchell Differential Revision: https://reviews.freebsd.org/D30228
show more ...
|
Revision tags: release/13.0.0 |
|
#
b55c0d5f |
| 15-Mar-2021 |
Julien Grall <julien@xen.org> |
xen: move x86-specific xen_vector_callback_enabled to sys/x86
This is x86-only and so should not be in the common area.
Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: royger Dif
xen: move x86-specific xen_vector_callback_enabled to sys/x86
This is x86-only and so should not be in the common area.
Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: royger Differential revision: https://reviews.freebsd.org/D29040
show more ...
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
c0b5e991 |
| 14-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338595 through r338689, and resolve conflicts.
|
#
a74cdf4e |
| 13-Sep-2018 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: legacy PVH fixes for the new interrupt count
Register interrupts using the PIC pic_register_sources method instead of doing it in apic_setup_io. This is now required, since the internal interru
xen: legacy PVH fixes for the new interrupt count
Register interrupts using the PIC pic_register_sources method instead of doing it in apic_setup_io. This is now required, since the internal interrupt structures are not yet setup when calling apic_setup_io.
Approved by: re (gjb) Sponsored by: Citrix Systems R&D
show more ...
|
Revision tags: release/11.2.0, release/10.4.0, release/11.1.0 |
|
#
ca7af67a |
| 22-Dec-2016 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: fix IPI setup with EARLY_AP_STARTUP
Current Xen IPI setup functions require that the caller provide a device in order to obtain the name of the interrupt from it. With early AP startup this dev
xen: fix IPI setup with EARLY_AP_STARTUP
Current Xen IPI setup functions require that the caller provide a device in order to obtain the name of the interrupt from it. With early AP startup this device is no longer available at the point where IPIs are bound, and a KASSERT would trigger:
panic: NULL pcpu device_t cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff82233a20 vpanic() at vpanic+0x186/frame 0xffffffff82233aa0 kassert_panic() at kassert_panic+0x126/frame 0xffffffff82233b10 xen_setup_cpus() at xen_setup_cpus+0x5b/frame 0xffffffff82233b50 mi_startup() at mi_startup+0x118/frame 0xffffffff82233b70 btext() at btext+0x2c
Fix this by no longer requiring the presence of a device in order to bind IPIs, and simply use the "cpuX" format where X is the CPU identifier in order to describe the interrupt.
Reported by: sbruno, cperciva Tested by: sbruno X-MFC-With: r310177 Sponsored by: Citrix Systems R&D
show more ...
|
#
02ebdc78 |
| 31-Oct-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r307736 through r308146.
|
#
0f4d7d9f |
| 31-Oct-2016 |
Roger Pau Monné <royger@FreeBSD.org> |
xen/intr: add reference counts to event channels
Add a reference count to xenisrc. This is required for implementation of unmap-notifications in the grant table userspace device (gntdev). We need to
xen/intr: add reference counts to event channels
Add a reference count to xenisrc. This is required for implementation of unmap-notifications in the grant table userspace device (gntdev). We need to hold a reference to the event channel port, in case the user deallocates the port before we send the notification.
Submitted by: jaggi Reviewed by: royger Differential review: https://reviews.freebsd.org/D7429
show more ...
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
a5d8944a |
| 19-Nov-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head (r291075).
|
#
3c3feed4 |
| 01-Nov-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
2f9ec994 |
| 21-Oct-2015 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: Code cleanup and small bug fixes
xen/hypervisor.h: - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain, is_running_on_xen - Remove unused define CONFIG_X86_PAE - Remove
xen: Code cleanup and small bug fixes
xen/hypervisor.h: - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain, is_running_on_xen - Remove unused define CONFIG_X86_PAE - Remove unused variable xen_start_info: note that it's used inpcifront which is not built at all - Remove forward declaration of HYPERVISOR_crash
xen/xen-os.h: - Remove unused define CONFIG_X86_PAE - Drop unused helpers: test_and_clear_bit, clear_bit, force_evtchn_callback - Implement a generic version (based on ofed/include/linux/bitops.h) of set_bit and test_bit and prefix them by xen_ to avoid any use by other code than Xen. Note that It would be worth to investigate a generic implementation in FreeBSD. - Replace barrier() by __compiler_membar() - Replace cpu_relax() by cpu_spinwait(): it's exactly the same as rep;nop = pause
xen/xen_intr.h: - Move the prototype of xen_intr_handle_upcall in it: Use by all the platform
x86/xen/xen_intr.c: - Use BITSET* for the enabledbits: Avoid to use custom helpers - test_bit/set_bit has been renamed to xen_test_bit/xen_set_bit - Don't export the variable xen_intr_pcpu
dev/xen/blkback/blkback.c: - Fix the string format when XBB_DEBUG is enabled: host_addr is typed uint64_t
dev/xen/balloon/balloon.c: - Remove set but not used variable - Use the correct type for frame_list: xen_pfn_t represents the frame number on any architecture
dev/xen/control/control.c: - Return BUS_PROBE_WILDCARD in xs_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore.
dev/xen/grant-table/grant_table.c: - Remove unused cmpxchg - Drop unused include opt_pmap.h: Doesn't exist on ARM64 and it doesn't contain anything required for the code on x86
dev/xen/netfront/netfront.c: - Use the correct type for rx_pfn_array: xen_pfn_t represents the frame number on any architecture
dev/xen/netback/netback.c: - Use the correct type for gmfn: xen_pfn_t represents the frame number on any architecture
dev/xen/xenstore/xenstore.c: - Return BUS_PROBE_WILDCARD in xctrl_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore.
Note that with the changes, x86/include/xen/xen-os.h doesn't contain anymore arch-specific code. Although, a new series will add some helpers that differ between x86 and ARM64, so I've kept the headers for now.
Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3921 Sponsored by: Citrix Systems R&D
show more ...
|
#
becbad1f |
| 13-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
a997b777 |
| 13-Oct-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Sync up with head up to r289211.
|
#
9be27fdc |
| 10-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
88750be4 |
| 06-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288836 through r288925.
|
#
1a52c105 |
| 06-Oct-2015 |
Roger Pau Monné <royger@FreeBSD.org> |
Update Xen headers from 4.2 to 4.6
Pull the latest headers for Xen which allow us to add support for ARM and use new features in FreeBSD.
This is a verbatim copy of the xen/include/public so every
Update Xen headers from 4.2 to 4.6
Pull the latest headers for Xen which allow us to add support for ARM and use new features in FreeBSD.
This is a verbatim copy of the xen/include/public so every headers which don't exits anymore in the Xen repositories have been dropped.
Note the interface version hasn't been bumped, it will be done in a follow-up. Although, it requires fix in the code to get it compiled:
- sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so drop it.
- {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on xen/interface/event_channel.h, so include it.
- {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include machine/intr_machdep.h. This is also fixing build compilation with the new headers.
- dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas been dropped. So directly use struct blkif_request_segment
Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if __XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file where xen/xen-os.h is not correctly included.
Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3805 Sponsored by: Citrix Systems R&D
show more ...
|
Revision tags: release/10.2.0 |
|
#
8f0ea33f |
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|
#
9268022b |
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
Revision tags: release/10.1.0 |
|
#
5c9ef378 |
| 04-Nov-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r274095.
|
#
6d54cab1 |
| 22-Oct-2014 |
Roger Pau Monné <royger@FreeBSD.org> |
xen: allow to register event channels without handlers
This is needed by the event channel user-space device, that requires registering event channels without unmasking them. intr_add_handler will u
xen: allow to register event channels without handlers
This is needed by the event channel user-space device, that requires registering event channels without unmasking them. intr_add_handler will unconditionally unmask the event channel, so we avoid calling it if no filter/handler is provided, and then the user will be in charge of calling it when ready.
In order to do this, we need to change the opaque type xen_intr_handle_t to contain the event channel port instead of the opaque cookie returned by intr_add_handler, since now registration of event channels without handlers are allowed. The cookie will now be stored inside of the private xenisrc struct. Also, introduce a new function called xen_intr_add_handler that allows adding a filter/handler after the event channel has been registered.
Sponsored by: Citrix Systems R&D
x86/xen/xen_intr.c: - Leave the event channel without a handler if no filter/handler is provided to xen_intr_bind_isrc. - Don't perform an evtchn_mask_port, intr_add_handler will already do it. - Change the opaque type xen_intr_handle_t to contain a pointer to the event channel port number, and make the necessary changes to related functions. - Introduce a new function called xen_intr_add_handler that can be used to add filter/handlers to an event channel after registration.
xen/xen_intr.h: - Add prototype of xen_intr_add_handler.
show more ...
|
#
c81ab40b |
| 11-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Merge HEAD@r272944.
|