Code: Difference between revisions

From KVM
No edit summary
 
(Remove completely outdated information about building the external module etc.)
 
(33 intermediate revisions by 16 users not shown)
Line 1: Line 1:
== kernel git tree ==                                                               
=Code=
The kvm kernel code is available through a git tree.  To create a repository using git, type
                                                                                           
git clone git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git                       
                                                                                           
Alternatively, it is also accessible through the kernel.org gitweb interface:             
[http://git.kernel.org/?p=linux/kernel/git/avi/kvm.git;a=summary]                         
 
For subsequent upgrades use the command
                                     
git-pull                             
                                     
in the git working dir.               
 
== userspace git tree ==
The kvm userspace code (libkvm and qemu) is available through a git tree.  To create a
repository using git, type                                                           
                                                                                     
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git                   
                                                                                     
Alternatively, it is also accessible through the kernel.org gitweb interface:       
[http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=summary]                     


== linux guest drivers kit ==
== kernel git tree ==
This kit converts a virtio-capable kernel into a package that can generate linux guest drivers for older kernels.                                                                                               


The kvm kernel code is available through a git tree (like the kernel itself). To create a repository using git, type
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-guest-drivers-linux.git
                                                                           


The corresponding kernel tree can found in the <code>virtio</code> branch of <code>kvm.git</code>.
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git


== building an external module with older kernels ==
Alternatively, it is also accessible through the kernel.org gitweb interface:             
[http://git.kernel.org/?p=virt/kvm/kvm.git;a=summary]


/!\ This only works for the x86 architecture.
For subsequent upgrades use the command
                                     
git pull


If you wish to use a distribution kernel (or just some random kernel you like) with kvm,
in the git working directory.
you can get both the userspace and kernel (via git).  In the userspace                 
toplevel directory, type                                                               
                                                                                       
./configure
cd kernel
make sync LINUX=/path/to/kvm/git/tree
cd ..
make


== kernel git workflow ==


There are three important directories in this scenario:
See [[Kvm-Git-Workflow]]


|| kvm-userspace || Already contains a "kernel" subdirectory from a kvm.git snapshot. The files in thisdirectory can be overwritten by <code>make sync</code>. ||
== userspace git tree ==
|| host kernel tree || Older kernel you want to use newer KVM modules with. Refer to it with <code>configure --kerneldir</code>. ||
|| kvm kernel tree (from git) || Used as the source of the KVM modules. Refer to it with <code>LINUX=path</code> in <code>make sync</code>. ||


== release tags ==
As of QEMU 1.3, the KVM userspace code is in mainline QEMU.  Please use and develop with


kvm releases are tagged with <code>kvm-nn</code> where ''nn'' is the release number.
git clone https://gitlab.com/qemu-project/qemu.git


== Binary Packages ==
'''If you want to contribute code''', please see the [http://wiki.qemu.org/Contribute guidelines] and submit patches to qemu-devel@nongnu.org.
=== CentOS / RHEL ===


Unofficial packages of latest releases can be found at
If you are interested in the history of KVM in the QEMU codebase, the old qemu-kvm.git fork repository is still available (but completely outdated nowadays):
http://www.lfarkas.org/linux/packages/centos/5/
                                                                                     
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git


== nightly snapshots ==
Alternatively, it is also accessible through the kernel.org gitweb interface:       
[http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=summary]


Nightly snapshots, for those who are uncomfortable with git, are [http://people.qumranet.com/avi/snapshots available].  When reporting a problem with a snapshot, please quote the snapshot name (which includes the date) and the contents of the SOURCES file in the snapshot tarball.
[[Category:Docs]][[Category:HowTo]]

Latest revision as of 04:16, 3 August 2023

Code

kernel git tree

The kvm kernel code is available through a git tree (like the kernel itself). To create a repository using git, type

git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git

Alternatively, it is also accessible through the kernel.org gitweb interface: [1]

For subsequent upgrades use the command

git pull

in the git working directory.

kernel git workflow

See Kvm-Git-Workflow

userspace git tree

As of QEMU 1.3, the KVM userspace code is in mainline QEMU. Please use and develop with

git clone https://gitlab.com/qemu-project/qemu.git

If you want to contribute code, please see the guidelines and submit patches to qemu-devel@nongnu.org.

If you are interested in the history of KVM in the QEMU codebase, the old qemu-kvm.git fork repository is still available (but completely outdated nowadays):

git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git

Alternatively, it is also accessible through the kernel.org gitweb interface: [2]