mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
KVM: nSVM: remove HF_HIF_MASK
The L1 flags can be found in the save area of svm->nested.hsave, fish it from there so that there is one fewer thing to migrate. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e9fd761a46
commit
08245e6d2e
3 changed files with 1 additions and 7 deletions
|
@ -1595,7 +1595,6 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HF_GIF_MASK (1 << 0)
|
#define HF_GIF_MASK (1 << 0)
|
||||||
#define HF_HIF_MASK (1 << 1)
|
|
||||||
#define HF_NMI_MASK (1 << 3)
|
#define HF_NMI_MASK (1 << 3)
|
||||||
#define HF_IRET_MASK (1 << 4)
|
#define HF_IRET_MASK (1 << 4)
|
||||||
#define HF_GUEST_MASK (1 << 5) /* VCPU is in guest-mode */
|
#define HF_GUEST_MASK (1 << 5) /* VCPU is in guest-mode */
|
||||||
|
|
|
@ -371,11 +371,6 @@ void enter_svm_guest_mode(struct vcpu_svm *svm, u64 vmcb_gpa,
|
||||||
struct vmcb *nested_vmcb)
|
struct vmcb *nested_vmcb)
|
||||||
{
|
{
|
||||||
svm->nested.vmcb = vmcb_gpa;
|
svm->nested.vmcb = vmcb_gpa;
|
||||||
if (kvm_get_rflags(&svm->vcpu) & X86_EFLAGS_IF)
|
|
||||||
svm->vcpu.arch.hflags |= HF_HIF_MASK;
|
|
||||||
else
|
|
||||||
svm->vcpu.arch.hflags &= ~HF_HIF_MASK;
|
|
||||||
|
|
||||||
load_nested_vmcb_control(svm, &nested_vmcb->control);
|
load_nested_vmcb_control(svm, &nested_vmcb->control);
|
||||||
nested_prepare_vmcb_save(svm, nested_vmcb);
|
nested_prepare_vmcb_save(svm, nested_vmcb);
|
||||||
nested_prepare_vmcb_control(svm);
|
nested_prepare_vmcb_control(svm);
|
||||||
|
|
|
@ -3105,7 +3105,7 @@ bool svm_interrupt_blocked(struct kvm_vcpu *vcpu)
|
||||||
if (is_guest_mode(vcpu)) {
|
if (is_guest_mode(vcpu)) {
|
||||||
/* As long as interrupts are being delivered... */
|
/* As long as interrupts are being delivered... */
|
||||||
if ((svm->nested.ctl.int_ctl & V_INTR_MASKING_MASK)
|
if ((svm->nested.ctl.int_ctl & V_INTR_MASKING_MASK)
|
||||||
? !(svm->vcpu.arch.hflags & HF_HIF_MASK)
|
? !(svm->nested.hsave->save.rflags & X86_EFLAGS_IF)
|
||||||
: !(kvm_get_rflags(vcpu) & X86_EFLAGS_IF))
|
: !(kvm_get_rflags(vcpu) & X86_EFLAGS_IF))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue