qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities
PATCH v3 1/1 qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
---
v3:
- dynamically get the ID length from the firmware and allocate a buffer accordingly (thanks Daniel)
v2:
- change encoding to Base64 (thanks Daniel)
- rename constant to SEV_CPU_UNIQUE_ID_LEN
--- qapi/misc-target.json | 4 ++++ target/i386/sev.c | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-)
qapi/misc-target.json +4 -0
@@ -177,6 +177,8 @@ # # @cert-chain: PDH certificate chain (base64 encoded) # +# @cpu0-id: Unique ID of CPU0 (base64 encoded) (since 7.0) +# # @cbitpos: C-bit location in page table entry # # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
@@ -187,6 +189,7 @@ { 'struct': 'SevCapability', 'data': { 'pdh': 'str', 'cert-chain': 'str', + 'cpu0-id': 'str', 'cbitpos': 'int', 'reduced-phys-bits': 'int'}, 'if': 'TARGET_I386' }
@@ -205,6 +208,7 @@ # # -> { "execute": "query-sev-capabilities" } # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", +# "cpu0-id": "2lvmGwo+...61iEinw==", # "cbitpos": 47, "reduced-phys-bits": 5}} # ##
target/i386/sev.c +41 -1
68 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 6 lines · Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
Signed-off-by Dov Murik <[email protected]>
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 10 lines · Daniel P. Berrangé
Quoted 6 lines · Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
Signed-off-by Dov Murik <[email protected]>Reviewed-by Daniel P. Berrangé <[email protected]>
Thanks Daniel for reviewing.
Next: libvirt patch to add this field to response of virNodeGetSEVInfo().
-Dov
Quoted 9 lines · Dov Murik
Quoted 6 lines · Daniel P. Berrangé
Quoted 5 lines · Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Dov Murik <[email protected]>Reviewed-by Daniel P. Berrangé <[email protected]>Thanks Daniel for reviewing.
Hmm I don't see this in qemu.git. Who should pick this up?
- Cole
Quoted 12 lines · Cole Robinson
Quoted 11 lines · Dov Murik
Quoted 8 lines · Daniel P. Berrangé
Quoted 6 lines · Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
Signed-off-by Dov Murik <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Reviewed-by Daniel P. Berrangé <[email protected]>Thanks Daniel for reviewing.
Hmm I don't see this in qemu.git. Who should pick this up?
I'd say
$ scripts/get_maintainer.pl -f target/i386/sev.c
Paolo Bonzini <[email protected]> (supporter:X86 KVM CPUs)
Marcelo Tosatti <[email protected]> (supporter:X86 KVM CPUs)
[email protected] (open list:X86 KVM CPUs)
[email protected] (open list:All patches CC here)Quoted 22 lines · Markus Armbruster
Quoted 12 lines · Cole Robinson
Quoted 11 lines · Dov Murik
Quoted 8 lines · Daniel P. Berrangé
Quoted 6 lines · Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the base64-encoded unique ID of CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS).
Signed-off-by Dov Murik <[email protected]>Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Reviewed-by Daniel P. Berrangé <[email protected]>Thanks Daniel for reviewing.
Hmm I don't see this in qemu.git. Who should pick this up?
Quoted 8 lines
I'd say
$ scripts/get_maintainer.pl -f target/i386/sev.c Paolo Bonzini <[email protected]> (supporter:X86 KVM CPUs) Marcelo Tosatti <[email protected]> (supporter:X86 KVM CPUs) [email protected] (open list:X86 KVM CPUs) [email protected] (open list:All patches CC here)
I see this in Paolo's tree in branch for-upstream:
https://gitlab.com/bonzini/qemu/-/commit/811b4ec7f8eb3fb1fe9851848ab8e3cd926b9627
-Dov
Paolo Bonzini
AppliedQueued, thanks.
Paolo