hyperv/vmbus: Assert that the bufring address is page aligned.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7962
This commit is contained in:
Sepherosa Ziehau 2016-09-21 06:43:52 +00:00
parent 7a7e4e4449
commit d1c1d97e6a

View File

@ -250,6 +250,8 @@ vmbus_chan_open_br(struct vmbus_channel *chan, const struct vmbus_chan_br *cbr,
("send bufring size is not multiple page"));
KASSERT((rxbr_size & PAGE_MASK) == 0,
("recv bufring size is not multiple page"));
KASSERT((cbr->cbr_paddr & PAGE_MASK) == 0,
("bufring is not page aligned"));
/*
* Zero out the TX/RX bufrings, in case that they were used before.