From: Greg Kroah-Hartman Date: Wed, 12 May 2021 10:24:50 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v5.4.119~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20c477a4b8f216aff6fdaff4f9358c8975293399;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: kvm-s390-split-kvm_s390_real_to_abs.patch --- diff --git a/queue-4.4/kvm-s390-split-kvm_s390_real_to_abs.patch b/queue-4.4/kvm-s390-split-kvm_s390_real_to_abs.patch new file mode 100644 index 00000000000..76a119a20e7 --- /dev/null +++ b/queue-4.4/kvm-s390-split-kvm_s390_real_to_abs.patch @@ -0,0 +1,71 @@ +From c5d1f6b531e68888cbe6718b3f77a60115d58b9c Mon Sep 17 00:00:00 2001 +From: Claudio Imbrenda +Date: Mon, 22 Mar 2021 15:05:58 +0100 +Subject: KVM: s390: split kvm_s390_real_to_abs + +From: Claudio Imbrenda + +commit c5d1f6b531e68888cbe6718b3f77a60115d58b9c upstream. + +A new function _kvm_s390_real_to_abs will apply prefixing to a real address +with a given prefix value. + +The old kvm_s390_real_to_abs becomes now a wrapper around the new function. + +This is needed to avoid code duplication in vSIE. + +Signed-off-by: Claudio Imbrenda +Reviewed-by: David Hildenbrand +Reviewed-by: Thomas Huth +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20210322140559.500716-2-imbrenda@linux.ibm.com +Signed-off-by: Christian Borntraeger +Signed-off-by: Greg Kroah-Hartman +--- + arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +--- a/arch/s390/kvm/gaccess.h ++++ b/arch/s390/kvm/gaccess.h +@@ -21,17 +21,14 @@ + + /** + * kvm_s390_real_to_abs - convert guest real address to guest absolute address +- * @vcpu - guest virtual cpu ++ * @prefix - guest prefix + * @gra - guest real address + * + * Returns the guest absolute address that corresponds to the passed guest real +- * address @gra of a virtual guest cpu by applying its prefix. ++ * address @gra of by applying the given prefix. + */ +-static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu, +- unsigned long gra) ++static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra) + { +- unsigned long prefix = kvm_s390_get_prefix(vcpu); +- + if (gra < 2 * PAGE_SIZE) + gra += prefix; + else if (gra >= prefix && gra < prefix + 2 * PAGE_SIZE) +@@ -40,6 +37,20 @@ static inline unsigned long kvm_s390_rea + } + + /** ++ * kvm_s390_real_to_abs - convert guest real address to guest absolute address ++ * @vcpu - guest virtual cpu ++ * @gra - guest real address ++ * ++ * Returns the guest absolute address that corresponds to the passed guest real ++ * address @gra of a virtual guest cpu by applying its prefix. ++ */ ++static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu, ++ unsigned long gra) ++{ ++ return _kvm_s390_real_to_abs(kvm_s390_get_prefix(vcpu), gra); ++} ++ ++/** + * kvm_s390_logical_to_effective - convert guest logical to effective address + * @vcpu: guest virtual cpu + * @ga: guest logical address diff --git a/queue-4.4/series b/queue-4.4/series index 89683c17317..a9163ca2c83 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -72,3 +72,4 @@ alsa-hda-realtek-re-order-alc882-acer-quirk-table-entries.patch alsa-hda-realtek-re-order-alc882-sony-quirk-table-entries.patch alsa-hda-realtek-re-order-alc269-sony-quirk-table-entries.patch alsa-hda-realtek-remove-redundant-entry-for-alc861-haier-uniwill-devices.patch +kvm-s390-split-kvm_s390_real_to_abs.patch