Skip to content

feat(qemu): make Qemu class extensible and QemuProcess injectable#122

Open
Rahul-Sutariya wants to merge 1 commit into
eclipse-score:mainfrom
Rahul-Sutariya:rasu_extend_itf_qemu_class
Open

feat(qemu): make Qemu class extensible and QemuProcess injectable#122
Rahul-Sutariya wants to merge 1 commit into
eclipse-score:mainfrom
Rahul-Sutariya:rasu_extend_itf_qemu_class

Conversation

@Rahul-Sutariya

@Rahul-Sutariya Rahul-Sutariya commented Jul 15, 2026

Copy link
Copy Markdown

feat(qemu): add _extra_qemu_args() hook and QemuProcess DI support

Add a single overridable hook _extra_qemu_args() to the Qemu class
that returns additional command-line flags to append after the base
devices. Defaults to [] so existing behavior is unchanged.

Also add qemu=None parameter to QemuProcess.init for dependency
injection: when a pre-configured Qemu subclass instance is provided, it
is used directly instead of constructing a default one.

These two changes allow downstream plugins to inject custom QEMU devices
(e.g. ivshmem-plain for inter-VM shared memory) via inheritance +
override.

@lurtz

lurtz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@Rahul-Sutariya What a coincidence. I am also working on extending the QEMU code: #123

@lurtz lurtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look ok to me, but I am not really a code owner of ITF, thus not approving.

We should have a discussion what features the QEMU plugin should have and how its extension points look like.

@Rahul-Sutariya

Copy link
Copy Markdown
Author

Changes look ok to me, but I am not really a code owner of ITF, thus not approving.

We should have a discussion what features the QEMU plugin should have and how its extension points look like.

Hi @lurtz, thanks for the feedback.

This PR is focused on making the Qemu class and QemuProcess extensible so that downstream plugins can add custom QEMU devices (for example, ivshmem) through inheritance and dependency injection, instead of having to duplicate the command assembly logic.

Regarding the broader discussion about the QEMU plugin's features and extension points, I think that is a separate design topic and outside the scope of this PR. I'm probably not the right person to drive that discussion, so I'd prefer to keep this change focused on the extensibility improvements it introduces.

@Rahul-Sutariya Rahul-Sutariya force-pushed the rasu_extend_itf_qemu_class branch from 14ea215 to a748f87 Compare July 16, 2026 12:28
Add a single overridable hook `_extra_qemu_args()` to the Qemu class
that returns additional command-line flags to append after the base
devices. Defaults to [] so existing behavior is unchanged.

Also add `qemu=None` parameter to QemuProcess.__init__ for dependency
injection: when a pre-configured Qemu subclass instance is provided, it
is used directly instead of constructing a default one.

These two changes allow downstream plugins to inject custom QEMU devices
(e.g. ivshmem-plain for inter-VM shared memory) via inheritance +
override.
@Rahul-Sutariya Rahul-Sutariya force-pushed the rasu_extend_itf_qemu_class branch from a748f87 to fea832a Compare July 16, 2026 12:43

@lurtz lurtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving because it looks like nobody else is looking at this PR. Might there be another refactoring of this code or is it final now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants