On 2014-06-30 17:08, Paolo Bonzini wrote: > Il 30/06/2014 10:54, Jan Kiszka ha scritto: >> + SVM_IOIO_SIZE_SHIFT; >> gpa = svm->nested.vmcb_iopm + (port / 8); >> - bit = port % 8; >> - val = 0; >> + start_bit = port % 8; >> + iopm_len = (start_bit + size > 8) ? 2 : 1; >> + mask = (0xf >> (4 - size)) << start_bit; > > These two lines are tricky. :) That last line was, indeed... :) > > The patch looks good, I'll write a test case if you don't beat me to it. I'm not going to beat you if you write any test case. :) Didn't check the svm part of the unit tests recently, if they are as easily extensible for such scenarios like vmx is now. Jan
Attachment:
signature.asc
Description: OpenPGP digital signature