Re: [PATCH -tip] x86/locking/atomic: Use asm_inline for atomic locking insns

Ingo Molnar
2025-03-06T10:50:07Z

* Ingo Molnar <mingo@kernel.org> wrote:

> Also, to shorten build & test times you can use the x86-64 defconfig.
> It's a config more or less representative of what major distros
> enable, and it's even bootable on some systems and in VMs, but it
> builds in far less time.

And if your primary test method is KVM+Qemu, then the following build
method will give you a representative core kernel bzImage that will
boot most cloud VM images as-is:

$ make -j128 ARCH=x86 defconfig kvm_guest.config bzImage

$ ll arch/x86/boot/bzImage
-rw-rw-r-- 1 mingo mingo 13788160 Mar 6 11:42 arch/x86/boot/bzImage

And you can boot up a .raw distro image in an xterm:

$ RAW=your_cloud_image.raw
$ PARTUID=your_target_root_partition_UUID

$ qemu-system-x86_64 \
-enable-kvm \
-smp cpus=4 \
-m 2048 \
-machine q35 \
-cpu host \
-global ICH9-LPC.disable_s3=1 \
-net nic,model=virtio \
-net user,hostfwd=tcp::8022-:22,hostfwd=tcp::8090-:80 \
-drive "file=$RAW",if=none,format=raw,id=disk1 \
-device virtio-blk-pci,drive=disk1,bootindex=1 \
-serial mon:stdio \
-nographic \
-append "root=PARTUUID=$ID ro console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0 ignore_loglevel" \
-kernel arch/x86/boot/bzImage

This way you don't need any initrd build or modules nonsense -
everything necessary is built in.

Bootable raw distro images can be found in numerous places, for example
at:

https://cloud.debian.org/images/cloud/bookworm-backports/

( And since I'm lazy to figure it out the 'cloud way', I usually read the
root UUID from the bootlog of the first unsuccessful attempt. )

Thanks,

Ingo