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]TODO check in HCL kernel repo #576

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

[TODO]TODO check in HCL kernel repo #576

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

Comments

@ramesh-thomas
Copy link

ramesh-thomas commented Dec 20, 2024

Information from Joe:

"go through the code (HvLite and UH Kernel) and look for any TODOs (marked as “TDX TODO” or “TODO TDX”) and when we find one, create a github issue for it and remove the comment from the code"

This ticket serves the center part of this task. It will list all the TODO TDX in the kernel repo and then links to the corresponding tickets for them.

(Migrated internal issue #1254)

@ramesh-thomas
Copy link
Author

yjiang5 on Sep 23:

Below information TODO list is from the repo. It's the diff from the OHCL kernel to the base Linux 6.6.19.

$ git logp -n 1
f53f8d5364f0c04746baf38aa94bdbda58ce1924 (origin/project/underhill-dev/6.6, oldrepo/origdev, oldrepo/cpustuck, mailbox/upstream_test) hyperv/mshv_vtl: Primitives to support Guest VSM under SNP
$ git diff -r 0700f4e154f88d6ddf4913fa2fce5c6e0314960a

The TODO TDX list:

`
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. */
drivers/hv/hv_common.c: hv_common_init()

/*

  • The VP assist page is useless to a TDX guest: the only use we
  • would have for it is lazy EOI, which can not be used with TDX.
  • TODO TDX: UH doens't require this on TDX right now, but we may
  • want it in the future?
    drivers/hv/mshv_vtl_main.c: mshv_vtl_configure_reg_page()
    16555 + if (ret == -EINVAL) {
    16556 + /*
    16557 + * TODO: replace ret == -EINVAL with
    16558 + * `ret == HV_STATUS_INVALID_PARAMETER'.
    16559 + *

drivers/hv/mshv_vtl_main.c: mshv_vtl_return_tdx()
17605 +/* TODO TDX: Confirm noinline produces the right asm for saving register
state */
17606 +noinline static void mshv_vtl_return_tdx(void)

17628 + /* TODO TDX: For now, hardcode VP.ENTER rax value and RCX.
17629 + RCX encodes vtl0 and invd translations */

17656 + /* TODO TDX: pushq popq causes some build complaints unclear why
when mshv uses
17657 + it also. alignment checks even though tdcall has no alignment
reqs? */

17662 + /* restore rbp from the stack */
17663 + "popq %%rbp\n"
17664 + : "=a"(tdx_exit_info->rax), "=c"(tdx_exit_info->rcx),
17665 + "=d"(tdx_exit_info->rdx), "=S"(tdx_exit_info->rsi),
"=D"(tdx_exit_info->rdi),
17666 + "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=r"(r12),
"=r"(r13), "=r"(r14), "=r"(r15), "+r" (__sp)
17667 + : "a"(input_rax), "c"(input_rcx), "d"(input_rdx)
17668 + : "rbx", "cc", "memory" // TODO: cc necessary?

@ramesh-thomas
Copy link
Author

Following issues capture the individual TODOs.

#566
#565
#578
#579
#580

@ramesh-thomas
Copy link
Author

@chris-oo this issue is like a "master issue" for the "sub-issues". This can be removed if it is not very helpful as the TODOs are tracked in detail in the sub-issues listed in the previous comment.

@mattkur
Copy link
Contributor

mattkur commented Dec 22, 2024

@ramesh-thomas , just in case it's helpful for you / the tdx program - I've found the "sub-issues" helpful when managing the nvme keepalive work. This is especially helpful when you want to track overall completion toward a goal. You could make 565, 566, 578, 579, 580, etc. sub-issues of this task. (To do that, click the arrow next to "Create sub-issue" in the first description of this issue, and then click on "Add existing issue")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants