mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 12:44:39 +00:00
Revert "hypervisors: Confidential Guests do not support Device hotplug"
This reverts commit df8ffecde0
, as device
hotplug *is* supported and, more than that, is very much needed when
using virtio-blk instead of virtio-fs.
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
934788eb53
commit
76e4f6a2a3
@ -25,7 +25,6 @@ image = "@IMAGEPATH@"
|
|||||||
# Known limitations:
|
# Known limitations:
|
||||||
# * Does not work by design:
|
# * Does not work by design:
|
||||||
# - CPU Hotplug
|
# - CPU Hotplug
|
||||||
# - Device Hotplug
|
|
||||||
# - Memory Hotplug
|
# - Memory Hotplug
|
||||||
# - NVDIMM devices
|
# - NVDIMM devices
|
||||||
#
|
#
|
||||||
|
@ -26,7 +26,6 @@ machine_type = "@MACHINETYPE@"
|
|||||||
# Known limitations:
|
# Known limitations:
|
||||||
# * Does not work by design:
|
# * Does not work by design:
|
||||||
# - CPU Hotplug
|
# - CPU Hotplug
|
||||||
# - Device Hotplug
|
|
||||||
# - Memory Hotplug
|
# - Memory Hotplug
|
||||||
# - NVDIMM devices
|
# - NVDIMM devices
|
||||||
#
|
#
|
||||||
|
@ -638,10 +638,6 @@ func (clh *cloudHypervisor) HotplugAddDevice(ctx context.Context, devInfo interf
|
|||||||
span, _ := katatrace.Trace(ctx, clh.Logger(), "HotplugAddDevice", clhTracingTags, map[string]string{"sandbox_id": clh.id})
|
span, _ := katatrace.Trace(ctx, clh.Logger(), "HotplugAddDevice", clhTracingTags, map[string]string{"sandbox_id": clh.id})
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
if clh.config.ConfidentialGuest {
|
|
||||||
return nil, errors.New("Device hotplug addition is not supported in confidential mode")
|
|
||||||
}
|
|
||||||
|
|
||||||
switch devType {
|
switch devType {
|
||||||
case BlockDev:
|
case BlockDev:
|
||||||
drive := devInfo.(*config.BlockDrive)
|
drive := devInfo.(*config.BlockDrive)
|
||||||
@ -659,10 +655,6 @@ func (clh *cloudHypervisor) HotplugRemoveDevice(ctx context.Context, devInfo int
|
|||||||
span, _ := katatrace.Trace(ctx, clh.Logger(), "HotplugRemoveDevice", clhTracingTags, map[string]string{"sandbox_id": clh.id})
|
span, _ := katatrace.Trace(ctx, clh.Logger(), "HotplugRemoveDevice", clhTracingTags, map[string]string{"sandbox_id": clh.id})
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
if clh.config.ConfidentialGuest {
|
|
||||||
return nil, errors.New("Device hotplug removal is not supported in confidential mode")
|
|
||||||
}
|
|
||||||
|
|
||||||
var deviceID string
|
var deviceID string
|
||||||
|
|
||||||
switch devType {
|
switch devType {
|
||||||
@ -917,9 +909,7 @@ func (clh *cloudHypervisor) Capabilities(ctx context.Context) types.Capabilities
|
|||||||
clh.Logger().WithField("function", "Capabilities").Info("get Capabilities")
|
clh.Logger().WithField("function", "Capabilities").Info("get Capabilities")
|
||||||
var caps types.Capabilities
|
var caps types.Capabilities
|
||||||
caps.SetFsSharingSupport()
|
caps.SetFsSharingSupport()
|
||||||
if !clh.config.ConfidentialGuest {
|
|
||||||
caps.SetBlockDeviceHotplugSupport()
|
caps.SetBlockDeviceHotplugSupport()
|
||||||
}
|
|
||||||
return caps
|
return caps
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,9 +158,8 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) {
|
|||||||
func (q *qemuAmd64) capabilities() types.Capabilities {
|
func (q *qemuAmd64) capabilities() types.Capabilities {
|
||||||
var caps types.Capabilities
|
var caps types.Capabilities
|
||||||
|
|
||||||
if (q.qemuMachine.Type == QemuQ35 ||
|
if q.qemuMachine.Type == QemuQ35 ||
|
||||||
q.qemuMachine.Type == QemuVirt) &&
|
q.qemuMachine.Type == QemuVirt {
|
||||||
q.protection == noneProtection {
|
|
||||||
caps.SetBlockDeviceHotplugSupport()
|
caps.SetBlockDeviceHotplugSupport()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,9 +277,7 @@ func (q *qemuArchBase) kernelParameters(debug bool) []Param {
|
|||||||
|
|
||||||
func (q *qemuArchBase) capabilities() types.Capabilities {
|
func (q *qemuArchBase) capabilities() types.Capabilities {
|
||||||
var caps types.Capabilities
|
var caps types.Capabilities
|
||||||
if q.protection == noneProtection {
|
|
||||||
caps.SetBlockDeviceHotplugSupport()
|
caps.SetBlockDeviceHotplugSupport()
|
||||||
}
|
|
||||||
caps.SetMultiQueueSupport()
|
caps.SetMultiQueueSupport()
|
||||||
caps.SetFsSharingSupport()
|
caps.SetFsSharingSupport()
|
||||||
return caps
|
return caps
|
||||||
|
@ -101,8 +101,7 @@ func (q *qemuPPC64le) capabilities() types.Capabilities {
|
|||||||
var caps types.Capabilities
|
var caps types.Capabilities
|
||||||
|
|
||||||
// pseries machine type supports hotplugging drives
|
// pseries machine type supports hotplugging drives
|
||||||
if q.qemuMachine.Type == QemuPseries &&
|
if q.qemuMachine.Type == QemuPseries {
|
||||||
q.protection == noneProtection {
|
|
||||||
caps.SetBlockDeviceHotplugSupport()
|
caps.SetBlockDeviceHotplugSupport()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user