Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
virt: Increase DIMM alignment to support huge pages
Browse files Browse the repository at this point in the history
The DIMM needs to be aligned to the size of the pages that are being
used by the VMM. Increase it to 2 MiB so that it can be used with
huge pages.

Fixes: kata-containers/runtime#1698

Signed-off-by: Rob Bradford <[email protected]>
  • Loading branch information
rbradford committed May 17, 2019
1 parent 02dd00a commit 4bcc167
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/i386/virt/virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@ static void virt_dimm_pre_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(hotplug_dev);
const uint64_t legacy_align = TARGET_PAGE_SIZE;
// Align DIMM to 2MiB to accomodate huge pages
const uint64_t legacy_align = 0x200000;
const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
Error *local_err = NULL;

Expand Down

0 comments on commit 4bcc167

Please sign in to comment.