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] Check VP assist page for TDX guest #578

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

[TODO TDX] Check VP assist page for TDX guest #578

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

Comments

@ramesh-thomas
Copy link

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?

(Migrated internal issue #1262)

@ramesh-thomas
Copy link
Author

yjiang5 opened on Sep 24:

This TODO is not so useful and can possibly be removed.

@ramesh-thomas
Copy link
Author

@yamahata confirms it is not needed for TDX.

@ramesh-thomas
Copy link
Author

@chris-oo since TDX does not need it, do we need any change to the below code? Looks like we only need the else part and initialize hv_vp_assist_page = NULL;

    /*
     * 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?
     */
    if (hv_isolation_type_tdx())
            hv_vp_assist_page = NULL;
    else {
            hv_vp_assist_page = kcalloc(num_possible_cpus(),
                                            sizeof(*hv_vp_assist_page), GFP_KERNEL);
            if (!hv_vp_assist_page) {
                    hv_common_free();
                    ret = -ENOMEM;
            }
    }

@yamahata
Copy link

yamahata commented Jan 7, 2025

The logic (if tdx hv_vp_assist_page = NULL) looks reasonable.

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