lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 15/30] KVM: s390: pci: do initial setup for AEN interpretation
From
On 1/25/22 7:23 AM, Pierre Morel wrote:
>
>
> On 1/14/22 21:31, Matthew Rosato wrote:
>> Initial setup for Adapter Event Notification Interpretation for zPCI
>> passthrough devices.  Specifically, allocate a structure for
>> forwarding of
>> adapter events and pass the address of this structure to firmware.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> ---
>>   arch/s390/include/asm/pci.h      |   4 +
>>   arch/s390/include/asm/pci_insn.h |  12 +++
>>   arch/s390/kvm/interrupt.c        |  14 +++
>>   arch/s390/kvm/kvm-s390.c         |   9 ++
>>   arch/s390/kvm/pci.c              | 144 +++++++++++++++++++++++++++++++
>>   arch/s390/kvm/pci.h              |  42 +++++++++
>>   arch/s390/pci/pci.c              |   6 ++
>>   7 files changed, 231 insertions(+)
>>   create mode 100644 arch/s390/kvm/pci.h
>>
> ...snip...
>
>> new file mode 100644
>> index 000000000000..b2000ed7b8c3
>> --- /dev/null
>> +++ b/arch/s390/kvm/pci.h
>> @@ -0,0 +1,42 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * s390 kvm PCI passthrough support
>> + *
>> + * Copyright IBM Corp. 2021
>> + *
>> + *    Author(s): Matthew Rosato <mjrosato@linux.ibm.com>
>> + */
>> +
>> +#ifndef __KVM_S390_PCI_H
>> +#define __KVM_S390_PCI_H
>> +
>> +#include <linux/pci.h>
>> +#include <linux/mutex.h>
>> +#include <asm/airq.h>
>> +#include <asm/kvm_pci.h>
>> +
>> +struct zpci_gaite {
>> +    u32 gisa;
>> +    u8 gisc;
>> +    u8 count;
>> +    u8 reserved;
>> +    u8 aisbo;
>> +    u64 aisb;
>> +};
>> +
>> +struct zpci_aift {
>> +    struct zpci_gaite *gait;
>> +    struct airq_iv *sbv;
>> +    struct kvm_zdev **kzdev;
>> +    spinlock_t gait_lock; /* Protects the gait, used during AEN
>> forward */
>> +    struct mutex lock; /* Protects the other structures in aift */
>
> To facilitate review and debug, can we please rename the lock aift_lock?
>
>

OK, sure

\
 
 \ /
  Last update: 2022-01-25 16:02    [W:0.100 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site