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

'savevm' monitor command crashes QEMU. #205

Open
jacobbramley opened this issue Oct 7, 2022 · 5 comments
Open

'savevm' monitor command crashes QEMU. #205

jacobbramley opened this issue Oct 7, 2022 · 5 comments

Comments

@jacobbramley
Copy link

  • Configure QEMU such that VM snapshots are available. The easiest way is to pass -snapshot (or via cheribuild with --run/ephemeral).
  • Whilst running (e.g. at the CheriBSD login prompt), enter the monitor and issue savevm <name>:
(qemu) savevm test
qemu-system-morello: ../../qemu/migration/../target/cheri-common/cheri-compressed-cap/cheri_compressed_cap_common.h:474: cc128_addr_t cc128_compress_raw(const cc128_cap_t *): Assertion `(!csp->cr_tag || cc128_get_reserved(csp) == 0) && "Unknown reserved bits set it tagged capability"' failed.
@jrtc27
Copy link
Member

jrtc27 commented Oct 7, 2022

If that's the output you get you must have an old build of Morello QEMU, it's using cc128m not cc128 these days (historically cc128 was re-defined for Morello but that meant software couldn't use both at the same time, so now they're encoding formats with distinct names). I instead see:

Assertion failed: (field->size == sizeof(cc128m_cap_t)), function put_cap128m_register, file vmstate-types.c, line 405.

@jrtc27
Copy link
Member

jrtc27 commented Oct 7, 2022

Oh, hm, except that never made it from dev to qemu-cheri... should fix that

@jrtc27
Copy link
Member

jrtc27 commented Oct 7, 2022

Pushed some fixes to dev. It still doesn't work in general as we have no handling for memory tags and co-processor registers that aren't special cased will lose metadata, but it doesn't crash QEMU any more.

@jacobbramley
Copy link
Author

Could it print a warning message or similar? It's nice that it doesn't kill the VM now but I'm worried that it now gives the illusion of working.

@lion10
Copy link

lion10 commented Oct 14, 2022

Same problem, when I save a snapshot, it raises a segmentation fault.

Screenshot from 2022-10-14 15-19-49

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

No branches or pull requests

3 participants