Skip to content

target/i386: SEV: Add support for enabling VMSA SEV features

Naveen N Rao (AMD) qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 8 repliesIn review
  2. v39 patches 6 repliesSuperseded
  3. v29 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches11 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9target/i386: SEV: Generalize handling of SVM_SEV_FEAT_SNP_ACTIVEtarget/i386/sev.c target/i386/sev.h+18 -80 replies
2/9target/i386: SEV: Ensure SEV features are only set through qemu cli or IGVMtarget/i386/sev.c+10 -04 replies
3/9target/i386: SEV: Consolidate SEV feature validation to common init pathtarget/i386/sev.c+4 -60 replies
4/9target/i386: SEV: Validate that SEV-ES is enabled when VMSA features are usedtarget/i386/sev.c+6 -00 replies
5/9target/i386: SEV: Enable use of KVM_SEV_INIT2 for SEV-ES gueststarget/i386/sev.c+1 -20 replies
6/9target/i386: SEV: Add support for enabling debug-swap SEV featureqapi/qom.json target/i386/sev.c target/i386/sev.h+33 -12 replies
7/9target/i386: SEV: Add support for enabling Secure TSC SEV featureqapi/qom.json target/i386/sev.c target/i386/sev.h+19 -10 replies
8/9target/i386: SEV: Add support for setting TSC frequency for Secure TSCqapi/qom.json target/i386/sev.c+51 -10 replies
9/9target/i386: SEV: Refactor check_sev_features()target/i386/sev.c+36 -310 replies

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchTom LendackyNikunj A Dadhania
1/9R-b
2/9R-b
3/9R-b
4/9R-b R-b
5/9R-b R-b
6/9
7/9R-b
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/9] target/i386: SEV: Add support for enabling VMSA SEV features

This series adds support for enabling VMSA SEV features for SEV-SNP guests through the Qemu command line. This is already supported for IGVM files, so some of that code has been generalized and reused.

The primary change w.r.t v3 (apart from rebasing and targeting v11.1) is a change to patch 6/9 to restrict debug-swap to SEV-SNP guests due to a compatibility issue with SEV-ES guests and pflash, discussed here:
http://lore.kernel.org/r/fcqjl5a7m27f2mfpblnhgmozbipdjmvpdyk3m5hhzwcenp4cpg@m2ooa7ykrcvs

I plan to post a workaround for that separately. For that reason, I have retained patch 5/9 so that enabling debug-swap for SEV-ES guests will be a simpler subsequent change.

The only other concern has been around patch 8/9 adding a new tsc-frequency property on sev-snp-guest object (and not re-using the one on the cpu object). If that's required/possible, I would appreciate some help since I've been unable to get that working.

Tom,
I have dropped your reviewed-by tag on patch 6/9 due to this change. Kindly take a look once.

v3: http://lore.kernel.org/r/[email protected]

- Naveen

Naveen N Rao (AMD) (9):
target/i386: SEV: Generalize handling of SVM_SEV_FEAT_SNP_ACTIVE target/i386: SEV: Ensure SEV features are only set through qemu cli or
IGVM
target/i386: SEV: Consolidate SEV feature validation to common init
path
target/i386: SEV: Validate that SEV-ES is enabled when VMSA features
are used
target/i386: SEV: Enable use of KVM_SEV_INIT2 for SEV-ES guests target/i386: SEV: Add support for enabling debug-swap SEV feature target/i386: SEV: Add support for enabling Secure TSC SEV feature target/i386: SEV: Add support for setting TSC frequency for Secure TSC target/i386: SEV: Refactor check_sev_features()

 target/i386/sev.h |   4 +-
 target/i386/sev.c | 177 +++++++++++++++++++++++++++++++++++++---------
 qapi/qom.json     |  17 ++++-
 3 files changed, 163 insertions(+), 35 deletions(-)

base-commit: e89049b3ba5f1f0468bc0d294173345597514a1b

Signature · 1 line
2.54.0