public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM_EXIT_FAIL_ENTRY with hardware_entry_failure_reason = 7
@ 2023-07-26 16:35 Yahya Sohail
  2023-07-26 17:17 ` Sean Christopherson
  0 siblings, 1 reply; 8+ messages in thread
From: Yahya Sohail @ 2023-07-26 16:35 UTC (permalink / raw)
  To: kvm

Hi,

I'm trying to copy the state of an x86 emulator into a KVM VM.

I've loaded the relevant state (i.e. registers and memory) into a KVM VM 
and VCPU, and tried to do a KVM_RUN on the VCPU, but it fails with 
KVM_EXIT_FAIL_ENTRY and hardware_entry_failure_reason = 7. I looked 
through the KVM source and Intel manuals to determine that this either 
means that the CPU is in an interrupt window and the VM was setup to 
exit on an interrupt window, or that a VM entry occurred with invalid 
control fields. The former is not possible because my RFLAGS.IF = 0, 
meaning interrupts are currently disabled, so I think it's the latter.

Is it possible for someone using the KVM API to set the VMCS to an 
invalid state? If so, what fields in the kvm_run struct should I check 
that could cause such an issue?

Thanks,
Yahya Sohail

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-02 19:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 16:35 KVM_EXIT_FAIL_ENTRY with hardware_entry_failure_reason = 7 Yahya Sohail
2023-07-26 17:17 ` Sean Christopherson
2023-07-26 19:16   ` Yahya Sohail
2023-07-26 19:51     ` Sean Christopherson
2023-07-26 22:14       ` Yahya Sohail
2023-07-27 16:52         ` Sean Christopherson
2023-07-28 17:45           ` Yahya Sohail
2023-08-02 19:04             ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox