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: regarding the use of cpuid’s 32bits register #8605

Open
476997779 opened this issue May 27, 2024 · 0 comments
Open

HV: regarding the use of cpuid’s 32bits register #8605

476997779 opened this issue May 27, 2024 · 0 comments
Labels
status: new The issue status: new for creation

Comments

@476997779
Copy link
Contributor

Describe the bug

In HV, cpuid uses the lower 32 bits of rax 、rbx、rcx and 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,will cause bugs。

Platform

guest: nuttx
HV: acrn 3.1

@476997779 476997779 added the status: new The issue status: new for creation label May 27, 2024
476997779 added a commit to 476997779/acrn-hypervisor that referenced this issue May 29, 2024
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]>
acrnsi-robot pushed a commit that referenced this issue Jun 19, 2024
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]>
Signed-off-by: andi6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: new The issue status: new for creation
Projects
None yet
Development

No branches or pull requests

1 participant