[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 4/5] x86/PV: use generic emulator for privileged instruction handling



>>> On 13.12.16 at 17:53, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 13/12/16 11:28, Jan Beulich wrote:
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -1185,7 +1185,7 @@ static int ioport_access_check(
>>  
>>      fail_if(ops->read_segment == NULL);
>>      if ( (rc = ops->read_segment(x86_seg_tr, &tr, ctxt)) != 0 )
>> -        return rc;
>> +        return rc == X86EMUL_DONE ? X86EMUL_OKAY : rc;
> 
> Please have at least a comment here
> 
> /* Used by the PV path to defer the port permission check to the ioport
> hooks. */

I'll probably use a slight variation thereof, as I'd prefer to not
mention specific uses (being too easy to go stale).

>>      /* Ensure the TSS has an io-bitmap-offset field. */
>>      generate_exception_if(tr.attr.fields.type != 0xb, EXC_GP, 0);
>>
> 
> Other than that, subject to double checking the IOPL behaviour,
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

These tests are fine. Of the pv-cpuid-faulting ones, which you had
asked for during v3 review, the pv32pae one gets skipped (no
faulting available), and the pv64 one even has a problem getting at
the guest console. I am getting that same problem randomly for
other tests too, though, if I run multiple ones in one batch. No idea
what to do about that. Running that one test in isolation doesn't
eliminate the problem though; the hypervisor log tells me that the
test has been skipped just like the 32-bit one (as one would expect).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.