mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-28 12:31:04 +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,
|
||||
FirmwareVolume: firmwareVolume,
|
||||
}), "", 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:
|
||||
return append(devices,
|
||||
govmmQemu.Object{
|
||||
|
@ -272,26 +272,6 @@ func TestQemuAmd64AppendProtectionDevice(t *testing.T) {
|
||||
assert.Error(err)
|
||||
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
|
||||
amd64.(*qemuAmd64).protection = snpProtection
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user