mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 17:06:28 +00:00
Merge pull request #2049 from liubin/2048/fix-log-field
runtime: using detail propertites instead of function name in log field
This commit is contained in:
@@ -216,6 +216,12 @@ func (q *qemuAmd64) enableProtection() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
logger := virtLog.WithFields(logrus.Fields{
|
||||||
|
"subsystem": "qemuAmd64",
|
||||||
|
"machine": q.qemuMachine,
|
||||||
|
"kernel-params-debug": q.kernelParamsDebug,
|
||||||
|
"kernel-params-non-debug": q.kernelParamsNonDebug,
|
||||||
|
"kernel-params": q.kernelParams})
|
||||||
|
|
||||||
switch q.protection {
|
switch q.protection {
|
||||||
case tdxProtection:
|
case tdxProtection:
|
||||||
@@ -224,22 +230,14 @@ func (q *qemuAmd64) enableProtection() error {
|
|||||||
}
|
}
|
||||||
q.qemuMachine.Options += "kvm-type=tdx,confidential-guest-support=tdx"
|
q.qemuMachine.Options += "kvm-type=tdx,confidential-guest-support=tdx"
|
||||||
q.kernelParams = append(q.kernelParams, Param{"tdx_guest", ""})
|
q.kernelParams = append(q.kernelParams, Param{"tdx_guest", ""})
|
||||||
virtLog.WithFields(logrus.Fields{
|
logger.Info("Enabling TDX guest protection")
|
||||||
"subsystem": "qemuAmd64",
|
|
||||||
"machine": q.qemuMachine,
|
|
||||||
"kernel-params": q.kernelParameters}).
|
|
||||||
Info("Enabling TDX guest protection")
|
|
||||||
return nil
|
return nil
|
||||||
case sevProtection:
|
case sevProtection:
|
||||||
if q.qemuMachine.Options != "" {
|
if q.qemuMachine.Options != "" {
|
||||||
q.qemuMachine.Options += ","
|
q.qemuMachine.Options += ","
|
||||||
}
|
}
|
||||||
q.qemuMachine.Options += "confidential-guest-support=sev"
|
q.qemuMachine.Options += "confidential-guest-support=sev"
|
||||||
virtLog.WithFields(logrus.Fields{
|
logger.Info("Enabling SEV guest protection")
|
||||||
"subsystem": "qemuAmd64",
|
|
||||||
"machine": q.qemuMachine,
|
|
||||||
"kernel-params": q.kernelParameters}).
|
|
||||||
Info("Enabling SEV guest protection")
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
// TODO: Add support for other x86_64 technologies
|
// TODO: Add support for other x86_64 technologies
|
||||||
|
Reference in New Issue
Block a user