Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO TDX] Convert apicid and vpid from the TDX module #579

Open
ramesh-thomas opened this issue Dec 20, 2024 · 4 comments
Open

[TODO TDX] Convert apicid and vpid from the TDX module #579

ramesh-thomas opened this issue Dec 20, 2024 · 4 comments
Labels
ohcl-linux-kernel Changes that apply to the Linux kernel at OHCL-Linux-Kernel repo tdx TDX specific bugs or features

Comments

@ramesh-thomas
Copy link

In arch/x86/hyperv/hv_vtl.c: hv_vtl_wakeup_secondary_cpu(),

/* TODO TDX: we cannot trust the hypervisor to perform this mapping...
Instead, we need hypervisor support for TDX 1.5 ENUM_TOPOLOGY to query
this directly from the tdx module. */

(Migrated internal issue #1261)

@ramesh-thomas
Copy link
Author

yjiang5 on Oct 30:

This will not be needed once we have the ACPI mailbox code merged.

@ramesh-thomas
Copy link
Author

ramesh-thomas commented Dec 20, 2024

Depends on #581

@ramesh-thomas
Copy link
Author

@chris-oo once #581 is merged, what should we do about the below code?

    /*
     * TODO TDX: we cannot trust the hypervisor to perform this mapping...
     * Instead, we need hypervisor support for TDX 1.5 ENUM_TOPOLOGY to
     * query this directly from the TDX module.
     */
    vp_id = hv_vtl_apicid_to_vp_id(apicid);

    if (vp_id < 0) {
            pr_err("Couldn't find CPU with APIC ID %d\n", apicid);
            return -EINVAL;
    }
    if (vp_id > ms_hyperv.max_vp_index) {
            pr_err("Invalid CPU id %d for APIC ID %d\n", vp_id, apicid);
            return -EINVAL;
    }

    if (hv_isolation_type_tdx())
            return hv_vtl_bringup_tdx_vcpu(vp_id, start_eip);
    else
            return hv_vtl_bringup_vcpu(vp_id, cpu, start_eip);

@chris-oo
Copy link
Member

We should leave that TODO in there until we have the right hypervisor support. I can start a conversation internally about this.

@chris-oo chris-oo added tdx TDX specific bugs or features ohcl-linux-kernel Changes that apply to the Linux kernel at OHCL-Linux-Kernel repo labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ohcl-linux-kernel Changes that apply to the Linux kernel at OHCL-Linux-Kernel repo tdx TDX specific bugs or features
Projects
None yet
Development

No branches or pull requests

2 participants