Loading Documentation/virtual/kvm/api.txt +12 −3 Original line number Diff line number Diff line Loading @@ -2901,14 +2901,19 @@ userspace buffer and its length: struct kvm_s390_irq_state { __u64 buf; __u32 flags; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; __u32 reserved[4]; /* will stay unused for compatibility reasons */ }; Userspace passes in the above struct and for each pending interrupt a struct kvm_s390_irq is copied to the provided buffer. The structure contains a flags and a reserved field for future extensions. As the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and reserved, these fields can not be used in the future without breaking compatibility. If -ENOBUFS is returned the buffer provided was too small and userspace may retry with a bigger buffer. Loading @@ -2932,10 +2937,14 @@ containing a struct kvm_s390_irq_state: struct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 pad; __u32 reserved[4]; /* will stay unused for compatibility reasons */ }; The restrictions for flags and reserved apply as well. (see KVM_S390_GET_IRQ_STATE) The userspace memory referenced by buf contains a struct kvm_s390_irq for each interrupt to be injected into the guest. If one of the interrupts could not be injected for some reason the Loading arch/s390/kvm/Makefile +1 −4 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 # Makefile for kernel virtual machines on s390 # # Copyright IBM Corp. 2008 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License (version 2 only) # as published by the Free Software Foundation. KVM := ../../../virt/kvm common-objs = $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/async_pf.o $(KVM)/irqchip.o $(KVM)/vfio.o Loading arch/s390/kvm/diag.c +1 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * handling diagnose instructions * * Copyright IBM Corp. 2008, 2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): Carsten Otte <cotte@de.ibm.com> * Christian Borntraeger <borntraeger@de.ibm.com> */ Loading arch/s390/kvm/gaccess.h +1 −4 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * access guest memory * * Copyright IBM Corp. 2008, 2014 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): Carsten Otte <cotte@de.ibm.com> */ Loading arch/s390/kvm/guestdbg.c +1 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * kvm guest debug support * * Copyright IBM Corp. 2014 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> */ #include <linux/kvm_host.h> Loading Loading
Documentation/virtual/kvm/api.txt +12 −3 Original line number Diff line number Diff line Loading @@ -2901,14 +2901,19 @@ userspace buffer and its length: struct kvm_s390_irq_state { __u64 buf; __u32 flags; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; __u32 reserved[4]; /* will stay unused for compatibility reasons */ }; Userspace passes in the above struct and for each pending interrupt a struct kvm_s390_irq is copied to the provided buffer. The structure contains a flags and a reserved field for future extensions. As the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and reserved, these fields can not be used in the future without breaking compatibility. If -ENOBUFS is returned the buffer provided was too small and userspace may retry with a bigger buffer. Loading @@ -2932,10 +2937,14 @@ containing a struct kvm_s390_irq_state: struct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 pad; __u32 reserved[4]; /* will stay unused for compatibility reasons */ }; The restrictions for flags and reserved apply as well. (see KVM_S390_GET_IRQ_STATE) The userspace memory referenced by buf contains a struct kvm_s390_irq for each interrupt to be injected into the guest. If one of the interrupts could not be injected for some reason the Loading
arch/s390/kvm/Makefile +1 −4 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 # Makefile for kernel virtual machines on s390 # # Copyright IBM Corp. 2008 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License (version 2 only) # as published by the Free Software Foundation. KVM := ../../../virt/kvm common-objs = $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/async_pf.o $(KVM)/irqchip.o $(KVM)/vfio.o Loading
arch/s390/kvm/diag.c +1 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * handling diagnose instructions * * Copyright IBM Corp. 2008, 2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): Carsten Otte <cotte@de.ibm.com> * Christian Borntraeger <borntraeger@de.ibm.com> */ Loading
arch/s390/kvm/gaccess.h +1 −4 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * access guest memory * * Copyright IBM Corp. 2008, 2014 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): Carsten Otte <cotte@de.ibm.com> */ Loading
arch/s390/kvm/guestdbg.c +1 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * kvm guest debug support * * Copyright IBM Corp. 2014 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. * * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> */ #include <linux/kvm_host.h> Loading