Guido Guenther wrote:
> On Thu, Jan 03, 2008 at 07:11:32PM +0100, Guido Guenther wrote:
>   
>> simulate the pressing of a fixed feature acpi power button. The patch
>> has one issue though, it currently needs --no-kvm-irqchip (see my other
>> mail). Please apply if appropriate.
>>     
> When running without --no-kvm-irqchip the ACPI irq never gets delivered,
> the ACPI interrupt always stays at zero in /proc/interrupt. However I
> can hack around this with:
>
> --- a/kernel/ioapic.c
> +++ b/kernel/ioapic.c
> @@ -248,6 +253,8 @@ void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int 
> irq, int level)
>  
>       if (irq >= 0 && irq < IOAPIC_NUM_PINS) {
>               entry = ioapic->redirtbl[irq];
> +             if(irq == 10) /* ACPI interrupt */
> +                     entry.fields.polarity = 0;
>               level ^= entry.fields.polarity;
>               if (!level)
>                       ioapic->irr &= ~mask;
>
> If I understand the docs correctly the ACPI SCI should be an (active low
> not active high) leveled interrupt. Where would be the proper place to
> fix this?
>   

While pci interrupts are documented as active high, the documentation 
for the piix4 pic elcr registers suggests piix4 level-triggered 
interrupts are active high.  So there is some inconsistency somewhere 
involving qemu interrupt generation (which IIRC treats all interrupts as 
active high), the ioapic (qemu doesn't implement polarity), bios setup, 
and the acpi dsdt.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to