@@ -1580,7 +1580,7 @@ void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
1580
1580
vmcs_writel (GUEST_RFLAGS , rflags );
1581
1581
1582
1582
if ((old_rflags ^ vmx -> rflags ) & X86_EFLAGS_VM )
1583
- vmx -> emulation_required = vmx_emulation_required (vcpu );
1583
+ vmx -> vt . emulation_required = vmx_emulation_required (vcpu );
1584
1584
}
1585
1585
1586
1586
bool vmx_get_if_flag (struct kvm_vcpu * vcpu )
@@ -1862,7 +1862,7 @@ void vmx_inject_exception(struct kvm_vcpu *vcpu)
1862
1862
return ;
1863
1863
}
1864
1864
1865
- WARN_ON_ONCE (vmx -> emulation_required );
1865
+ WARN_ON_ONCE (vmx -> vt . emulation_required );
1866
1866
1867
1867
if (kvm_exception_is_soft (ex -> vector )) {
1868
1868
vmcs_write32 (VM_ENTRY_INSTRUCTION_LEN ,
@@ -3391,7 +3391,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
3391
3391
}
3392
3392
3393
3393
/* depends on vcpu->arch.cr0 to be set to a new value */
3394
- vmx -> emulation_required = vmx_emulation_required (vcpu );
3394
+ vmx -> vt . emulation_required = vmx_emulation_required (vcpu );
3395
3395
}
3396
3396
3397
3397
static int vmx_get_max_ept_level (void )
@@ -3654,7 +3654,7 @@ void vmx_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg)
3654
3654
{
3655
3655
__vmx_set_segment (vcpu , var , seg );
3656
3656
3657
- to_vmx (vcpu )-> emulation_required = vmx_emulation_required (vcpu );
3657
+ to_vmx (vcpu )-> vt . emulation_required = vmx_emulation_required (vcpu );
3658
3658
}
3659
3659
3660
3660
void vmx_get_cs_db_l_bits (struct kvm_vcpu * vcpu , int * db , int * l )
@@ -5800,7 +5800,7 @@ static bool vmx_emulation_required_with_pending_exception(struct kvm_vcpu *vcpu)
5800
5800
{
5801
5801
struct vcpu_vmx * vmx = to_vmx (vcpu );
5802
5802
5803
- return vmx -> emulation_required && !vmx -> rmode .vm86_active &&
5803
+ return vmx -> vt . emulation_required && !vmx -> rmode .vm86_active &&
5804
5804
(kvm_is_exception_pending (vcpu ) || vcpu -> arch .exception .injected );
5805
5805
}
5806
5806
@@ -5813,7 +5813,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
5813
5813
intr_window_requested = exec_controls_get (vmx ) &
5814
5814
CPU_BASED_INTR_WINDOW_EXITING ;
5815
5815
5816
- while (vmx -> emulation_required && count -- != 0 ) {
5816
+ while (vmx -> vt . emulation_required && count -- != 0 ) {
5817
5817
if (intr_window_requested && !vmx_interrupt_blocked (vcpu ))
5818
5818
return handle_interrupt_window (& vmx -> vcpu );
5819
5819
@@ -6460,7 +6460,7 @@ static int __vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
6460
6460
* the least awful solution for the userspace case without
6461
6461
* risking false positives.
6462
6462
*/
6463
- if (vmx -> emulation_required ) {
6463
+ if (vmx -> vt . emulation_required ) {
6464
6464
nested_vmx_vmexit (vcpu , EXIT_REASON_TRIPLE_FAULT , 0 , 0 );
6465
6465
return 1 ;
6466
6466
}
@@ -6470,7 +6470,7 @@ static int __vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
6470
6470
}
6471
6471
6472
6472
/* If guest state is invalid, start emulating. L2 is handled above. */
6473
- if (vmx -> emulation_required )
6473
+ if (vmx -> vt . emulation_required )
6474
6474
return handle_invalid_guest_state (vcpu );
6475
6475
6476
6476
if (exit_reason .failed_vmentry ) {
@@ -6963,7 +6963,7 @@ void vmx_handle_exit_irqoff(struct kvm_vcpu *vcpu)
6963
6963
{
6964
6964
struct vcpu_vmx * vmx = to_vmx (vcpu );
6965
6965
6966
- if (vmx -> emulation_required )
6966
+ if (vmx -> vt . emulation_required )
6967
6967
return ;
6968
6968
6969
6969
if (vmx_get_exit_reason (vcpu ).basic == EXIT_REASON_EXTERNAL_INTERRUPT )
@@ -7286,7 +7286,7 @@ fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu, bool force_immediate_exit)
7286
7286
* start emulation until we arrive back to a valid state. Synthesize a
7287
7287
* consistency check VM-Exit due to invalid guest state and bail.
7288
7288
*/
7289
- if (unlikely (vmx -> emulation_required )) {
7289
+ if (unlikely (vmx -> vt . emulation_required )) {
7290
7290
vmx -> fail = 0 ;
7291
7291
7292
7292
vmx -> vt .exit_reason .full = EXIT_REASON_INVALID_STATE ;
0 commit comments