On 12/26/23 16:21, Michael S. Tsirkin wrote:
On Mon, Dec 25, 2023 at 11:40:54PM +0700, Bui Quang Minh wrote:
Hi everyone,

This series implements x2APIC mode in userspace local APIC and the
RDMSR/WRMSR helper to access x2APIC registers in x2APIC mode. Intel iommu
and AMD iommu are adjusted to support x2APIC interrupt remapping. With this
series, we can now boot Linux kernel into x2APIC mode with TCG accelerator
using either Intel or AMD iommu.

Testing to boot my own built Linux 6.3.0-rc2, the kernel successfully boot
with enabled x2APIC and can enumerate CPU with APIC ID 257

Using Intel IOMMU

qemu/build/qemu-system-x86_64 \
   -smp 2,maxcpus=260 \
   -cpu qemu64,x2apic=on \
   -machine q35 \
   -device intel-iommu,intremap=on,eim=on \
   -device qemu64-x86_64-cpu,x2apic=on,core-id=257,socket-id=0,thread-id=0 \
   -m 2G \
   -kernel $KERNEL_DIR \
   -append "nokaslr console=ttyS0 root=/dev/sda earlyprintk=serial 
net.ifnames=0" \
   -drive file=$IMAGE_DIR,format=raw \
   -nographic \
   -s

Using AMD IOMMU

qemu/build/qemu-system-x86_64 \
   -smp 2,maxcpus=260 \
   -cpu qemu64,x2apic=on \
   -machine q35 \
   -device amd-iommu,intremap=on,xtsup=on \
   -device qemu64-x86_64-cpu,x2apic=on,core-id=257,socket-id=0,thread-id=0 \
   -m 2G \
   -kernel $KERNEL_DIR \
   -append "nokaslr console=ttyS0 root=/dev/sda earlyprintk=serial 
net.ifnames=0" \
   -drive file=$IMAGE_DIR,format=raw \
   -nographic \
   -s

Testing the emulated userspace APIC with kvm-unit-tests, disable test
device with this patch

Seems to break build for windows/amd64
https://gitlab.com/mstredhat/qemu/-/pipelines/1118886361/failures

I saw the CI test "pages" failed too. On my CI, most of the time, it failed with

$ htags -anT --tree-view=filetree -m qemu_init -t "Welcome to the QEMU sourcecode"
00:24
htags: Negative exec line limit = -8099

It only succeeded once. I could not reproduce locally. Do you have any ideas what the problem is?

Thanks,
Quang Minh.

Reply via email to