[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 56/60] i386/tdx: Don't treat SYSCALL as unavailable
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v6 56/60] i386/tdx: Don't treat SYSCALL as unavailable |
Date: |
Tue, 5 Nov 2024 11:07:48 +0000 |
User-agent: |
Mutt/2.2.13 (2024-03-09) |
On Tue, Nov 05, 2024 at 01:24:04AM -0500, Xiaoyao Li wrote:
Preferrably explain the rationale for why this is needed in
the commit message.
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
> target/i386/kvm/tdx.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
> index 9cb099e160e4..05475edf72bd 100644
> --- a/target/i386/kvm/tdx.c
> +++ b/target/i386/kvm/tdx.c
> @@ -734,6 +734,13 @@ static int tdx_check_features(X86ConfidentialGuest *cg,
> CPUState *cs)
>
> requested = env->features[w];
> unavailable = requested & ~actual;
> + /*
> + * Intel enumerates SYSCALL bit as 1 only when processor in 64-bit
> + * mode and before vcpu running it's not in 64-bit mode.
> + */
> + if (w == FEAT_8000_0001_EDX && unavailable & CPUID_EXT2_SYSCALL) {
> + unavailable &= ~CPUID_EXT2_SYSCALL;
> + }
> mark_unavailable_features(cpu, w, unavailable, unav_prefix);
> if (unavailable) {
> mismatch = true;
> --
> 2.34.1
>
With regards,
Daniel
--
|: 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 :|
- [PATCH v6 44/60] i386/tdx: Skip kvm_put_apicbase() for TDs, (continued)
- [PATCH v6 44/60] i386/tdx: Skip kvm_put_apicbase() for TDs, Xiaoyao Li, 2024/11/05
- [PATCH v6 47/60] i386/tdx: Implement adjust_cpuid_features() for TDX, Xiaoyao Li, 2024/11/05
- [PATCH v6 49/60] i386/tdx: Mask off CPUID bits by unsupported TD Attributes, Xiaoyao Li, 2024/11/05
- [PATCH v6 50/60] i386/cpu: Move CPUID_XSTATE_XSS_MASK to header file and introduce CPUID_XSTATE_MASK, Xiaoyao Li, 2024/11/05
- [PATCH v6 52/60] i386/cpu: Expose mark_unavailable_features() for TDX, Xiaoyao Li, 2024/11/05
- [PATCH v6 54/60] i386/cgs: Introduce x86_confidential_guest_check_features(), Xiaoyao Li, 2024/11/05
- [PATCH v6 51/60] i386/tdx: Mask off CPUID bits by unsupported XFAM, Xiaoyao Li, 2024/11/05
- [PATCH v6 55/60] i386/tdx: Fetch and validate CPUID of TD guest, Xiaoyao Li, 2024/11/05
- [PATCH v6 56/60] i386/tdx: Don't treat SYSCALL as unavailable, Xiaoyao Li, 2024/11/05
- [PATCH v6 57/60] i386/tdx: Make invtsc default on, Xiaoyao Li, 2024/11/05
- [PATCH v6 48/60] i386/tdx: Apply TDX fixed0 and fixed1 information to supported CPUIDs, Xiaoyao Li, 2024/11/05
- [PATCH v6 60/60] docs: Add TDX documentation, Xiaoyao Li, 2024/11/05
- [PATCH v6 58/60] cpu: Introduce qemu_early_init_vcpu(), Xiaoyao Li, 2024/11/05
- [PATCH v6 53/60] i386/cpu: introduce mark_forced_on_features(), Xiaoyao Li, 2024/11/05
- [PATCH v6 59/60] i386/cpu: Set up CPUID_HT in x86_cpu_realizefn() instead of cpu_x86_cpuid(), Xiaoyao Li, 2024/11/05