Skip to content
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

Spoofing CPUID Results in the Linux-Stubdom Crashing #4980

Closed
dylangerdaly opened this issue Apr 17, 2019 · 9 comments
Closed

Spoofing CPUID Results in the Linux-Stubdom Crashing #4980

dylangerdaly opened this issue Apr 17, 2019 · 9 comments
Labels
C: Xen eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@dylangerdaly
Copy link

dylangerdaly commented Apr 17, 2019

Qubes OS version
R4.0

Affected component(s) or functionality
Linux Stub-dom

Brief summary
If you have Xen Spoof the CPU ID (XenVMMXenVMM to ZenVMMZenVMM) the Linux-Stubdom Crashes.

To Reproduce
Spoof the CPU ID and start an HVM appVM

How?

Apply these patches to vmm-xen and core-libvirt
https://gist.github.com/dylangerdaly/2ec8172116e63fd56feb0cf95f4d5a69
https://gist.github.com/dylangerdaly/74be3f316ce8f0ddfb27b0202aa5ec2d

Expected behavior
The VM to boot without crashing

Actual behavior
The Stubdomain Crashes causing the HVM to not boot.

Screenshots
Xen Hypervisor Log: https://imgur.com/a/wE7E3Dj
Stubdom Console Log: https://pastebin.com/fsX2bhh3

Additional context
Would be useful to get this working for Nvidia GPU Pass-through to HVMs

Solutions you've tried
Using MiniOS Stubdom dosen't work and will likely be removed from later Qubes Releases.

Relevant documentation you've consulted
A list of links to the Qubes documentation (or other relevant software documentation) pages you have already consulted.

Related, non-duplicate issues
A list of links to other bug reports, feature requests, or tasks in the qubes-issues tracker. Do not describe any other unreported bugs, features, or tasks here.

@dylangerdaly dylangerdaly added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Apr 17, 2019
@marmarek
Copy link
Member

Do you have some more of this hypervisor message?

@dylangerdaly
Copy link
Author

That's all it gives me, maybe I can compile Xen to be verbose?

@marmarek
Copy link
Member

Yes, set CONFIG_DEBUG=y in qubes-src/vmm-xen/config. CONFIG_FRAME_POINTER=y may also be useful.

@dylangerdaly
Copy link
Author

Is it worth waiting for Xen 4.12 release? Or directly working on 4.12/Qubes 4.1?

All of these patches are applying to Xen 4.8

@marmarek
Copy link
Member

marmarek commented Apr 18, 2019

Generally, it's better to develop new xen patches on top of latest development version and then possibly backport to older version.
That said, it isn't easy to get Qubes 4.1 working setup yet...

@dylangerdaly
Copy link
Author

Roger that, I think I'll wait until it's possible to get a "stable" Qubes 4.1 Dev Environment (Assuming 4.1 will be using Xen 4.12)

Maybe they've made it easier for spoofing the CPUID in 4.12?

@marmarek
Copy link
Member

In the meantime, there are testable images of Qubes 4.1, you can build it yourself or download from openqa.qubes-os.org (look for 4.1 build in the top section). Some more context and links in #5529

@khmartinsen
Copy link

khmartinsen commented Sep 4, 2020

I also tried patching Xen following what @dylangerdaly did but on a test image of 4.1 and had issues with libxl where no vms were able to launch.

What resources are there to learn more about the linux stub domain? I couldnt find much information related to it and pci passthrough.
Is there anywhere else people are working on doing this?

@andrewdavidwong andrewdavidwong added the eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) label Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment.
(For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Xen eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants