[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] kvm_arch_put_registers and xsave

From: Alex Bligh
Subject: [Qemu-devel] kvm_arch_put_registers and xsave
Date: Sun, 19 Jun 2016 20:36:18 +0100

I'm still plugging away at my Hypervisor.Framework port (now rewritten
to be another accelerator like kvm).

It appears to be setting up memory regions, and I'm now working on
the equivalent of kvm_cpu_exec. I see an exit code 33 on the first
call, which is an invalid VMCS. This is unsurprising as I haven't
yet implemented the equivalent of kvm_arch_put_registers so the
register contents will presumably be illegal.

Looking at kvm_arch_put_registers it appears to be pretty complicated.
It appears to 'put' each individual register type, as well as putting
an xsave region. I'm a bit confused why the ordinary registers 'put'
are not then overwritten by the xsave put.

Assuming I am only targeting processors supporting XSAVE (which I
believe is reasonable given what Macs support Hypervisor.Framework),
is there a reason I shouldn't merely XRSTOR (by writing the
XSAVE region with the appropriate hv_ call) and ignore all the
other register futzing? Or is it more complicated than that
because (presumably) something sets up register states in the
cpu->regs, cpu->sregs areas? I'm a bit confused as to how all
this works to be honest. Any ideas / docs to point to?

Alex Bligh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]