From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] add acpi powerbutton support Date: Sun, 13 Jan 2008 15:48:04 +0200 Message-ID: <478A1694.1010307@qumranet.com> References: <20080103181132.GA1077@bogon.ms20.nix> <20080103181415.GB1077@bogon.ms20.nix> <477D50FE.4040104@qumranet.com> <20080104183158.GA14002@bogon.ms20.nix> <47809A8F.5090803@qumranet.com> <20080107115916.GA24050@bogon.ms20.nix> <20080107120223.GB24050@bogon.ms20.nix> <47821EC8.4020308@qumranet.com> <47833938.1020609@qumranet.com> <20080109180001.GA11240@bogon.ms20.nix> <4789DB74.5070901@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Guido Guenther Return-path: In-Reply-To: <4789DB74.5070901-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Guido Guenther wrote: >> On Tue, Jan 08, 2008 at 10:50:00AM +0200, Avi Kivity wrote: >> >>> Yes, you can press the VM's power button (system_powerdown in the >>> monitor) and it will invoke the OS shutdown sequence. >>> >>> Only worked on Linux in my testing though. >>> >> It works for me _when_ I pass --no-kvm-irqchip. So it seems Windows >> ignores the MADT entries or something. >> > > -no-kvm-irqchip implies ignoring the polarity, since qemu doesn't > implement ioapic polarity. > > I think we need to go back to active low pci irqs, and to have > no-ioapic working we need to insert an inverter between the pci irq > links and the pic. I base this on the following: > > - piix doesn't contain an ioapic, so the actual lines must be active low > - the piix pic elcr is documented as active-high for level-triggered irqs > Okay, this is likely right as I was able to shutdown both Windows and Linux with the following: - backout the madt interrupt source override changes - declare all interrupts as active low - negate pci irq interrupts in qemu just before forwarding to kvm (so they become active low) - negate pci irq interrupts in the kernel just before forwarding to the pic (so that they become active high, but leaving the ioapic interrupts active low) There's quite a bit of work before that can be committed, though. I want to generalize interrupt routing in the kernel, and we need tons of backward compatibility in the dsdt so that older hosts can still function. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace