Nested support
Closed this issue · 7 comments
Is nested support functional? I would like to reproduce this scenario for academic purpose for RDTSC integrity:
L0 KSM -> L1 KSM (Malicious)
L0 controls RDTSC/RDTSCP exit handler, L1 tries to controls them.
Guest software call RDTSC, L0 returns the bare machine value WITHOUT invoking L1
Can I do this?
Nesting support is minimal, but it's quite trivial to add new code to it.
Yes, you can do it, since L0 gets the real VM exit anyway, or you can just strip their RDTSC/RDTSCP controls in the vmwrite VM exit handler.
I'm sorry if I'm being annoying, but do you have some literature on how can I do this or can you give me a brief how to?
nested_can_handle decides whether L0 will exit to L1 to handle the event, you can modify that to your needs or simply modify nested_vmcs_write to mask out the RDTSC exiting bit.
Thanks! The nested VM should be KSM or any other?
KSM may not be able to nest itself. Up to you.
But should I use any other hypervisor?
Like I said, it's up to you. Some may not work because it doesn't emulate many important features, by they are quite easy to add.
If you decide to go with KSM, then make sure to change device name, etc so it can be loaded a second time.