mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-29 12:54:10 +00:00
Fix bad merge
This commit is contained in:
parent
25aa03aefe
commit
241a5a490f
@ -310,16 +310,6 @@ func (q *qemuAmd64) appendProtectionDevice(devices []govmmQemu.Device, firmware,
|
|||||||
File: firmware,
|
File: firmware,
|
||||||
FirmwareVolume: firmwareVolume,
|
FirmwareVolume: firmwareVolume,
|
||||||
}), "", nil
|
}), "", nil
|
||||||
case sevProtection:
|
|
||||||
return append(devices,
|
|
||||||
govmmQemu.Object{
|
|
||||||
Type: govmmQemu.SEVGuest,
|
|
||||||
ID: "sev",
|
|
||||||
Debug: false,
|
|
||||||
File: firmware,
|
|
||||||
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
|
||||||
ReducedPhysBits: 1,
|
|
||||||
}), "", nil
|
|
||||||
case snpProtection:
|
case snpProtection:
|
||||||
return append(devices,
|
return append(devices,
|
||||||
govmmQemu.Object{
|
govmmQemu.Object{
|
||||||
|
@ -272,26 +272,6 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
|||||||
assert.Error(err)
|
assert.Error(err)
|
||||||
assert.Empty(bios)
|
assert.Empty(bios)
|
||||||
|
|
||||||
// sev protection
|
|
||||||
amd64.(*qemuAmd64).protection = sevProtection
|
|
||||||
|
|
||||||
devices, bios, err = amd64.appendProtectionDevice(devices, firmware, "")
|
|
||||||
assert.NoError(err)
|
|
||||||
assert.Empty(bios)
|
|
||||||
|
|
||||||
expectedOut := []govmmQemu.Device{
|
|
||||||
govmmQemu.Object{
|
|
||||||
Type: govmmQemu.SEVGuest,
|
|
||||||
ID: "sev",
|
|
||||||
Debug: false,
|
|
||||||
File: firmware,
|
|
||||||
CBitPos: cpuid.AMDMemEncrypt.CBitPosition,
|
|
||||||
ReducedPhysBits: 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
assert.Equal(expectedOut, devices)
|
|
||||||
|
|
||||||
// snp protection
|
// snp protection
|
||||||
amd64.(*qemuAmd64).protection = snpProtection
|
amd64.(*qemuAmd64).protection = snpProtection
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user