Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Paolo Bonzini
- Original Message - > From: "Alexander Boettcher" > To: "Alex Bennée" > Cc: qemu-devel@nongnu.org, r...@twiddle.net, "fred konrad" > , pbonz...@redhat.com, > "crosthwaite peter" > Sent: Monday, March 6, 2017 9:11:04 PM > Subject: Re: Qemu deadlocks in tb_lock when using SVM+SoftMMU >

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hello, thank you for your effort. With your patch I get now a 0x3f exception shown by the hypervisor, which I have never encountered so far before. The guest kernel seems not to start, at least no life sign is shown. For me the patch of Paolo Bonzini works reliable. How to proceed ? Thanks, A

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hello, I applied the patch and beside two uint64 -> uint64_t in do_vmexit() it compiles and solves the issue for me reliable. Great ! On 06.03.2017 17:58, Paolo Bonzini wrote: > > > On 06/03/2017 02:34, Richard Henderson wrote: >> On 03/06/2017 08:32 AM, Alex Bennée wrote: #5 0x0

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Richard Henderson
On 03/07/2017 03:58 AM, Paolo Bonzini wrote: On 06/03/2017 02:34, Richard Henderson wrote: My guess is that everything from cpu_svm_check_intercept_param on should be done from do_interrupt instead of during raise_interrupt. From cpu_svm_check_intercept_param, or from cpu_vmexit? The former

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Paolo Bonzini
On 06/03/2017 02:34, Richard Henderson wrote: > On 03/06/2017 08:32 AM, Alex Bennée wrote: >>> #5 0x0046ea2e in tlb_flush (cpu=0x164a360) at >>> qemu.git/cputlb.c:121 >>> #6 0x00538987 in cpu_x86_update_cr4 (env=0x16525f0, >>> new_cr4=1784) >>> at qemu.git/target/i386/helper

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alex Bennée
Alexander Boettcher writes: > Hi, > > Sometimes Qemu just succeeds if the timing is well, will see. > > But this is not the point of this issue atm. I've sent a patch that works as Richard suggested. However your test image seems to run into other issues. I have tested it on my known good x86

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hi, On 06.03.2017 15:42, Alex Bennée wrote: > > Alexander Boettcher writes: > >> Hi, >> >> On 06.03.2017 14:15, Alex Bennée wrote: >>> I found the virtualbox.iso on your branch but I can't trigger the >>> assert. Running: >>> >>> #!/bin/sh >>> >>> QEMU="$@" >>> >>> ${QEMU} -s -no-kvm -display s

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alex Bennée
Alexander Boettcher writes: > Hi, > > On 06.03.2017 14:15, Alex Bennée wrote: >> I found the virtualbox.iso on your branch but I can't trigger the >> assert. Running: >> >> #!/bin/sh >> >> QEMU="$@" >> >> ${QEMU} -s -no-kvm -display sdl -m 512 -cpu phenom -nographic -cdrom >> virtualbox.iso >>

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hi, On 06.03.2017 14:15, Alex Bennée wrote: > I found the virtualbox.iso on your branch but I can't trigger the > assert. Running: > > #!/bin/sh > > QEMU="$@" > > ${QEMU} -s -no-kvm -display sdl -m 512 -cpu phenom -nographic -cdrom > virtualbox.iso > > I get: > > NOVA Microhypervisor v7-2436

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alex Bennée
Alexander Boettcher writes: > Hello, > > beginning with commit 3bd1d74576bacb120949e13cdeded7a0c792c685 > > "cputlb: introduce tlb_flush_* async work" > > using Qemu with SoftMMU+SVM virtualization deadlocks because tb_lock is > taken second time in cputlb.c tlb_flush_nocheck() function. The fir

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-05 Thread Richard Henderson
On 03/06/2017 08:32 AM, Alex Bennée wrote: #5 0x0046ea2e in tlb_flush (cpu=0x164a360) at qemu.git/cputlb.c:121 #6 0x00538987 in cpu_x86_update_cr4 (env=0x16525f0, new_cr4=1784) at qemu.git/target/i386/helper.c:660 #7 0x0055e318 in cpu_vmexit (env=0x16525f0, exit_cod

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-05 Thread Alex Bennée
Alexander Boettcher writes: > Hello, > > beginning with commit 3bd1d74576bacb120949e13cdeded7a0c792c685 > > "cputlb: introduce tlb_flush_* async work" > > using Qemu with SoftMMU+SVM virtualization deadlocks because tb_lock is > taken second time in cputlb.c tlb_flush_nocheck() function. The fir