Skip to content

Commit

Permalink
Add VirtIO Viomem Driver support
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Mar 19, 2024
1 parent bf594f3 commit b378fec
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
11 changes: 11 additions & 0 deletions lib/engines/hcktest/drivers/viomem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "VirtIO Viomem Driver",
"device": "virtio-mem-pci",
"inf": "viomem.inf",
"install_method": "PNP",
"type": 0,
"support": false,
"reject_test_names": [
"Hardware-enforced Stack Protection Compatibility Test"
]
}
7 changes: 7 additions & 0 deletions lib/setupmanagers/qemuhck/devices/virtio-mem-pci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "virtio-mem-pci",
"command_line": [
"-object memory-backend-ram,id=mem_backend,size=2G",
"-device virtio-mem-pci@device_extra_param@,memdev=mem_backend,requested-size=1G,bus=@[email protected]"
]
}
3 changes: 2 additions & 1 deletion lib/setupmanagers/qemuhck/qemu_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def full_replacement_list
'@client_id@' => @client_id,
'@workspace@' => @workspace_path,
'@memory@' => "#{option_config('memory_gb')}G",
'@double_memory@' => "#{2 * option_config('memory_gb')}G",
'@cpu@' => option_config('cpu'),
'@cpu_count@' => option_config('cpu_count'),
'@cpu_model@' => option_config('cpu_model'),
Expand Down Expand Up @@ -486,7 +487,7 @@ def process_devices
def base_cmd
[
'@qemu_bin@ -enable-kvm -machine @machine_name@@machine_extra_param@ ',
'-m @memory@ -smp @cpu_count@,cores=@cpu_count@ ',
'-m @memory@,maxmem=@double_memory@ -smp @cpu_count@,cores=@cpu_count@ ',
'-cpu @cpu_options@ -boot order=cd,menu=on ',
'-nodefaults -no-user-config -usb -device usb-tablet -vnc :@vnc_id@ ',
'-global kvm-pit.lost_tick_policy=discard -rtc base=localtime,clock=host,driftfix=slew ',
Expand Down

0 comments on commit b378fec

Please sign in to comment.