-
Notifications
You must be signed in to change notification settings - Fork 7
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
Switch Back to LegacySerial for Aarch64 #23
base: main
Are you sure you want to change the base?
Conversation
When using MOS, using PCISerialDevice does not result in console output because MOS boots cdroms, thus the switch back to LegacySerial. Also overwrote the Attach of the cdrom to be virtio instead of ide for aarch64/arm64.
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.
Let's split this into two PRs.
- Fix up console path and virtio-cdrom
This enables the cloud image to work.
Then, a second pr introducing the legacy serial device. This second PR may require
an update to qcli so we emit both -serial <something>
and the -device pci-serial,...
Further, this second PR will need some machine console
and api changes to enumerate and allow selecting which console the command attaches.
MaxPorts: 1, | ||
LegacySerialDevices: []qcli.LegacySerialDevice{ | ||
qcli.LegacySerialDevice{ | ||
ChardevID: "serial0", |
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 think we're going to want both; in case someone boots an image using console=ttyS0, and a different image with console=ttyAMA0.
I think we can fix this in qcli though; that is, if we use the PCISerialDevice and set Legacy, we should get:
-serial stdio \
-chardev socket,id=serial1,path=/tmp/console.sock,server=on,wait=off
-device pci-serial,id=pciser0,chardev=serial1
Then we can have both -- this does mean that machine console
will need some enhancement so one can select the different serial devices attached. But that's 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.
This can go the PR with the console path fix.
Path: "/tmp/console.sock", | ||
Path: filepath.Join(sockDir, "console.sock"), |
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.
This is a stand-alone fix. Let's put this in as it's own PR.
rt := runtime.GOARCH | ||
if (rt == "aarch64" || rt == "arm64") { | ||
qd.Attach = "virtio" | ||
log.Infof("WARK: arch %s overriding cdrom Attach to virtio", rt) |
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.
log.Infof("WARK: arch %s overriding cdrom Attach to virtio", rt) |
Let's drop this
@@ -420,6 +417,11 @@ func GenerateQConfig(runDir, sockDir string, v VMDef) (*qcli.Config, error) { | |||
Type: "cdrom", | |||
ReadOnly: true, | |||
} | |||
rt := runtime.GOARCH |
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.
rt := runtime.GOARCH | |
rt := runtime.GOARCH | |
// the aarch64 qemu virtual machine does not attach an IDE/AHCI adapter to the machine by default | |
// and the `cdrom` setting machine.yaml will introduce an IDE device unless we specify it to be a virtio-blk-cdrom |
When using MOS, using PCISerialDevice does not result in console output because MOS boots cdroms. Thus we switch back to LegacySerial as this permits console outputs. Also overwrote the Attach of the cdrom to be virtio instead of ide for aarch64/arm64 for console capabilities.