Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

virtcontainers: Append max ports to virtio-serial device #2676

Closed
hejianet opened this issue May 11, 2020 · 2 comments · Fixed by #2677
Closed

virtcontainers: Append max ports to virtio-serial device #2676

hejianet opened this issue May 11, 2020 · 2 comments · Fixed by #2677

Comments

@hejianet
Copy link

Which feature do you think can be improved?

virtcontainers: Append max ports to virtio-serial device

How can it be improved?
Govmm has provided a "max_ports" parameter to allow API consumers to change the maximum number of ports in the virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Additional Information

No

Before raising this feature request

Have you looked at the limitations document?
Yes

@hejianet hejianet added enhancement Improvement to an existing feature needs-review Needs to be assessed by the team. labels May 11, 2020
justin-he added a commit to justin-he/runtime that referenced this issue May 11, 2020
Update github.com/intel/govmm.

shortlog:
29529a5 Add rt clock definition for rtc clock in qemu
0e98b61 qemu: Add max_ports option to virtio-serial device

Fixes: kata-containers#2676

Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue May 11, 2020
Govmm has provided a "max_ports" parameter to allow API consumers to
change the maximum number of ports in the virtio-serial devices, setting
a lower number of ports can improve the boot time and reduce the attack
surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue May 11, 2020
Govmm has provided a "max_ports" parameter to allow API consumers to
change the maximum number of ports in the virtio-serial devices, setting
a lower number of ports can improve the boot time and reduce the attack
surface.

Qemu enables ioeventfd by default for virtio-serial-pci, if max_ports is
31 by default, virtio-serial-bus will add 2+2+30*2=64 virtqueues. It will
cost a lot of time overhead during boot time.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue May 30, 2020
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue Oct 14, 2020
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue Oct 14, 2020
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
justin-he added a commit to justin-he/runtime that referenced this issue Oct 16, 2020
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
@c3d
Copy link
Member

c3d commented Dec 1, 2020

Open PR #2677 not correctly linked here.

@c3d c3d linked a pull request Dec 1, 2020 that will close this issue
@c3d c3d removed enhancement Improvement to an existing feature needs-review Needs to be assessed by the team. labels Dec 1, 2020
justin-he added a commit to justin-he/runtime that referenced this issue Dec 2, 2020
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: kata-containers#2676
Signed-off-by: Jia He <[email protected]>
@c3d
Copy link
Member

c3d commented Dec 8, 2020

Linking to kata-containers/kata-containers#249 (2.0 placeholder, apparently)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants