From owner-freebsd-current@freebsd.org Thu Nov 15 20:08:31 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3D521108195 for ; Thu, 15 Nov 2018 20:08:31 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 537D17BE77 for ; Thu, 15 Nov 2018 20:08:31 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 44BB8D78E; Thu, 15 Nov 2018 20:08:31 +0000 (UTC) From: Jan Beich To: freebsd-current@freebsd.org Subject: Re: [regression] drm-stable-kmod doesn't work in i386 jail on amd64 host References: Date: Thu, 15 Nov 2018 21:08:27 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 537D17BE77 X-Spamd-Result: default: False [-106.84 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-3.74)[ip: (-9.75), ipnet: 2610:1c1:1::/48(-4.93), asn: 11403(-3.91), country: US(-0.10)]; MX_GOOD(-0.01)[cached: mx66.freebsd.org]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2018 20:08:32 -0000 Jan Beich writes: > I often test Firefox on 10.4 i386 and sometimes play games via Wine. > Both require working OpenGL for COMPAT_FREEBSD32. My GPU is Skylake > which worked fine a few weegs ago i.e., before r338990. > > Any clue? I've opened https://github.com/FreeBSDDesktop/kms-drm/issues/99 but so far no response. Would a sample would help? $ cc -o test test.c $ cc -m32 -o test32 test.c $ pciconf -l | fgrep 0:0:2:0 vgapci1@pci0:0:2:0: class=0x030000 card=0x79681462 chip=0x19128086 rev=0x06 hdr=0x00 $ /poudriere/jails/112i386/usr/sbin/pciconf -l pciconf: ioctl(PCIOCGETCONF): Operation not permitted $ ./test 0 0 2 0 vendor=0x8086, device=0x1912, subvendor=0x1462, subdevice=0x7968, revid=0x6 $ ./test32 0 0 2 0 test32: PCIOCGETCONF failed: Operation not permitted $ sudo ./test32 0 0 2 0 test32: PCIOCGETCONF failed: Operation not permitted $ cat test.c #include #include #include #include #include #include #include #include int main(int argc, char **argv) { /* Based on drmParsePciDeviceInfo() from graphics/libdrm/files/patch-xf86drm.c */ struct pci_conf_io pc; struct pci_match_conf patterns[1]; struct pci_conf results[1]; if (argc < 5) { printf("usage: %s \n", argv[0]); return 1; } int fd = open("/dev/pci", O_RDONLY, 0); if (fd < 0) err(1, "open(/dev/pci) failed"); bzero(&patterns, sizeof(patterns)); patterns[0].pc_sel.pc_domain = atoi(argv[1]); patterns[0].pc_sel.pc_bus = atoi(argv[2]); patterns[0].pc_sel.pc_dev = atoi(argv[3]); patterns[0].pc_sel.pc_func = atoi(argv[4]); patterns[0].flags = PCI_GETCONF_MATCH_DOMAIN | PCI_GETCONF_MATCH_BUS | PCI_GETCONF_MATCH_DEV | PCI_GETCONF_MATCH_FUNC; bzero(&pc, sizeof(struct pci_conf_io)); pc.num_patterns = 1; pc.pat_buf_len = sizeof(patterns); pc.patterns = patterns; pc.match_buf_len = sizeof(results); pc.matches = results; if (ioctl(fd, PCIOCGETCONF, &pc) || pc.status == PCI_GETCONF_ERROR) { close(fd); err(1, "PCIOCGETCONF failed"); } close(fd); printf("vendor=%#x, device=%#x, subvendor=%#x, subdevice=%#x, revid=%#x\n", results[0].pc_vendor, results[0].pc_device, results[0].pc_subvendor, results[0].pc_subdevice, results[0].pc_revid); return 0; }