Skip to content

Conversation

@junnplus
Copy link
Contributor

@junnplus junnplus commented Feb 10, 2022

closes: #592

  • doc

<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>

Copy link
Member

@jandubois jandubois left a 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.

@junnplus junnplus force-pushed the cpu-type branch 5 times, most recently from f1b02ac to 2dff508 Compare February 10, 2022 07:11
@junnplus junnplus marked this pull request as ready for review February 10, 2022 07:36
if isNativeArch(*y.Arch) {
args = appendArgsIfNoConflict(args, "-machine", "q35,accel="+accel)
} else {
if strings.HasPrefix(cpu, "qemu64") {
Copy link
Member

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"

Copy link
Contributor Author

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.

Copy link
Member

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).

@AkihiroSuda AkihiroSuda linked an issue Feb 10, 2022 that may be closed by this pull request
@junnplus junnplus requested a review from jandubois February 10, 2022 12:54
if isNativeArch(*y.Arch) {
args = appendArgsIfNoConflict(args, "-machine", "q35,accel="+accel)
} else {
if strings.HasPrefix(cpu, "qemu64") {
Copy link
Member

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]>
Copy link
Member

@jandubois jandubois left a 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.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 129bbc8 into lima-vm:master Feb 14, 2022
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"`
Copy link
Member

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?

Copy link
Member

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 )

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.

lima 0.8.2 instance not support CPU SSSE3 Provide a cpu setting to override default host setting

3 participants