El 02/10/15 a les 20.37, Andrew Cooper ha escrit:
> On 02/10/15 16:48, Roger Pau Monne wrote:
>> If certain devices (like the local or the io apic) are disabled some modes
>> of operation of the HVM event channel callback cannot be used. Make sure Xen
>> doesn't try to setup them.
>>
>> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
>> Cc: Jan Beulich <jbeul...@suse.com>
>> Cc: Andrew Cooper <andrew.coop...@citrix.com>
>> ---
>>  xen/arch/x86/hvm/irq.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
>> index 990a2ca..0f3ab6c 100644
>> --- a/xen/arch/x86/hvm/irq.c
>> +++ b/xen/arch/x86/hvm/irq.c
>> @@ -330,6 +330,10 @@ void hvm_set_callback_via(struct domain *d, uint64_t 
>> via)
>>           (via_type > HVMIRQ_callback_vector) )
>>          via_type = HVMIRQ_callback_none;
>>  
>> +    if ( via_type != HVMIRQ_callback_vector &&
>> +         (!has_vlapic(d) || !has_vioapic(d) || !has_vpic(d)) )
>> +        return;
> 
> I think the logic needs to be slightly more complicated.
> 
> Without a vlapic, all callback types are invalid.

Really? On PVH/HVMlite we allow using HVMIRQ_callback_vector without a
vlapic.

> Without an ioapic/pic, _gsi and _pci_intx are invalid, but _vector is
> possible.
> 
> Other issues with this area of code (not caused by you) are the fact
> there is no error flagged from this setup, and that via_type is not
> exposed in the Xen ABI.  Both of these should be looked into by someone
> with some copious free time, but are not impediments to this patch series.
> 
> ~Andrew
> 


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

Reply via email to