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


Groups > linux.kernel > #1316718

Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the interrupt is not single-destination

From "rkrcmar@redhat.com" <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the interrupt is not single-destination
Date 2016-01-25 15:00 +0100
Message-ID <qUPQu-4Ie-7@gated-at.bofh.it> (permalink)
References (5 earlier) <qTgi6-LZ-7@gated-at.bofh.it> <qTqr8-7RN-19@gated-at.bofh.it> <qTzkK-5CO-3@gated-at.bofh.it> <qTK6t-4Fl-5@gated-at.bofh.it> <qUEBJ-513-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-01-25 09:49+0800, Yang Zhang:
> On 2016/1/22 21:31, rkrcmar@redhat.com wrote:
>>2016-01-22 10:03+0800, Yang Zhang:
>>>Not so complicated. We can reuse the wake up vector and check whether the
>>>interrupt is multicast when one of destination vcpu handles it.
>>
>>I'm not sure what you mean now ... I guess it is:
>>- Deliver the interrupt to a guest VCPU and relay the multicast to other
>>   VCPUs.  No, it's strictly worse than intercepting it in the host.
> 
> It is still handled in host context not guest context. The wakeup event
> cannot be consumed like posted event.

Ok.  ("when one of destination vcpu handles it" confused me into
thinking that you'd like to handle it with the notification vector.)

>                                       So it relies on hypervisor to inject
> the interrupt to guest. We can add the check at this point.

Yes, but I don't think we want to do that, because of following
drawbacks:

>>- Modify host's wakeup vector handler to send the multicast.
>>   It's so complicated, because all information you start with in the
>>   host is a vector number.  You start with no idea what the multicast
>>   interrupt should be.
>>
>>   We could add per-multicast PID to the list of parsed PIDs in
>>   wakeup_handler and use PID->multicast interrupt mapping to tell which
>>   interrupt we should send, but that seems worse than just delivering a
>>   non-remapped interrupt.

(should have been "remapped, but non-posted".)

>>   Also, if wakeup vector were used for wakeup and multicast, we'd be
>>   uselessly doing work, because we can't tell which reason triggered the
>>   interrupt before finishing one part -- using separate vectors for that
>>   would be a bit nicer.

(imprecise -- we would always have to check for ON bit of all PIDs from
 blocked VCPUs, for the original meaning of wakeup vector, and always
 either read the PIRR or check for ON bit of all PIDs that encode
 multicast interrupts;  then we have to clear ON bits for multicasts.)


---
There might be a benefit of using posted interrupts for host interrupts
when we run out of free interrupt vectors:  we could start using vectors
by multiple sources through posted interrupts, if using posted
interrupts is the fastest way to distinguish the interrupt source.

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


Thread

[PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the interrupt is not single-destination Feng Wu <feng.wu@intel.com> - 2016-01-20 03:10 +0100
  Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 04:10 +0100
    RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 04:20 +0100
      Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 04:40 +0100
        RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 05:50 +0100
          RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Tian, Kevin" <kevin.tian@intel.com> - 2016-01-21 06:00 +0100
          Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 06:00 +0100
            RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 06:10 +0100
              Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 06:40 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-21 06:50 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-21 17:40 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-22 03:10 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-22 14:40 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-25 03:00 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-25 15:00 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-26 02:50 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-26 19:30 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Yang Zhang <yang.zhang.wz@gmail.com> - 2016-01-27 03:10 +0100
                Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "rkrcmar@redhat.com" <rkrcmar@redhat.com> - 2016-01-27 16:10 +0100
                RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-21 06:50 +0100
  Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Radim Krčmář <rkrcmar@redhat.com> - 2016-01-21 17:30 +0100
    RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-22 02:50 +0100
      Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Radim Krcmár <rkrcmar@redhat.com> - 2016-01-22 14:10 +0100
        RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-25 13:30 +0100
          Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Paolo Bonzini <pbonzini@redhat.com> - 2016-01-25 13:40 +0100
            RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-25 13:50 +0100
          Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Radim Krcmár <rkrcmar@redhat.com> - 2016-01-25 15:10 +0100
            RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination "Wu, Feng" <feng.wu@intel.com> - 2016-01-26 02:00 +0100
        Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the  interrupt is not single-destination Paolo Bonzini <pbonzini@redhat.com> - 2016-01-25 13:30 +0100

csiph-web