mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01: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:
@@ -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,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user