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

[ICX-D] Segmentation fault when passthrough TSN to post_launched VM with enable_ptm option #7045

Closed
mgcao opened this issue Jan 19, 2022 · 1 comment
Labels
status: new The issue status: new for creation

Comments

@mgcao
Copy link
Contributor

mgcao commented Jan 19, 2022

[root@ICX-D-HCC-01 gos_images]# ./POST_RT_VM1.sh
cpu8 online=1
cpu9 online=1
acrn-br0 bridge aleady exists, adding new tap device to it...
logger: name=console, level=4
logger: name=kmsg, level=3
logger: name=disk, level=5
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: POST_RT_VM1
vm_setup_memory: size=0x40000000
open hugetlbfs file /run/hugepage/acrn/huge_lv1/POST_RT_VM1
open hugetlbfs file /run/hugepage/acrn/huge_lv2/POST_RT_VM1
level 0 free/need pages:0/1 page size:0x200000
level 1 free/need pages:13/1 page size:0x40000000
to reserve more free pages:
to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
now enough free pages are reserved!

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0
total_size 0x140000000

mmap ptr 0x0x7f07b7cb4000 -> baseaddr 0x0x7f07c0000000
mmap 0x40000000@0x7f07c0000000
touch 1 pages with pagesz 0x40000000
mmap 0x200000@0x7f08bfe00000
touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0
vm_init_vdevs
No pm notify channel given
Listening 0...
polling 0...
pci init passthru
: opt=enable_ptm.
./POST_RT_VM1.sh: line 35: 3935 Segmentation fault (core dumped) acrn-dm -A -m $mem_size -s 0:0,hostbridge --mac_seed $mac_seed --virtio_poll 1000000 --lapic_pt $logger_setting -s 4,passthru,16/00/0,enable_ptm -s 6,virtio-blk,/home/gos_images/rtvm1.img -s 7,virtio-net,tap_RT1 -s 8,virtio-console,@stdio:stdio_port --ovmf /usr/share/acrn/bios/OVMF.fd --cpu_affinity 8,9 $vm_name

@mgcao mgcao added the status: new The issue status: new for creation label Jan 19, 2022
@mgcao
Copy link
Contributor Author

mgcao commented Jan 19, 2022

[External_System_ID] ACRN-7582

mgcao added a commit to mgcao/acrn-hypervisor that referenced this issue Jan 28, 2022
fix bug: if PTM-CAP device, like TSN in multi-hostbridge could cause
acrn-dm crash.

original PTM PCI code has not handled multi-hostbridge case, and just
handled hostbridge (00:00.0) case.

this patch calls PCI access API to handle PTM-CAP device/bridge
(root port) structure, to avoid scan PCI hierarchical.

Tracked-On: projectacrn#7045
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
acrnsi-robot pushed a commit that referenced this issue Jan 28, 2022
fix bug: if PTM-CAP device, like TSN in multi-hostbridge could cause
acrn-dm crash.

original PTM PCI code has not handled multi-hostbridge case, and just
handled hostbridge (00:00.0) case.

this patch calls PCI access API to handle PTM-CAP device/bridge
(root port) structure, to avoid scan PCI hierarchical.

Tracked-On: #7045
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
@fuzhongl fuzhongl closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: new The issue status: new for creation
Projects
None yet
Development

No branches or pull requests

2 participants