Re: [PATCH kvm-unit-tests 2/3] x86: Test rflags.rf is set upon faults

2014-07-21 Thread Paolo Bonzini
Il 21/07/2014 13:39, Nadav Amit ha scritto: > @@ -176,7 +176,7 @@ unsigned exception_vector(void) > unsigned short vector; > > asm("mov %%gs:4, %0" : "=rm"(vector)); "rm" is wrong here, it should be "r". If we make it "q" instead, we can use movb. unsigned char vector;

[PATCH kvm-unit-tests 2/3] x86: Test rflags.rf is set upon faults

2014-07-21 Thread Nadav Amit
This patch tests whether rflags.rf is set upon #UD and #GP faults as it should, according to Intel SDM 17.3.1.1. The patch saves rflags.rf in an unused bit of the value which is saved during exception handling to save rflags.rf. Signed-off-by: Nadav Amit --- lib/x86/desc.c | 14 +++---