mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-03 22:17:35 +00:00
SEV: Update ReducedPhysBits
Updating this field, as `cpuid` provides host level data, which is not what a guest would expect for Reduced Phsycial Bits. In almost all cases, we should be using `1` for the value here. Amend: Adding unit test change. Fixes: #5006 Signed-off-by: Larry Dewey <larry.dewey@amd.com>
This commit is contained in:
parent
bd1e8a2a24
commit
67b8f0773f
@ -290,7 +290,7 @@ func (q *qemuAmd64) appendProtectionDevice(devices []govmmQemu.Device, firmware,
|
|||||||
Debug: false,
|
Debug: false,
|
||||||
File: firmware,
|
File: firmware,
|
||||||
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
||||||
ReducedPhysBits: cpuid.AMDMemEncrypt.PhysAddrReduction,
|
ReducedPhysBits: 1,
|
||||||
}), "", nil
|
}), "", nil
|
||||||
case snpProtection:
|
case snpProtection:
|
||||||
return append(devices,
|
return append(devices,
|
||||||
|
@ -286,7 +286,7 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
Debug: false,
|
Debug: false,
|
||||||
File: firmware,
|
File: firmware,
|
||||||
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
||||||
ReducedPhysBits: cpuid.AMDMemEncrypt.PhysAddrReduction,
|
ReducedPhysBits: 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user