-
Notifications
You must be signed in to change notification settings - Fork 164
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
hypervisor/kvm: Fix serial device access for ARM #3300
Conversation
Great, nobody did that on ARM :) Did you have a chance to test the attach of the serial port and reading/writing the data? Also would it make sense to change to the pci-serial on x86 as well? |
BTW, there is eden test which covers serial attach: https://github.com/lf-edge/eden/blob/master/tests/eclient/testdata/com-pt_test.txt |
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.
Ack
@rouming, I think it does make sense to change pci-serial on x86 as well. However, I prefer to do it into a new PR since it can break VMs without support to serial over PCI, better test more before merge. Let's keep only ARM changes here, since they are critical for now.... |
pkg/pillar/hypervisor/kvm.go
Outdated
{{- if ne .Machine "virt"}} | ||
backend = "tty" | ||
{{- else}} | ||
backend = "serial" | ||
{{- end}} |
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.
What about having it without double negation?
{{- if ne .Machine "virt"}} | |
backend = "tty" | |
{{- else}} | |
backend = "serial" | |
{{- end}} | |
backend = "tty" | |
{{- if eq .Machine "virt"}} | |
backend = "serial" | |
{{- end}} |
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.
do you mean like this?
{{- if eq .Machine "virt"}}
backend = "serial"
{{- else}}
backend = "tty"
{{- end}}
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.
That's also ok.
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.
@rene are you swapping the code per the above?
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 @eriknordmark , it's done.
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.
Kick off tests
The QEMU's virt machine model (ARM64) doesn't support isa-serial emulation, so guests cannot access serial devices of the host. This commit fixes this issue changing emulation to pci-serial only for the virt machine model. Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
Updates in this PR:
|
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.
LGTM
The QEMU's virt machine model (ARM64) doesn't support isa-serial emulation, so guests cannot access serial devices of the host. This commit fixes this issue changing emulation to pci-serial only for the virt machine model.
Error message from the logs: