On 12/28/23 22:44, Bui Quang Minh wrote:
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?

I think I briefly understand why pages test fails. Internally, htags call global to parse the output of gtags. When executing command, it expects the size of argv and env to 20*1024 (https://github.com/harai/gnu-global/blob/f86ba74d867385353815f8656c4a6cf4029c1f0b/libutil/xargs.c#L92-L105). The failed test case only happens when the last commit is patch 7 (test: bios-tables-test: add IVRS changed binary) which has a very long commit message (around 9000 bytes). By default, Gitlab appends some environment variables to the runner and one of them is CI_COMMIT_MESSAGE which contains the long commit message. So it exceeds the limit of 20*1024 bytes and fails.

In my opinion, this failed test is not so critical and seems unrelated to the series so I skip this failed test. I will post the new version to fix the windows/amd64 build soon.

Thanks,
Quang Minh.

Reply via email to