3 ms·
Then the CPU isn’t stopping and is moving on doing other work. Meaning the divide by zero could be processed by a background CPU and doesn’t require immediate h
by vlovich123 5y ago
Then the CPU isn’t stopping and is moving on doing other work. Meaning the divide by zero could be processed by a background CPU and doesn’t require immediate handling. Same for page faults.
- bonzini 5y agoYour instance can still be preempted by the hypervisor.
- fulafel 5y agoThe hypervisor is just some software that runs on the same CPU. It wouldn't help if the assertion that the CPU can't continue was true.
- bonzini 5y agoThe CPU can't continue running user code because it jumps to the exception handler. But it can get to the hypervisor at any instruction boundary. (I write a hypervisor for a living :)).
- bananabreakfast 5y agoIncorrect. The "CPU" is stopping and handling the fault. There is no background CPU from your perspective. In a cloud provider you are always in a virtual environment and using a vCPU which is constantly being preempted by the hypervisor. You cannot DOS a hypervisor just by bogging down your virtualized kernel.
- bonzini 5y agoThere are a couple x86 corner cases where you can do so, by causing an endless stream of exceptions. But they are not going to happen in a hot path, so the hypervisors force a vmexit on those exceptions and avoid that the processor freezes forever.
- zaptheimpaler 5y agoThe divide by zero in this case is handled by a virtual CPU implemented in the hypervisor, not the actual physical CPU on the server.