Page MenuHomeFreeBSD

bhyve: snapshot virtio queues can fail
ClosedPublic

Authored by gusev.vitaliy_gmail.com on Sep 1 2020, 11:23 AM.
Tags
Referenced Files
Unknown Object (File)
Sat, Apr 6, 9:39 AM
Unknown Object (File)
Feb 10 2024, 9:29 AM
Unknown Object (File)
Feb 8 2024, 11:51 AM
Unknown Object (File)
Jan 19 2024, 10:18 AM
Unknown Object (File)
Dec 22 2023, 10:53 PM
Unknown Object (File)
Dec 11 2023, 12:00 AM
Unknown Object (File)
Nov 30 2023, 1:40 AM
Unknown Object (File)
Nov 23 2023, 5:16 PM

Details

Summary

If virtio device is not fully initialized, then suspend fails with:

    
vi_pci_snapshot_queues: invalid address: vq->vq_desc
Failed to snapshot virtio-rnd; ret=14
Test Plan

Suspend and resume VM. VM should suspend w/o error and keep working after resume.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Is the issue specific to virtio-rnd, or why does it appear? I'm wondering why it was not caught earlier.

Is the issue specific to virtio-rnd, or why does it appear? I'm wondering why it was not caught earlier.

I saw the same message also for virtio-net:

vi_pci_snapshot_queues: invalid address: vq->vq_desc
Failed to snapshot virtio-net; ret=14

To reproduce virtio-net fail, you need to suspend VM before vi_vq_init() is called, i.e. before even grub is started. To reproduce for virtio-rnd, you need run suspend exactly after grub and before guest Linux OS initialise virtio random device.

By the code you can see that this patch is required if device is not initialised by guest OS.

Another wording might be: "Only snapshot initialized VirtIO queues."?

This revision is now accepted and ready to land.Nov 28 2020, 4:33 AM
In D26268#612118, @jhb wrote:

Another wording might be: "Only snapshot initialized VirtIO queues."?

Yes, sure.

Should this be committed?

I think yes. Of course if @jhb doesn't mind.

Should this be committed?

I think yes. Can you do it?
Just a side note. Vitaliy is my colleague, and we have been thoroughly testing his patches for several months in our test lab (vstack.com or Serverspace).
We think that these patches are quite stable, and in the near future we are thinking of releasing them into production.

It would be nice if these patches goes to the upstream.

Should this be committed?

I think yes. Can you do it?
Just a side note. Vitaliy is my colleague, and we have been thoroughly testing his patches for several months in our test lab (vstack.com or Serverspace).
We think that these patches are quite stable, and in the near future we are thinking of releasing them into production.

It would be nice if these patches goes to the upstream.

Ok, I'll commit with the subject line proposed by John.

This revision now requires review to proceed.Dec 16 2021, 6:24 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 17 2021, 6:12 PM
This revision was automatically updated to reflect the committed changes.