<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marcelot</id>
	<title>KVM - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marcelot"/>
	<link rel="alternate" type="text/html" href="https://linux-kvm.org/page/Special:Contributions/Marcelot"/>
	<updated>2026-04-21T16:55:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Code&amp;diff=4542</id>
		<title>Code</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Code&amp;diff=4542"/>
		<updated>2012-05-16T21:02:47Z</updated>

		<summary type="html">&lt;p&gt;Marcelot: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Code=&lt;br /&gt;
&lt;br /&gt;
[[Category:Architechture]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== kernel git tree ==&lt;br /&gt;
&lt;br /&gt;
The kvm kernel code is available through a git tree (like the kernel itself).  To create a repository using git, type&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git&lt;br /&gt;
&lt;br /&gt;
Alternatively, it is also accessible through the kernel.org gitweb interface:               &lt;br /&gt;
[http://git.kernel.org/?p=virt/kvm/kvm.git;a=summary]&lt;br /&gt;
&lt;br /&gt;
For subsequent upgrades use the command&lt;br /&gt;
                                       &lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
in the git working directory.&lt;br /&gt;
&lt;br /&gt;
== kernel git workflow ==&lt;br /&gt;
&lt;br /&gt;
See [[Kvm-Git-Workflow]]&lt;br /&gt;
&lt;br /&gt;
== userspace git tree ==&lt;br /&gt;
&lt;br /&gt;
The kvm userspace code (libkvm and qemu) is available through a git tree. To create a repository using git, type&lt;br /&gt;
                                                                                      &lt;br /&gt;
 git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git&lt;br /&gt;
&lt;br /&gt;
Alternatively, it is also accessible through the kernel.org gitweb interface:         &lt;br /&gt;
[http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=summary]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want to contribute code&#039;&#039;&#039;, please [http://wiki.qemu.org/Contribute/StartHere develop against qemu.git] and submit patches to qemu-devel@nongnu.org.  The qemu-kvm.git tree regularly gets changes from qemu.git and patches against qemu-kvm.git should be minimized.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== building an external module with older kernels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This only works for the x86 architecture.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. If you wish to use a distribution kernel (or just some random kernel you like) with kvm,&lt;br /&gt;
you can use the external module kit.  You will need the kvm-kmod repository:&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-kmod.git&lt;br /&gt;
 cd kvm-kmod&lt;br /&gt;
 git submodule update --init&lt;br /&gt;
 ./configure [--kerneldir=/path/to/kernel/dir]&lt;br /&gt;
 make sync&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
=== Tip about building against Red Hat Enterprise Linux kernels ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;kvm-userspace/kernel&amp;lt;/code&amp;gt; has some compat code to allow it to compile against older kernels, and also some code specific to features that are normally not present on older kernels but are present on RHEL kernels.&lt;br /&gt;
&lt;br /&gt;
So, when building against a RHEL kernel tree, check if the &amp;lt;code&amp;gt;RHEL_*&amp;lt;/code&amp;gt; macros at &amp;lt;code&amp;gt;${kerneldir}/include/linux/version.h&amp;lt;/code&amp;gt; are defined correctly, corresponding to the RHEL version where the kernel source comes from. If those macros aren&#039;t defined correctly, the compat code that allows compilation against RHEL kernels will break and you will get build errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== release tags ==&lt;br /&gt;
&lt;br /&gt;
kvm stable releases (based off of Qemu&#039;s stable branch) are tagged with &amp;lt;code&amp;gt;kvm-qemu-0.NN.N&amp;lt;/code&amp;gt; where &#039;&#039;N&#039;&#039; equates to the upstream Qemu branch versions. Note that kvm has them tagged not branched.&lt;br /&gt;
&lt;br /&gt;
kvm development releases are tagged with &amp;lt;code&amp;gt;kvm-nn&amp;lt;/code&amp;gt; where &#039;&#039;nn&#039;&#039; is the release number.&lt;br /&gt;
&lt;br /&gt;
== Binary Packages ==&lt;br /&gt;
&lt;br /&gt;
=== CentOS / RHEL ===&lt;br /&gt;
&lt;br /&gt;
Unofficial packages of latest releases can be found at:&lt;br /&gt;
&amp;lt;code&amp;gt;http://www.lfarkas.org/linux/packages/centos/5/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
For Debian Lenny, please use packages from backports.debian.org - for &amp;lt;em&amp;gt;both&amp;lt;/em&amp;gt; qemu-kvm and kernel (at least 2.6.32).  It is important to use more recent kernel - 2.6.26 does not work well with kvm.&lt;br /&gt;
&lt;br /&gt;
Note that package &amp;quot;kvm&amp;quot; has been renamed to &amp;quot;qemu-kvm&amp;quot; in Squeeze and in Lenny backports (and kvm is now transitional package that installs qemu-kvm automatically).&lt;br /&gt;
&lt;br /&gt;
Debian Squeeze will have qemu-kvm based on 0.12, available in standard repositories.&lt;br /&gt;
&lt;br /&gt;
Experimental 0.13 packages are available at &lt;br /&gt;
&amp;lt;code&amp;gt;http://www.corpit.ru/debian/tls/kvm/0.13/&amp;lt;/code&amp;gt; , pending upload to debian -experimental.&lt;br /&gt;
&lt;br /&gt;
== nightly snapshots ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;/div&gt;</summary>
		<author><name>Marcelot</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Kvm-Git-Workflow&amp;diff=4541</id>
		<title>Kvm-Git-Workflow</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Kvm-Git-Workflow&amp;diff=4541"/>
		<updated>2012-05-16T20:58:37Z</updated>

		<summary type="html">&lt;p&gt;Marcelot: KVM Git Workflow&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New git workflow for kvm.git ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The old &#039;master&#039; branch has been abandoned (still available for&lt;br /&gt;
reviewing history).  The new branch structure will be as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;master&#039;: contains patches destined for fixes after the current merge windows; for example, after v3.4 has been released, master contains fixes which will be merged during the 3.4 cycle.&lt;br /&gt;
&lt;br /&gt;
&#039;next&#039;: contains patches destined for the next merge window; for&lt;br /&gt;
example, if v3.4 has just been released, then &#039;next&#039; will be based on&lt;br /&gt;
the v3.5-rc1 tag (or thereabouts), and will be accepting patches&lt;br /&gt;
targeted at the 3.6 merge window (when 3.5 is released).&lt;br /&gt;
&lt;br /&gt;
&#039;queue&#039;: holding area for patches which have not been tested yet; may&lt;br /&gt;
be rebased; usually merged into &#039;next&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;kvm-updates/3.x&#039;: unchanged, patches destined for a stable branch&lt;br /&gt;
&lt;br /&gt;
Since &#039;next&#039; is based on an -rc1 release, it may lack upstream non-kvm&lt;br /&gt;
fixes (or features) needed for development.  To work around that, an&lt;br /&gt;
&#039;auto-next&#039; branch will be provided that is a merge of current upstream&lt;br /&gt;
and &#039;next&#039; (this is more or less the equivalent of the old &#039;master&#039;&lt;br /&gt;
branch).  That branch of course will be rebased often.&lt;br /&gt;
&lt;br /&gt;
== How to work with the new layout ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a developer, usually developing against &#039;next&#039; is okay.  If&lt;br /&gt;
&#039;next&#039; is unstable for you or you need a new upstream API, work against&lt;br /&gt;
&#039;auto-next&#039;, but let the maintainers know that when posting your patch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re working on a fix for the current cycle, work against upstream&lt;br /&gt;
or &#039;master&#039; (they should be equivalent most of the time).&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a submaintainer, post git pull requests against &#039;next&#039; or&lt;br /&gt;
&#039;master&#039;, according to your merge target.&lt;br /&gt;
&lt;br /&gt;
Please ask Avi or Marcelo with any question or suggestion.  It&#039;s&lt;br /&gt;
better to ask a &amp;quot;silly&amp;quot; question than develop against a stale tree&lt;br /&gt;
accidentally and waste your efforts.&lt;/div&gt;</summary>
		<author><name>Marcelot</name></author>
	</entry>
</feed>