[Xen-devel] [PATCH v2 04/16] x86emul: complete decoding of two-byte instructions

2016-09-28 Thread Jan Beulich
This way we can at least size (and e.g. skip) them if needed, and we also won't raise the wrong fault due to not having read all relevant bytes. This at once adds correct raising of #UD for the three "ud" flavors (Intel names only "ud2", but AMD names all three of them in their opcode maps), as th

Re: [Xen-devel] [PATCH v2 04/16] x86emul: complete decoding of two-byte instructions

2016-09-28 Thread Andrew Cooper
On 28/09/16 09:08, Jan Beulich wrote: > @@ -1651,6 +1668,34 @@ x86_decode_onebyte( > } > > static int > +x86_decode_twobyte( > +struct x86_emulate_state *state, > +struct x86_emulate_ctxt *ctxt, > +const struct x86_emulate_ops *ops) > +{ > +int rc = X86EMUL_OKAY; > + > +swit

Re: [Xen-devel] [PATCH v2 04/16] x86emul: complete decoding of two-byte instructions

2016-09-28 Thread Jan Beulich
>>> On 28.09.16 at 19:22, wrote: > On 28/09/16 09:08, Jan Beulich wrote: >> @@ -1651,6 +1668,34 @@ x86_decode_onebyte( >> } >> >> static int >> +x86_decode_twobyte( >> +struct x86_emulate_state *state, >> +struct x86_emulate_ctxt *ctxt, >> +const struct x86_emulate_ops *ops) >> +{