Re: [PATCH 2/7] KVM: x86: Function for determining exception type

2014-07-22 Thread Paolo Bonzini
Il 21/07/2014 23:30, Nadav Amit ha scritto: > Few comments to see we are on the same page: > > On 7/21/14, 3:18 PM, Paolo Bonzini wrote: >> Il 21/07/2014 13:37, Nadav Amit ha scritto: >>> +int kvm_exception_type(unsigned int nr) >> >> The manual calls this the exception class. > Yes, but it also c

Re: [PATCH 2/7] KVM: x86: Function for determining exception type

2014-07-21 Thread Nadav Amit
Few comments to see we are on the same page: On 7/21/14, 3:18 PM, Paolo Bonzini wrote: Il 21/07/2014 13:37, Nadav Amit ha scritto: +int kvm_exception_type(unsigned int nr) The manual calls this the exception class. Yes, but it also calls it exception "type" (see table 6-1 "Protected-Mode Exc

Re: [PATCH 2/7] KVM: x86: Function for determining exception type

2014-07-21 Thread Paolo Bonzini
Il 21/07/2014 13:37, Nadav Amit ha scritto: > +int kvm_exception_type(unsigned int nr) The manual calls this the exception class. Please open code this as an if like this int mask; /* This should never happen, right? */ if (WARN_ON(nr > 31)) return EXCPT_