~mreed8855/ubuntu/+source/linux/+git/lunar:enable_vmd_lp_2020022

Last commit made on 2023-12-07
Get this branch:
git clone -b enable_vmd_lp_2020022 https://git.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/lunar
Only Michael Reed can upload to this branch. If you are Michael Reed please log in for upload directions.

Branch merges

Branch information

Name:
enable_vmd_lp_2020022
Repository:
lp:~mreed8855/ubuntu/+source/linux/+git/lunar

Recent commits

dbcb662... by Jim Mattson <email address hidden>

x86/cpufeatures: Add macros for Intel's new fast rep string features

BugLink: https://bugs.launchpad.net/bugs/2020022

KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits
are already cached in word 12. Give the bits X86_FEATURE names, so
that they can be easily referenced. Hide these bits from
/proc/cpuinfo, since the host kernel makes no use of them at present.

Signed-off-by: Jim Mattson <email address hidden>
Reviewed-by: Sean Christopherson <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Sean Christopherson <email address hidden>
(cherry picked from commit f8df91e73a6827a4569bb56cd53e55b4ea2f5b1f)
Signed-off-by: Michael Reed <email address hidden>

f1bde9d... by Linus Torvalds <email address hidden>

x86: don't use REP_GOOD or ERMS for small memory clearing

BugLink: https://bugs.launchpad.net/bugs/2020022

The modern target to use is FSRS (Fast Short REP STOS), and the other
cases should only be used for bigger areas (ie mainly things like page
clearing).

Signed-off-by: Linus Torvalds <email address hidden>
(cherry picked from commit 20f3337d350c4e1b4ac66d731fd4e98565bf6cc0)
Signed-off-by: Michael Reed <email address hidden>

8f55d2c... by ChunHao Lin <email address hidden>

r8169: fix network lost after resume on DASH systems

BugLink: https://bugs.launchpad.net/bugs/2043786

Device that support DASH may be reseted or powered off during suspend.
So driver needs to handle DASH during system suspend and resume. Or
DASH firmware will influence device behavior and causes network lost.

Fixes: b646d90053f8 ("r8169: magic.")
Cc: <email address hidden>
Reviewed-by: Heiner Kallweit <email address hidden>
Signed-off-by: ChunHao Lin <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>

(cherry picked from commit 868c3b95afef4883bfb66c9397482da6840b5baf)
Signed-off-by: Aaron Ma <email address hidden>
Acked-by: Manuel Diewald <email address hidden>
Acked-by: Thibault Ferrante <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

2c70d91... by ChunHao Lin <email address hidden>

r8169: add handling DASH when DASH is disabled

BugLink: https://bugs.launchpad.net/bugs/2043786

For devices that support DASH, even DASH is disabled, there may still
exist a default firmware that will influence device behavior.
So driver needs to handle DASH for devices that support DASH, no
matter the DASH status is.

This patch also prepares for "fix network lost after resume on DASH
systems".

Fixes: ee7a1beb9759 ("r8169:call "rtl8168_driver_start" "rtl8168_driver_stop" only when hardware dash function is enabled")
Cc: <email address hidden>
Signed-off-by: ChunHao Lin <email address hidden>
Reviewed-by: Heiner Kallweit <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>

(cherry picked from commit 0ab0c45d8aaea5192328bfa6989673aceafc767c)
Signed-off-by: Aaron Ma <email address hidden>
Acked-by: Manuel Diewald <email address hidden>
Acked-by: Thibault Ferrante <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

5364c57... by Dan Clash

audit, io_uring: io_uring openat triggers audit reference count underflow

BugLink: https://bugs.launchpad.net/bugs/2043841

An io_uring openat operation can update an audit reference count
from multiple threads resulting in the call trace below.

A call to io_uring_submit() with a single openat op with a flag of
IOSQE_ASYNC results in the following reference count updates.

These first part of the system call performs two increments that do not race.

do_syscall_64()
  __do_sys_io_uring_enter()
    io_submit_sqes()
      io_openat_prep()
        __io_openat_prep()
          getname()
            getname_flags() /* update 1 (increment) */
              __audit_getname() /* update 2 (increment) */

The openat op is queued to an io_uring worker thread which starts the
opportunity for a race. The system call exit performs one decrement.

do_syscall_64()
  syscall_exit_to_user_mode()
    syscall_exit_to_user_mode_prepare()
      __audit_syscall_exit()
        audit_reset_context()
           putname() /* update 3 (decrement) */

The io_uring worker thread performs one increment and two decrements.
These updates can race with the system call decrement.

io_wqe_worker()
  io_worker_handle_work()
    io_wq_submit_work()
      io_issue_sqe()
        io_openat()
          io_openat2()
            do_filp_open()
              path_openat()
                __audit_inode() /* update 4 (increment) */
            putname() /* update 5 (decrement) */
        __audit_uring_exit()
          audit_reset_context()
            putname() /* update 6 (decrement) */

The fix is to change the refcnt member of struct audit_names
from int to atomic_t.

kernel BUG at fs/namei.c:262!
Call Trace:
...
 ? putname+0x68/0x70
 audit_reset_context.part.0.constprop.0+0xe1/0x300
 __audit_uring_exit+0xda/0x1c0
 io_issue_sqe+0x1f3/0x450
 ? lock_timer_base+0x3b/0xd0
 io_wq_submit_work+0x8d/0x2b0
 ? __try_to_del_timer_sync+0x67/0xa0
 io_worker_handle_work+0x17c/0x2b0
 io_wqe_worker+0x10a/0x350

Cc: <email address hidden>
Link: https://<email address hidden>/
Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring")
Signed-off-by: Dan Clash <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Jens Axboe <email address hidden>
Signed-off-by: Christian Brauner <email address hidden>

(cherry picked from commit 03adc61edad49e1bbecfb53f7ea5d78f398fe368)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Thibault Ferrante <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

7f44944... by Mika Westerberg <email address hidden>

ata: ahci: Add Intel Alder Lake-P AHCI controller to low power chipsets list

BugLink: https://bugs.launchpad.net/bugs/2037493

Intel Alder Lake-P AHCI controller needs to be added to the mobile
chipsets list in order to have link power management enabled. Without
this the CPU cannot enter lower power C-states making idle power
consumption high.

Cc: Koba Ko <email address hidden>
Signed-off-by: Mika Westerberg <email address hidden>
Signed-off-by: Damien Le Moal <email address hidden>

(cherry picked from commit b8b8b4e0c052b2c06e1c4820a8001f4e0f77900f)
Signed-off-by: Koba Ko <email address hidden>
Acked-by: Tim Gardner <email address hidden>
Acked-by: Roxana Nicolescu <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

f7fdaff... by Frank Heimes

UBUNTU: [Config] CONFIG_VFIO_PCI_ZDEV_KVM=y

BugLink: https://bugs.launchpad.net/bugs/2042853

Enable VFIO zPCI pass-through for s390x (CONFIG_VFIO_PCI_ZDEV_KVM=y),
to allow pass-through of any kind of s390x-specific vfio-pci devices,
like RoCE devices, ISM devices, NVMe drives.

Signed-off-by: Frank Heimes <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Manuel Diewald <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

ff03d3a... by Keith Busch <email address hidden>

nvme: avoid bogus CRTO values

BugLink: https://bugs.launchpad.net/bugs/2041495

Some devices are reporting controller ready mode support, but return 0
for CRTO. These devices require a much higher time to ready than that,
so they are failing to initialize after the driver starter preferring
that value over CAP.TO.

The spec requires that CAP.TO match the appropritate CRTO value, or be
set to 0xff if CRTO is larger than that. This means that CAP.TO can be
used to validate if CRTO is reliable, and provides an appropriate
fallback for setting the timeout value if not. Use whichever is larger.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217863
Reported-by: Cláudio Sampaio <email address hidden>
Reported-by: Felix Yan <email address hidden>
Tested-by: Felix Yan <email address hidden>
Based-on-a-patch-by: Felix Yan <email address hidden>
Cc: <email address hidden>
Signed-off-by: Keith Busch <email address hidden>

(cherry picked from commit 6cc834ba62998c65c42d0c63499bdd35067151ec)
Signed-off-by: You-Sheng Yang <email address hidden>
Acked-by: Emil Renner Berthing <email address hidden>
Acked-by: Andrea Righi <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

16e7bd8... by Tim Gardner

UBUNTU: SAUCE: (no-up) hv: Fix supply vendor ID

BugLink: https://bugs.launchpad.net/bugs/2036600

There is a mistake in the commit (https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/lunar/commit/?id=5dd24f2df3280d4354641f4687dbb36e418e7de8):

Before the commit, the good guest_id is 0x8180000602100000.

With the commit, the generated guest_id is incorrect: 0x0080000602100000, i.e. the 0x81 from bit 56~63 are dropped.

See "include/asm-generic/hyperv-tlfs.h" for the definition of the bits:
* Bit(s)
* 63 - Indicates if the OS is Open Source or not; 1 is Open Source

* 62:56 - Os Type; Linux is 0x100 !!!!! Dexuan: this should be 0x1. I'll post a patch to LKML to fix this typo.

* 55:48 - Distro specific identification
* 47:16 - Linux kernel version number
* 15:0 - Distro specific identification

See https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/tlfs ("February, 2020: Released Version 6.0b", page 15)

As a result, the host thinks that the VM is not an open-source OS, and it's not Linux. Consequently, the "VM Availability" fron Azure portal is 0 (unhealthy): some users rely on the info to manage their VMs, e.g. if the VM is erroneously reported "unhealthy", the VM may be killed and re-created, and the new VM is still "unhealthy", and the VM may be killed and re-created again...

Fixes commit 5dd24f2df328 ('UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI')
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Manuel Diewald <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

df4a64b... by Kamal Mostafa

UBUNTU: Upstream stable to v6.1.54, v6.5.4

BugLink: https://bugs.launchpad.net/bugs/2045079

Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>