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

hv: fix using cpuid does not clear the upper 32-bit registers. #8610

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

476997779
Copy link
Contributor

In HV, cpuid uses the lower 32 bits of rax\rbx\rcx\rdx registers to pass parameters, But the software does not clear the upper 32-bit registers, if the guest uses 64-bit variables to pass parameters to cpuid,guest will use rax\rbx\rcx\rdx, not eax\ebx\ecx\edx, the previous value of the high 32 registers will affect the guest.

Tracked-On:8605
Reviewed-by: Junjie Mao [email protected]

@yuhuanX
Copy link

yuhuanX commented May 28, 2024

Can one of the admins verify this patch?

@476997779
Copy link
Contributor Author

I verified it on nuttx,I defined a 64-bit variable to pass the cpuid parameter. The high 32 bits of the return value were cleared.

@yuhuanX
Copy link

yuhuanX commented May 28, 2024

start to run premerge test

@476997779
Copy link
Contributor Author

start to run premerge test

HI Please tell me how to check the error cause of CI. Is there any relevant documentation?

@junjiemao1
Copy link
Contributor

start to run premerge test

HI Please tell me how to check the error cause of CI. Is there any relevant documentation?

I suspect there were some internal instability issues in the CI system. We'll check.

The CI system itself is internal and we'll post meaning errors or warnings on GitHub if there is any requiring attention from the author.

@yuhuanX
Copy link

yuhuanX commented May 29, 2024

@476997779 ,no space left on CI server (sit server), please wait until we clean the space on CI server, sorry for the trouble brought by this.

@yuhuanX
Copy link

yuhuanX commented May 29, 2024

start to run premerge test

@yuhuanX
Copy link

yuhuanX commented May 29, 2024

@476997779, please modify "Tracked-On:8605" in commit message to "Tracked-On:#8605" to pass TRACKED_ON_TEST

In HV, cpuid uses the lower 32 bits of rax\rbx\rcx\rdx registers to pass parameters,
But the software does not clear the upper 32-bit registers,  if the guest
uses 64-bit variables to pass parameters to cpuid,guest will use rax\rbx\rcx\rdx,
not eax\ebx\ecx\edx, the previous value of the high 32 registers will affect the guest.

Tracked-On: projectacrn#8605
Reviewed-by: Junjie Mao <[email protected]>
Signed-off-by: andi6 <[email protected]>
@wenlingz
Copy link
Contributor

@lifeix please help approve this PR, thanks

@wenlingz
Copy link
Contributor

@lifeix @junjiemao1 please help approve this PR, thanks

@yuhuanX
Copy link

yuhuanX commented Jun 19, 2024

start to run premerge test

@acrnsi-robot acrnsi-robot merged commit 46a860b into projectacrn:master Jun 19, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants