paravirt_ops.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ============
  3. Paravirt_ops
  4. ============
  5. Linux provides support for different hypervisor virtualization technologies.
  6. Historically different binary kernels would be required in order to support
  7. different hypervisors, this restriction was removed with pv_ops.
  8. Linux pv_ops is a virtualization API which enables support for different
  9. hypervisors. It allows each hypervisor to override critical operations and
  10. allows a single kernel binary to run on all supported execution environments
  11. including native machine -- without any hypervisors.
  12. pv_ops provides a set of function pointers which represent operations
  13. corresponding to low level critical instructions and high level
  14. functionalities in various areas. pv-ops allows for optimizations at run
  15. time by enabling binary patching of the low-ops critical operations
  16. at boot time.
  17. pv_ops operations are classified into three categories:
  18. - simple indirect call
  19. These operations correspond to high level functionality where it is
  20. known that the overhead of indirect call isn't very important.
  21. - indirect call which allows optimization with binary patch
  22. Usually these operations correspond to low level critical instructions. They
  23. are called frequently and are performance critical. The overhead is
  24. very important.
  25. - a set of macros for hand written assembly code
  26. Hand written assembly codes (.S files) also need paravirtualization
  27. because they include sensitive instructions or some of code paths in
  28. them are very performance critical.