Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM configuration check fail! #7956

Closed
ashwanth-07 opened this issue Aug 5, 2022 · 21 comments
Closed

VM configuration check fail! #7956

ashwanth-07 opened this issue Aug 5, 2022 · 21 comments
Assignees

Comments

@ashwanth-07
Copy link

make[2]: Leaving directory '/home/acrn/acrn-work/acrn-hypervisor/misc/hv_prebuild'
sanitize_vm_config: vm0 assigns invalid PCPU (affinity: 0x000000000000000f)
VM configuration check fail!
make[1]: *** [Makefile:420: pre_build] Error 255
make[1]: Leaving directory '/home/acrn/acrn-work/acrn-hypervisor/hypervisor'
make: *** [Makefile:130: hypervisor] Error 2

issue

@ashwanth-07
Copy link
Author

while doing the default configuration given in getting started page, this error occurred , please do help solving this error.

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 6, 2022

@ashwanth-07
From following log, vm0 assigns invalid PCPU.

sanitize_vm_config: vm0 assigns invalid PCPU (affinity: 0x000000000000000f)
VM configuration check fail!

You are using v3.0 branch, correct?
Please share your board.xml and scenario.xml.
Thanks!

@fuzhongl fuzhongl self-assigned this Aug 6, 2022
@ashwanth-07
Copy link
Author

ashwanth-07 commented Aug 6, 2022

scenario.xml
<?xml version="1.0" encoding="utf-8"?> <acrn-config> <hv> <BUILD_TYPE>release</BUILD_TYPE> <FEATURES> <RELOC_ENABLED>y</RELOC_ENABLED> <SCHEDULER>SCHED_BVT</SCHEDULER> <MULTIBOOT2_ENABLED>y</MULTIBOOT2_ENABLED> <ENFORCE_TURNOFF_AC>y</ENFORCE_TURNOFF_AC> <ENFORCE_TURNOFF_GP>n</ENFORCE_TURNOFF_GP> <SECURITY_VM_FIXUP>n</SECURITY_VM_FIXUP> <KEEP_IRQ_DISABLED>n</KEEP_IRQ_DISABLED> <HYPERV_ENABLED>y</HYPERV_ENABLED> <IOMMU_ENFORCE_SNP>n</IOMMU_ENFORCE_SNP> <ACPI_PARSE_ENABLED>y</ACPI_PARSE_ENABLED> <L1D_VMENTRY_ENABLED>n</L1D_VMENTRY_ENABLED> <MCE_ON_PSC_DISABLED>n</MCE_ON_PSC_DISABLED> <RDT> <RDT_ENABLED>n</RDT_ENABLED> <CDP_ENABLED>n</CDP_ENABLED> <VCAT_ENABLED>n</VCAT_ENABLED> </RDT> </FEATURES> <DEBUG_OPTIONS> <SERIAL_CONSOLE>None</SERIAL_CONSOLE> <MEM_LOGLEVEL>5</MEM_LOGLEVEL> <NPK_LOGLEVEL>5</NPK_LOGLEVEL> <CONSOLE_LOGLEVEL>5</CONSOLE_LOGLEVEL> </DEBUG_OPTIONS> <MEMORY> <STACK_SIZE>0x2000</STACK_SIZE> </MEMORY> <CAPACITIES> <MAX_VM_NUM>16</MAX_VM_NUM> <MAX_IOAPIC_NUM>1</MAX_IOAPIC_NUM> <MAX_PCI_DEV_NUM>96</MAX_PCI_DEV_NUM> <MAX_IOAPIC_LINES>120</MAX_IOAPIC_LINES> <MAX_PT_IRQ_ENTRIES>256</MAX_PT_IRQ_ENTRIES> <MAX_MSIX_TABLE_NUM>64</MAX_MSIX_TABLE_NUM> <MAX_EMULATED_MMIO>16</MAX_EMULATED_MMIO> </CAPACITIES> <MISC_CFG> <GPU_SBDF>0x00000010</GPU_SBDF> </MISC_CFG> </hv> <vm id="0"> <vm_type>STANDARD_VM</vm_type> <console_vuart>None</console_vuart> <os_config> <kern_type>KERNEL_BZIMAGE</kern_type> <kern_mod>Linux_bzImage</kern_mod> <bootargs>rw rootwait root=/dev/nvme0n1p2 console=tty0 console=ttyS0 consoleblank=0 no_timer_check quiet loglevel=3 i915.nuclear_pageflip=1 swiotlb=131072</bootargs> </os_config> <load_order>SERVICE_VM</load_order> <name>ACRN_Service_VM</name> <priority>PRIO_LOW</priority> <companion_vmid>65535</companion_vmid> </vm> <vm id="1"> <vm_type>STANDARD_VM</vm_type> <console_vuart>None</console_vuart> <os_type>Non-Windows OS</os_type> <vuart0>n</vuart0> <vbootloader>y</vbootloader> <memory> <size>1024</size> </memory> <cpu_affinity> <pcpu> <pcpu_id>0</pcpu_id> <real_time_vcpu>n</real_time_vcpu> </pcpu> <pcpu> <pcpu_id>1</pcpu_id> <real_time_vcpu>n</real_time_vcpu> </pcpu> </cpu_affinity> <virtio_devices> <console> <use_type>Virtio console</use_type> <backend_type>stdio</backend_type> </console> <block>/home/acrn/acrn-work/ubuntu-20.04.4-desktop-amd64.iso</block> </virtio_devices> <load_order>POST_LAUNCHED_VM</load_order> <name>POST_STD_VM1</name> <priority>PRIO_LOW</priority> <companion_vmid>65535</companion_vmid> </vm> </acrn-config>

@ashwanth-07
Copy link
Author

please do help

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 8, 2022

@ashwanth-07 The format isn't correct after paste.
Could you please upload your board.xml as file; instead of paste it.
Following is example for your scenario.xml(rename it to .txt)
github.txt
You shared scenario.xml works well with my board:

ACRN Configuration Summary:
Build directory: /home/acrn/acrn-hypervisor/build/hypervisor
This build directory is configured with the settings below.
- BOARD = whl-ipc-i5
- SCENARIO = github
- RELEASE = y

Thanks!

@ashwanth-07
Copy link
Author

@fuzhongl Thanks for responding, I have attached the files like you asked, please do help.

my_board.txt
scenario.txt

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 8, 2022

@ashwanth-07 The issue is root caused: cpu_id info doesn't match in board.xml.
image
Vs
image

Please help to workaround it with following modification:
From

  <CPU_PROCESSOR_INFO>
	0, 1, 2, 3
	</CPU_PROCESSOR_INFO>

To

  <CPU_PROCESSOR_INFO>
	0, 1
	</CPU_PROCESSOR_INFO>

Will provide the final fix later.
Thanks!

@ashwanth-07
Copy link
Author

ashwanth-07 commented Aug 8, 2022

@fuzhongl thank you ! It worked, please do send the final fix later

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 9, 2022

@fuzhongl thank you ! It worked, please do send the final fix later

@ashwanth-07 With and without Hyper-thread enabled; we generate the board.xml:

root@acrn-10:/home/acrn# board_inspector.py whl_ht
Generating board XML whl_ht. This may take a few minutes...
2022-08-09 09:02:29-root-WARNING:-Hyper-Threading (HT) is enabled. While this feature can provide more overall processing power,
hyperthreading can adversely impact predictable real-time performance behavior.
========================================================================================================================
WARNING
These issues affect optional features. You can ignore them if they don't apply to you.

2022-08-09 09:02:29-root-WARNING:-Hyper-Threading (HT) is enabled. While this feature can provide more overall processing power,
========================================================================================================================
SUCCESS: Board configuration file whl_ht.xml generated successfully and saved to /home/acrn

The cpu_id info match in the generated board.xml:

<die id="0x0">
      <core id="0x0">
        <thread id="0x0">
          <cpu_id>0</cpu_id>
          <apic_id>0x0</apic_id>
          <x2apic_id>0x0</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
        <thread id="0x1">
          <cpu_id>4</cpu_id>
          <apic_id>0x1</apic_id>
          <x2apic_id>0x1</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
      </core>
      <core id="0x1">
        <thread id="0x2">
          <cpu_id>1</cpu_id>
          <apic_id>0x2</apic_id>
          <x2apic_id>0x2</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
        <thread id="0x3">
          <cpu_id>5</cpu_id>
          <apic_id>0x3</apic_id>
          <x2apic_id>0x3</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
      </core>
      <core id="0x2">
        <thread id="0x4">
          <cpu_id>2</cpu_id>
          <apic_id>0x4</apic_id>
          <x2apic_id>0x4</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
        <thread id="0x5">
          <cpu_id>6</cpu_id>
          <apic_id>0x5</apic_id>
          <x2apic_id>0x5</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
      </core>
      <core id="0x3">
        <thread id="0x6">
          <cpu_id>3</cpu_id>
          <apic_id>0x6</apic_id>
          <x2apic_id>0x6</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
        <thread id="0x7">
          <cpu_id>7</cpu_id>
          <apic_id>0x7</apic_id>
          <x2apic_id>0x7</x2apic_id>
          <family_id>0x6</family_id>
          <model_id>0x8e</model_id>
          <stepping_id>0xb</stepping_id>
          <core_type></core_type>
          <native_model_id></native_model_id>
        </thread>
      </core>
    </die>

Do you use v3.0 codebase or master codebase?
Any error log during generate board.xml on your side? Could you please re-generate the board.xml with v3.0?
Thanks!

@ashwanth-07
Copy link
Author

@fuzhongl thanks for responding , I did get this warning while generating board.xml
warning

@ashwanth-07
Copy link
Author

and yes I am using v3.0

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 11, 2022

@fuzhongl thanks for responding , I did get this warning while generating board.xml warning

@ashwanth-07 Could you please share the following log on native? which is used to generate the board.xml.

lscpu
lsb_release -a
cat /proc/cmdline
uname -a
kernel config

Following are the example of my side:

acrn@acrn-10:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy
acrn@acrn-10:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.15.0-41-generic root=UUID=d0d5bf33-ed61-43be-883b-713973597572 ro console=tty0 console=ttyS0,115200n8 quiet splash iomem=relaxed intel_idle.max_cstate=0 intel_pstate=disable vt.handoff=7
acrn@acrn-10:~$ uname -a
Linux acrn-10 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

acrn@acrn-10:~$ ls /boot |grep config-5.15.0-41-generic
config-5.15.0-41-generic

Thanks!

@ashwanth-07
Copy link
Author

@fuzhongl thanks for responding, here are the logs for the commands you gave
command 1
c2

@fuzhongl
Copy link
Contributor

fuzhongl commented Aug 12, 2022

@ashwanth-07 There are only 2 CPU on your board.
You don't enable Hyper-Thread when generate the board.xml, right?
If yes, we need to check why board inspector try to bring up core 2 and 3.

Following is the log from my side:

acrn@acrn-OptiPlex-9010:~$ lscpu |grep "CPU(s)"
CPU(s):              4
On-line CPU(s) list: 0-3
acrn@acrn-OptiPlex-9010:~$ cat /proc/cpuinfo |grep processor
processor       : 0
processor       : 1
processor       : 2
processor       : 3

@ashwanth-07
Copy link
Author

@fuzhongl thanks for responding and sorry for the delay,
Yes I only have 2 cpus
1

@ashwanth-07
Copy link
Author

ashwanth-07 commented Aug 15, 2022

I dont think I enabled hyperthreading, these are all the commands that I ran to create board.xml
board

@ashwanth-07
Copy link
Author

@fuzhongl I have enabled intel virtualization in BIOS, it couldn't be a problem, could it?

@fuzhongl
Copy link
Contributor

@fuzhongl I have enabled intel virtualization in BIOS, it couldn't be a problem, could it?

@ashwanth-07 You are right, VMx and VTd should be enabled in BIOS.

@ashwanth-07
Copy link
Author

@fuzhongl ,thanks for responding...I only have a VT-X setting in my bios. I dont have a VMx or a VTd, could you please help
bios

@fuzhongl
Copy link
Contributor

@ashwanth-07 Could you please help to share following info?

cat /sys/devices/system/cpu/offline
cat /sys/devices/system/cpu/possible

Thanks!

@fuzhongl
Copy link
Contributor

Close it since the issue can't be reproduced on my side; and no feedback long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants