--- nono/vm/virtio_entropy.cpp 2026/04/29 17:05:32 1.1.1.2 +++ nono/vm/virtio_entropy.cpp 2026/04/29 17:05:42 1.1.1.3 @@ -56,13 +56,10 @@ VirtIOEntropyDevice::MonitorUpdate(Monit void VirtIOEntropyDevice::ProcessDesc(VirtIOReq& req) { - uint32 data = 0; + std::vector buf(roundup(req.wlen, 4)); - while (req.pos < req.len) { - if ((req.pos & 3) == 0) { - data = rnd(); - } - ReqWriteU8(req, data & 0xff); - data >>= 8; + for (auto&& d : buf) { + d = rnd(); } + ReqWriteRegion(req, (const uint8 *)buf.data(), req.wlen); }