Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-22 Thread Jan Kiszka
Gerd Hoffmann wrote: > Hi, > Catching ctrl-c sounds like a good idea but "ctrl-c, ctrl-c" should probably kill qemu then, since the machine might have no acpid running - in that case hitting ctrl-c would have no effect. >>> Good idea. >>> >> I'm worried about the 30+

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-22 Thread Gerd Hoffmann
Hi, >>> Catching ctrl-c sounds like a good idea but "ctrl-c, ctrl-c" should >>> probably kill qemu then, since the machine might have no acpid running - >>> in that case hitting ctrl-c would have no effect. >>> >> Good idea. >> > > I'm worried about the 30+ second shutdown latency. Is

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-21 Thread Avi Kivity
Jan Kiszka wrote: > Avi Kivity wrote: > >> Jan Kiszka wrote: >> >>> Guido Guenther wrote: >>> >>> Hi Jan, On Sat, Jan 19, 2008 at 04:40:06PM +0100, Jan Kiszka wrote: > What about additionally listening on signals? If you run qemu from the

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-21 Thread Jan Kiszka
Avi Kivity wrote: > Jan Kiszka wrote: >> Guido Guenther wrote: >> >>> Hi Jan, >>> On Sat, Jan 19, 2008 at 04:40:06PM +0100, Jan Kiszka wrote: >>> What about additionally listening on signals? If you run qemu from the console, you can then just press ctrl-c to shut the guest down (

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-21 Thread Avi Kivity
Jan Kiszka wrote: > Hi Guido, > > [posting via gmane sucks, just re-enabled mail delivery in this account...] > > Much appreciated. > Guido Guenther wrote: > >> Hi Jan, >> On Sat, Jan 19, 2008 at 04:40:06PM +0100, Jan Kiszka wrote: >> >>> What about additionally listening on signals? I

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-21 Thread Jan Kiszka
Hi Guido, [posting via gmane sucks, just re-enabled mail delivery in this account...] Guido Guenther wrote: > Hi Jan, > On Sat, Jan 19, 2008 at 04:40:06PM +0100, Jan Kiszka wrote: >> What about additionally listening on signals? If you run qemu from the >> console, you can then just press ctrl-c

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-20 Thread Guido Guenther
Hi Jan, On Sat, Jan 19, 2008 at 04:40:06PM +0100, Jan Kiszka wrote: > What about additionally listening on signals? If you run qemu from the > console, you can then just press ctrl-c to shut the guest down (instead Catching ctrl-c sounds like a good idea but "ctrl-c, ctrl-c" should probably kill

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-19 Thread Jan Kiszka
Guido Guenther wrote: > On Tue, Jan 08, 2008 at 01:34:30PM +0900, Jun Koi wrote: >> Sorry for my ignorance, but what is the effect of this patch? So >> I can shutdown guest VM cleanly, or smt else?? > system_powerdown in the commmand monitor now simulates the pressing of > the acpi power butto

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-19 Thread Guido Guenther
On Sat, Jan 19, 2008 at 12:20:56AM +0200, Avi Kivity wrote: > I found a piix4 acpi spec update that says that the SCI interrupt is > hardwired to IRQ9 and is active high. Linux knows about this and ignores > the pci irq config for this function. With the following changes Aahh, that's why Xen h

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-18 Thread Avi Kivity
Avi Kivity wrote: >> >> 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 >> - th

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-14 Thread Avi Kivity
Guido Guenther wrote: - backout the madt interrupt source override changes Should these stay, but with active low instead of active high? They can go away, since active low is the default. For reference, I'm attaching the patches I'm using. -- error compiling committee.c: too many

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-14 Thread Guido Guenther
On Mon, Jan 14, 2008 at 04:41:23AM -0800, Alexey Eremenko wrote: > As far as I know, Qemu/KVM already had ACPI power button; It can be used via > Qemu Monitor: "system_shutdown" command. Before 46b1a7377b55a3b6317b18fff64f1a80de7d3120 system_powerdown was a "do { } while(0);" on i386 and the FF pw

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-14 Thread Alexey Eremenko
Hi, As far as I know, Qemu/KVM already had ACPI power button; It can be used via Qemu Monitor: "system_shutdown" command. -Alexey "Technologov" - Check out the new SourceForge.net Marketplace. It's the best place to buy or s

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-14 Thread Guido Guenther
On Sun, Jan 13, 2008 at 03:48:04PM +0200, Avi Kivity wrote: > Okay, this is likely right as I was able to shutdown both Windows and Linux > with the following: Cool. > - backout the madt interrupt source override changes Should these stay, but with active low instead of active high? -- Guido --

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-14 Thread Guido Guenther
On Sun, Jan 13, 2008 at 11:35:48AM +0200, 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 work

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-13 Thread Avi Kivity
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. >>>

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-13 Thread Avi Kivity
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

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-09 Thread Guido Guenther
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 Window

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-08 Thread Avi Kivity
Jun Koi wrote: > On 1/7/08, Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Guido Guenther wrote: >> >>> (needs either --no-kvm-irqchip or the previous patch) >>> -- Guido >>> >>> >>> >> Applied both, thanks. >> >> > > Sorry for my ignorance, but what is the effect of this patc

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-08 Thread Guido Guenther
On Tue, Jan 08, 2008 at 01:34:30PM +0900, Jun Koi wrote: > Sorry for my ignorance, but what is the effect of this patch? So > I can shutdown guest VM cleanly, or smt else?? system_powerdown in the commmand monitor now simulates the pressing of the acpi power button. This allows you to shutdown

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-07 Thread Jun Koi
On 1/7/08, Avi Kivity <[EMAIL PROTECTED]> wrote: > Guido Guenther wrote: > > (needs either --no-kvm-irqchip or the previous patch) > > -- Guido > > > > > > Applied both, thanks. > Sorry for my ignorance, but what is the effect of this patch? So I can shutdown guest VM cleanly, or smt else??

Re: [kvm-devel] [PATCH] add acpi powerbutton support

2008-01-07 Thread Avi Kivity
Guido Guenther wrote: > (needs either --no-kvm-irqchip or the previous patch) > -- Guido > > Applied both, thanks. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Mic

[kvm-devel] [PATCH] add acpi powerbutton support

2008-01-07 Thread Guido Guenther
(needs either --no-kvm-irqchip or the previous patch) -- Guido diff --git a/bios/rombios32.c b/bios/rombios32.c index 314df94..7a96ece 100755 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -1318,8 +1318,8 @@ void acpi_bios_init(void) fadt->pm_tmr_len = 4; fadt->plvl2_lat = cpu_to_le16