From 2314c58840b6c957d7c1e4ea050688ddeb19416b Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Fri, 29 Mar 2013 07:36:11 -0700 Subject: [PATCH] --- yaml --- r: 363169 b: refs/heads/master c: 647965a268fd876781dd9899185482682bf42f6a h: refs/heads/master i: 363167: 0a24984b0ba04febc6fc2181417bbc6ae275b6b1 v: v3 --- [refs] | 2 +- trunk/drivers/hv/hv_balloon.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a1c1da01230f..06063ebcdc3e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 39d791649781f6bb6937a217764a928b660375e2 +refs/heads/master: 647965a268fd876781dd9899185482682bf42f6a diff --git a/trunk/drivers/hv/hv_balloon.c b/trunk/drivers/hv/hv_balloon.c index d5225261ee54..2250bf532bb0 100644 --- a/trunk/drivers/hv/hv_balloon.c +++ b/trunk/drivers/hv/hv_balloon.c @@ -117,7 +117,14 @@ union dm_caps { struct { __u64 balloon:1; __u64 hot_add:1; - __u64 reservedz:62; + /* + * To support guests that may have alignment + * limitations on hot-add, the guest can specify + * its alignment requirements; a value of n + * represents an alignment of 2^n in mega bytes. + */ + __u64 hot_add_alignment:4; + __u64 reservedz:58; } cap_bits; __u64 caps; } __packed; @@ -774,7 +781,7 @@ static unsigned long process_hot_add(unsigned long pg_start, * If the host has specified a hot-add range; deal with it first. */ - if ((rg_size != 0) && (!dm_device.host_specified_ha_region)) { + if (rg_size != 0) { ha_region = kzalloc(sizeof(struct hv_hotadd_state), GFP_KERNEL); if (!ha_region) return 0; @@ -1366,6 +1373,12 @@ static int balloon_probe(struct hv_device *dev, cap_msg.caps.cap_bits.balloon = 1; cap_msg.caps.cap_bits.hot_add = 1; + /* + * Specify our alignment requirements as it relates + * memory hot-add. Specify 128MB alignment. + */ + cap_msg.caps.cap_bits.hot_add_alignment = 7; + /* * Currently the host does not use these * values and we set them to what is done in the