]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-balloon: Document byte ordering of poison_val
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Mon, 13 Jul 2020 20:35:39 +0000 (13:35 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 29 Jul 2020 17:24:30 +0000 (13:24 -0400)
commitdbab07eb4c4059c9c622279fc776e1325e3fc8c2
tree2469061f064294545ce00a75a9d6c8090c2e10ee
parent64d25a748034cfc41b8446eb2b6482bd7d34361a
virtio-balloon: Document byte ordering of poison_val

The poison_val field in the virtio_balloon_config is treated as a
little-endian field by the host. Since we are currently only having to deal
with a single byte poison value this isn't a problem, however if the value
should ever expand it would cause byte ordering issues. Document that in
the code so that we know that if the value should ever expand we need to
byte swap the value on big-endian architectures.

Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Link: https://lore.kernel.org/r/20200713203539.17140.71425.stgit@localhost.localdomain
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
drivers/virtio/virtio_balloon.c