-
Notifications
You must be signed in to change notification settings - Fork 669
add cpuType for specify cpu #643
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
Conversation
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 know the PR is still in draft mode, but I wanted to get in some early feedback already.
f1b02ac
to
2dff508
Compare
if isNativeArch(*y.Arch) { | ||
args = appendArgsIfNoConflict(args, "-machine", "q35,accel="+accel) | ||
} else { | ||
if strings.HasPrefix(cpu, "qemu64") { |
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.
Why not just compare cpu != "host"
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'm not sure if these parameters are added for all cpu types, so i keep the status quo.
If someone can be sure to do this, I'll fix it.
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.
Yeah, seems prudent. I don't know either if these work for all cpu types (and if the reasoning to use them applies).
Signed-off-by: ye.sijun <[email protected]>
if isNativeArch(*y.Arch) { | ||
args = appendArgsIfNoConflict(args, "-machine", "q35,accel="+accel) | ||
} else { | ||
if strings.HasPrefix(cpu, "qemu64") { |
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.
Yeah, seems prudent. I don't know either if these work for all cpu types (and if the reasoning to use them applies).
Co-authored-by: Jan Dubois <[email protected]> Signed-off-by: ye.sijun <[email protected]>
Signed-off-by: ye.sijun <[email protected]>
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.
Thanks, LGTM. Leaving for @AkihiroSuda to make final decision and merge.
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.
Thanks
@@ -9,6 +9,7 @@ import ( | |||
type LimaYAML struct { | |||
Arch *Arch `yaml:"arch,omitempty" json:"arch,omitempty"` | |||
Images []File `yaml:"images" json:"images"` // REQUIRED | |||
CPUType *string `yaml:"cpuType,omitempty" json:"cpuType,omitempty"` |
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 already merged this PR, but on second thought we could define this as []struct{Type string, Arch Arch}
so that a single YAML can be used on multiple archs?
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.
Changed to map[Arch]string
in #656 (thanks @jandubois )
closes: #592
<EDIT by @AkihiroSuda >
The yaml type definition was changed in #656
(Both #643 and #656 were merged in the v0.8.3, but not merged in v0.8.2. So, there is no compatibility issue.)
</EDIT>