Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314371

Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts

From "rkrcmar@redhat.com" <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts
Date 2016-01-21 18:30 +0100
Message-ID <qTrdy-8tf-31@gated-at.bofh.it> (permalink)
References <qSQnE-8bo-19@gated-at.bofh.it> <qSQnF-8bo-51@gated-at.bofh.it> <qTfYK-Ea-5@gated-at.bofh.it> <qTg8q-Im-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-01-21 05:33+0000, Wu, Feng:
>> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
>> owner@vger.kernel.org] On Behalf Of Yang Zhang
>> On 2016/1/20 9:42, Feng Wu wrote:
>> > +			/*
>> > +			 * We may find a hardware disabled LAPIC here, if
>> that
>> > +			 * is the case, print out a error message once for each
>> > +			 * guest and return.
>> > +			 */
>> > +			if (!dst[idx-1] &&
>> > +				(kvm->arch.disabled_lapic_found == 0)) {
>> > +				kvm->arch.disabled_lapic_found = 1;
>> > +				printk(KERN_ERR
>> > +					"Disabled LAPIC found during irq
>> injection\n");
>> > +				goto out;
>> 
>> What does "goto out" mean? Inject successfully or fail? According the
>> value of ret which is set to ture here, it means inject successfully but

(true actually means that fast path did the job and slow path isn't
 needed.)

>> i = -1.

(I think there isn't a practical difference between *r=-1 and *r=0.)

> Oh, I didn't notice 'ret' is initialized to true, I thought it was initialized
> to false like another function, I should add a "ret = false' here. We should
> failed to inject the interrupt since hardware disabled LAPIC is found.

'ret = true' is the better one.  We know that the interrupt is not
deliverable [1], so there's no point in trying to deliver with the slow
path.  We behave similarly when the interrupt targets a single disabled
APIC.

---
1: Well ... it's possible that slowpath would deliver it thanks to
   different handling of disabled APICs, but it's undefined behavior,
   so it doesn't matter matter if we don't try.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] VT-d posted-interrupts follow ups Feng Wu <feng.wu@intel.com> - 2016-01-20 03:10 +0100
  [PATCH v3 4/4] KVM/VMX: Add host irq information in trace event when updating IRTE for posted interrupts Feng Wu <feng.wu@intel.com> - 2016-01-20 03:10 +0100
    Re: [PATCH v3 4/4] KVM/VMX: Add host irq information in trace event  when updating IRTE for posted interrupts Radim Krčmář <rkrcmar@redhat.com> - 2016-01-21 21:20 +0100
  [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts Feng Wu <feng.wu@intel.com> - 2016-01-20 03:10 +0100
    Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 06:30 +0100
      RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 06:40 +0100
        RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 06:50 +0100
          Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 07:00 +0100
            Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 07:10 +0100
            RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 07:10 +0100
        Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 06:50 +0100
        Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-21 18:30 +0100
          RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-22 03:10 +0100
          Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-22 05:10 +0100
            Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-22 14:50 +0100
    Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Radim Krčmář <rkrcmar@redhat.com> - 2016-01-21 21:00 +0100
      RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-22 06:20 +0100
        Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Radim Krcmár <rkrcmar@redhat.com> - 2016-01-22 15:10 +0100
          Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Paolo Bonzini <pbonzini@redhat.com> - 2016-01-25 13:30 +0100
            Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Radim Krcmár <rkrcmar@redhat.com> - 2016-01-25 16:30 +0100
              Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts Paolo Bonzini <pbonzini@redhat.com> - 2016-01-25 17:20 +0100
                RE: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver  lowest-priority interrupts "Wu, Feng" <feng.wu@intel.com> - 2016-01-26 02:20 +0100

csiph-web