Skip to content

Add "hvm-pirq" platform key - #7235

Open
dinhngtu wants to merge 1 commit into
xapi-project:masterfrom
dinhngtu:dnt/pirq
Open

Add "hvm-pirq" platform key#7235
dinhngtu wants to merge 1 commit into
xapi-project:masterfrom
dinhngtu:dnt/pirq

Conversation

@dinhngtu

Copy link
Copy Markdown
Contributor

The HVM PIRQ feature is known to have compatibility issues with some AMD GPUs. It has been disabled by default in Xenlight version 024e7131be5c.

Add a platform control for hvm-pirq to allow it to be disabled. Also add it to the filtered_flags list to prevent it from being disabled by the platform_filter feature.

Tested-by: Teddy Astie teddy.astie@vates.tech

The HVM PIRQ feature is known to have compatibility issues with some AMD
GPUs. It has been disabled by default in Xenlight version 024e7131be5c.

Add a platform control for hvm-pirq to allow it to be disabled. Also add
it to the filtered_flags list to prevent it from being disabled by the
platform_filter feature.

Tested-by: Teddy Astie <teddy.astie@vates.tech>
Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>

@last-genius last-genius 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.

What's the issue with disabling PIRQs for new VMs altogether? From reading the upstream threads, it's either causing breakages, slowing things down, or not being used altogether (with virtualized local APIC active).

@dinhngtu

Copy link
Copy Markdown
Contributor Author

What's the issue with disabling PIRQs for new VMs altogether? From reading the upstream threads, it's either causing breakages, slowing things down, or not being used altogether (with virtualized local APIC active).

I don't think there's an issue with disabling it by default. Is there a migration path I could use for existing VMs?

@last-genius

Copy link
Copy Markdown
Contributor

I don't think there's an issue with disabling it by default.

Then it should just be enough to change the default in Platform.is_true to false

Is there a migration path I could use for existing VMs?

Existing VMs will keep the flags they booted up with, and be updated on reboot (only new domains call into domain_config_of_vm). Or do you mean something else?

@dinhngtu

dinhngtu commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

I don't think there's an issue with disabling it by default.

Then it should just be enough to change the default in Platform.is_true to false

Is there a migration path I could use for existing VMs?

Existing VMs will keep the flags they booted up with, and be updated on reboot (only new domains call into domain_config_of_vm). Or do you mean something else?

Existing VMs that don't have this flag set would still need the Platform.is_true ~default to be set to true right? Otherwise their PIRQ setting would be disabled upon migration to a newer host.

@last-genius

Copy link
Copy Markdown
Contributor

Existing VMs that don't have this flag set would still need the Platform.is_true ~default to be set to true right? Otherwise their PIRQ setting would be disabled upon migration to a newer host.

No, VMs keep their boot flags on migration/suspend/resume (hence, in Teddy's testing, changing platform flags only had an impact after a reboot):
xenopsd-xc: [debug||VM.pool_migrate|xenops] VM = 2a12f82d-cb2b-4ef5-8641-000000000001; reloading stored domain-level configuration

@andyhhp

andyhhp commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

HVM PIRQs should never have existed in the first place, but alas. Compatibility wise, what is critical is that this doesn't get turned off behind the back of a migrating/resuming VM.

Beyond that, it should be off-by-default for newly-booted VMs, and with an option to turn back on as a debugging strategy.

@andyhhp

andyhhp commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

One path which has been a source of bugs in the past is the metadata upgrade for incoming VMs which don't have a last-boot record, or have an incomplete one. That path must assume the worst case for the VM when synthesizing the old state.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants