C CHI
C CHI

Reputation: 1

What happens when meet an exception?

I'm studying the part of kvm in linux and it seems that when the we meet an exception during kvm_run, the program will stuck in endless loop to deal with the execption.

For example, when I let kvm run wrmsr to write into a locked MSR IA32_FEATURE_CONTROL(in the intel handbook this will lead to a #GP), then when I run kvm, it endlessly handle_exception and not exit.

I've noticed that this happened in the KVM at least 4 years ago, the phenomenon of infinite loops often occurs, which puzzles me.

I want to know when a #GP or other execption generates in the real world, how the kernel deals with it, if a Interrupt is needed? Should these infinite loops not be handled in KVM?

Upvotes: 0

Views: 50

Answers (0)

Related Questions