projectacrn / acrn-hypervisor

Project ACRN hypervisor
BSD 3-Clause "New" or "Revised" License
1.1k stars 506 forks source link

[TGL][qemu] Cannot launch qemu with HOST-passthrough #6256

Closed fuzhongl closed 2 years ago

fuzhongl commented 3 years ago

Describe the bug When we use qemu CPU 'host-passthrough' mode, if the CPU support posted-interrupt, ACRN would use posted-interrupt to notify another vCPU which in non-root mode or sync interrupt for itself when it in root-mode. However, QEMU could not handle this properly

Platform TGL

Codebase v2.5

Scenario SDC

To Reproduce Refer to this guide setup qemu sos on Native Ubuntu on TGL board and launch ACRN

Expected behavior Able to login qemu ACRN successfully.

Actual result: virsh list shows qemu is running but no login prompt and cannot remote control it either

fuzhongl commented 3 years ago

[External_System_ID]ACRN-6671

fuzhongl commented 2 years ago

Switch to QEMU CPU Model in v2.6:

<qemu:commandline>
    <qemu:arg value='-machine'/>
    <qemu:arg value='kernel-irqchip=split'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='Denverton,
    +invtsc,+lm,+nx,+smep,+smap,+mtrr,+clflushopt,+vmx,+x2apic,+popcnt,+xsaves,+sse,+rdrand,+vmx-apicv-xapic,+vmx-apicv-x2apic,+vmx-flexpriority,+tsc-deadline'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='intel-iommu,intremap=on,caching-mode=on,aw-bits=48'/>
  </qemu:commandline>