View Issue Details

IDProjectCategoryView StatusLast Update
0015725CentOS-7xorg-x11-serverpublic2019-04-16 09:58
Status newResolutionopen 
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0015725: Statx will have segment fault with hyper-V environment
DescriptionDescription of problem:
It will have segmant fault when startx on Redhat7.6 virtual machine with running on Hyper-V hypervisor

It is because the tip Xorg 1.20.1 changes the logic to get the busid from :
buf = drmGetBusid(fd);
xf86_platform_odev_attributes(delayed_index)->busid = XNFstrdup(buf);
to follow:
  if (!strncmp(attribs->syspath, pci_prefix, strlen(pci_prefix))) {
   char *dbdf = attribs->syspath + strlen(pci_prefix) + strlen("XXXX:XX") + 1;
                 "pci:%.12s", dbdf);
   LogMessage(X_INFO, "Platform PCI device at %s\n",
, as the pci_prefix is "/sys/devices/pci", but on the hyper-V platform, the pci_hyperv driver will create devices under the directory:
so the strncmp function will return fail, then the busid of will be NULL. And then it will have segmant fault in xf86platformProbe.

I passthrough 1 amd graphic device to the Virtual machine, and load the graphic driver amdgpu. And then I run "init 3" and startx. The issue's root cause is because the tip
Xorg assume the pci device's directory is "/sys/devices/pci", but on the hyper-V platform, the pci device's directory is similar to "/sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/VMBUS:00/74f89322-92bd-400f-a8bb-008a102a3e4d/pci".
   You could check the function "get_drm_info" in hw/xfree86/os-support/linux/lnx-platform.c.
TagsNo tags attached.


Issue History

Date Modified Username Field Change
2019-01-21 08:41 jqdeng New Issue
2019-04-16 09:58 hbuxiaofei Note Added: 0034192