lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Jan 2022 12:20:48 -0500
From:   Matthew Rosato <mjrosato@...ux.ibm.com>
To:     Pierre Morel <pmorel@...ux.ibm.com>, linux-s390@...r.kernel.org
Cc:     alex.williamson@...hat.com, cohuck@...hat.com,
        schnelle@...ux.ibm.com, farman@...ux.ibm.com,
        borntraeger@...ux.ibm.com, hca@...ux.ibm.com, gor@...ux.ibm.com,
        gerald.schaefer@...ux.ibm.com, agordeev@...ux.ibm.com,
        frankja@...ux.ibm.com, david@...hat.com, imbrenda@...ux.ibm.com,
        vneethv@...ux.ibm.com, oberpar@...ux.ibm.com, freude@...ux.ibm.com,
        thuth@...hat.com, pasic@...ux.ibm.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 26/30] vfio-pci/zdev: wire up zPCI adapter interrupt
 forwarding support

On 1/19/22 12:10 PM, Pierre Morel wrote:
> 
> 
> On 1/14/22 21:31, Matthew Rosato wrote:
...
>> diff --git a/include/uapi/linux/vfio_zdev.h 
>> b/include/uapi/linux/vfio_zdev.h
>> index 575f0410dc66..c574e23f9385 100644
>> --- a/include/uapi/linux/vfio_zdev.h
>> +++ b/include/uapi/linux/vfio_zdev.h
>> @@ -90,4 +90,24 @@ struct vfio_device_zpci_interp {
>>       __u32 fh;        /* Host device function handle */
>>   };
>> +/**
>> + * VFIO_DEVICE_FEATURE_ZPCI_AIF
>> + *
>> + * This feature is used for enabling forwarding of adapter interrupts 
>> directly
>> + * from firmware to the guest.  When setting this feature, the flags 
>> indicate
>> + * whether to enable/disable the feature and the structure defined 
>> below is
>> + * used to setup the forwarding structures.  When getting this 
>> feature, only
>> + * the flags are used to indicate the current state.
>> + */
>> +struct vfio_device_zpci_aif {
>> +    __u64 flags;
>> +#define VFIO_DEVICE_ZPCI_FLAG_AIF_FLOAT 1
>> +#define VFIO_DEVICE_ZPCI_FLAG_AIF_HOST 2
> 
> Generaly it looks good to me but I miss some explanation on these flags.

I can add a small line comment for each, like:

  AIF_FLOAT 1 /* Floating interrupts enabled */
  AIF_HOST 2  /* Host delivery forced */

But here's a bit more detail:

On SET:
AIF_FLOAT = 1 means enable the interrupt forwarding assist for floating 
interrupt delivery
AIF_FLOAT = 0 means to disable it.
AIF_HOST = 1 means the assist will always deliver the interrupt to the 
host and let the host inject it
AIF_HOST = 0 host only gets interrupts when firmware can't deliver

on GET, we just indicate the current settings from the most recent SET, 
meaning:
AIF_FLOAT = 1 interrupt forwarding assist is currently active
AIF_FLOAT = 0 interrupt forwarding assist is not currently active
AIF_HOST = 1 interrupt forwarding will always go through host
AIF_HOST = 0 interrupt forwarding will only go through the host when 
necessary

> 
> Which makes me realize that a more complete documentation under 
> Documentation/S390 for VFIO zPCI as we have for VFIO AP and VFIO CCW 
> would be of great interest.

You're not wrong -- a similar comment came up for QEMU.  I will add this 
to my todo list as a follow-on.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ