Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Paolo Bonzini
On 01/31/2012 09:49 PM, Anthony Liguori wrote: +DEFINE_PROP_HEX32("iobase", PCSpkState, iobase, -1), +DEFINE_PROP_PTR("pit", PCSpkState, pit), Please don't introduce a pointer property here. They cannot be used in a meaningful way in qdev. Why not register a link in instance

Re: [Qemu-devel] [RFC/PATCH] Fix guest OS panic when 64bit BAR is present

2012-01-31 Thread Michael S. Tsirkin
On Wed, Feb 01, 2012 at 06:44:42PM +1300, Alexey Korolev wrote: > On 31/01/12 22:43, Avi Kivity wrote: > > On 01/31/2012 11:40 AM, Avi Kivity wrote: > >> On 01/27/2012 06:42 AM, Alexey Korolev wrote: > >>> On 27/01/12 04:12, Avi Kivity wrote: > On 01/26/2012 04:36 PM, Michael S. Tsirkin wrote:

Re: [Qemu-devel] [RFC/PATCH] Fix guest OS panic when 64bit BAR is present

2012-01-31 Thread Alexey Korolev
On 31/01/12 22:43, Avi Kivity wrote: > On 01/31/2012 11:40 AM, Avi Kivity wrote: >> On 01/27/2012 06:42 AM, Alexey Korolev wrote: >>> On 27/01/12 04:12, Avi Kivity wrote: On 01/26/2012 04:36 PM, Michael S. Tsirkin wrote: > On Thu, Jan 26, 2012 at 03:52:27PM +0200, Avi Kivity wrote: >>

[Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3)

2012-01-31 Thread David Gibson
In order to safely drive a device with a userspace driver, or to pass it through to a guest system, we must first make sure that the device is isolated in such a way that it cannot interfere with other devices on the system. This isolation is only available on some systems and will generally requi

[Qemu-devel] [PATCH 2/3] device_isolation: Support isolation on POWER p5ioc2 bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p5ioc2 PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 14 +

[Qemu-devel] RFC: Device isolation groups

2012-01-31 Thread David Gibson
This patch series introduces a new infrastructure to the driver core for representing "device isolation groups". That is, groups of devices which can be "isolated" in such a way that the rest of the system can be protected from them, even in the presence of userspace or a guest OS directly driving

[Qemu-devel] [PATCH 3/3] device_isolation: Support isolation on POWER p7ioc (IODA) bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p7ioc (aka IODA) PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- arch/powerpc/platforms/powernv/pci-ioda.c

[Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen

2012-01-31 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery Index: qemu/block/raw.c === --- qemu.

[Qemu-devel] [RFC Patch 7/7]Qemu: vmdk image file reopen

2012-01-31 Thread Supriya Kannery
vmdk driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache flag dynamically is handled here. Signed-off-by: Supriya Kannery Index: qemu/block/vmdk.c === --- qemu.

[Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 image file reopen

2012-01-31 Thread Supriya Kannery
win32 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery Index: qemu/block/raw-win32.c === --- qem

[Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely

2012-01-31 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery Index: qemu/block.c

[Qemu-devel] [RFC Patch 3/7]Qemu: Cmd "block_set_hostcache" for dynamic cache change

2012-01-31 Thread Supriya Kannery
New command "block_set_hostcache" added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache = block device = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery --- block.c | 54 +

[Qemu-devel] [RFC Patch 1/7]Qemu: Enhance "info block" to display host cache setting

2012-01-31 Thread Supriya Kannery
Enhance "info block" to display hostcache setting for each block device. Example: (qemu) info block ide0-hd0: removable=0 file=../rhel6-32.raw ro=0 drv=raw encrypted=0 Enhanced to display "hostcache" setting: (qemu) info block ide0-hd0: removable=0 hostcache=1 file=../rhel6-32.raw ro=0 drv=raw en

[Qemu-devel] [RFC Patch 2/7]Qemu: Error classes for file reopen and data sync failure

2012-01-31 Thread Supriya Kannery
New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c === --- qemu.orig/qe

[Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change

2012-01-31 Thread Supriya Kannery
For changing host pagecache setting of a running VM, it is important to have a safe way of reopening its image file. Following patchset introduces: * a generic way to reopen image files safely. In this approach, before reopening an image, for each block driver, its state will be

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread John Williams
On Wed, Feb 1, 2012 at 12:37 PM, Anthony Liguori wrote: > On 01/31/2012 07:44 PM, Alexander Graf wrote: >> >> >> On 01.02.2012, at 02:35, Paul Brook wrote: >> We could also just change machine->init() and pass the dtb in there. In a QOM world these would become machine device proper

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Anthony Liguori
On 01/31/2012 07:44 PM, Alexander Graf wrote: On 01.02.2012, at 02:35, Paul Brook wrote: We could also just change machine->init() and pass the dtb in there. In a QOM world these would become machine device properties anyways. machine->init(ram_size, boot_devices, kernel

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Anthony Liguori
On 01/31/2012 07:35 PM, Paul Brook wrote: We could also just change machine->init() and pass the dtb in there. In a QOM world these would become machine device properties anyways. machine->init(ram_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_

Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option

2012-01-31 Thread John Williams
On Mon, Jan 30, 2012 at 12:48 PM, Anthony Liguori wrote: > > On Jan 29, 2012 8:41 PM, "John Williams" > wrote: >> >> There's an opportunity here - QEMU needs the cmdline ability to load >> random binaries/elfs anyway, such as >> >> --load file@address >> >>> >> >>> >> >>> >> >

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Alexander Graf
On 01.02.2012, at 02:35, Paul Brook wrote: >> We could also just change machine->init() and pass the dtb in there. In a >> QOM world these would become machine device properties anyways. >> >>machine->init(ram_size, boot_devices, >> kernel_filename, kernel_cmdline, initrd_fi

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Paul Brook
> We could also just change machine->init() and pass the dtb in there. In a > QOM world these would become machine device properties anyways. > > machine->init(ram_size, boot_devices, > kernel_filename, kernel_cmdline, initrd_filename, > cpu_model); > > Essentially we should

Re: [Qemu-devel] Why QEMUClock is defined in qemu-timer.c?

2012-01-31 Thread Richard Yang
On Tue, Jan 31, 2012 at 12:00:30PM +0200, Dmitry Zamaruev wrote: >This is used in many places. >Maybe to simulate 'private' variables and access methods like in C++. > >If you define structure in .c file then every function that works with >this structure must reside in same file. And any other cod

Re: [Qemu-devel] [PATCH] multiboot: mh_load_end_addr and mh_bss_end_addr may be zero

2012-01-31 Thread Göran Weinholt
Kevin Wolf writes: > Am 23.01.2012 13:49, schrieb Göran Weinholt: >> There are two special cases in the address fields of the multiboot >> format. If mh_load_end_addr is zero then the whole image file should >> be loaded and if mh_bss_end_addr is zero then there is no bss segment. >> With this ch

Re: [Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Alexander Graf
On 01.02.2012, at 01:11, Grant Likely wrote: > If compiled with CONFIG_FDT, allow user to specify a device tree file using > the -dtb argument. If the machine supports it then the dtb will be loaded > into memory and passed to the kernel on boot. > > v2: - Enable for all arm platforms by making

[Qemu-devel] [PATCH v2] arm: add device tree support

2012-01-31 Thread Grant Likely
If compiled with CONFIG_FDT, allow user to specify a device tree file using the -dtb argument. If the machine supports it then the dtb will be loaded into memory and passed to the kernel on boot. v2: - Enable for all arm platforms by making arm_boot use the filename directly - Fix style issue

[Qemu-devel] [PATCH 2/4] linux-user: add struct old_dev_t compat

2012-01-31 Thread Alexander Graf
The compat LOOP_SET_STATUS ioctl uses struct old_dev_t in its passed struct. That variable type is vastly different between different architectures. Implement wrapping around it so we can use it. This fixes running arm kpartx on an x86_64 host for me. Signed-off-by: Alexander Graf --- I messed

[Qemu-devel] [PATCH 1/4] linux-user: implement device mapper ioctls

2012-01-31 Thread Alexander Graf
This patch implements all ioctls currently implemented by device mapper, enabling us to run dmsetup and kpartx inside of linux-user. Signed-off-by: Alexander Graf --- linux-user/ioctls.h| 33 +++ linux-user/syscall.c | 226 linux-

[Qemu-devel] [PATCH 3/4] linux-user: fix BLK ioctl arguments

2012-01-31 Thread Alexander Graf
Some BLK ioctls passed sizeof(x) into a macro that already did sizeof() on the passed in argument, rendering the size information inside the ioctl be the size of the host default integer type. Signed-off-by: Alexander Graf --- linux-user/syscall_defs.h |8 +--- 1 files changed, 5 inserti

[Qemu-devel] [PATCH 2/4] linux-user: add struct old_dev_t compat

2012-01-31 Thread Alexander Graf
The compat LOOP_SET_STATUS ioctl uses struct old_dev_t in its passed struct. That variable type is vastly different between different architectures. Implement wrapping around it so we can use it. This fixes running arm kpartx on an x86_64 host for me. Signed-off-by: Alexander Graf --- linux-use

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:48 PM, Jan Kiszka wrote: On 2012-01-31 23:40, Anthony Liguori wrote: Why is what's in the tree not usable? Just don't do pcspk_init as a static inline (which is not that nice to do anyway) and you don't need to worry about the availability of an accessor. The current pattern

[Qemu-devel] [PATCH 4/4] linux-user: add BLKSSZGET ioctl wrapper

2012-01-31 Thread Alexander Graf
This patch adds an ioctl definition for BLKSSZGET. Signed-off-by: Alexander Graf --- linux-user/ioctls.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index a9d333a..7245ff0 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioc

[Qemu-devel] [PATCH 0/4] linux-user: kpartx fixes

2012-01-31 Thread Alexander Graf
As part of our OBS build process, we also want to be able to create kiwi images for ARM on x86 hardware. One of the crucial bits there is the kpartx tool, since that allows us to map images on the fly through device mapper. So this patch set goes in and implements all the device mapper ioctls and

Re: [Qemu-devel] [PATCH] block: Add support for vpc Fixed Disk type

2012-01-31 Thread Andreas Färber
Am 01.02.2012 00:04, schrieb Charles Arnold: > The Virtual Hard Disk Image Format Specification allows for three > types of hard disk formats, Fixed, Dynamic, and Differencing. Qemu > currently only supports Dynamic disks. This patch adds support for > the Fixed Disk format. > > Usage: > Ex

Re: [Qemu-devel] [PATCH 00/19] Pending linux-user patches

2012-01-31 Thread Andreas Färber
Riku, Am 31.01.2012 10:29, schrieb riku.voi...@linaro.org: > From: Riku Voipio > > The collection of simpler linux-user patches submitted since release of 1.0. > To be sent as pull request later this week unless bugs found. What about this one? http://patchwork.ozlabs.org/patch/117176/ It mig

Re: [Qemu-devel] [PATCH] block: Add support for vpc Fixed Disk type

2012-01-31 Thread Charles Arnold
Thanks Andreas, The 'TODO uuid is missing' comment in the patch is from the original sources (as well as many '//' comments). The vhd footer and header data structures contain a field for a UUID but no code was ever developed to generate one. The revised patch is below after running scripts/ch

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:40, Anthony Liguori wrote: > On 01/31/2012 04:00 PM, Jan Kiszka wrote: >> On 2012-01-31 21:49, Anthony Liguori wrote: >>> On 01/31/2012 11:41 AM, Jan Kiszka wrote: Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at t

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:00 PM, Jan Kiszka wrote: On 2012-01-31 21:49, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. Signed-off-by: Jan Kiszka Heh, I did this to

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:38, Anthony Liguori wrote: > On 01/31/2012 04:05 PM, Jan Kiszka wrote: >> On 2012-01-31 22:02, Anthony Liguori wrote: >>> On 01/31/2012 11:41 AM, Jan Kiszka wrote: In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output l

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Anthony Liguori
On 01/31/2012 04:05 PM, Jan Kiszka wrote: On 2012-01-31 22:02, Anthony Liguori wrote: On 01/31/2012 11:41 AM, Jan Kiszka wrote: In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again. T

Re: [Qemu-devel] [PATCH 0/4] linux-user: A serie of patches to set default CPU

2012-01-31 Thread Laurent Vivier
Le mardi 31 janvier 2012 à 22:01 +0200, Riku Voipio a écrit : > On Sun, Jan 22, 2012 at 01:27:13PM +0100, Laurent Vivier wrote: > > This serie of patches has already been sent, more or less, several time, > > last time in july 2011. > > > For chrooted environment, it allows to define the default

Re: [Qemu-devel] [PATCH v3 1/9] fdc: take side count into account

2012-01-31 Thread Hervé Poussineau
Hi, Markus Armbruster a écrit : Are single sided floppies broken before the patch? How? Yes. For head > 0, wrong sector number is calculated, so data is read/written at wrong place on underlying block device. Fortunately, mostly nobody is still using single-sided floppies (only some 360 kB flo

[Qemu-devel] MIM - Public Education Program Feb 2012

2012-01-31 Thread MarkPlus Malaysia
Greetings from MarkPlus Institute of Marketing Malaysia.   We would like to inform you that MarkPlus Institute of Marketing (MIM) will be holding two training programs on February 2012. · One-day program : EFFECTIVE NEGOTIATION SKILL on 14 February 2012 · Two-day program : PROFES

Re: [Qemu-devel] [PATCH v3 0/9] Misc fixes for floppy emulation

2012-01-31 Thread Hervé Poussineau
Hi, Markus Armbruster a écrit : Looks sane, except for the migration of media rate. See my reply to 7/9. I'm not very fluent with requirements for store/save/migration compatibility things, so can someone knowing them can look at the migration of media rate problem? Paolo? Markus reply i

Re: [Qemu-devel] [PATCH v3 5/9] fdc: add CCR (Configuration Control Register) write register

2012-01-31 Thread Hervé Poussineau
Markus Armbruster a écrit : Hervé Poussineau writes: Markus Armbruster a écrit : Hervé Poussineau writes: DIR and CCR registers share the same address ; DIR is read-only while CCR is write-only Looks like guest writes to CCR are silently ignored before this patch. Is that correct? Yes.

Re: [Qemu-devel] [PATCH] block: Add support for vpc Fixed Disk type

2012-01-31 Thread Andreas Färber
Hello Charles, Am 31.01.2012 20:03, schrieb Charles Arnold: > The Virtual Hard Disk Image Format Specification allows for three > types of hard disk formats, Fixed, Dynamic, and Differencing. Qemu > currently only supports Dynamic disks. This patch adds support for > the Fixed Disk format. > >

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
On 2012-01-31 22:02, Anthony Liguori wrote: > On 01/31/2012 11:41 AM, Jan Kiszka wrote: >> In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ >> 8 but keeps track of the RTC output level and applies it when legacy >> mode is turned off again. This value has to be preserved acros

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
On 2012-01-31 21:49, Anthony Liguori wrote: > On 01/31/2012 11:41 AM, Jan Kiszka wrote: >> Convert the PC speaker device to a qdev ISA model. Move the public >> interface to a dedicated header file at this chance. >> >> Signed-off-by: Jan Kiszka > > Heh, I did this too more or less the same way.

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Anthony Liguori
On 01/31/2012 03:49 PM, Jan Kiszka wrote: On 2012-01-31 22:40, Anthony Liguori wrote: On 01/31/2012 12:46 PM, Jan Kiszka wrote: Applying the concept used for the *PICs once again: establish a base class for the i8254 that can be used both by the current user space emulation and the upcoming KVM

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Jan Kiszka
On 2012-01-31 22:40, Anthony Liguori wrote: > On 01/31/2012 12:46 PM, Jan Kiszka wrote: >> Applying the concept used for the *PICs once again: establish a base >> class for the i8254 that can be used both by the current user space >> emulation and the upcoming KVM in-kernel version. We share most o

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Anthony Liguori
On 01/31/2012 12:46 PM, Jan Kiszka wrote: Applying the concept used for the *PICs once again: establish a base class for the i8254 that can be used both by the current user space emulation and the upcoming KVM in-kernel version. We share most of the public interface of the i8254, specifically to

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Anthony Liguori
On 01/31/2012 11:41 AM, Jan Kiszka wrote: In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again. This value has to be preserved across save/ restore as it cannot be reconstructed otherwi

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Anthony Liguori
On 01/31/2012 11:41 AM, Jan Kiszka wrote: Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. Signed-off-by: Jan Kiszka Heh, I did this too more or less the same way. Some comments below: --- arch_init.c|1 + hw/

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

2012-01-31 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 0/4] linux-user: A serie of patches to set default CPU

2012-01-31 Thread Riku Voipio
On Sun, Jan 22, 2012 at 01:27:13PM +0100, Laurent Vivier wrote: > This serie of patches has already been sent, more or less, several time, > last time in july 2011. > For chrooted environment, it allows to define the default cpu model as we > can't use '-cpu' argument. We now can, with QEMU_CPU

[Qemu-devel] [PATCH 2/4] qemu-ga: add guest-suspend-disk

2012-01-31 Thread Luiz Capitulino
As the command name implies, this command suspends the guest to disk. The suspend operation is implemented by two functions: bios_supports_mode() and guest_suspend(). Both functions are generic enough to be used by other suspend modes (introduced by next commits). Both functions will try to use t

Re: [Qemu-devel] [PATCH 5/5] sdl: Limit sdl_grab_end in handle_activation to Windows hosts

2012-01-31 Thread Erik Rull
Jan Kiszka wrote: There are scenarios on Linux with some SDL versions where handle_activation is continuous invoked with state = SDL_APPINPUTFOCUS and gain = 0 while we grabbed the input. This causes a ping-pong when we grab the input after an absolute mouse entered the window. As this sdl_grab_

[Qemu-devel] [PATCH 4/4] qemu-ga: add guest-suspend-hybrid

2012-01-31 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qapi-schema-guest.json | 23 +++ qga/guest-agent-commands.c | 10 ++ 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index cc914ad..9b9ecc9 100644 --- a/qapi-sche

[Qemu-devel] [PATCH 3/4] qemu-ga: add guest-suspend-ram

2012-01-31 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qapi-schema-guest.json | 28 qga/guest-agent-commands.c | 10 ++ 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index da2b240..cc914ad 100644 --- a/qapi

[Qemu-devel] [PATCH v8 0/4]: qemu-ga: add guest-suspend commands

2012-01-31 Thread Luiz Capitulino
v8 o Split the guest-suspend command into guest-suspend-disk, guest-suspend-ram and guest-suspend-hybrid (this required some refactorings) o Drop ga_has_support_level usage qapi-schema-guest.json | 75 qemu-ga.c | 20 - qga/guest-agent-commands.c |

[Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard

2012-01-31 Thread Sergei Trofimovich
From: Sergei Trofimovich Current './configure --static && make' fails for me: LINK qemu-nbd /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot fin

[Qemu-devel] building qemu on Oracle Solaris 11 x64

2012-01-31 Thread Günther Schmidt
Hi everyone, I'm trying to build qemu on Oracle Solars 11 x64. I've figure out that I need to set the --disable-guest-agent for ./configure, but there are other errors I do not know how to fix. Setting LD_LIBRARY_PATH to /usr/lib/mps/amd64 helps but at least one error still remains: ld: fa

[Qemu-devel] building qemu on Oracle Solaris 11 x64

2012-01-31 Thread Günther Schmidt
Hi everyone, I'm trying to build qemu on Oracle Solars 11 x64. I've figure out that I need to set the --disable-guest-agent for ./configure, but there are other errors I do not know how to fix. Setting LD_LIBRARY_PATH to /usr/lib/mps/amd64 helps but at least one error still remains: ld: fa

[Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking

2012-01-31 Thread Sergei Trofimovich
From: Sergei Trofimovich Added wrapper around pkg-config to allow: - safe options injection via ${QEMU_PKG_CONFIG_FLAGS} - spaces in path to pkg-config Signed-off-by: Sergei Trofimovich CC: Peter Maydell --- configure | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH] block: Add support for vpc Fixed Disk type

2012-01-31 Thread Charles Arnold
The Virtual Hard Disk Image Format Specification allows for three types of hard disk formats, Fixed, Dynamic, and Differencing. Qemu currently only supports Dynamic disks. This patch adds support for the Fixed Disk format. Usage: Example 1: qemu-img create -f vpc -o type=fixed [size] E

[Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore

2012-01-31 Thread Jan Kiszka
Same as for the APIC: To enable migration between accelerated and non-accelerated models, we need to arm the channel 0 timer only inside the emulated PIT model. The common code just saves/restores that timer to the the next_transition_time field. Signed-off-by: Jan Kiszka --- hw/i8254.c|

[Qemu-devel] [PATCH 4/4] kvm: x86: Add user space part for in-kernel i8254

2012-01-31 Thread Jan Kiszka
This provides the required user space stubs to enable the in-kernel i8254 emulation of KVM. The in-kernel model supports lost tick compensation according to the "delay" policy. This is enabled by default and can be switched off via a device property. Depending on the feature set of the host kerne

[Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Jan Kiszka
Applying the concept used for the *PICs once again: establish a base class for the i8254 that can be used both by the current user space emulation and the upcoming KVM in-kernel version. We share most of the public interface of the i8254, specifically to the pcspk, vmstate, reset and certain init p

[Qemu-devel] [PATCH 3/4] kvm: Add kvm_has_pit_state2 helper

2012-01-31 Thread Jan Kiszka
To be used for in-kernel PIT emulation. Signed-off-by: Jan Kiszka --- kvm-all.c | 10 ++ kvm-stub.c |5 + kvm.h |1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 3f2460f..8df5235 100644 --- a/kvm-all.c +++ b/kvm-all.c @@

[Qemu-devel] [PATCH 0/4] uq/master: Introduce KVM PIT support

2012-01-31 Thread Jan Kiszka
This adds another piece of qemu-kvm to upstream: The accelerated in-kernel model of the i8254. It does this in the same fashion as the interrupt controllers were already introduced. And it even has one bug less than qemu-kvm: PC speaker output still works with KVM acceleration enabled. The patches

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add a section for the host OS and a W32 maintainer

2012-01-31 Thread Stefan Weil
Am 31.01.2012 15:48, schrieb Kevin Wolf: Am 31.01.2012 15:40, schrieb Peter Maydell: On 31 January 2012 13:35, Kevin Wolf wrote: Am 27.01.2012 18:53, schrieb Stefan Weil: +Hosts: +-- + +LINUX +L: qemu-devel@nongnu.org +S: Maintained +F: linux-* +F: linux-headers/ + +POSIX +L: qemu-devel@n

[Qemu-devel] [PATCH uq/master] kvm: Implement kvm_irqchip_in_kernel like kvm_enabled

2012-01-31 Thread Jan Kiszka
To both avoid that kvm_irqchip_in_kernel always has to be paired with kvm_enabled and that the former ends up in a function call, implement it like the latter. This means keeping the state in a global variable and defining kvm_irqchip_in_kernel as a preprocessor macro. Signed-off-by: Jan Kiszka -

[Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again. This value has to be preserved across save/ restore as it cannot be reconstructed otherwise. Signed-off-by: Jan Kiszka --- hw/hpet

[Qemu-devel] [PATCH v3 3/7] i8254: Factor out interface header

2012-01-31 Thread Jan Kiszka
Move the public interface of the PIT into its own header file and update all users. Signed-off-by: Jan Kiszka --- hw/alpha_dp264.c |1 + hw/hpet.c |1 + hw/i82378.c|1 + hw/i8254.c |1 + hw/i8254.h | 54

[Qemu-devel] [PATCH v3 4/7] i8254: Pass alternative IRQ output object on initialization

2012-01-31 Thread Jan Kiszka
HPET legacy emulation will require control over the PIT IRQ output. To enable this, add support for an alternative IRQ output object to the PIT factory function. If the isa_irq number is < 0, this object will be used. This also removes the IRQ number property from the PIT class as we now use a gen

[Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. Signed-off-by: Jan Kiszka --- arch_init.c|1 + hw/i82378.c|3 +- hw/mips_jazz.c |3 +- hw/pc.c|3 +- hw/pc.h|4 --- hw/pcspk.c |

[Qemu-devel] [PATCH v3 7/7] i8254: Factor out pit_get_channel_info

2012-01-31 Thread Jan Kiszka
Instead of providing 4 individual query functions for mode, gate, output and initial counter state, introduce a service that queries all information at once. This comes with tiny additional costs for pcspk_callback but with a much cleaner interface. Also, it will simplify the implementation of the

[Qemu-devel] [PATCH v3 5/7] i8254: Rework & fix interaction with HPET in legacy mode

2012-01-31 Thread Jan Kiszka
When the HPET enters legacy mode, the IRQ output of the PIT is suppressed and replaced by the HPET timer 0. But the current code to emulate this was broken in many ways. It reset the PIT state after re-enabling, it worked against a stale static PIT structure, and it did not properly saved/restored

[Qemu-devel] [PATCH v3 0/7] pit, hpet, pcspk: fixes & preparation for KVM

2012-01-31 Thread Jan Kiszka
This is a preparatory series to allow the introduction of the KVM in-kernel PIT. It also fixes various bugs in the PIT and HPET code, see patches for details. Changes in V3: - rebased over master - tuned pic_init interface to avoid isa_get_irq(NULL, ...) Jan Kiszka (7): i8254: Do not raise IR

[Qemu-devel] [PATCH v3 1/7] i8254: Do not raise IRQ level on reset

2012-01-31 Thread Jan Kiszka
Avoid changing the IRQ level to high on reset as it may trigger spurious events. Instead, open-code the effects of pit_load_count(0) in the reset handler. Signed-off-by: Jan Kiszka --- hw/i8254.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/i8254.c b/hw/i825

Re: [Qemu-devel] [help]how to make qemu-img utility to support writting file or directory to the image file

2012-01-31 Thread TeLeMan
On Sun, Jan 29, 2012 at 17:02, 马磊 wrote: > Hi, >     qemu-img is only to support create/info and so on whithout writting > operation to the image file. >      I have ported the reading operation for a image file form grub2 to > qemu-img. But NTFS document online  is not detailed enough, how to do

[Qemu-devel] [PATCH] linux-user: fail execve() if env/args too big

2012-01-31 Thread Ulrich Hecht
If the host's page size is equal to or smaller than the target's, native execve() will fail appropriately with E2BIG if called with too big an environment for the target to handle. It may falsely succeed, however, if the host's page size is bigger, and feed the executed target process an environmen

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Paolo Bonzini
On 01/31/2012 05:47 PM, Anthony Liguori wrote: static void object_initialize(Object *obj) { PIIX3State *s = PIIX3(obj); ChildProperty props[] = { { "pic[0]", TYPE_I8259, &s->pic[0] }, { "pic[1]", TYPE_I8259, &s->pic[1] }, }; object_property_add_children(obj,

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 17:49, Anthony Liguori wrote: > On 01/31/2012 10:42 AM, Jan Kiszka wrote: >> On 2012-01-31 15:56, Anthony Liguori wrote: >>> On 01/31/2012 08:51 AM, Jan Kiszka wrote: On 2012-01-31 15:47, Anthony Liguori wrote: > On 01/31/2012 08:34 AM, Jan Kiszka wrote: >> On 2012-01-26

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Anthony Liguori
On 01/31/2012 10:42 AM, Jan Kiszka wrote: On 2012-01-31 15:56, Anthony Liguori wrote: On 01/31/2012 08:51 AM, Jan Kiszka wrote: On 2012-01-31 15:47, Anthony Liguori wrote: On 01/31/2012 08:34 AM, Jan Kiszka wrote: On 2012-01-26 20:00, Anthony Liguori wrote: @@ -548,6 +550,13 @@ static int pi

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Anthony Liguori
On 01/31/2012 10:19 AM, Jan Kiszka wrote: On 2012-01-31 17:12, Anthony Liguori wrote: On 01/31/2012 08:58 AM, Paolo Bonzini wrote: On 01/31/2012 03:51 PM, Jan Kiszka wrote: BTW, this is yet another benefit of making structures public. You can take the address of a child and set link fields di

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:56, Anthony Liguori wrote: > On 01/31/2012 08:51 AM, Jan Kiszka wrote: >> On 2012-01-31 15:47, Anthony Liguori wrote: >>> On 01/31/2012 08:34 AM, Jan Kiszka wrote: On 2012-01-26 20:00, Anthony Liguori wrote: > @@ -548,6 +550,13 @@ static int piix3_realize(PCIDevice *dev) >

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Andreas Färber
Am 31.01.2012 14:59, schrieb Anthony Liguori: > On 01/30/2012 05:41 PM, Andreas Färber wrote: >> Am 30.01.2012 19:55, schrieb Juan Quintela: >>> Please send in any agenda items you are interested in covering. >> >> QOM roadmap update: >> * Series 3/4 is on the list. >> -> Please officially designa

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 17:12, Anthony Liguori wrote: > On 01/31/2012 08:58 AM, Paolo Bonzini wrote: >> On 01/31/2012 03:51 PM, Jan Kiszka wrote: > > BTW, this is yet another benefit of making structures public. You can > take the > address of a child and set link fields directly without acc

[Qemu-devel] [PATCH v4 1/6] xen: do not initialize the interval timer and PCSPK emulator

2012-01-31 Thread Stefano Stabellini
PIT and PCSPK are emulated by the hypervisor so we don't need to emulate them in Qemu: this patch prevents Qemu from waking up needlessly at PIT_FREQ on Xen. Signed-off-by: Stefano Stabellini --- hw/pc.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/h

[Qemu-devel] [PATCH v4 3/6] xen: introduce an event channel for buffered io event notifications

2012-01-31 Thread Stefano Stabellini
Use the newly introduced HVM_PARAM_BUFIOREQ_EVTCHN to receive notifications for buffered io events. After the first notification is received leave the event channel masked and setup a timer to process the rest of the batch. Once we have completed processing the batch, unmask the event channel and d

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Anthony Liguori
On 01/31/2012 08:58 AM, Paolo Bonzini wrote: On 01/31/2012 03:51 PM, Jan Kiszka wrote: > > BTW, this is yet another benefit of making structures public. You can take the > address of a child and set link fields directly without accessors. Well, that has two sides. We introduced properties to av

[Qemu-devel] [PATCH v4 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-01-31 Thread Stefano Stabellini
There is no reason why the minimum timeout should be 1sec, it could easily be 1h and we would save lots of cpu cycles. Signed-off-by: Stefano Stabellini --- qemu-timer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index de20852..84b970e 1

[Qemu-devel] [PATCH v4 5/6] qemu_next_alarm_deadline: check the expire time of a clock only if it is enabled

2012-01-31 Thread Stefano Stabellini
Also delta in qemu_next_alarm_deadline is a 64 bit value so set the default to INT64_MAX instead of INT32_MAX. Signed-off-by: Stefano Stabellini --- qemu-timer.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 29410f1..de20852 1

[Qemu-devel] [PATCH v4 2/6] xen: disable rtc_clock

2012-01-31 Thread Stefano Stabellini
rtc_clock is only used by the RTC emulator (mc146818rtc.c), however Xen has its own RTC emulator in the hypervisor so we can disable it. Signed-off-by: Stefano Stabellini --- xen-all.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/xen-all.c b/xen-all.c index fd39168

[Qemu-devel] [PATCH v4 4/6] timers: the rearm function should be able to handle delta = INT64_MAX

2012-01-31 Thread Stefano Stabellini
Fix win32_rearm_timer and mm_rearm_timer: they should be able to handle INT64_MAX as a delta parameter without overflowing. Also, the next deadline in ms should be calculated rounding down rather than up (see unix_rearm_timer and dynticks_rearm_timer). Finally ChangeTimerQueueTimer takes an unsign

[Qemu-devel] [PATCH v4 0/6] prevent QEMU from waking up needlessly

2012-01-31 Thread Stefano Stabellini
Hi all, this small patch series prevents QEMU from waking up needlessly on Xen several times a second in order to check some timers. The first patch stops QEMU from emulating the PIT on Xen, the second patch disables the rtc_clock entirely. The third patch makes use of a new mechanism to receiv

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:58, Paolo Bonzini wrote: > On 01/31/2012 03:51 PM, Jan Kiszka wrote: BTW, this is yet another benefit of making structures public. You can take the address of a child and set link fields directly without accessors. >> Well, that has two sides. We introduced

Re: [Qemu-devel] [PATCH 05/15] piix: create the HPET and RTC through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:26, Jan Kiszka wrote: > Also note that the HPET is not a part of the PIIX, so composition is > wrong here. The RTC is again. Err, forgot my nonsense. The HPET is part of the PIIX. Dunno, I was somehow thinking of the IOAPIC while reading "HPET". Too few sleep, I guess... Jan --

Re: [Qemu-devel] [PATCH v4 0/6] save/restore on Xen

2012-01-31 Thread Stefano Stabellini
On Wed, 25 Jan 2012, Stefano Stabellini wrote: > Hi all, > this is the fourth version of the Xen save/restore patch series. > We have been discussing this issue for quite a while on #qemu and > qemu-devel: > > > http://marc.info/?l=qemu-devel&m=132346828427314&w=2 > http://marc.info/?l=qemu-devel

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Paolo Bonzini
On 01/31/2012 03:12 PM, Anthony Liguori wrote: Don't use VMState. Just open code a save/restore function. VMState is too limited in how it handles complex data structures. I really believe the only long term solution we're going to get to here is something that uses a builder interface (like

  1   2   >