[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v4 08/36] i386/tdx: Adjust get_supported_cpuid() for TDX
From: |
Gerd Hoffmann |
Subject: |
Re: [RFC PATCH v4 08/36] i386/tdx: Adjust get_supported_cpuid() for TDX VM |
Date: |
Mon, 23 May 2022 11:01:33 +0200 |
Hi,
> - The supported XCR0 and XSS bits needs to be cap'ed by tdx_caps, because
> KVM uses them to setup XFAM of TD.
> + case 0xd:
> + if (index == 0) {
> + if (reg == R_EAX) {
> + *ret &= (uint32_t)tdx_caps->xfam_fixed0 & XCR0_MASK;
> + *ret |= (uint32_t)tdx_caps->xfam_fixed1 & XCR0_MASK;
> + } else if (reg == R_EDX) {
> + *ret &= (tdx_caps->xfam_fixed0 & XCR0_MASK) >> 32;
> + *ret |= (tdx_caps->xfam_fixed1 & XCR0_MASK) >> 32;
> + }
> + } else if (index == 1) {
> + /* TODO: Adjust XSS when it's supported. */
> + }
> + break;
> + default:
> + /* TODO: Use tdx_caps to adjust CPUID leafs. */
> + break;
Hmm, that looks all a bit messy and incomplete, also the commit
message doesn't match the patch (describes XSS which isn't actually
implemented).
take care,
Gerd
- Re: [RFC PATCH v4 06/36] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES, (continued)
- [RFC PATCH v4 09/36] KVM: Introduce kvm_arch_pre_create_vcpu(), Xiaoyao Li, 2022/05/11
- [RFC PATCH v4 08/36] i386/tdx: Adjust get_supported_cpuid() for TDX VM, Xiaoyao Li, 2022/05/11
- Re: [RFC PATCH v4 08/36] i386/tdx: Adjust get_supported_cpuid() for TDX VM,
Gerd Hoffmann <=
- [RFC PATCH v4 10/36] i386/kvm: Move architectural CPUID leaf generation to separate helper, Xiaoyao Li, 2022/05/11
- [RFC PATCH v4 11/36] i386/tdx: Initialize TDX before creating TD vcpus, Xiaoyao Li, 2022/05/11
[RFC PATCH v4 12/36] i386/tdx: Wire CPU features up with attributes of TD guest, Xiaoyao Li, 2022/05/11