virtio: move functionality out of assert expression

having functionality inside the assert expression is dangerous
because someone could be tempted to use the NDEBUG macro, and
the assert expression would disappear from the generated code.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>