Skip to content

Align value generated by get_ram_size() to the host's page size

Fuad Tabba kvm 2 versions Applied

Status from this message: Applied to kvmtool (master), thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyApplied
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Factor out code for getting _SC_PHYS_PAGES into a function (Will)
- Apply the scaling down of the ramsize to the number of pages (Will)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3Factor out getting the host page sizebuiltin-run.c+13 -70 replies
2/3Factor out getting the number of physical memory host pagesbuiltin-run.c+10 -40 replies
3/3Apply scaling down the calculated guest ram size to the number of pagesbuiltin-run.c+6 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH kvmtool v2 0/3] Align value generated by get_ram_size() to the host's page size

Hi,

This patch series ensures that the value returned by get_ram_size() is aligned to the host's page size. Without that, KVM_SET_USER_MEMORY_REGION could fail when passed an unaligned value.

Changes from V1:
- Factor out code for getting _SC_PHYS_PAGES into a function (Will)
- Apply the scaling down of the ramsize to the number of pages (Will)

Cheers,
/fuad

Fixes 18bd8c3bd2a7 ("kvm tools: Don't use all of host RAM for guests by default")

Fuad Tabba (3):
Factor out getting the host page size
Factor out getting the number of physical memory host pages Apply scaling down the calculated guest ram size to the number of
pages

 builtin-run.c | 44 +++++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 17 deletions(-)

base-commit: bd4ba57156dad39349edfb2338bdc2f4ed3c0bae

Signature · 1 line
2.41.0.255.g8b1d071c50-goog