Re: 5.10.131-rc1 crash with int3: RIP 0010:xaddw_ax_dx+0x9/0x10 [kvm]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 13, 2022 at 11:11 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Wed, Jul 13, 2022, Jinpu Wang wrote:
> > On Wed, Jul 13, 2022 at 3:01 PM Greg Kroah-Hartman
> > <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Wed, Jul 13, 2022 at 02:26:44PM +0200, Jinpu Wang wrote:
> > > > On Wed, Jul 13, 2022 at 12:49 PM Jinpu Wang <jinpu.wang@xxxxxxxxx> wrote:
> > > > > #5.10.131-1+feature+linux+5.10.y+20220712.1850+30f4172c~deb11
>
> ...
>
> > > > > [ 1895.979325] Call Trace:
> > > > > [ 1895.979325]  ? fastop+0x59/0xa0 [kvm]
> > > > > [ 1895.979326]  ? x86_emulate_insn+0x73a/0xe00 [kvm]
> > > > > [ 1895.979326]  ? x86_emulate_instruction+0x2d0/0x750 [kvm]
> > > > > [ 1895.979326]  ? vmx_vcpu_load+0x21/0x70 [kvm_intel]
> > > > > [ 1895.979327]  ? complete_emulated_mmio+0x236/0x310 [kvm]
> > > > > [ 1895.979327]  ? kvm_arch_vcpu_ioctl_run+0x1744/0x1920 [kvm]
> > > > > [ 1895.979327]  ? kvm_vcpu_ioctl+0x211/0x5a0 [kvm]
> > > > > [ 1895.979328]  ? __fget_files+0x79/0xb0
> > > > > [ 1895.979328]  ? __fget_files+0x79/0xb0
> > > > > [ 1895.979328]  ? __x64_sys_ioctl+0x8b/0xc0
> > > > > [ 1895.979329]  ? do_syscall_64+0x33/0x40
> > > > > [ 1895.979329]  ? entry_SYSCALL_64_after_hwframe+0x61/0xc6
>
> ...
>
> > > > > Is this bug known, any hint how to fix it?
> > > > I did more tests on different Servers, so far all the machine
> > > > checked(Skylake/Icelake/Haswell/Broadwell/EPYC) crash immediately
> > > > except AMD Opteron.
> > > > kvm-unit-tests succeeded without regression.
> > >
> > > Same issue on Linus's tree right now as well?  Or does that pass just
> > > fine?
> >
> > Hi Greg,
> >
> > I haven't try linus tree, but just tried 5.15.55-rc1 on Intel Skylake,
> > it crashed the same.
> >
> > I will give Linus tree a try.
>
> Looks like fastop() got broken by the retbleed mitigations, i.e. this isn't unique
> to stable trees.
>
> https://lore.kernel.org/all/20220713171241.184026-1-cascardo@xxxxxxxxxxxxx
Hi Sean,

Thanks for the link, I will give it a try, to apply to kernel  5.10, I
adapted it a bit to

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 59e5d79f5c34..aa7b5adac633 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -189,7 +189,7 @@
 #define X16(x...) X8(x), X8(x)

 #define NR_FASTOP (ilog2(sizeof(ulong)) + 1)
-#define FASTOP_SIZE 8
+#define FASTOP_SIZE (8 * (1 + (IS_ENABLED(CONFIG_RETHUNK))))

 struct opcode {
        u64 flags : 56;

With it, kvm-unit-tests is working again, no gression found.

Thanks!



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux