-
Notifications
You must be signed in to change notification settings - Fork 878
Conversation
core/vcpu.c
Outdated
@@ -2727,7 +2745,8 @@ static void handle_cpuid_virtual(struct vcpu_t *vcpu, uint32_t a, uint32_t c) | |||
state->_eax = state->_ebx = state->_ecx = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @PatrickvL mentioned, this line will cause succeeding state->_ecx always cleared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ecx zeroing should be removed.
hw_model = (cpuid_eax.extModelID << 4) + cpuid_eax.model; | ||
else | ||
hw_model = cpuid_eax.model; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactoring makes it much clean now and match the pseudo code of SDM better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have further question on this PR. Please:
1). Remove the zeroing out of state->_ecx.
2). Do not add PDPE1GB, LAHF and PREFETCHW in this patch. Leave this one as pure handle_cpuid_virtual() refactoring and draft another patch to add them, so that we can bisect if any issue found.
3). Describe in commit message what you did in this patch.
Force update your repo and I'll merge it.
And draft another patch by simply adding DPE1GB, LAHF and PREFETCHW.
- renamed feature lists. - removed conditional feature checks of supported feature lists, they should be checked in ioctl setting CPU features, when this ioctl will be added. - added CPU description structure for cpuid 0, instead of handling raw bits. Signed-off-by: Alexey Romko <nevilad@yahoo.com>
cdecc7d
to
62bc8d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
CPUID handling code refactoring, originally part of windows 10 support PR.