Fix issue with the virtio descriptor region being truncated

if it was above 4GB. This was seen with CentOS 6.5 guests with
large RAM, since the block drivers are loaded late in the
boot sequence and end up allocating descriptor memory from
high addresses.

Reported by:	Michael Dexter
MFC after:	3 days
This commit is contained in:
Peter Grehan 2014-01-09 07:17:21 +00:00
parent add611fd4c
commit d68f0bd618
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260469

View File

@ -160,7 +160,7 @@ vi_vq_init(struct virtio_softc *vs, uint32_t pfn)
vq = &vs->vs_queues[vs->vs_curq];
vq->vq_pfn = pfn;
phys = pfn << VRING_PFN;
phys = (uint64_t)pfn << VRING_PFN;
size = vring_size(vq->vq_qsize);
base = paddr_guest2host(vs->vs_pi->pi_vmctx, phys, size);