qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] kvm-unit-test poweroff qemu-kvm via acpi
@ 2013-03-14  5:26 Qiu, Shuang
  2013-03-14  8:32 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Qiu, Shuang @ 2013-03-14  5:26 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Hello there,

I tried to run kvm-unit-test on uq/master branch commit 3e41a753551a906dd9ed66fb0fc34167a6af3ba0 but failed.
The symptom is that qume cannot exit/poweroff gracefully and keeps rebooting.


After investigating the code, I find the misbehaviors may be introduced by commint 9ee59f341f9d7a95b3a87b7cac3f74bcdda395fb on uq/master branch, in which commit bochs bios debug ports are removed from the codes, instead poweroff should be done via acpi since then.
I find the exit process of kvm-unit-test(repo kvm-unit-test.git) kernel is defined in lib/x86/io.c

void exit(int code);

which still follow the bochs bios debug poweroff paradigm, i.e. write string "Shutdown" to I/O port 0x8900.


Then I tried to poweroff via acpi. However, I could not find the required ACPI table.
I read code in qemu-kvm(repo qemu-kvm.git), acpi table is loaded in function

Int acpi_table_add(const char *t);

Defined in hw/acpi.c.
To add a acpi table, I should pass the name of a file where the expected acpi table is defined. (Am I on the right track? :))


The question is how could I poweroff qemu-kvm via acpi in kvm-unit-test? Is there a pre-defined acpi table in kvm-unit-test, so I can load it directly without compiling my own one?

Thank you and Best!
Shuang

[-- Attachment #2: Type: text/html, Size: 7381 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] kvm-unit-test poweroff qemu-kvm via acpi
  2013-03-14  5:26 [Qemu-devel] kvm-unit-test poweroff qemu-kvm via acpi Qiu, Shuang
@ 2013-03-14  8:32 ` Gleb Natapov
  0 siblings, 0 replies; 2+ messages in thread
From: Gleb Natapov @ 2013-03-14  8:32 UTC (permalink / raw)
  To: Qiu, Shuang; +Cc: qemu-devel@nongnu.org

On Thu, Mar 14, 2013 at 05:26:29AM +0000, Qiu, Shuang wrote:
> Hello there,
> 
> I tried to run kvm-unit-test on uq/master branch commit 3e41a753551a906dd9ed66fb0fc34167a6af3ba0 but failed.
> The symptom is that qume cannot exit/poweroff gracefully and keeps rebooting.
> 
> 
> After investigating the code, I find the misbehaviors may be introduced by commint 9ee59f341f9d7a95b3a87b7cac3f74bcdda395fb on uq/master branch, in which commit bochs bios debug ports are removed from the codes, instead poweroff should be done via acpi since then.
Instead you should add "-device isa-debug-exit,iobase=0xf4,iosize=0x4"
to qemu command line.

--
			Gleb.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-14  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14  5:26 [Qemu-devel] kvm-unit-test poweroff qemu-kvm via acpi Qiu, Shuang
2013-03-14  8:32 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).