mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-12 02:15:28 +00:00
Revert "qemu: tdx: Adapt command line" (partially)
This reverts commit b7cccfa019
.
The `private=on` bit has never made its way upstream, and was removed
from the latest iteration that we're using. With that in mind, let's
revert its usage in the code.
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
1c3037fd25
commit
416d00228c
src/runtime
@ -3028,9 +3028,6 @@ func (config *Config) appendMemoryKnobs() {
|
||||
numaMemParam = "node,memdev=" + dimmName
|
||||
}
|
||||
|
||||
if config.Knobs.Private {
|
||||
objMemParam += ",private=on"
|
||||
}
|
||||
if config.Knobs.MemShared {
|
||||
objMemParam += ",share=on"
|
||||
}
|
||||
|
@ -586,7 +586,6 @@ func TestAppendMemoryFileBackedMem(t *testing.T) {
|
||||
knobs := Knobs{
|
||||
FileBackedMem: true,
|
||||
MemShared: false,
|
||||
Private: false,
|
||||
}
|
||||
objMemString := "-object memory-backend-file,id=dimm1,size=1G,mem-path=foobar"
|
||||
numaMemString := "-numa node,memdev=dimm1"
|
||||
@ -600,36 +599,6 @@ func TestAppendMemoryFileBackedMem(t *testing.T) {
|
||||
}
|
||||
|
||||
testConfigAppend(conf, knobs, memString+" "+knobsString, t)
|
||||
|
||||
// Reset the conf and memString values
|
||||
conf = &Config{
|
||||
Memory: Memory{
|
||||
Size: "1G",
|
||||
Slots: 8,
|
||||
MaxMem: "3G",
|
||||
Path: "foobar",
|
||||
},
|
||||
}
|
||||
memString = "-m 1G,slots=8,maxmem=3G"
|
||||
testConfigAppend(conf, conf.Memory, memString, t)
|
||||
|
||||
knobs = Knobs{
|
||||
FileBackedMem: true,
|
||||
MemShared: false,
|
||||
Private: true,
|
||||
}
|
||||
objMemString = "-object memory-backend-file,id=dimm1,size=1G,mem-path=foobar,private=on"
|
||||
numaMemString = "-numa node,memdev=dimm1"
|
||||
memBackendString = "-machine memory-backend=dimm1"
|
||||
|
||||
knobsString = objMemString + " "
|
||||
if isDimmSupported(nil) {
|
||||
knobsString += numaMemString
|
||||
} else {
|
||||
knobsString += memBackendString
|
||||
}
|
||||
|
||||
testConfigAppend(conf, knobs, memString+" "+knobsString, t)
|
||||
}
|
||||
|
||||
func TestAppendMemoryFileBackedMemPrealloc(t *testing.T) {
|
||||
|
@ -615,17 +615,6 @@ func (q *qemu) CreateVM(ctx context.Context, id string, network Network, hypervi
|
||||
return err
|
||||
}
|
||||
|
||||
if q.config.ConfidentialGuest {
|
||||
// At this point we're safe to just check for the protection field
|
||||
// on the hypervisor specific code, as availableGuestProtection()
|
||||
// has been called earlier and we know we have the value stored.
|
||||
if q.arch.getProtection() == tdxProtection {
|
||||
|
||||
// TDX relies on ",private=on" passed to the memory object.
|
||||
knobs.Private = true
|
||||
}
|
||||
}
|
||||
|
||||
kernelPath, err := q.config.KernelAssetPath()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user