| 6699c22c | 14-May-2021 |
Elliott Mitchell <[email protected]> |
xen/intr: move interrupt allocation/release to architecture
Simply moving the interrupt allocation and release functions into files which belong to the architecture. Since x86 interrupt handling is
xen/intr: move interrupt allocation/release to architecture
Simply moving the interrupt allocation and release functions into files which belong to the architecture. Since x86 interrupt handling is quite distinct from other architectures, this is a crucial necessary step.
Identifying the border between x86 and architecture-independent is actually quite tricky. Similarly, getting the prototypes for the border right is also quite tricky.
Inspired by the work of Julien Grall <[email protected]>, 2015-10-20 09:14:56, but heavily adjusted.
Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D30936
show more ...
|
| 2d795ab1 | 20-Oct-2015 |
Julien Grall <[email protected]> |
xen/intr: move x86 PIC interface to xen_arch_intr.c, introduce wrappers
The x86 PIC interface is very much x86-specific and not used by other architectures. Since most of xen_intr.c can be shared w
xen/intr: move x86 PIC interface to xen_arch_intr.c, introduce wrappers
The x86 PIC interface is very much x86-specific and not used by other architectures. Since most of xen_intr.c can be shared with other architectures, the PIC interface needs to be broken off.
Introduce wrappers for calls into the architecture-dependent interrupt layer. All architectures need roughly the same functionality, but the interface is slightly different between architectures. Due to the wrappers being so thin, all of them are implemented as inline in arch-intr.h.
The original implementation was done by Julien Grall in 2015, but this has required major updating.
Removal of PVHv1 meant substantial portions disappeared. The original implementation took care of moving interrupt allocation to xen_arch_intr.c, but this has required massive rework and was broken off.
In the original implementation the wrappers were normal functions. Some had empty stubs in xen_intr.c and were removed.
Reviewed by: royger Submitted by: Elliott Mitchell <[email protected]> Original implementation: Julien Grall <[email protected]>, 2015-10-20 09:14:56 Differential Revision: https://reviews.freebsd.org/D30909
show more ...
|
| ab7ce14b | 20-Oct-2015 |
Julien Grall <[email protected]> |
xen/intr: introduce dev/xen/bus/intr-internal.h
Move the xenisrc structure which needs to be shared between the core Xen interrupt code and architecture-dependent code into a separate header. A sim
xen/intr: introduce dev/xen/bus/intr-internal.h
Move the xenisrc structure which needs to be shared between the core Xen interrupt code and architecture-dependent code into a separate header. A similar situation exists for the NR_EVENT_CHANNELS constant.
Turn xi_intsrc into a type definition named xi_arch to reflect the new purpose of being an architectural variable for the interrupt source.
This was originally implemented by Julien Grall, but has been heavily modified. The core side was renamed "intr-internal.h" and is #include'd by "arch-intr.h" instead of the other way around. This allows the architecture to add function definitions which use struct xenisrc.
The original version only moved xi_intsrc into xen_arch_isrc_t. Moving xi_vector was done by the submitter.
The submitter had also moved xi_activehi and xi_edgetrigger into xen_arch_isrc_t. Those disappeared with the removal of PVHv1 support.
Copyright note. The current xenisrc structure was introduced at 76acc41fb7c7 by Justin T. Gibbs. Traces remain, but the strength of Copyright claims from before 2013 seem pretty weak.
Reviewed by: royger Submitted by: Elliott Mitchell <[email protected]>, 2021-03-17 19:09:01 Original implementation: Julien Grall <[email protected]>, 2015-10-20 09:14:56 Differential Revision: https://reviews.freebsd.org/D30648 [royger] - Adjust some line lengths - Fix comment about NR_EVENT_CHANNELS after movement. - Use #include instead of symlinks.
show more ...
|
| 2f9ec994 | 21-Oct-2015 |
Roger Pau Monné <[email protected]> |
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 <[email protected]> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3921 Sponsored by: Citrix Systems R&D
show more ...
|