virtio: avoid implicit use of Linux page size in balloon interface
Make the balloon interface always use 4K pages, and convert Linux pfns if necessary. This patch assumes that Linux's PAGE_SHIFT will never be less than 12. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
This commit is contained in:
committed by
Rusty Russell
parent
87c7d57c17
commit
1b4aa2faec
@@ -10,6 +10,9 @@
|
||||
/* The feature bitmap for virtio balloon */
|
||||
#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
|
||||
|
||||
/* Size of a PFN in the balloon interface. */
|
||||
#define VIRTIO_BALLOON_PFN_SHIFT 12
|
||||
|
||||
struct virtio_balloon_config
|
||||
{
|
||||
/* Number of pages host wants Guest to give up. */
|
||||
|
Reference in New Issue
Block a user