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

virtio: cloud-hypervisor report warnings in virtio-code #1160

Closed
wkozaczuk opened this issue Jul 1, 2021 · 1 comment
Closed

virtio: cloud-hypervisor report warnings in virtio-code #1160

wkozaczuk opened this issue Jul 1, 2021 · 1 comment

Comments

@wkozaczuk
Copy link
Collaborator

The commit 4fa1483 made it possible to run OSv on Intel's cloud hypervisor. However when we run we get a number of warnings and some of them would be nice to fix.

Here is a full terminal output when running OSv:

/cloud-hypervisor-static-0.15.0 --console off --serial tty \
 --kernel ./build/release/kernel-stripped.elf \
 --disk path=./build/release/usr.raw \
 --cpus boot=1 --memory size=128M --rng \
  --cmdline='--verbose --ip=eth0,172.16.0.2,255.255.255.252 --defaultgw=172.16.0.1 --nameserver=172.16.0.1 /go.so /httpserver.so' --net "tap=fc_tap0,mac=,ip=172.16.0.1,mask=255.255.255.252"
OSv v0.55.0-282-ga669c61a
cloud-hypervisor: 19.881835ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0x21
cloud-hypervisor: 19.952633ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0xa1
1 CPUs detected
Firmware vendor: Unknown
bsd: initializing - done
VFS: mounting ramfs at /
VFS: mounting devfs at /dev
net: initializing - done
cloud-hypervisor: 34.100384ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
cloud-hypervisor: 34.24164ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
cloud-hypervisor: 34.374407ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
eth0: ethernet address: 2e:65:d1:f2:b8:af
cloud-hypervisor: 37.534086ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
virtio-blk: Add blk device instances 0 as vblk0, devsize=12130816
cloud-hypervisor: 51.838975ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
random: virtio-rng registered as a source.
random: intel drng, rdrand registered as a source.
random: <Software, Yarrow> initialized
VFS: unmounting /dev
VFS: mounting rofs at /rofs
VFS: mounting devfs at /dev
VFS: mounting procfs at /proc
VFS: mounting sysfs at /sys
VFS: mounting ramfs at /tmp
eth0: 172.16.0.2
cloud-hypervisor: 56.920199ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0x3f0
Booted up in 39.26 ms
Cmdline: /go.so /httpserver.so
random: blocking on read.
random: device unblocked.
Go version: go1.15.8, listening on port 8000 ...

Here are some comments I got from developers on cloud-hypervisor Slack channel:

The warning about guest PIO mean the guest fw/kernel is trying to access these PIO addresses, but CH does not have any device registered there.
And the warnings about virtio, they mean the virtio implementation on OSv differs slightly from the implementation on Linux, meaning we might need to fix something on CH if the spec allows such accesses

0x3f0 is floppy. https://wiki.osdev.org/Floppy_Disk_Controller

https://wiki.osdev.org/I/O_Ports
The error about invalid word read is because OSv is trying to access a the feature select field with a strange offset 0x1 ? but also the field it a u32 so needs dword access not word access

It would be nice to verify and fix any potential. It could that only the last one about offset 0x1 needs some fixing. But putting all information here for completeness.

@wkozaczuk
Copy link
Collaborator Author

The virtio related warning was actually caused by a silly bug fixed by this commit. The other type of warning about GPIO does not seem like something we can/should address on the OSv side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant