1. 16 7月, 2022 8 次提交
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a8ebfcd3
      Linus Torvalds 提交于
      Pull KVM fixes from Paolo Bonzini:
       "RISC-V:
         - Fix missing PAGE_PFN_MASK
      
         - Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
      
        x86:
         - Fix for nested virtualization when TSC scaling is active
      
         - Estimate the size of fastcc subroutines conservatively, avoiding
           disastrous underestimation when return thunks are enabled
      
         - Avoid possible use of uninitialized fields of 'struct
           kvm_lapic_irq'
      
        Generic:
         - Mark as such the boolean values available from the statistics file
           descriptors
      
         - Clarify statistics documentation"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: emulate: do not adjust size of fastop and setcc subroutines
        KVM: x86: Fully initialize 'struct kvm_lapic_irq' in kvm_pv_kick_cpu_op()
        Documentation: kvm: clarify histogram units
        kvm: stats: tell userspace which values are boolean
        x86/kvm: fix FASTOP_SIZE when return thunks are enabled
        KVM: nVMX: Always enable TSC scaling for L2 when it was enabled for L1
        RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
        riscv: Fix missing PAGE_PFN_MASK
      a8ebfcd3
    • L
      Merge tag 'ceph-for-5.19-rc7' of https://github.com/ceph/ceph-client · 1ce9d792
      Linus Torvalds 提交于
      Pull ceph fix from Ilya Dryomov:
       "A folio locking fixup that Xiubo and David cooperated on, marked for
        stable. Most of it is in netfs but I picked it up into ceph tree on
        agreement with David"
      
      * tag 'ceph-for-5.19-rc7' of https://github.com/ceph/ceph-client:
        netfs: do not unlock and put the folio twice
      1ce9d792
    • L
      Merge tag 'spi-fix-v5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 8006112d
      Linus Torvalds 提交于
      Pull spi fixes from Mark Brown:
       "A few driver specific fixes, none especially remarkable, plus a
        MAINTAINERS file update due to the previous maintainer for the NXP
        FSPI driver having left the company"
      
      * tag 'spi-fix-v5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: cadence-quadspi: Remove spi_master_put() in probe failure path
        MAINTAINERS: change the NXP FSPI driver maintainer.
        spi: amd: Limit max transfer and message size
        spi: aspeed: Fix division by zero
        spi: aspeed: Add dev_dbg() to dump the spi-mem direct mapping descriptor
      8006112d
    • L
      Merge tag 'soc-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 1c49f281
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "Most of the contents are bugfixes for the devicetree files:
      
         - A Qualcomm MSM8974 pin controller regression, caused by a cleanup
           patch that gets partially reverted here.
      
         - Missing properties for Broadcom BCM49xx to fix timer detection and
           SMP boot.
      
         - Fix touchscreen pinctrl for imx6ull-colibri board
      
         - Multiple fixes for Rockchip rk3399 based machines including the vdu
           clock-rate fix, otg port fix on Quartz64-A and ethernet on
           Quartz64-B
      
         - Fixes for misspelled DT contents causing minor problems on
           imx6qdl-ts7970m, orangepi-zero, sama5d2, kontron-kswitch-d10, and
           ls1028a
      
        And a couple of changes elsewhere:
      
         - Fix binding for Allwinner D1 display pipeline
      
         - Trivial code fixes to the TEE and reset controller driver
           subsystems and the rockchip platform code.
      
         - Multiple updates to the MAINTAINERS files, marking the Palm Treo
           support as orphaned, and fixing some entries for added or changed
           file names"
      
      * tag 'soc-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (21 commits)
        arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
        arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
        ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
        ARM: dts: at91: sama5d2: Fix typo in i2s1 node
        tee: tee_get_drvdata(): fix description of return value
        optee: Remove duplicate 'of' in two places.
        ARM: dts: kswitch-d10: use open drain mode for coma-mode pins
        ARM: dts: colibri-imx6ull: fix snvs pinmux group
        optee: smc_abi.c: fix wrong pointer passed to IS_ERR/PTR_ERR()
        MAINTAINERS: add polarfire rng, pci and clock drivers
        MAINTAINERS: mark ARM/PALM TREO SUPPORT orphan
        ARM: dts: imx6qdl-ts7970: Fix ngpio typo and count
        arm64: dts: ls1028a: Update SFP node to include clock
        dt-bindings: display: sun4i: Fix D1 pipeline count
        ARM: dts: qcom: msm8974: re-add missing pinctrl
        reset: Fix devm bulk optional exclusive control getter
        MAINTAINERS: rectify entry for SYNOPSYS AXS10x RESET CONTROLLER DRIVER
        ARM: rockchip: Add missing of_node_put() in rockchip_suspend_init()
        arm64: dts: rockchip: Assign RK3399 VDU clock rate
        arm64: dts: rockchip: Fix Quartz64-A dwc3 otg port behavior
        ...
      1c49f281
    • L
      Merge tag 'platform-drivers-x86-v5.19-4' of... · 2a347a06
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
       "Highlights:
      
         - Fix brightness key events getting reported twice on some Dells.
           Regression caused by recent Panasonic hotkey fixes
      
         - Fix poweroff no longer working on some devices regression caused
           by recent poweroff handler rework
      
         - Mark new (in 5.19) Intel IFS driver as broken, because of some
           issues surrounding the userspace (sysfs) API which need to be
           cleared up
      
         - Some hardware-id / quirk additions"
      
      * tag 'platform-drivers-x86-v5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        ACPI: video: Fix acpi_video_handles_brightness_key_presses()
        platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF
        platform/x86/intel/ifs: Mark as BROKEN
        platform/x86: asus-wmi: Add key mappings
        efi: Fix efi_power_off() not being run before acpi_power_off() when necessary
        platform/x86: x86-android-tablets: Fix Lenovo Yoga Tablet 2 830/1050 poweroff again
        platform/x86: gigabyte-wmi: add support for B660I AORUS PRO DDR4
        platform/x86/amd/pmc: Add new platform support
        platform/x86/amd/pmc: Add new acpi id for PMC controller
      2a347a06
    • L
      Merge tag 'for-linus-5.19a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 339f74e3
      Linus Torvalds 提交于
      Pull xen fix from Juergen Gross:
       "Fix for the Xen gntdev driver causing inappropriate WARN() messages"
      
      * tag 'for-linus-5.19a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE
      339f74e3
    • L
      Merge tag 'drm-fixes-2022-07-15' of git://anongit.freedesktop.org/drm/drm · fcd1b2b9
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This is the regular fixes pull for this week. This has a bunch of
        amdgpu fixes, major one reverts the buddy allocator until it can be
        tested more, otherwise just small ones, then i915 has a bunch of
        fixes.
      
        The outstanding firmware regressions reported by phoronix will
        hopefully be dealt with ASAP.
      
        amdgpu:
         - revert buddy allocator support for now
         - DP MST blank screen fix for specific platforms
         - MEC firmware check fix for GC 10.3.7
         - Deep color fix for DCE
         - Fix possible divide by 0
         - Coverage blend mode fix
         - Fix cursor only commit timestamps
      
        i915:
         - Selftest fix
         - TTM fix sg_table construction
         - Error return fixes
         - Fix a performance regression related to waitboost
         - Fix GT resets"
      
      * tag 'drm-fixes-2022-07-15' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Ensure valid event timestamp for cursor-only commits
        drm/amd/display: correct check of coverage blend mode
        drm/amd/pm: Prevent divide by zero
        drm/amd/display: Only use depth 36 bpp linebuffers on DCN display engines.
        drm/amdkfd: correct the MEC atomic support firmware checking for GC 10.3.7
        drm/amd/display: Ignore First MST Sideband Message Return Error
        drm/i915/selftests: fix subtraction overflow bug
        drm/i915/gem: Look for waitboosting across the whole object prior to individual waits
        drm/i915/gt: Serialize TLB invalidates with GT resets
        drm/i915/gt: Serialize GRDOM access between multiple engine resets
        drm/i915/ttm: fix sg_table construction
        drm/i915/selftests: fix a couple IS_ERR() vs NULL tests
        drm/i915: Fix vm use-after-free in vma destruction
        drm/i915/guc: ADL-N should use the same GuC FW as ADL-S
        drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector()
        drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist()
        Revert "drm/amdgpu: add drm buddy support to amdgpu"
      fcd1b2b9
    • L
      Merge tag 'sysctl-fixes-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 862161e8
      Linus Torvalds 提交于
      Pyll sysctl fix from Luis Chamberlain:
       "Only one fix for sysctl"
      
      * tag 'sysctl-fixes-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE
      862161e8
  2. 15 7月, 2022 22 次提交
  3. 14 7月, 2022 10 次提交
    • P
      Merge commit 'kvm-vmx-nested-tsc-fix' into kvm-master · cca3f338
      Paolo Bonzini 提交于
      Merge bugfix needed in both 5.19 (because it's bad) and 5.20 (because
      it is a prerequisite to test new features).
      cca3f338
    • N
      selftests/net: test nexthop without gw · cd72e61b
      Nicolas Dichtel 提交于
      This test implement the scenario described in the commit
      "ip: fix dflt addr selection for connected nexthop".
      The test configures a nexthop object with an output device only (no gateway
      address) and a route that uses this nexthop. The goal is to check if the
      kernel selects a valid source address.
      
      Link: https://lore.kernel.org/netdev/20220712095545.10947-1-nicolas.dichtel@6wind.com/Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Link: https://lore.kernel.org/r/20220713114853.29406-2-nicolas.dichtel@6wind.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      cd72e61b
    • N
      ip: fix dflt addr selection for connected nexthop · 747c1430
      Nicolas Dichtel 提交于
      When a nexthop is added, without a gw address, the default scope was set
      to 'host'. Thus, when a source address is selected, 127.0.0.1 may be chosen
      but rejected when the route is used.
      
      When using a route without a nexthop id, the scope can be configured in the
      route, thus the problem doesn't exist.
      
      To explain more deeply: when a user creates a nexthop, it cannot specify
      the scope. To create it, the function nh_create_ipv4() calls fib_check_nh()
      with scope set to 0. fib_check_nh() calls fib_check_nh_nongw() wich was
      setting scope to 'host'. Then, nh_create_ipv4() calls
      fib_info_update_nhc_saddr() with scope set to 'host'. The src addr is
      chosen before the route is inserted.
      
      When a 'standard' route (ie without a reference to a nexthop) is added,
      fib_create_info() calls fib_info_update_nhc_saddr() with the scope set by
      the user. iproute2 set the scope to 'link' by default.
      
      Here is a way to reproduce the problem:
      ip netns add foo
      ip -n foo link set lo up
      ip netns add bar
      ip -n bar link set lo up
      sleep 1
      
      ip -n foo link add name eth0 type dummy
      ip -n foo link set eth0 up
      ip -n foo address add 192.168.0.1/24 dev eth0
      
      ip -n foo link add name veth0 type veth peer name veth1 netns bar
      ip -n foo link set veth0 up
      ip -n bar link set veth1 up
      
      ip -n bar address add 192.168.1.1/32 dev veth1
      ip -n bar route add default dev veth1
      
      ip -n foo nexthop add id 1 dev veth0
      ip -n foo route add 192.168.1.1 nhid 1
      
      Try to get/use the route:
      > $ ip -n foo route get 192.168.1.1
      > RTNETLINK answers: Invalid argument
      > $ ip netns exec foo ping -c1 192.168.1.1
      > ping: connect: Invalid argument
      
      Try without nexthop group (iproute2 sets scope to 'link' by dflt):
      ip -n foo route del 192.168.1.1
      ip -n foo route add 192.168.1.1 dev veth0
      
      Try to get/use the route:
      > $ ip -n foo route get 192.168.1.1
      > 192.168.1.1 dev veth0 src 192.168.0.1 uid 0
      >     cache
      > $ ip netns exec foo ping -c1 192.168.1.1
      > PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
      > 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.039 ms
      >
      > --- 192.168.1.1 ping statistics ---
      > 1 packets transmitted, 1 received, 0% packet loss, time 0ms
      > rtt min/avg/max/mdev = 0.039/0.039/0.039/0.000 ms
      
      CC: stable@vger.kernel.org
      Fixes: 597cfe4f ("nexthop: Add support for IPv4 nexthops")
      Reported-by: NEdwin Brossette <edwin.brossette@6wind.com>
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Link: https://lore.kernel.org/r/20220713114853.29406-1-nicolas.dichtel@6wind.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      747c1430
    • V
      spi: cadence-quadspi: Remove spi_master_put() in probe failure path · 73d5fe04
      Vaishnav Achath 提交于
      Currently the spi_master is allocated by devm_spi_alloc_master()
      and devres core manages the deallocation, but in probe failure
      path spi_master_put() is being handled manually which causes
      "refcount underflow use-after-free" warning when probe failure happens
      after allocating spi_master.
      
      Trimmed backtrace during failure:
      
      refcount_t: underflow; use-after-free.
      pc : refcount_warn_saturate+0xf4/0x144
      Call trace:
      refcount_warn_saturate
      kobject_put
      put_device
      devm_spi_release_controller
      devres_release_all
      
      This commit makes relevant changes to remove spi_master_put() from probe
      failure path.
      
      Fixes: 606e5d40 ("spi: cadence-quadspi: Handle spi_unregister_master() in remove()")
      Signed-off-by: NVaishnav Achath <vaishnav.a@ti.com>
      Link: https://lore.kernel.org/r/20220601071611.11853-1-vaishnav.a@ti.comSigned-off-by: NMark Brown <broonie@kernel.org>
      73d5fe04
    • A
      ARM: 9208/1: entry: add .ltorg directive to keep literals in range · 29589ca0
      Ard Biesheuvel 提交于
      LKP reports a build issue on Clang, related to a literal load of
      __current issued through the ldr_va macro. This turns out to be due to
      the fact that group relocations are disabled when CONFIG_COMPILE_TEST=y,
      which means that the ldr_va macro resolves to a pair of LDR
      instructions, the first one being a literal load issued too far from its
      literal pool.
      
      Due to the introduction of a couple of new uses of this macro in commit
      50807460 ("ARM: 9195/1: entry: avoid explicit literal loads"),
      the literal pools end up getting rearranged in a way that causes the
      literal for __current to go out of range. Let's fix this up by putting a
      .ltorg directive in a suitable place in the code.
      
      Link: https://lore.kernel.org/all/202205290805.1vZLAr36-lkp@intel.com/
      
      Fixes: 50807460 ("ARM: 9195/1: entry: avoid explicit literal loads")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Tested-by: NNathan Chancellor <nathan@kernel.org>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      29589ca0
    • W
      ARM: 9207/1: amba: fix refcount underflow if amba_device_add() fails · 8030aa3c
      Wang Kefeng 提交于
      "ARM: 9192/1: amba: fix memory leak in amba_device_try_add()" leads
      to a refcount underflow if amba_device_add() fails, which called by
      of_amba_device_create(), the of_amba_device_create() already exists
      the error handling, so amba_put_device() only need to be added into
      amba_deferred_retry().
      
      Fixes: 7719a68b ("ARM: 9192/1: amba: fix memory leak in amba_device_try_add()")
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      8030aa3c
    • P
      Documentation: kvm: clarify histogram units · 942d9e89
      Paolo Bonzini 提交于
      In the case of histogram statistics, the values are always sample
      counts; the unit instead applies to the bucket range.  For example,
      halt_poll_success_hist is a nanosecond statistic because the buckets are
      for 0ns, 1ns, 2-3ns, 4-7ns etc.  There isn't really any other sensible
      interpretation, but clarify this anyway in the Documentation.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      942d9e89
    • P
      kvm: stats: tell userspace which values are boolean · 1b870fa5
      Paolo Bonzini 提交于
      Some of the statistics values exported by KVM are always only 0 or 1.
      It can be useful to export this fact to userspace so that it can track
      them specially (for example by polling the value every now and then to
      compute a % of time spent in a specific state).
      
      Therefore, add "boolean value" as a new "unit".  While it is not exactly
      a unit, it walks and quacks like one.  In particular, using the type
      would be wrong because boolean values could be instantaneous or peak
      values (e.g. "is the rmap allocated?") or even two-bucket histograms
      (e.g. "number of posted vs. non-posted interrupt injections").
      Suggested-by: NAmneesh Singh <natto@weirdnatto.in>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1b870fa5
    • T
      x86/kvm: fix FASTOP_SIZE when return thunks are enabled · 84e7051c
      Thadeu Lima de Souza Cascardo 提交于
      The return thunk call makes the fastop functions larger, just like IBT
      does. Consider a 16-byte FASTOP_SIZE when CONFIG_RETHUNK is enabled.
      
      Otherwise, functions will be incorrectly aligned and when computing their
      position for differently sized operators, they will executed in the middle
      or end of a function, which may as well be an int3, leading to a crash
      like:
      
      [   36.091116] int3: 0000 [#1] SMP NOPTI
      [   36.091119] CPU: 3 PID: 1371 Comm: qemu-system-x86 Not tainted 5.15.0-41-generic #44
      [   36.091120] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
      [   36.091121] RIP: 0010:xaddw_ax_dx+0x9/0x10 [kvm]
      [   36.091185] Code: 00 0f bb d0 c3 cc cc cc cc 48 0f bb d0 c3 cc cc cc cc 0f 1f 80 00 00 00 00 0f c0 d0 c3 cc cc cc cc 66 0f c1 d0 c3 cc cc cc cc <0f> 1f 80 00 00 00 00 0f c1 d0 c3 cc cc cc cc 48 0f c1 d0 c3 cc cc
      [   36.091186] RSP: 0018:ffffb1f541143c98 EFLAGS: 00000202
      [   36.091188] RAX: 0000000089abcdef RBX: 0000000000000001 RCX: 0000000000000000
      [   36.091188] RDX: 0000000076543210 RSI: ffffffffc073c6d0 RDI: 0000000000000200
      [   36.091189] RBP: ffffb1f541143ca0 R08: ffff9f1803350a70 R09: 0000000000000002
      [   36.091190] R10: ffff9f1803350a70 R11: 0000000000000000 R12: ffff9f1803350a70
      [   36.091190] R13: ffffffffc077fee0 R14: 0000000000000000 R15: 0000000000000000
      [   36.091191] FS:  00007efdfce8d640(0000) GS:ffff9f187dd80000(0000) knlGS:0000000000000000
      [   36.091192] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   36.091192] CR2: 0000000000000000 CR3: 0000000009b62002 CR4: 0000000000772ee0
      [   36.091195] PKRU: 55555554
      [   36.091195] Call Trace:
      [   36.091197]  <TASK>
      [   36.091198]  ? fastop+0x5a/0xa0 [kvm]
      [   36.091222]  x86_emulate_insn+0x7b8/0xe90 [kvm]
      [   36.091244]  x86_emulate_instruction+0x2f4/0x630 [kvm]
      [   36.091263]  ? kvm_arch_vcpu_load+0x7c/0x230 [kvm]
      [   36.091283]  ? vmx_prepare_switch_to_host+0xf7/0x190 [kvm_intel]
      [   36.091290]  complete_emulated_mmio+0x297/0x320 [kvm]
      [   36.091310]  kvm_arch_vcpu_ioctl_run+0x32f/0x550 [kvm]
      [   36.091330]  kvm_vcpu_ioctl+0x29e/0x6d0 [kvm]
      [   36.091344]  ? kvm_vcpu_ioctl+0x120/0x6d0 [kvm]
      [   36.091357]  ? __fget_files+0x86/0xc0
      [   36.091362]  ? __fget_files+0x86/0xc0
      [   36.091363]  __x64_sys_ioctl+0x92/0xd0
      [   36.091366]  do_syscall_64+0x59/0xc0
      [   36.091369]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091370]  ? do_syscall_64+0x69/0xc0
      [   36.091371]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091372]  ? __x64_sys_writev+0x1c/0x30
      [   36.091374]  ? do_syscall_64+0x69/0xc0
      [   36.091374]  ? exit_to_user_mode_prepare+0x37/0xb0
      [   36.091378]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091379]  ? do_syscall_64+0x69/0xc0
      [   36.091379]  ? do_syscall_64+0x69/0xc0
      [   36.091380]  ? do_syscall_64+0x69/0xc0
      [   36.091381]  ? do_syscall_64+0x69/0xc0
      [   36.091381]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
      [   36.091384] RIP: 0033:0x7efdfe6d1aff
      [   36.091390] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
      [   36.091391] RSP: 002b:00007efdfce8c460 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [   36.091393] RAX: ffffffffffffffda RBX: 000000000000ae80 RCX: 00007efdfe6d1aff
      [   36.091393] RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000000c
      [   36.091394] RBP: 0000558f1609e220 R08: 0000558f13fb8190 R09: 00000000ffffffff
      [   36.091394] R10: 0000558f16b5e950 R11: 0000000000000246 R12: 0000000000000000
      [   36.091394] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
      [   36.091396]  </TASK>
      [   36.091397] Modules linked in: isofs nls_iso8859_1 kvm_intel joydev kvm input_leds serio_raw sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua ipmi_devintf ipmi_msghandler drm msr ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel virtio_net net_failover crypto_simd ahci xhci_pci cryptd psmouse virtio_blk libahci xhci_pci_renesas failover
      [   36.123271] ---[ end trace db3c0ab5a48fabcc ]---
      [   36.123272] RIP: 0010:xaddw_ax_dx+0x9/0x10 [kvm]
      [   36.123319] Code: 00 0f bb d0 c3 cc cc cc cc 48 0f bb d0 c3 cc cc cc cc 0f 1f 80 00 00 00 00 0f c0 d0 c3 cc cc cc cc 66 0f c1 d0 c3 cc cc cc cc <0f> 1f 80 00 00 00 00 0f c1 d0 c3 cc cc cc cc 48 0f c1 d0 c3 cc cc
      [   36.123320] RSP: 0018:ffffb1f541143c98 EFLAGS: 00000202
      [   36.123321] RAX: 0000000089abcdef RBX: 0000000000000001 RCX: 0000000000000000
      [   36.123321] RDX: 0000000076543210 RSI: ffffffffc073c6d0 RDI: 0000000000000200
      [   36.123322] RBP: ffffb1f541143ca0 R08: ffff9f1803350a70 R09: 0000000000000002
      [   36.123322] R10: ffff9f1803350a70 R11: 0000000000000000 R12: ffff9f1803350a70
      [   36.123323] R13: ffffffffc077fee0 R14: 0000000000000000 R15: 0000000000000000
      [   36.123323] FS:  00007efdfce8d640(0000) GS:ffff9f187dd80000(0000) knlGS:0000000000000000
      [   36.123324] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   36.123325] CR2: 0000000000000000 CR3: 0000000009b62002 CR4: 0000000000772ee0
      [   36.123327] PKRU: 55555554
      [   36.123328] Kernel panic - not syncing: Fatal exception in interrupt
      [   36.123410] Kernel Offset: 0x1400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
      [   36.135305] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
      
      Fixes: aa3d4803 ("x86: Use return-thunk in asm code")
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Co-developed-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reported-by: NLinux Kernel Functional Testing <lkft@linaro.org>
      Message-Id: <20220713171241.184026-1-cascardo@canonical.com>
      Tested-by: NJack Wang <jinpu.wang@ionos.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      84e7051c
    • V
      KVM: nVMX: Always enable TSC scaling for L2 when it was enabled for L1 · 99482726
      Vitaly Kuznetsov 提交于
      Windows 10/11 guests with Hyper-V role (WSL2) enabled are observed to
      hang upon boot or shortly after when a non-default TSC frequency was
      set for L1. The issue is observed on a host where TSC scaling is
      supported. The problem appears to be that Windows doesn't use TSC
      frequency for its guests even when the feature is advertised and KVM
      filters SECONDARY_EXEC_TSC_SCALING out when creating L2 controls from
      L1's. This leads to L2 running with the default frequency (matching
      host's) while L1 is running with an altered one.
      
      Keep SECONDARY_EXEC_TSC_SCALING in secondary exec controls for L2 when
      it was set for L1. TSC_MULTIPLIER is already correctly computed and
      written by prepare_vmcs02().
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: NMaxim Levitsky <mlevitsk@redhat.com>
      Message-Id: <20220712135009.952805-1-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      99482726