0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ============
0004 Paravirt_ops
0005 ============
0006
0007 Linux provides support for different hypervisor virtualization technologies.
0008 Historically different binary kernels would be required in order to support
0009 different hypervisors, this restriction was removed with pv_ops.
0010 Linux pv_ops is a virtualization API which enables support for different
0011 hypervisors. It allows each hypervisor to override critical operations and
0012 allows a single kernel binary to run on all supported execution environments
0013 including native machine -- without any hypervisors.
0014
0015 pv_ops provides a set of function pointers which represent operations
0016 corresponding to low level critical instructions and high level
0017 functionalities in various areas. pv-ops allows for optimizations at run
0018 time by enabling binary patching of the low-ops critical operations
0019 at boot time.
0020
0021 pv_ops operations are classified into three categories:
0022
0023 - simple indirect call
0024 These operations correspond to high level functionality where it is
0025 known that the overhead of indirect call isn't very important.
0026
0027 - indirect call which allows optimization with binary patch
0028 Usually these operations correspond to low level critical instructions. They
0029 are called frequently and are performance critical. The overhead is
0030 very important.
0031
0032 - a set of macros for hand written assembly code
0033 Hand written assembly codes (.S files) also need paravirtualization
0034 because they include sensitive instructions or some of code paths in
0035 them are very performance critical.