[Qemu-devel] [PATCH v2 5/6] qapi: String visitor, use %f represenation for floats

2012-02-23 Thread Michael Roth
Currently string-output-visitor formats floats as %g, which is nice in that trailing 0's are automatically truncated, but otherwise this causes some issues: - it 6 uses significant figures instead of 6 decimal places, which means something like 155777.5 (which even has an exact floating point

[Qemu-devel] [BUG] Multiple graphical consoles are broken (black screen)

2012-02-23 Thread Hervé Poussineau
Hi, MIPS Magnum machine emulation is quite specific because it instanciates two graphical consoles. This has worked for a while, up to following commit which breaks it badly (qemu crashes): commit 3023f3329d87a6203d03a0e9ccb948772940da96 Author: aliguori

[Qemu-devel] [RFC] sdl: initialize all graphic consoles

2012-02-23 Thread Hervé Poussineau
MIPS Jazz emulation registers two graphical consoles, but second one stays black. This patch repairs it. Other display methods (cocoa, vnc...) also probably require the same kind of fix. --- console.c |3 +++ vl.c | 30 +- 2 files changed, 24

[Qemu-devel] [Bug 939027] Re: Combining direct_io and non-direct_io leads to hang

2012-02-23 Thread Avleen Vig
Nothing else at all accesses those files, which is one of the things that concerned me the most :-/ It looks like it call came from the same place. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PULL 0/8] qemu-ga: add support for Windows

2012-02-23 Thread Michael Roth
The following changes since commit 235fe3bfd46b1104575b540d0bc3fdf584030b99: qom: add test tools (2012-02-22 12:18:26 -0600) are available in the git repository at: git://github.com/mdroth/qemu.git qga-win32-pull-2-23-12 Michael Roth (8): qemu-ga: Add schema documentation for types

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

2012-02-23 Thread Michael Roth
Document guest agent schema types in similar fashion to qmp schema types. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qapi-schema-guest.json | 118 +++- 1 files changed, 97 insertions(+), 21 deletions(-) diff --git

[Qemu-devel] [PATCH 5/8] qemu-ga: fixes for win32 build of qemu-ga

2012-02-23 Thread Michael Roth
Various stubs and #ifdefs to compile for Windows using mingw cross-build. Still has 1 linker error due to a dependency on the forthcoming win32 versions of the GAChannel/transport class. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile |2 +- Makefile.objs

[Qemu-devel] [PATCH 4/8] qemu-ga: rename guest-agent-commands.c - commands-posix.c

2012-02-23 Thread Michael Roth
Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- Makefile.objs |2 +- qga/commands-posix.c | 528 qga/guest-agent-commands.c | 528 3 files changed, 529 insertions(+), 529

[Qemu-devel] [PATCH 3/8] qemu-ga: separate out common commands from posix-specific ones

2012-02-23 Thread Michael Roth
Many of the current RPC implementations are very much POSIX-specific and require complete re-writes for Windows. There are however a small set of core guest agent commands that are common to both, and other commands such as guest-file-* which *may* be portable. So we introduce commands.c for the

[Qemu-devel] [PATCH 7/8] qemu-ga: add Windows service integration

2012-02-23 Thread Michael Roth
This allows qemu-ga to function as a Windows service: - to install the service (will auto-start on boot): qemu-ga --service install - to start the service: net start qemu-ga - to stop the service: net stop qemu-ga - to uninstall service: qemu-ga --service uninstall

[Qemu-devel] [PATCH 2/8] qemu-ga: move channel/transport functionality into wrapper class

2012-02-23 Thread Michael Roth
This is mostly in preparation for the win32 port, which won't use GIO channels for reasons that will be made clearer later. Here the GAChannel class is just a loose wrapper around GIOChannel calls/callbacks, but we also roll in the logic/configuration for various channel types and managing unix

[Qemu-devel] [PATCH 8/8] qemu-ga: add win32 guest-shutdown command

2012-02-23 Thread Michael Roth
Implement guest-shutdown RPC for Windows. Functionally this should be equivalent to the posix implementation. Original patch by Gal Hammer gham...@redhat.com Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qga/commands-win32.c | 41 - 1 files

[Qemu-devel] [PATCH 6/8] qemu-ga: add initial win32 support

2012-02-23 Thread Michael Roth
This adds a win32 channel implementation that makes qemu-ga functional on Windows using virtio-serial (unix-listen/isa-serial not currently implemented). Unlike with the posix implementation, we do not use GIOChannel for the following reasons: - glib calls stat() on an fd to check whether

Re: [Qemu-devel] [RFC] sdl: initialize all graphic consoles

2012-02-23 Thread Anthony Liguori
On 02/23/2012 03:39 PM, Hervé Poussineau wrote: MIPS Jazz emulation registers two graphical consoles, but second one stays black. This patch repairs it. Other display methods (cocoa, vnc...) also probably require the same kind of fix. I don't think this is really the right way to solve this

[Qemu-devel] RFC: Change the default display adapter

2012-02-23 Thread Marko Myllynen
Hi, glxgears shows that vga provides much better FPS rate than cirrus (these numbers are from RHEL 6.2 host/guest on a Lenovo laptop): cirrus : 78 FPS vga: 260 FPS This makes one wonder should the default display adapter in qemu be changed from cirrus to vga? Thanks, -- Marko

[Qemu-devel] QEMU PEX HW device

2012-02-23 Thread Shlomo Pongratz
Hi, I want to add a new PEX HW device emulation to QEMU, but I can't find a skeleton/template driver or documentation that explains how to do it. Are there any guidelines for this task? Best regards, S.P.

Re: [Qemu-devel] Qemu for simulating SoCs?

2012-02-23 Thread Peter Maydell
On 23 February 2012 14:36, Magnus Therning mag...@therning.org wrote: Qemu seems to mostly ship with emulation of individual CPUs (e.g. ARM processors) and with emulation of boards (e.g. versatile), is it also used for emulation of SoC? Yes. Our infrastructure for doing it in a neatly

[Qemu-devel] Qemu for simulating SoCs?

2012-02-23 Thread Magnus Therning
Hello, Qemu seems to mostly ship with emulation of individual CPUs (e.g. ARM processors) and with emulation of boards (e.g. versatile), is it also used for emulation of SoC? I've looked around a bit, and found some indications of it, e.g. a branch that allows connection between SystemC and qemu.

Re: [Qemu-devel] arm-linux-user, i386-linux-user: Make QEMU act as TCG compiler

2012-02-23 Thread Peter Maydell
2012/2/23 Rajat Goyal rajat.go...@cl.cam.ac.uk: Would QEMU developers be interested in integrating this TCG compilation functionality that I have been working on into later releases of QEMU? The patch I have right now breaks the original emulation but if there is some interest in supporting

Re: [Qemu-devel] [offtopic] Sparc Softmmu

2012-02-23 Thread P. Wilhelm
We use the old Solaris/Sparc in a medical device we produce where I work. Since we can't get new Sparc hardware any longer (many countries no longer accept refurbished devices - so we can't sell this product to them when we use refurbish IT parts) that is reasonable cost for our application,

[Qemu-devel] [0/6] Assorted bugfixes

2012-02-23 Thread David Gibson
Hi Anthony, This series contains my current accumulated batch of qemu bugfixes which are not ppc specific. There are small, but real, fixes from across the codebase. Maintainers for the individual subsystems should be CCed. Please apply.

[Qemu-devel] [PATCH 2/6] slirp: Fix assertion failure on rejected DHCP requests

2012-02-23 Thread David Gibson
The guest network stack might DHCPREQUEST an address that the slirp built in dhcp server can't let it have - for example if the guest has an old leases file from another network configuration. In this case the dhcp server should and does reject the request and prepares to send a DHCPNAK to the

[Qemu-devel] [PATCH 6/6] kvm: Fix dirty tracking with large kernel page size

2012-02-23 Thread David Gibson
From: Benjamin Herrenschmidt b...@kernel.crashing.org If the kernel page size is larger than TARGET_PAGE_SIZE, which happens for example on ppc64 with kernels compiled for 64K pages, the dirty tracking doesn't work. Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tossatti mtossa...@redhat.com

[Qemu-devel] [0/3] Various code cleanups

2012-02-23 Thread David Gibson
These 3 patches make several cleanups to the qemu code; they affect files across the tree, particularly 2/3. Please apply.

[Qemu-devel] [PATCH 3/3] .gitignore update

2012-02-23 Thread David Gibson
This adds a few previously missing generated files to .gitignore: the qemu-bridge-helper binary, and the linuxboot and multiboot images from pc-bios/optionrom. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- .gitignore |1 + pc-bios/optionrom/.gitignore |3

[Qemu-devel] [PATCH 1/6] kvm: Comparison with ioctl number macros needs to be unsigned

2012-02-23 Thread David Gibson
In kvm-all.c we store an ioctl cmd number in the irqchip_inject_ioctl field of KVMState, which has type 'int'. This seems to make sense since the ioctl() man page says that the cmd parameter has type int. However, the kernel treats ioctl numbers as unsigned - sys_ioctl() takes an unsigned int,

[Qemu-devel] [PATCH 5/6] Endian fix an assertion in usb-msd

2012-02-23 Thread David Gibson
From: Benjamin Herrenschmidt b...@kernel.crashing.org This fixes a broken endian assumption in an assertion in usb-msd. Cc: Gerd Hoffman kra...@redhat.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- hw/usb-msd.c |

Re: [Qemu-devel] [PATCH 2/3] Allow larger return values from get_image_size()

2012-02-23 Thread Michael S. Tsirkin
On Fri, Feb 24, 2012 at 11:36:45AM +1100, David Gibson wrote: Currently get_image_size(), used to find the size of files, returns an int. But for modern systems, int may be only 32-bit and we can have files larger than that. This patch, therefore, changes the return type of get_image_size()

[Qemu-devel] [PATCH 1/3] pci: Factor out bounds checking on config space accesses

2012-02-23 Thread David Gibson
There are several paths into the code to emulate PCI config space accesses: one for MMIO to a plain old PCI bridge one for MMIO to a PCIe bridge and one for the pseries machine which provides para-virtualized access to PCI config space. Each of these functions does their own bounds checking

Re: [Qemu-devel] [PATCH v2 0/4] RTC: New logic to emulate RTC

2012-02-23 Thread Zhang, Yang Z
-Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Wednesday, February 22, 2012 7:19 PM 0) My alarm tests failed quite badly. :( I attach a patch for kvm-unit-tests (repository at git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git). The tests can be

Re: [Qemu-devel] [PATCH 6/6] kvm: Fix dirty tracking with large kernel page size

2012-02-23 Thread Benjamin Herrenschmidt
diff --git a/kvm-all.c b/kvm-all.c index 5e188bf..3f8cfd9 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -348,10 +348,11 @@ static int kvm_set_migration_log(int enable) static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section, unsigned long

[Qemu-devel] [PATCH 3/6] USB OHCI bug fixes

2012-02-23 Thread David Gibson
From: Wei Yang weiy...@linux.vnet.ibm.com This patch fixes two bugs in the OHCI device where the device writes back data to system memory that should be exclusively under the control of the guest side driver. In OHCI specification Section 5.2.7, it mentioned In all cases, Host Controller Driver

[Qemu-devel] [PATCH 4/6] Endian fixes for virtfs

2012-02-23 Thread David Gibson
From: Benjamin Herrenschmidt b...@kernel.crashing.org This patch fixes several endian bugs in virtfs. Cc: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: David Gibson da...@gibson.dropbear.id.au ---

[Qemu-devel] [PATCH 2/3] Allow larger return values from get_image_size()

2012-02-23 Thread David Gibson
Currently get_image_size(), used to find the size of files, returns an int. But for modern systems, int may be only 32-bit and we can have files larger than that. This patch, therefore, changes the return type of get_image_size() to off_t (the same as the return type from lseek() itself). It

[Qemu-devel] [Bug 939995] [NEW] v1.0-1172-g235fe3b crashes (opts=0x0)

2012-02-23 Thread Roy Tam
Public bug reported: C:\msys\home\User\qemu\i386-softmmugdb --args qemu-system-i386.exe -L ..\pc-bios GNU gdb (GDB) 7.3 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and

[Qemu-devel] [Bug 939995] Re: v1.0-1172-g235fe3b crashes (opts=0x0)

2012-02-23 Thread Roy Tam
qemu_opt_find() doesn't check if opts is NULL or not before use. The patch fixes that issue. ** Patch added: optfind_fixsegfault.patch https://bugs.launchpad.net/qemu/+bug/939995/+attachment/2777432/+files/optfind_fixsegfault.patch -- You received this bug notification because you are a

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

2012-02-23 Thread Roy Tam
let me make comment on current git (v1.0-1172-g235fe3b), my XP SP3 -net dump is attached. You can see slirp almost not returning anything to guest (10.0.2.15), while the outgoing packets seem to be delivered correctly. ** Attachment added: net dump from v1.0-1172-g235fe3b with XP SP3 guest

[Qemu-devel] [0/8] RFC: A second batch of preliminaries towards guest visible IOMMUS

2012-02-23 Thread David Gibson
Before qemu 1.0 there was some discussion, and several patch series proposed for adding support for guest visible IOMMU emulation to qemu. No agreement was reached on how to do this, but a patch series did go in preparation - a conversion of most existing PCI devices to use helper functions for

[Qemu-devel] [PATCH 5/8] usb-ohci: Use universal DMA helper functions

2012-02-23 Thread David Gibson
The OHCI device emulation can provide both PCI and SysBus OHCI implementations. Because of this, it was not previously converted to use the PCI DMA helper functions. This patch converts it to use the new universal DMA helper functions. In the PCI case, it obtains its DMAContext from

[Qemu-devel] [PATCH 3/8] usb-xhci: Use PCI DMA helper functions

2012-02-23 Thread David Gibson
Shortly before 1.0, we added helper functions / wrappers for doing PCI DMA from individual devices. This makes what's going on clearer and means that when we add IOMMU support somewhere in the future, only the general PCI code will have to change, not every device that uses PCI DMA. However,

[Qemu-devel] [PATCH 2/8] Better support for dma_addr_t variables

2012-02-23 Thread David Gibson
A while back, we introduced the dma_addr_t type, which is supposed to be used for bus visible memory addresses. At present, this is an alias for target_phys_addr_t, but this will change when we eventually add support for guest visible IOMMUs. There are some instances of target_phys_addr_t in the

[Qemu-devel] [PATCH 7/8] ide/ahci: Use universal DMA helper functions

2012-02-23 Thread David Gibson
The AHCI device can provide both PCI and SysBus AHCI device emulations. For this reason, it wasn't previously converted to use the pci_dma_*() helper functions. Now that we have universal DMA helper functions, this converts AHCI to use them. The DMAContext is obtained from pci_dma_context() in

[Qemu-devel] [PATCH 4/8] Add universal DMA helper functions

2012-02-23 Thread David Gibson
Not that long ago, every device implementation using DMA directly accessed guest memory using cpu_physical_memory_*(). This meant that adding support for a guest visible IOMMU would require changing every one of these devices to go through IOMMU translation. Shortly before qemu 1.0, I made a

[Qemu-devel] [PATCH 8/8] Make dma_addr_t 64 bit always

2012-02-23 Thread David Gibson
--- dma.h |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dma.h b/dma.h index b8cfd1d..ee540f4 100644 --- a/dma.h +++ b/dma.h @@ -18,10 +18,13 @@ typedef struct ScatterGatherEntry ScatterGatherEntry; #if defined(TARGET_PHYS_ADDR_BITS) -typedef

[Qemu-devel] [PATCH 1/8] Use DMADirection type for dma_bdrv_io

2012-02-23 Thread David Gibson
Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to determine the direction of DMA it is emulating. We already have a DMADirection enum designed specifically to encode DMA directions. This patch uses it for dma_bdrv_io() as well. Cc: Kevin Wolf kw...@redhat.com Signed-off-by: David

[Qemu-devel] [PATCH 6/8] Make sglists and dma_bdrv helpers use new universal DMA herlpers

2012-02-23 Thread David Gibson
dma-helpers.c contains a number of helper functions for doing scatter/gather DMA, and various block device related DMA. Currently, these directly access guest memory using cpu_physical_memory_*(), assuming no IOMMU translation. This patch updates this code to use the new universal DMA helper

Re: [Qemu-devel] [PATCH 8/8] Make dma_addr_t 64 bit always

2012-02-23 Thread David Gibson
On Fri, Feb 24, 2012 at 02:27:43PM +1100, David Gibson wrote: Oops, ignore this one folks. As is probably obvious, this was a testing patch not meant to go into the main series. --- dma.h |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dma.h b/dma.h index

[Qemu-devel] Core dumps - commit a0abe474d587499a1553372c1692811f81fd3eda

2012-02-23 Thread Gerhard Wiesinger
Hi, I'm getting coredumps: #0 qemu_opt_find (opts=0x0, name=0x7f18e8c833db kernel) at qemu-option.c:535 535 QTAILQ_FOREACH_REVERSE(opt, opts-head, QemuOptHead, next) { I bisected it down to the following commit: a0abe474d587499a1553372c1692811f81fd3eda is the first bad commit commit

Re: [Qemu-devel] Core dumps - commit a0abe474d587499a1553372c1692811f81fd3eda

2012-02-23 Thread Roy Tam
Hi, 2012/2/24 Gerhard Wiesinger li...@wiesinger.com: Hi, I'm getting coredumps: #0  qemu_opt_find (opts=0x0, name=0x7f18e8c833db kernel) at qemu-option.c:535 535         QTAILQ_FOREACH_REVERSE(opt, opts-head, QemuOptHead, next) { I bisected it down to the following commit:

[Qemu-devel] Backing file Explanation ?

2012-02-23 Thread PANKAJ RAWAT
Hi all can anoyone explain about backing file? How it is written and in which fashion ? and what role it plays when the clusters are allocated ?

Re: [Qemu-devel] [Bug 939027] Re: Combining direct_io and non-direct_io leads to hang

2012-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 9:39 PM, Avleen Vig 939...@bugs.launchpad.net wrote: Nothing else at all accesses those files, which is one of the things that concerned me the most :-/ It looks like it call came from the same place. It's possible to check the file descriptor flags using

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com p...@dlh.net wrote: Stefan Hajnoczi stefa...@gmail.com schrieb: On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven p...@dlh.net wrote: However, in a virtual machine I have not observed the above slow down to that extend while the benefit

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com p...@dlh.net wrote: Stefan Hajnoczi stefa...@gmail.com schrieb: On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven p...@dlh.net wrote: However, in a virtual machine

Re: [Qemu-devel] [PATCH v2 0/4] RTC: New logic to emulate RTC

2012-02-23 Thread Paolo Bonzini
On 02/24/2012 01:55 AM, Zhang, Yang Z wrote: Hi paolo The DM and 24/12 test case assumes the changing of DM bit will reflect to RTC internal clock. But the datasheet said nothing will affect if you change it. Also, the current logic in qemu has the same assumption. Does this a bug or just by

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Gleb Natapov
On Thu, Feb 23, 2012 at 04:42:54PM +, Stefan Hajnoczi wrote: On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven p...@dlh.net wrote: However, in a virtual machine I have not observed the above slow down to that extend while the benefit of zero after free in a virtualisation environment is

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com p...@dlh.net wrote: Stefan Hajnoczi stefa...@gmail.com schrieb: On Thu, Feb 23, 2012 at

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Peter Lieven
Am 24.02.2012 um 08:23 schrieb Stefan Hajnoczi: On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com p...@dlh.net wrote: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v4 14/18] virtio-scsi: process control queue requests

2012-02-23 Thread Hu Tao
On Wed, Feb 22, 2012 at 03:33:52PM +0100, Paolo Bonzini wrote: Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio-scsi.c | 134 ++--- 1 files changed, 126 insertions(+), 8

<    1   2