On Wed, 2016-08-10 at 13:33 +0200, Thomas Huth wrote: > On 10.08.2016 03:59, Suraj Jitindar Singh wrote: > > > > On Power machines if a guest cedes while a tm transaction is in the > > suspended state then the checkpointed state of the vcpu may be lost > > and we > > lose the cpu in the host. > > > > Add a file for tm tests "powerpc/tm.c" and add a test to check if > > the fix > > has been applied to the host kernel. If this fix hasn't been > > applied then > > the test will never complete and the cpu will be lost. Otherwise > > the test > > should succeed. Since this has the ability to mess things up in the > > host > > mark this test as don't run by default. > > > > Based on initial work done by: Cyril Bur <cyril.bur@xxxxxxxxxxx> > > > > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@xxxxxxxxx> > > --- > [...] > > > > + /* > > + * Begin a transaction and guarantee we are in the suspend > > state > > + * before continuing > > + */ > > + asm volatile ( "1: tbegin.\n\t" > > + "beq 2f\n\t" > > + "tsuspend.\n\t" > > + "2: tcheck cr0\n\t" > > + "bf 2,1b" : > > + : > > + : "cr0" > > + ); > I now also tried to compile your patches, and looks like my standard > GCC > cross-compiler does not know about these mnemonics yet: > > /tmp/ccGEtgIa.s: Assembler messages: > /tmp/ccGEtgIa.s:96: Error: unrecognized opcode: `tbegin.' > /tmp/ccGEtgIa.s:98: Error: unrecognized opcode: `tsuspend.' > /tmp/ccGEtgIa.s:99: Error: unrecognized opcode: `tcheck' > > That's happening with the standard cross-compiler which is shipping > with > RHEL 7.2 (GCC 4.8.1 20130717). Could you please use ".long 0x..." > statements with the corresponding opcode values here instead, so that > it > also compiles with such older versions of GCC? I'll fix this up, thanks for the catch > > Thanks, > Thomas > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html