Re: [Qemu-devel] [PATCH v2 0/6] initial suspend support

2012-01-16 Thread Paolo Bonzini
On 01/16/2012 07:15 PM, Gerd Hoffmann wrote: This patch series makes suspend support in qemu alot more useful. Right now the guest can put itself into s3, but qemu will wakeup the guest instantly. With this patch series applied the guest will stay suspended instead and there are a few events wh

Re: [Qemu-devel] [PATCH 1/4] console: a few cleanups

2012-01-16 Thread Stefan Weil
Am 16.01.2012 23:36, schrieb Anthony Liguori: We don't do anything with the list of registered DisplayState so get rid of it. That's one less list to deal with down the road. Also pass DisplayState to the callbacks in DisplayState so users can avoid global state references. Signed-off-by: Antho

[Qemu-devel] [PATCH v2] Add tab-completion for device_add.

2012-01-16 Thread Andrzej Zaborowski
From: Andrzej Zaborowski Signed-off-by: Andrzej Zaborowski --- v2: pass only char *prop_name as qdev_driver_prop_foreach_func parameter, Anthony noted Property was soon going away. --- hw/qdev.c | 38 ++ hw/qdev.h |7 +++ monitor.c | 41

Re: [Qemu-devel] [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15

2012-01-16 Thread Charles . Tsai-蔡清海-研究發展部
Vadim, I am sorry that it was my mistake because I did not see there was a PIC device which was created with no device driver installed. Instead of updating the driver, I ran the hardware installation wizard to install the Vioserial driver. As such, the system could not install the device for

Re: [Qemu-devel] [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15

2012-01-16 Thread Michael Roth
On 01/15/2012 08:02 PM, Charles.Tsai-蔡清海-研究發展部 wrote: Vadim, Thank you for your prompt reply. Here are the information for our test case. 1) we use the following command line to launch the guest OS /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name win_x

Re: [Qemu-devel] [PATCH 03/12] hw/arm_boot.c: Make SMP boards specify address to poll in bootup loop

2012-01-16 Thread andrzej zaborowski
On 13 January 2012 21:52, Peter Maydell wrote: > From: Evgeny Voevodin > > The secondary CPU bootloader in arm_boot.c holds secondary CPUs in a > pen until the primary CPU releases them. Make boards specify the > address to be polled to determine whether to leave the pen (it was > previously hard

Re: [Qemu-devel] [PATCH v7 01/10] hw/sysbus.h: Increase maximum number of device IRQs.

2012-01-16 Thread andrzej zaborowski
On 16 January 2012 07:48, Evgeny Voevodin wrote: > Samsung exynos4210 Interrupt Combiner needs 512 IRQ sources. Thanks, I applied this patch and the second one reviewed by Peter Maydell. I haven't look at the other patches but on quick glance the code formatting is still a little off in places.

[Qemu-devel] buildbot failure in qemu on disable_kvm_i386_debian_6_0

2012-01-16 Thread qemu
The Buildbot has detected a new failure on builder disable_kvm_i386_debian_6_0 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/disable_kvm_i386_debian_6_0/builds/156 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: yuz

Re: [Qemu-devel] [PATCH 1/2] pxa2xx_keypad: make single automatic scans work

2012-01-16 Thread andrzej zaborowski
On 12 January 2012 20:30, Vasily Khoruzhick wrote: > u-boot uses single automatic scans and polling in > pxa2xx_keypad driver, so clear KPC_AS bit immediately > and update keys state even if KPC_AS and KPC_ASACT are > cleared. Thanks, applied. Cheers

Re: [Qemu-devel] [PATCH 2/2] pxa2xx_lcd: fix palette parser

2012-01-16 Thread andrzej zaborowski
On 12 January 2012 20:30, Vasily Khoruzhick wrote: > Pallete entry size for 16bpp format is 2 bytes, not 4 > > Signed-off-by: Vasily Khoruzhick Thanks, applied, (with a style consistency change). Cheers

[Qemu-devel] [PATCH v3 2/2] qemu-ga: add guest-set-support-level command

2012-01-16 Thread Michael Roth
Recently commands where introduced on the mailing that involved adding commands to the guest agent that could potentially break older versions of QEMU. While it's okay to expect that qemu-ga can be updated to support newer host features, it's unrealistic to require a host to be updated to support q

[Qemu-devel] [PATCH v3 1/2] qemu-ga: Add schema documentation for types

2012-01-16 Thread Michael Roth
Document guest agent schema types in similar fashion as qmp schema types. Signed-off-by: Michael Roth --- qapi-schema-guest.json | 98 +++ 1 files changed, 81 insertions(+), 17 deletions(-) diff --git a/qapi-schema-guest.json b/qapi-schema-guest.jso

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Alexander Graf
On 17.01.2012, at 00:52, Peter Maydell wrote: > On 16 January 2012 19:18, Alexander Graf wrote: >> On 16.01.2012, at 20:17, Peter Maydell wrote: >>> On 16 January 2012 19:12, Alexander Graf wrote: So what if we leave uint32_t be uint32_t and make the other ones _fast_? >>> >>> We'd need t

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Peter Maydell
On 16 January 2012 19:18, Alexander Graf wrote: > On 16.01.2012, at 20:17, Peter Maydell wrote: >> On 16 January 2012 19:12, Alexander Graf wrote: >>> So what if we leave uint32_t be uint32_t and make the other ones _fast_? >> >> We'd need to get Andreas to do another benchmark run to check that

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

2012-01-16 Thread Andrzej Zaborowski
On 14 January 2012 01:42, Andreas Färber wrote: > Am 08.12.2011 01:41, schrieb Andreas Färber: >> Am 10.11.2011 19:40, schrieb Pavel Borzenkov: >>> When SDL support is disabled, there is no way to build QEMU without >>> Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and >>> all

Re: [Qemu-devel] [Android-virt] [PATCH 03/12] hw/arm_boot.c: Make SMP boards specify address to poll in bootup loop

2012-01-16 Thread Peter Maydell
On 16 January 2012 23:31, andrzej zaborowski wrote: > On 16 January 2012 09:31, Peter Maydell wrote: >> [*] realview, vexpress, highbank and exynos4 all do something >> that's sufficiently similar that we can handle them all by >> parameterising the secondary boot code a bit. omap is kinda >> dif

Re: [Qemu-devel] [Android-virt] [PATCH 03/12] hw/arm_boot.c: Make SMP boards specify address to poll in bootup loop

2012-01-16 Thread andrzej zaborowski
On 16 January 2012 09:31, Peter Maydell wrote: > On 16 January 2012 01:56, Alexander Graf wrote: >> >> On 13.01.2012, at 21:52, Peter Maydell wrote: >> >>> From: Evgeny Voevodin >>> >>> The secondary CPU bootloader in arm_boot.c holds secondary CPUs in a >>> pen until the primary CPU releases th

[Qemu-devel] [PATCH] tests: fix out-of-tree building for lm32 target

2012-01-16 Thread Michael Walle
Signed-off-by: Michael Walle --- configure |4 +++- tests/tcg/lm32/Makefile | 13 - 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 467e87b..168be85 100755 --- a/configure +++ b/configure @@ -3775,7 +3775,8 @@ echo "QEMU_

[Qemu-devel] [PATCH 2/4] sdl: move globals to a state file, update everything accordingly

2012-01-16 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- ui/sdl.c| 552 ++- ui/sdl_keysym.h |2 - 2 files changed, 301 insertions(+), 253 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 0040ad2..2310964 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -33,82

[Qemu-devel] [PATCH 1/4] console: a few cleanups

2012-01-16 Thread Anthony Liguori
We don't do anything with the list of registered DisplayState so get rid of it. That's one less list to deal with down the road. Also pass DisplayState to the callbacks in DisplayState so users can avoid global state references. Signed-off-by: Anthony Liguori --- console.c |9 +++--

[Qemu-devel] [PATCH 3/4] console: pass DisplayAllocator as first argument to methods

2012-01-16 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- console.c | 14 -- console.h | 12 ++-- ui/sdl.c | 10 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/console.c b/console.c index 1085b07..36b8d76 100644 --- a/console.c +++ b/console.c @@ -1271,7 +1271,8 @

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Michael Roth
On 01/16/2012 02:09 PM, Luiz Capitulino wrote: The guest-suspend command supports three modes: o hibernate (suspend to disk) o sleep (suspend to ram) o hybrid(save RAM contents to disk, but suspend instead of powering off) Before trying to suspend, the command queri

Re: [Qemu-devel] [PATCH RFC] pyembed: integer python into QEMU

2012-01-16 Thread Alex Bradbury
On 16 January 2012 18:22, Anthony Liguori wrote: > This is something I started during 1.0-rc on a lark and spent some time last > night actually making work.  I'm sending it only to show that (1) it's > possible > and (2) to get some input about what other people think as a longer term > directio

[Qemu-devel] Is guest agent socket being closed upon reboot?

2012-01-16 Thread Michal Privoznik
Hi, I'd like you to ask if/why is guest agent socked being closed upon guest reboot. I am using virtserialport to talk to guest agent: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/f16x86_64.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Michael Roth
On 01/16/2012 02:35 PM, Daniel P. Berrange wrote: On Mon, Jan 16, 2012 at 02:02:08PM -0600, Michael Roth wrote: On 01/16/2012 11:23 AM, Luiz Capitulino wrote: On Mon, 16 Jan 2012 15:18:37 -0200 Luiz Capitulino wrote: On Mon, 16 Jan 2012 17:13:39 + "Daniel P. Berrange" wrote: On Mon,

Re: [Qemu-devel] [PATCH 01/14] lm32: Fix mixup of uint32 and uint32_t

2012-01-16 Thread Michael Walle
Am Montag 16 Januar 2012, 12:27:01 schrieb Peter Maydell: > On 16 January 2012 00:46, Andreas Färber wrote: > > diff --git a/hw/milkymist-vgafb_template.h > > b/hw/milkymist-vgafb_template.h index 69af9ef..544b55e 100644 > > --- a/hw/milkymist-vgafb_template.h > > +++ b/hw/milkymist-vgafb_template

Re: [Qemu-devel] Summary of Anthony's 'next' queue

2012-01-16 Thread Igor Mammedov
Anthony Liguori codemonkey.ws> writes: > 006 pingfank linux.vnet.ibm.com Introduce a new bus "ICC" to connect > APIC Hi Anthony, I'm re-basing cpu hot-plug from qemu-kvm.git to qemu.git and to get working cpu hot-plug the above mentioned 006 patch is required. Is it still on your qemu.git t

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Jamie Lokier
Eric Blake wrote: > On 01/13/2012 12:15 PM, Luiz Capitulino wrote: > > This might look complex, but the final code is quite simple. The > > purpose of that approach is to allow qemu-ga to reap its children > > (semi-)automatically from its SIGCHLD handler. > > Yes, given your desire for the top-le

Re: [Qemu-devel] Fwd: Re: [target-mips] qemu on centos

2012-01-16 Thread Andreas Färber
Hello Brendan, Happy New Year. Am 23.12.2011 19:05, schrieb Brendan Kirby: > Attached are three MIPS binaries that I have seen segfault > intermittently on CentOS 6 machines. Just run them with no arguments > several times. Unfortunately those binaries are all dynamically linked. Even if I use

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf [2012-01-16 14:52]: > > On 16.01.2012, at 21:13, Ryan Harper wrote: > > > * Alexander Graf [2012-01-16 13:52]: > >> > >> On 16.01.2012, at 20:46, Ryan Harper wrote: > >> > >>> * Alexander Graf [2012-01-16 13:37]: > > On 16.01.2012, at 20:30, Ryan Harper wrote: > >

Re: [Qemu-devel] [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15

2012-01-16 Thread Vadim Rozenfeld
On Mon, 2012-01-16 at 17:17 +0800, Charles.Tsai-蔡清海-研究發展部 wrote: > Vadim, > > I just ran the Qemu monitor to get the PCI information. The information is > listed belowe. > From the listed information, I did not see anything wrong with the BAR0. > --- Thank you. > > > > 2). In Guest Wind

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Eric Blake
On 01/16/2012 01:19 PM, Luiz Capitulino wrote: >> memset(), strlen, strcpy, and friends in are all in the class >> of functions that I think are unintentional omissions from the list of >> async-signal-safe functions (they don't read/modify anything but the >> pointers passed in, so the _only_ rea

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Daniel P. Berrange
On Mon, Jan 16, 2012 at 06:09:52PM -0200, Luiz Capitulino wrote: > +/* Try to find executable file 'file'. If it's found, its absolute path is > + returned in 'abs_path' and the function returns true. If it's not found, > + the function will return false and 'abs_path' will contain zeros */ >

Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework

2012-01-16 Thread Anthony Liguori
On 01/16/2012 11:08 AM, Avi Kivity wrote: On 01/16/2012 06:59 PM, Stefan Hajnoczi wrote: +} +qtest_send_prefix(chr); +qtest_send(chr, "OK 0x%04x\n", value); Endianness is a little weird here. memory.c will byteswap if target and device endianness differ. Imagine the c

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 21:13, Ryan Harper wrote: > * Alexander Graf [2012-01-16 13:52]: >> >> On 16.01.2012, at 20:46, Ryan Harper wrote: >> >>> * Alexander Graf [2012-01-16 13:37]: On 16.01.2012, at 20:30, Ryan Harper wrote: > * Alexander Graf [2012-01-08 17:53]: >> When

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Daniel P. Berrange
On Mon, Jan 16, 2012 at 02:02:08PM -0600, Michael Roth wrote: > On 01/16/2012 11:23 AM, Luiz Capitulino wrote: > >On Mon, 16 Jan 2012 15:18:37 -0200 > >Luiz Capitulino wrote: > > > >>On Mon, 16 Jan 2012 17:13:39 + > >>"Daniel P. Berrange" wrote: > >> > >>>On Mon, Jan 16, 2012 at 03:08:53PM -0

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
On Mon, 16 Jan 2012 13:08:23 -0700 Eric Blake wrote: > On 01/16/2012 10:08 AM, Luiz Capitulino wrote: > >> Strangely enough, POSIX doesn't include strcmp() in its list of > >> async-signal-safe functions (which is what you should be restricting > >> yourself to, if qemu-ga is multi-threaded), but

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf [2012-01-16 13:52]: > > On 16.01.2012, at 20:46, Ryan Harper wrote: > > > * Alexander Graf [2012-01-16 13:37]: > >> > >> On 16.01.2012, at 20:30, Ryan Harper wrote: > >> > >>> * Alexander Graf [2012-01-08 17:53]: > When running QEMU without -cpu parameter, the user usua

[Qemu-devel] [PATCH v6 0/2]: qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
Several fixes, but no major changes. This series depends on this patch from Michael: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01382.html v6 o improve schema documentation o change reopen_fd_to_null() to return void o fix reopen_fd_to_null() no to close stdin [Eric] o use execle(

[Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
The guest-suspend command supports three modes: o hibernate (suspend to disk) o sleep (suspend to ram) o hybrid(save RAM contents to disk, but suspend instead of powering off) Before trying to suspend, the command queries the guest in order to know whether the given mode

[Qemu-devel] [PATCH 1/2] qemu-ga: set O_NONBLOCK for serial channels

2012-01-16 Thread Luiz Capitulino
This fixes a bug when using -m isa-serial where qemu-ga will hang on a read()'s when communicating to the host via isa-serial. Original fix by Michael Roth. Signed-off-by: Luiz Capitulino --- qemu-ga.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-ga.c b/qemu-ga

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Eric Blake
On 01/16/2012 10:08 AM, Luiz Capitulino wrote: >> Strangely enough, POSIX doesn't include strcmp() in its list of >> async-signal-safe functions (which is what you should be restricting >> yourself to, if qemu-ga is multi-threaded), but in practice, I think >> that is a bug of omission in POSIX, an

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Michael Roth
On 01/16/2012 11:23 AM, Luiz Capitulino wrote: On Mon, 16 Jan 2012 15:18:37 -0200 Luiz Capitulino wrote: On Mon, 16 Jan 2012 17:13:39 + "Daniel P. Berrange" wrote: On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote: On Fri, 13 Jan 2012 14:48:04 -0700 Eric Blake wrote: +

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:46, Ryan Harper wrote: > * Alexander Graf [2012-01-16 13:37]: >> >> On 16.01.2012, at 20:30, Ryan Harper wrote: >> >>> * Alexander Graf [2012-01-08 17:53]: When running QEMU without -cpu parameter, the user usually wants a sane default. So far, we're using the q

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf [2012-01-16 13:37]: > > On 16.01.2012, at 20:30, Ryan Harper wrote: > > > * Alexander Graf [2012-01-08 17:53]: > >> When running QEMU without -cpu parameter, the user usually wants a sane > >> default. So far, we're using the qemu64/qemu32 CPU type, which basically > >> means "

Re: [Qemu-devel] [PATCH RFC] pyembed: integer python into QEMU

2012-01-16 Thread Stefan Weil
Am 16.01.2012 20:23, schrieb Anthony Liguori: On 01/16/2012 12:35 PM, Alex Bradbury wrote: On 16 January 2012 18:22, Anthony Liguori wrote: This is something I started during 1.0-rc on a lark and spent some time last night actually making work. I'm sending it only to show that (1) it's possi

Re: [Qemu-devel] [PATCH 1/2] KVM: Add new -cpu best

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:33, Anthony Liguori wrote: > On 01/08/2012 05:52 PM, Alexander Graf wrote: >> During discussions on whether to make -cpu host the default in SLE, I found >> myself disagreeing to the thought, because it potentially opens a big can >> of worms for potential bugs. But if I alre

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:30, Ryan Harper wrote: > * Alexander Graf [2012-01-08 17:53]: >> When running QEMU without -cpu parameter, the user usually wants a sane >> default. So far, we're using the qemu64/qemu32 CPU type, which basically >> means "the maximum TCG can emulate". > > it also means we

[Qemu-devel] [PATCH v2 4/6] suspend: make ps/2 devices wakeup the guest

2012-01-16 Thread Gerd Hoffmann
This patch adds wakeup support to ps/2 emulation. Any key press on the ps/2 keyboard will wakeup the guest. Likewise any mouse button press will wakeup the guest. Mouse moves are ignored, so the guest will not wakeup in case your mouse crosses the vnc window of a suspended guest by accident. Si

[Qemu-devel] [PATCH v2 0/6] initial suspend support

2012-01-16 Thread Gerd Hoffmann
This patch series makes suspend support in qemu alot more useful. Right now the guest can put itself into s3, but qemu will wakeup the guest instantly. With this patch series applied the guest will stay suspended instead and there are a few events which can kick the guest out of suspend state: A

Re: [Qemu-devel] [PATCH 1/2] KVM: Add new -cpu best

2012-01-16 Thread Anthony Liguori
On 01/08/2012 05:52 PM, Alexander Graf wrote: During discussions on whether to make -cpu host the default in SLE, I found myself disagreeing to the thought, because it potentially opens a big can of worms for potential bugs. But if I already am so opposed to it for SLE, how can it possibly be rea

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf [2012-01-08 17:53]: > When running QEMU without -cpu parameter, the user usually wants a sane > default. So far, we're using the qemu64/qemu32 CPU type, which basically > means "the maximum TCG can emulate". it also means we all maximum possible migration targets. Have you given

[Qemu-devel] [PATCH v2 2/6] suspend: switch acpi s3 to new infrastructure.

2012-01-16 Thread Gerd Hoffmann
This patch switches pc s3 suspend over to the new infrastructure. The cmos_s3 qemu_irq is killed, the new notifier is used instead. The xen hack goes away with that too, the hypercall can simply be done in a notifier function now. This patch also makes the guest actually stay suspended instead of

Re: [Qemu-devel] [RFC PATCH 1/5] suspend: add infrastructure

2012-01-16 Thread Gerd Hoffmann
On 01/13/12 16:51, Paolo Bonzini wrote: > On 01/11/2012 04:08 PM, Gerd Hoffmann wrote: >> +void qemu_system_suspend_request(qemu_irq wake_irq) >> +{ >> +if (suspend_wake_irq != NULL) { >> +return; >> +} >> +cpu_stop_current(); >> +qemu_notify_event(); >> +suspend_wake_ir

Re: [Qemu-devel] [PATCH RFC] pyembed: integer python into QEMU

2012-01-16 Thread Anthony Liguori
On 01/16/2012 12:35 PM, Alex Bradbury wrote: On 16 January 2012 18:22, Anthony Liguori wrote: This is something I started during 1.0-rc on a lark and spent some time last night actually making work. I'm sending it only to show that (1) it's possible and (2) to get some input about what other p

Re: [Qemu-devel] [PATCH V14 0/7] Qemu Trusted Platform Module (TPM) integration

2012-01-16 Thread Paul Moore
On Thursday, January 12, 2012 11:59:54 AM Paul Moore wrote: > On Wednesday, December 14, 2011 08:43:15 AM Stefan Berger wrote: > > The following series of patches adds TPM (Trusted Platform Module) > > support to Qemu. An emulator for the TIS (TPM Interface Spec) interface > > is added that provide

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:17, Peter Maydell wrote: > On 16 January 2012 19:12, Alexander Graf wrote: >> >> On 16.01.2012, at 20:02, Peter Maydell wrote: >>> The changes from int32/uint32 to int_fast32_t/uint_fast32_t are >>> the potentially dangerous ones in this set, since they change a >>> type th

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Peter Maydell
On 16 January 2012 19:12, Alexander Graf wrote: > > On 16.01.2012, at 20:02, Peter Maydell wrote: >> The changes from int32/uint32 to int_fast32_t/uint_fast32_t are >> the potentially dangerous ones in this set, since they change a >> type that was easily mistaken for "exactly 32 bits" and happene

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:02, Peter Maydell wrote: > On 16 January 2012 00:46, Andreas Färber wrote: >> Based on a suggestion from Alex earlier this week, I managed to run a >> simple benchmark of softfloat performance with qemu-arm, as requested by >> Peter. >> >> I went for the Whetstone floating

Re: [Qemu-devel] [PATCH 00/14] softfloat: Use POSIX integer types - benchmarked

2012-01-16 Thread Peter Maydell
On 16 January 2012 00:46, Andreas Färber wrote: > Based on a suggestion from Alex earlier this week, I managed to run a > simple benchmark of softfloat performance with qemu-arm, as requested by > Peter. > > I went for the Whetstone floating point benchmark: > http://en.wikipedia.org/wiki/Whetston

[Qemu-devel] [PATCH 3/3] softfloat: roundAndPackInt{32, 64}: Don't assume int32 is 32 bits

2012-01-16 Thread Peter Maydell
Fix code in roundAndPackInt32 that assumed that int32 was only 32 bits, by simply using int32_t instead. Fix the parallel bug in roundAndPackInt64 as well, although that one is only theoretical since it's unlikely that int64 will ever be more than 64 bits. Signed-off-by: Peter Maydell --- fpu/so

Re: [Qemu-devel] [PATCH 09/14] softfloat: Replace int8 type with int_fast8_t

2012-01-16 Thread Peter Maydell
On 16 January 2012 00:46, Andreas Färber wrote: > -static int8 countLeadingZeros32( uint32_t a ) > +static int_fast8_t countLeadingZeros32(uint32_t a) >  { >  #if SOFTFLOAT_GNUC_PREREQ(3, 4) >     if (a) { > @@ -634,7 +634,7 @@ static int8 countLeadingZeros32( uint32_t a ) >         return 32; >  

Re: [Qemu-devel] [PATCH 06/14] softfloat: Replace uint16 type with uint_fast16_t

2012-01-16 Thread Peter Maydell
2012/1/16 Andreas Färber : > -typedef int uint16; ...I see we've been using a signed type for uint16 all this time. I'm surprised that hasn't caused any problems :-) -- PMM

Re: [Qemu-devel] [PATCH 2/4] Add cleanup function

2012-01-16 Thread Ryan Harper
* Eric Blake [2012-01-13 17:18]: > On 01/13/2012 03:05 PM, Ryan Harper wrote: > > Create a cleanup function and call it from all exits so we don't leave > > temp files and directories around since we change the name on each > > invocation. > > > > Also, no need to delete the files in the tmpdir

[Qemu-devel] [PATCH 2/3] softfloat: float*_to_int32_round_to_zero: don't assume int32 is 32 bits

2012-01-16 Thread Peter Maydell
Code in the float64_to_int32_round_to_zero() function was assuming that int32 would not be wider than 32 bits; this meant it might not correctly detect the overflow case. We take the simple approach of using int32_t. Also fix equivalent issues in the functions for other float sizes. Signed-off-by:

[Qemu-devel] [PATCH 0/3] softfloat/arm: fix 'int32 is 32 bits' assumptions

2012-01-16 Thread Peter Maydell
These patches fix some assumptions that are made by various bits of code that the softfloat 'int32' and 'uint32' types are exactly 32 bits rather than at least 32 bits. I found these issues as part of testing Andreas' recent softfloat type fixes patchset. What I did was to take the first four patch

[Qemu-devel] [PATCH 1/3] target-arm/helper.c: Don't assume softfloat int32 is 32 bits only

2012-01-16 Thread Peter Maydell
In the helper routines for VCVT float-to-int conversions, add an explicit cast rather than relying on the softfloat int32 type being exactly 32 bits wide (which it is not guaranteed to be). Without this, if the softfloat type was 64 bits wide we would get zero-extension of the 32 bit value from the

[Qemu-devel] [PATCH] Remove O_NOATIME flag from 9pfs open() calls in readonly mode

2012-01-16 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When 2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 added support for the 'readonly' flag against 9p filesystems, it also made QEMU add the O_NOATIME flag as a side-effect. The O_NOATIME flag, however, may only be set by the file owner, or a user with CAP_FOWNER capability.

[Qemu-devel] [PATCH v2 1/6] suspend: add infrastructure

2012-01-16 Thread Gerd Hoffmann
This patch adds some infrastructure to handle suspend and resume to qemu. First there are two functions to switch state and second there is a suspend notifier: * qemu_system_suspend_request() is supposed to be called when the guest asks for being be suspended, for example via ACPI. * qemu_s

[Qemu-devel] [PATCH v2 6/6] suspend: make rtc alarm wakeup the guest.

2012-01-16 Thread Gerd Hoffmann
Add a 'wakeup' property to the mc146818rtc. It is on by default. When enabled the rtc will wake up the guest when the alarm fires. Signed-off-by: Gerd Hoffmann --- hw/mc146818rtc.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c i

[Qemu-devel] [PATCH RFC] pyembed: integer python into QEMU

2012-01-16 Thread Anthony Liguori
This is something I started during 1.0-rc on a lark and spent some time last night actually making work. I'm sending it only to show that (1) it's possible and (2) to get some input about what other people think as a longer term direction. I see a couple possibilities here: 1. We could code por

[Qemu-devel] [PATCH v2 5/6] suspend: make serial ports wakeup the guest.

2012-01-16 Thread Gerd Hoffmann
Add a 'wakeup' property to the serial port. It is off by default. When enabled any incoming character on the serial line will wake up the guest. Useful for guests which have a serial console configured. Signed-off-by: Gerd Hoffmann --- hw/serial.c |6 ++ 1 files changed, 6 insertions(

[Qemu-devel] [PATCH v2 3/6] suspend: add wakeup monitor command

2012-01-16 Thread Gerd Hoffmann
This patch adds a wakeup monitor command which will simply wake up suspended guests. Signed-off-by: Gerd Hoffmann --- hmp-commands.hx | 14 ++ hmp.c|5 + hmp.h|1 + qapi-schema.json | 11 +++ qmp-commands.hx | 21 +++

Re: [Qemu-devel] [PATCH 4/6] make: add check targets based on gtester

2012-01-16 Thread Anthony Liguori
On 01/16/2012 11:16 AM, Paolo Bonzini wrote: On 01/13/2012 07:32 PM, Anthony Liguori wrote: This will run all tests through gtester. The main targets are: $ make check Which will run each unit test and: $ make check-report.html Which will generate a nice HTML report of the test status. Loo

Re: [Qemu-devel] [PATCH 04/14] softfloat: Fix mixups of int and int16

2012-01-16 Thread Peter Maydell
On 16 January 2012 00:46, Andreas Färber wrote: > normalizeFloat{32,64}Subnormal() expect the exponent as int16, not int. > This went unnoticed since int16 and uint16 were both typedef'ed to int. I think at the time I wrote that I was being slightly conservative because I didn't feel like confirm

[Qemu-devel] [PATCH v7 04/18] apic: Inject external NMI events via LINT1

2012-01-16 Thread Jan Kiszka
On real hardware, NMI button events are injected via the LINT1 line of the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that should not receive them. Change the APIC emulation code to reflect this. Based on qemu

[Qemu-devel] [PATCH v7 00/18] uq/master: Introduce basic irqchip support

2012-01-16 Thread Jan Kiszka
Changes in v7: - introduce {apic,pic,ioapic}_qdev_register and use {APIC,PIC,IOAPIC}CommonInfo to move more code into the common modules - clean up forgotten fragments of backend/frontend approach - rephrased potentially misleading title of last patch ;) CC: Lai Jiangshan Jan Kiszka (18): ms

[Qemu-devel] [PATCH 03/15] dma-helpers: add accounting wrappers

2012-01-16 Thread Paolo Bonzini
The length of the transfer is already in the sglist, and may be opaque to the device if it is not in hw/. So add a wrapper that fetches it. Signed-off-by: Paolo Bonzini --- dma-helpers.c |6 ++ dma.h |3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dma-

[Qemu-devel] [PATCH v7 08/18] i8259: Completely privatize PicState

2012-01-16 Thread Jan Kiszka
Use DeviceState instead of PicState in the public i8259 API. This is cleaner and allows to reorganize the PIC data structures for KVM reuse. Signed-off-by: Jan Kiszka --- hw/i8259.c | 17 +++-- hw/pc.h|7 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --gi

[Qemu-devel] [PATCH v7 14/18] kvm: x86: Establish IRQ0 override control

2012-01-16 Thread Jan Kiszka
KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka --- hw/pc.c|3 ++- kvm-all.c |5 + kvm-stub.c |5 + k

[Qemu-devel] [PATCH v7 03/18] apic: Stop timer on reset

2012-01-16 Thread Jan Kiszka
All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index

[Qemu-devel] [PATCH v7 06/18] apic: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
The KVM in-kernel APIC model will reuse parts of the user space model while providing the same frontend view to guest and most management interfaces. Factor out an APIC base class to encapsulate those parts that will be shared by user space and KVM model. This class offers callback hooks for init,

[Qemu-devel] [PATCH 12/15] virtio-scsi: Add basic request processing infrastructure

2012-01-16 Thread Paolo Bonzini
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 142 +- 1 files changed, 140 insertions(+), 2 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 7ebfba7..b34c14f 1006

[Qemu-devel] [PATCH 01/15] dma-helpers: make QEMUSGList target independent

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- dma.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dma.h b/dma.h index a13209d..d50019b 100644 --- a/dma.h +++ b/dma.h @@ -17,6 +17,13 @@ typedef struct ScatterGatherEntry ScatterGatherEntry; +struct QEMUSGList { +

[Qemu-devel] [PATCH v7 12/18] memory: Introduce memory_region_init_reservation

2012-01-16 Thread Jan Kiszka
Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest code (DMA to reser

[Qemu-devel] [PATCH 15/15] virtio-scsi: add migration support

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 50 +- 1 files changed, 49 insertions(+), 1 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 7ad60ec..f5cecfc 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -237,6 +2

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
On Mon, 16 Jan 2012 15:18:37 -0200 Luiz Capitulino wrote: > On Mon, 16 Jan 2012 17:13:39 + > "Daniel P. Berrange" wrote: > > > On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote: > > > On Fri, 13 Jan 2012 14:48:04 -0700 > > > Eric Blake wrote: > > > > > > > > + > > > > > +

[Qemu-devel] [PATCH 11/15] virtio-scsi: Add virtio-scsi stub device

2012-01-16 Thread Paolo Bonzini
From: Stefan Hajnoczi Add a useless virtio SCSI HBA device: qemu -device virtio-scsi-pci Signed-off-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- Makefile.target |1 + default-configs/pci.mak |1 + default-configs/s390x-softmmu.mak |1 + hw/pc

[Qemu-devel] [Bug 824650] Re: Latest GIT assert error in arp_table.c

2012-01-16 Thread alek...@gmail.com
qemu-system-i386 -m 320 -hda mikrotik.img qemu-system-i386: slirp/arp_table.c:75: arp_table_search: Assertion `(ip_addr & (__extension__ ({ register unsigned int __v, __x = (~(0xf << 28)); if (__builtin_constant_p (__x)) __v = __x) & 0xff00) >> 24) | (((__x) & 0x00ff) >> 8) | (((__x)

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
On Mon, 16 Jan 2012 17:13:39 + "Daniel P. Berrange" wrote: > On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote: > > On Fri, 13 Jan 2012 14:48:04 -0700 > > Eric Blake wrote: > > > > > > + > > > > +pid = fork(); > > > > +if (!pid) { > > > > +char buf[

[Qemu-devel] [PATCH 13/15] virtio-scsi: add basic SCSI bus operation

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 110 +++-- 1 files changed, 97 insertions(+), 13 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index b34c14f..21264a1 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -128,

Re: [Qemu-devel] [PATCH 4/6] make: add check targets based on gtester

2012-01-16 Thread Paolo Bonzini
On 01/13/2012 07:32 PM, Anthony Liguori wrote: This will run all tests through gtester. The main targets are: $ make check Which will run each unit test and: $ make check-report.html Which will generate a nice HTML report of the test status. Looks like there isn't any documentation about t

[Qemu-devel] [PATCH 10/15] scsi-disk: add migration support

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 59 --- 1 files changed, 55 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 28b217c..4465d76 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -111,12 +111,1

[Qemu-devel] [PATCH v7 11/18] ioapic: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
Split up the IOAPIC analogously to APIC and i8259. KVM will share the IOAPICCommonState, the vmstate, reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/ioapic.c | 130 ++

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Daniel P. Berrange
On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote: > On Fri, 13 Jan 2012 14:48:04 -0700 > Eric Blake wrote: > > > > + > > > +pid = fork(); > > > +if (!pid) { > > > +char buf[32]; > > > +FILE *sysfile; > > > +const char *arg; > > >

[Qemu-devel] [PATCH 07/15] scsi-disk: enable scatter/gather functionality

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |1 + hw/scsi-disk.c | 63 --- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index b774261..ff7e4f4 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-b

Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework

2012-01-16 Thread Anthony Liguori
On 01/16/2012 10:59 AM, Stefan Hajnoczi wrote: On Fri, Jan 13, 2012 at 6:32 PM, Anthony Liguori wrote: +if (strcmp(words[0], "outb") == 0 || +strcmp(words[0], "outw") == 0 || +strcmp(words[0], "outl") == 0) { +uint16_t addr; +uint32_t value; + +g_asse

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command

2012-01-16 Thread Luiz Capitulino
On Fri, 13 Jan 2012 14:48:04 -0700 Eric Blake wrote: > > + > > +pid = fork(); > > +if (!pid) { > > +char buf[32]; > > +FILE *sysfile; > > +const char *arg; > > +const char *pmutils_bin = "pm-is-supported"; > > + > > +if (

[Qemu-devel] [PATCH 09/15] scsi-generic: add migration support

2012-01-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 0aebcdd..12d7d15 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -59,6 +59,28 @@ typedef struc

[Qemu-devel] [PATCH v7 09/18] i8259: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. The base class provides a common device state, the vmstate, the property list, a reset core and some shared init bits. This also introduces a common helper to instantiate a single i8259 chip from the cascade-c

  1   2   >