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

Re: [Xen-devel] [PATCH v7 12/32] xen/x86: add bitmap of enabled emulated devices



>>> On 15.10.15 at 03:48, <boris.ostrovsky@xxxxxxxxxx> wrote:
> On 10/02/2015 11:48 AM, Roger Pau Monne wrote:
>> --- a/xen/include/public/arch-x86/xen.h
>> +++ b/xen/include/public/arch-x86/xen.h
>> @@ -268,7 +268,28 @@ typedef struct arch_shared_info arch_shared_info_t;
>>    * XEN_DOMCTL_INTERFACE_VERSION.
>>    */
>>   struct xen_arch_domainconfig {
>> -    char dummy;
>> +#define _XEN_X86_EMU_LAPIC          0
>> +#define XEN_X86_EMU_LAPIC           (1U<<_XEN_X86_EMU_LAPIC)
>> +#define _XEN_X86_EMU_HPET           1
>> +#define XEN_X86_EMU_HPET            (1U<<_XEN_X86_EMU_HPET)
>> +#define _XEN_X86_EMU_PMTIMER        2
>> +#define XEN_X86_EMU_PMTIMER         (1U<<_XEN_X86_EMU_PMTIMER)
>> +#define _XEN_X86_EMU_RTC            3
>> +#define XEN_X86_EMU_RTC             (1U<<_XEN_X86_EMU_RTC)
>> +#define _XEN_X86_EMU_IOAPIC         4
>> +#define XEN_X86_EMU_IOAPIC          (1U<<_XEN_X86_EMU_IOAPIC)
>> +#define _XEN_X86_EMU_PIC            5
>> +#define XEN_X86_EMU_PIC             (1U<<_XEN_X86_EMU_PIC)
>> +#define _XEN_X86_EMU_VGA            6
>> +#define XEN_X86_EMU_VGA             (1U<<_XEN_X86_EMU_VGA)
>> +#define _XEN_X86_EMU_IOMMU          7
>> +#define XEN_X86_EMU_IOMMU           (1U<<_XEN_X86_EMU_IOMMU)
> 
> What about PIT? Should we (initially) disable it as well?

Definitely - good that you spotted it missing.

Jan

> I (by mistake) enabled it in my guest and crashed the hypervisor due to 
> unprotected access to vlapic in pt_update_irq(). I started fixing it but 
> then realized that perhaps we shouldn't have PIT at all. Which did solve 
> my problems.
> 
> (Regardless of whether we have PIT we should probably guard 
> vlapic_accept_pit_interrupt() in pit_irq_masked() with has_vlapic())
> 
> -boris



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


 


Rackspace

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