]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-balloon: Disable free page reporting if page poison reporting is not enabled
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Fri, 8 May 2020 17:40:06 +0000 (10:40 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Jun 2020 19:36:51 +0000 (15:36 -0400)
commit6c17dd8ff8cb95235c5ec43d909442363a8d62b1
tree10ffd40e36d2b5d5a86c6fea6accbe0b64931ccb
parent15fd831ccfbbfe9cd70f602f3439731c0b671b7f
virtio-balloon: Disable free page reporting if page poison reporting is not enabled

We should disable free page reporting if page poisoning is enabled but we
cannot report it via the balloon interface. This way we can avoid the
possibility of corrupting guest memory. Normally the page poisoning feature
should always be present when free page reporting is enabled on the
hypervisor, however this allows us to correctly handle a case of the
virtio-balloon device being possibly misconfigured.

Fixes: 5d757c8d518d ("virtio-balloon: add support for providing free page reports to host")
Cc: stable@vger.kernel.org
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Link: https://lore.kernel.org/r/20200508173732.17877.85060.stgit@localhost.localdomain
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_balloon.c