]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Sun, 20 Feb 2022 23:55:49 +0000 (18:55 -0500)
committerSasha Levin <sashal@kernel.org>
Sun, 20 Feb 2022 23:55:49 +0000 (18:55 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.9/kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch [new file with mode: 0644]
queue-4.9/nfs-do-not-report-writeback-errors-in-nfs_getattr.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch b/queue-4.9/kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch
new file mode 100644 (file)
index 0000000..a759aae
--- /dev/null
@@ -0,0 +1,39 @@
+From 41dfcaa6eb1a713068e8d828235e1b1ad0b73904 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 2 Feb 2022 17:48:13 -0800
+Subject: KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW
+
+From: Jim Mattson <jmattson@google.com>
+
+[ Upstream commit 710c476514313c74045c41c0571bb5178fd16e3d ]
+
+AMD's event select is 3 nybbles, with the high nybble in bits 35:32 of
+a PerfEvtSeln MSR. Don't mask off the high nybble when configuring a
+RAW perf event.
+
+Fixes: ca724305a2b0 ("KVM: x86/vPMU: Implement AMD vPMU code for KVM")
+Signed-off-by: Jim Mattson <jmattson@google.com>
+Message-Id: <20220203014813.2130559-2-jmattson@google.com>
+Reviewed-by: David Dunn <daviddunn@google.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/kvm/pmu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
+index 0827ee7d0e9b6..f1aa0b932c547 100644
+--- a/arch/x86/kvm/pmu.c
++++ b/arch/x86/kvm/pmu.c
+@@ -164,7 +164,7 @@ void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel)
+       }
+       if (type == PERF_TYPE_RAW)
+-              config = eventsel & X86_RAW_EVENT_MASK;
++              config = eventsel & AMD64_RAW_EVENT_MASK;
+       pmc_reprogram_counter(pmc, type, config,
+                             !(eventsel & ARCH_PERFMON_EVENTSEL_USR),
+-- 
+2.34.1
+
diff --git a/queue-4.9/nfs-do-not-report-writeback-errors-in-nfs_getattr.patch b/queue-4.9/nfs-do-not-report-writeback-errors-in-nfs_getattr.patch
new file mode 100644 (file)
index 0000000..f193055
--- /dev/null
@@ -0,0 +1,42 @@
+From 15c00d4a4df8a7ea959c2f2ecdb53942f4b15c96 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Feb 2022 18:05:18 -0500
+Subject: NFS: Do not report writeback errors in nfs_getattr()
+
+From: Trond Myklebust <trond.myklebust@hammerspace.com>
+
+[ Upstream commit d19e0183a88306acda07f4a01fedeeffe2a2a06b ]
+
+The result of the writeback, whether it is an ENOSPC or an EIO, or
+anything else, does not inhibit the NFS client from reporting the
+correct file timestamps.
+
+Fixes: 79566ef018f5 ("NFS: Getattr doesn't require data sync semantics")
+Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfs/inode.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
+index 7a94f5a5f8c8c..3f93b659c849a 100644
+--- a/fs/nfs/inode.c
++++ b/fs/nfs/inode.c
+@@ -661,11 +661,8 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+       trace_nfs_getattr_enter(inode);
+       /* Flush out writes to the server in order to update c/mtime.  */
+-      if (S_ISREG(inode->i_mode)) {
+-              err = filemap_write_and_wait(inode->i_mapping);
+-              if (err)
+-                      goto out;
+-      }
++      if (S_ISREG(inode->i_mode))
++              filemap_write_and_wait(inode->i_mapping);
+       /*
+        * We may force a getattr if the user cares about atime.
+-- 
+2.34.1
+
index 1bae179b0196a56c8c4211d5c1b1081b22ebf263..5d554f250ce9ea7677c73081ab91d54c5451fee7 100644 (file)
@@ -24,3 +24,5 @@ alsa-hda-fix-missing-codec-probe-on-shenker-dock-15.patch
 asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw.patch
 asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch
 nfs-lookup_directory-is-also-ok-with-symlinks.patch
+kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch
+nfs-do-not-report-writeback-errors-in-nfs_getattr.patch