View Issue Details

IDProjectCategoryView StatusLast Update
0015725CentOS-7xorg-x11-serverpublic2019-04-16 09:58
Reporterjqdeng 
PriorityurgentSeveritycrashReproducibilityalways
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);
drmFreeBusid(buf);
to follow:
  if (!strncmp(attribs->syspath, pci_prefix, strlen(pci_prefix))) {
   char *dbdf = attribs->syspath + strlen(pci_prefix) + strlen("XXXX:XX") + 1;
   asprintf(&xf86_platform_odev_attributes(delayed_index)->busid,
                 "pci:%.12s", dbdf);
   LogMessage(X_INFO, "Platform PCI device at %s\n",
   xf86_platform_odev_attributes(delayed_index)->busid);
   }
, as the pci_prefix is "/sys/devices/pci", but on the hyper-V platform, the pci_hyperv driver will create devices under the directory:
/sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/VMBUS:00/74f89322-92bd-400f-a8bb-008a102a3e4d/pcia8bb:00/a8bb:00:00.0/drm/card0,
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.
abrt_hash
URL

Activities

Issue History

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