Skip to content

Commit

Permalink
Merge pull request autotest#5753 from liang-cong-red-hat/virtio-mem_c…
Browse files Browse the repository at this point in the history
…hange_request_aarch64-4k_adaption

Add adaption for aarch64 4k kernel
  • Loading branch information
dzhengfy authored Jul 3, 2024
2 parents 890c1bb + fb25e6f commit ea45e51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
type = change_virtio_mem_request_size
no s390-virtio
start_vm = yes
kernel_extra_params_add = "memhp_default_state=online_movable"
kernel_extra_params_remove = "memhp_default_state"
mem_model = "virtio-mem"
allocate_huge_pages = "4194304KiB"
target_size = 1048576
block_size = 2048
request_size = 524288
requested_unit = "KiB"
basic_request = "${request_size}${requested_unit}"
Expand Down Expand Up @@ -35,6 +32,8 @@
no file hugepages memfd
mem_basic = {'mem_model': '${mem_model}', 'target': {'requested_unit': '${requested_unit}', 'size': %s, 'node': ${basic_node}, 'size_unit': 'KiB', 'requested_size': %s, 'block_unit': 'KiB', 'block_size': %s}}
- running_guest:
kernel_extra_params_add = "memhp_default_state=online_movable"
kernel_extra_params_remove = "memhp_default_state"
attach_node = 1
attached_device = "--node ${attach_node}"
basic_device_alias = "--alias virtiomem0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def run_test_shutoff_guest():
test.log.info("TEST_STEP3: Check the virtio-mem memory device config")
converted_req = int(memory_base.convert_data_size(update_request_size, requested_unit))
check_list = [(target_size, 'size'), (converted_req, 'requested_size'),
(basic_node, 'node'), (block_size, 'block_size')]
(basic_node, 'node'), (params.get('default_pagesize'), 'block_size')]
for items in check_list:
check_various_size(test, vm_name, items[0], check_item=items[1])

Expand Down Expand Up @@ -349,13 +349,11 @@ def teardown_test():
vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(vm_name)
bkxml = vmxml.copy()
vm = env.get_vm(vm_name)
memory_base.adjust_memory_size(params)

allocate_huge_pages = re.findall(r'\d+', params.get("allocate_huge_pages"))[0]
guest_state = params.get("guest_state")
basic_node = params.get("basic_node")
target_size = int(params.get("target_size"))
block_size = params.get("block_size")
mem_basic = params.get("mem_basic", "{}")
mem_attach = params.get("mem_attach", "{}")
attached_device = params.get("attached_device")
Expand Down

0 comments on commit ea45e51

Please sign in to comment.