Generating the Patch for Qemu

To generate the patch you need to submit, proceed as described here.

First, download then extract a vanilla version of Qemu v8.2.0-rc2 in /tmp:

wget https://download.qemu.org/qemu-8.2.0-rc2.tar.xz -O /tmp/qemu-8.2.0-rc2.tar.xz
tar xf /tmp/qemu-8.2.0-rc2.tar.xz -C /tmp/

Next, generate the patch as follows:

diff -urN --no-dereference -x prefix -x scripts -x tests -x build -x GNUmakefile /tmp/qemu-8.2.0-rc2 ~/virt-101-exercise/qemu-8.2.0-rc2 > qemu-8.2.0-rc2.patch

Generating the Patch for Linux

Similarly to what we have done with Qemu, download and extract the vanilla version of Linux v6.6.4.tar.xz sources in /tmp:

https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.4.tar.xz -O /tmp/linux-6.6.4.tar.xz
tar xf /tmp/linux-6.6.4.tar.xz -C /tmp/

We then need to clean up our modified source folder:

make distclean -C ~/virt-101-exercise/linux-6.6.4

Then generate the patch as follows:

cd ~/virt-101-exercise
diff -urN -x tools -x security  /tmp/linux-6.6.4 ~/virt-101-exercise/linux-6.6.4 > linux-6.6.4.patch

Note that because we need to clean up Linux's source folder before generating the patch, to rebuild the kernel you will have to reconfigure and recompile it:

cd ~/virt-101-exercise/linux-6.6.4
make x86_64_defconfig
make -j4

This takes a bit of time according to your host's processing power, so make sure to generate the patch only when you have finalised the exercise.

For the instructions on how to submit the patches and report, please see the logistics part at the beginning of this guide.