lkml.org 
[lkml]   [2022]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 12/21] KVM: s390: pci: enable host forwarding of Adapter Event Notifications
From


Am 26.04.22 um 22:08 schrieb Matthew Rosato:
[...]

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>

one comment below.


> +static void aen_process_gait(u8 isc)
> +{
> + bool found = false, first = true;
> + union zpci_sic_iib iib = {{0}};
> + unsigned long si, flags;
> +
> + spin_lock_irqsave(&aift->gait_lock, flags);

I think we can live with this for now, but if it turns out to create too long periods of disabled interrupts or lock hold times we might want to consider moving gaite access to an rcu-like approach.

> +
> + if (!aift->gait) {
> + spin_unlock_irqrestore(&aift->gait_lock, flags);
> + return;
> + }
> +
> + for (si = 0;;) {
> + /* Scan adapter summary indicator bit vector */
> + si = airq_iv_scan(aift->sbv, si, airq_iv_end(aift->sbv));
> + if (si == -1UL) {
> + if (first || found) {
> + /* Re-enable interrupts. */
> + zpci_set_irq_ctrl(SIC_IRQ_MODE_SINGLE, isc,
> + &iib);
> + first = found = false;
> + } else {
> + /* Interrupts on and all bits processed */
> + break;
> + }
> + found = false;
> + si = 0;
> + /* Scan again after re-enabling interrupts */
> + continue;
> + }
> + found = true;
> + aen_host_forward(si);
> + }
> +
> + spin_unlock_irqrestore(&aift->gait_lock, flags);
> +}
> +

\
 
 \ /
  Last update: 2022-05-05 14:39    [W:0.457 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site