Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Aug 2020 17:00:03 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Ottavio Caruso <ottavio2006-usenet2012@yahoo.com>, freebsd-hackers@freebsd.org
Subject:   Re: [xpost,repost] VGA false positive in dmesg?
Message-ID:  <a2a4cd6a-1889-86f1-49e4-4be1fb0bb7fa@grosbein.net>
In-Reply-To: <rgb51b$10i4$1@ciao.gmane.io>
References:  <rgb51b$10i4$1@ciao.gmane.io>

next in thread | previous in thread | raw e-mail | index | archive | help
04.08.2020 15:08, Ottavio Caruso via freebsd-hackers wrote:
> Hi,
> 
> [originally mailed to freebsd-questions, but I didn't get any feedback over there]
> 
> I've launched a FreeBSD 12.1 instance in qemu (pay attention to "-vga
> none"). Host is Linux:
> 
> qemu-system-x86_64 \
> -drive if=virtio,file=/home/oc/VM/img/freebsd.image,index=0,media=disk \
> -M q35,accel=kvm -m 250M -cpu host -smp $(nproc) \
> -nic user,hostfwd=tcp:127.0.0.1:5554-:22,model=virtio-net-pci \
> -daemonize -display none -vga none \
> -serial mon:telnet:127.0.0.1:6664,server,nowait \
> 
> In the guest:
> 
> oc@FreeBSD:~ % pciconf -vl
> hostb0@pci0:0:0:0:      class=0x060000 card=0x11001af4 chip=0x29c08086
> rev=0x00 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = '82G33/G31/P35/P31 Express DRAM Controller'
>     class      = bridge
>     subclass   = HOST-PCI
> virtio_pci0@pci0:0:1:0: class=0x020000 card=0x00011af4 chip=0x10001af4
> rev=0x00 hdr=0x00
>     vendor     = 'Red Hat, Inc.'
>     device     = 'Virtio network device'
>     class      = network
>     subclass   = ethernet
> virtio_pci1@pci0:0:2:0: class=0x010000 card=0x00021af4 chip=0x10011af4
> rev=0x00 hdr=0x00
>     vendor     = 'Red Hat, Inc.'
>     device     = 'Virtio block device'
>     class      = mass storage
>     subclass   = SCSI
> virtio_pci2@pci0:0:3:0: class=0x010000 card=0x00021af4 chip=0x10011af4
> rev=0x00 hdr=0x00
>     vendor     = 'Red Hat, Inc.'
>     device     = 'Virtio block device'
>     class      = mass storage
>     subclass   = SCSI
> isab0@pci0:0:31:0:      class=0x060100 card=0x11001af4 chip=0x29188086
> rev=0x02 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = '82801IB (ICH9) LPC Interface Controller'
>     class      = bridge
>     subclass   = PCI-ISA
> ahci0@pci0:0:31:2:      class=0x010601 card=0x11001af4 chip=0x29228086
> rev=0x02 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = '82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller
> [AHCI mode]'
>     class      = mass storage
>     subclass   = SATA
> none0@pci0:0:31:3:      class=0x0c0500 card=0x11001af4 chip=0x29308086
> rev=0x02 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = '82801I (ICH9 Family) SMBus Controller'
>     class      = serial bus
>     subclass   = SMBus
> 
> However, in dmesg:
> 
> oc@FreeBSD:~ % dmesg | grep -i vga
> VT(vga): text 80x25
> vtvga0: <VT VGA driver> on motherboard
> vga0: <Generic ISA VGA> at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff
> pnpid PNP0900 on isa0
> 
> I don't know how to interpret this output.

pciconf deals with PCI/PCI-E only but your guest detects ISA VGA device.
Compare with real VGA hardware:

VT(vga): resolution 640x480
vtvga0: <VT VGA driver> on motherboard
vgapci0: <VGA-compatible display> port 0xb000-0xb0ff mem 0xd0000000-0xdfffffff,0xfc3f0000-0xfc3fffff,0xfc200000-0xfc2fffff irq 18 at device 5.0 on pci1
vgapci0: Boot video device


> I don't think it's a qemu issue, because I've done the same with NetBSD and OpenBSD guests and
> there's no trace of vga in their dmesg.

Maybe your guest has hw.vga.acpi_ignore_no_vga=1 in the kernel environment
or some other non-default "hw.vga" knobs, check it out with kenv(1).

You can also try adding to /boot/loader.conf:

hint.vtvga.0.disabled=1

As for NetBSD/OpenBSD, they could drop ISA PNP VGA support or qemu settings differ for them.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a2a4cd6a-1889-86f1-49e4-4be1fb0bb7fa>