kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>,
	Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Shuah Khan <shuah@kernel.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 0/3] Reanme the definitions of INTERRUPT_PENDING, NMI_PENDING and TSC_OFFSETING
Date: Mon, 9 Dec 2019 16:23:15 +0100	[thread overview]
Message-ID: <2beeb1fb-7d3a-d829-38e0-ddf76b65bd3c@redhat.com> (raw)
In-Reply-To: <20191206204747.GD5433@linux.intel.com>

On 06/12/19 21:47, Sean Christopherson wrote:
>> When reading the codes, I find the definitions of interrupt-window exiting
>> and nmi-window exiting don't match the names in latest intel SDM.
> I prefer KVM's names even though they diverge from the SDM.  The "window
> exiting" terminology is very literal, which is desirable for the SDM
> because it doesn't leave any wiggle room.  But for software, IMO the
> "event pending" terminology is preferable as it's more descriptive of the
> intended use of the control, e.g. KVM sets VIRTUAL_{INTR,NMI}_PENDING when
> it has a virtual event to inject and clears it after injecting said event.
> 

On the other hand:

static void enable_irq_window(struct kvm_vcpu *vcpu)
{
        exec_controls_setbit(to_vmx(vcpu), CPU_BASED_VIRTUAL_INTR_PENDING);
}

static void enable_nmi_window(struct kvm_vcpu *vcpu)
{
        if (!enable_vnmi ||
            vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_STI) {
                enable_irq_window(vcpu);
                return;
        }

        exec_controls_setbit(to_vmx(vcpu), CPU_BASED_VIRTUAL_NMI_PENDING);
}

so we're already using a lot the "window" nomenclature in KVM.  I've applied Xiaoyao's patches.

Paolo


      reply	other threads:[~2019-12-09 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  8:45 [PATCH 0/3] Reanme the definitions of INTERRUPT_PENDING, NMI_PENDING and TSC_OFFSETING Xiaoyao Li
2019-12-06  8:45 ` [PATCH 1/3] KVM: VMX: Rename INTERRUPT_PENDING to INTERRUPT_WINDOW Xiaoyao Li
2019-12-06  8:45 ` [PATCH 2/3] KVM: VMX: Rename NMI_PENDING to NMI_WINDOW Xiaoyao Li
2019-12-06  8:45 ` [PATCH 3/3] KVM: VMX: Fix the spelling of CPU_BASED_USE_TSC_OFFSETTING Xiaoyao Li
2019-12-06 20:47 ` [PATCH 0/3] Reanme the definitions of INTERRUPT_PENDING, NMI_PENDING and TSC_OFFSETING Sean Christopherson
2019-12-09 15:23   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2beeb1fb-7d3a-d829-38e0-ddf76b65bd3c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=shuah@kernel.org \
    --cc=xiaoyao.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).