Skip to content

Commit 96c45e3

Browse files
committed
Merge pull request xapi-project#23 from simonjbeaumont/cp-6238
Fix computation of shadow_memkb for HVM domains without HAP
2 parents 4884ffb + 120ab57 commit 96c45e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xl/xenops_server_xenlight.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,6 @@ module VM = struct
19311931
let avail_vcpus = Array.init max_vcpus (fun i -> i < vm.vcpus) in
19321932
let max_memkb = vm.memory_static_max /// 1024L in
19331933
let target_memkb =
1934-
let open Memory in
19351934
let target_plus_overhead_bytes = bytes_of_kib target_plus_overhead_kib in
19361935
let target_bytes = target_plus_overhead_bytes --- overhead_bytes in
19371936
let target_bytes = min vm.memory_dynamic_max target_bytes in
@@ -1941,7 +1940,9 @@ module VM = struct
19411940
match vm.ty with
19421941
| HVM hvm_info ->
19431942
Int64.mul (Int64.of_int hvm_info.video_mib) 1024L,
1944-
Memory.HVM.shadow_mib (max_memkb /// 1025L) max_vcpus hvm_info.shadow_multiplier
1943+
Int64.mul
1944+
(Memory.HVM.shadow_mib (max_memkb /// 1024L) max_vcpus hvm_info.shadow_multiplier)
1945+
1024L
19451946
| PV _ -> 0L, 0L
19461947
in
19471948
let b_info =

0 commit comments

Comments
 (0)