diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-30 12:34:26 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-30 12:35:44 +0000 |
| commit | 25f8033d556aa17afaea4a5196ea7a69fe248320 (patch) | |
| tree | 0f056db167683be54ea1e5e72d29d6069af55e7d /results/classifier/deepseek-2-tmp/output/hypervisor/1809144 | |
| parent | 8e6da29e4ee5fc14bc1cc816a24f21271f14090d (diff) | |
| download | qemu-analysis-25f8033d556aa17afaea4a5196ea7a69fe248320.tar.gz qemu-analysis-25f8033d556aa17afaea4a5196ea7a69fe248320.zip | |
add new temporary deepseek-r1:14b results
Diffstat (limited to 'results/classifier/deepseek-2-tmp/output/hypervisor/1809144')
| -rw-r--r-- | results/classifier/deepseek-2-tmp/output/hypervisor/1809144 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/results/classifier/deepseek-2-tmp/output/hypervisor/1809144 b/results/classifier/deepseek-2-tmp/output/hypervisor/1809144 new file mode 100644 index 000000000..e09a04524 --- /dev/null +++ b/results/classifier/deepseek-2-tmp/output/hypervisor/1809144 @@ -0,0 +1,36 @@ + +SVM instructions fail with SVME bit enabled + +I was trying to use QEMU/TCG to emulate some stuff that uses SVM. +I know SVM is only partially implemented but I gave it a try anyway. + +I found that if SVM is enabled in the same basic block in which there's a call to VMSAVE/etc, +the call fails as illegal op because the flags don't get updated correctly. + +The pseudocode for the asm I'm running is: + +``` +EFER |= SVME; set the appropriate bit with wrmsr +vmsave +``` + +This is an example of the relevant translate.c code: + +``` + if (!(s->flags & HF_SVME_MASK) || !s->pe) { + goto illegal_op; + } + if (s->cpl != 0) { + gen_exception(s, EXCP0D_GPF, pc_start - s->cs_base); + break; + } +``` + +s->flags doesn't get updated after the wrmsr instruction and so QEMU raises an illegal opcode interrupt. + +A quick fix is to make the tb end after `wrmsr` instructions, but it's an hack afaik. +I'm not too comfortable with QEMU's code, so I don't know what a proper fix would be. + +Cheers, + +thebabush \ No newline at end of file |