[Qemu-devel] [PATCH 3/3] xilinx_zynq: added QSPI controller

2012-10-28 Thread Peter Crosthwaite
Added the QSPI controller to the Zynq. 4 SPI devices are attached to allow modelling of the different geometries. E.G. Dual parallel and dual stacked mode can both be tested with this one arrangement. Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 40 --

[Qemu-devel] [PATCH 2/3] xilinx_spips: Generalised to model QSPI

2012-10-28 Thread Peter Crosthwaite
Extended the xilinx spips controller to model QSPI as well. Paremeterised the operational difference with the normal spi controller (num_ss_bits, width of the tx/rx fifo heads etc.). Multiple bus functionality is modelled (needed for QSPI dual parallel mode. LQSPI is modelled. Signed-off-by: Peter

[Qemu-devel] [PATCH 1/3] m25p80: Support for Quad SPI

2012-10-28 Thread Peter Crosthwaite
Added the Quad mode read and write commands. Data remains serialized on a single wire, i.e. the quad mode instructions just behave the same as single mode, with the expection of modelling the varying number of dummy/mode bytes between the address bytes and the first data word. Signed-off-by: Peter

[Qemu-devel] [PULL 0/3] Xilinx Zynq QSPI support

2012-10-28 Thread Peter Crosthwaite
The following changes since commit 50cd72148211c5e5f22ea2519d19ce024226e61f: Max Filippov (1): hw/xtensa_sim: get rid of intermediate xtensa_sim_init are available in the git repository at: git://developer.petalogix.com/public/qemu.git qspi.2 Peter Crosthwaite (3): m25p80: Supp

[Qemu-devel] [PATCH v5 2/2] xilinx_zynq: added pl330 to machine model

2012-10-28 Thread Peter Crosthwaite
Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..e985e26 100644 --- a/hw/xilinx_zynq.c +++ b/hw/xilinx_zynq.c @@ -33,6 +33,10 @@ #define IRQ

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-28 Thread John Williams
> -Original Message- > From: Edgar E. Iglesias [mailto:edgar.igles...@gmail.com] > Sent: Saturday, 27 October 2012 2:12 PM > To: Peter Crosthwaite > Cc: qemu-devel@nongnu.org Developers; Avi Kivity; Peter Maydell; John > Williams > Subject: Re: [Qemu-devel] [RFC] Memory API and fine grained

[Qemu-devel] [PATCH v5 1/2] pl330: Initial version

2012-10-28 Thread Peter Crosthwaite
Device model for Primecell PL330 dma controller. Signed-off-by: Kirill Batuzov Tested-by: Igor Mitsyanko Signed-off-by: Peter Crosthwaite --- changed from v4: Various cosmetic fixes Some Makefile refactoring updates refactored properties to match primecell options rather than be the config regi

[Qemu-devel] [PATCH v5 0/2] These patches add support for the Primcell PL330 DMA controller and add it to the Xilinx Zynq machine model. Patch 1 is the device model. Patch 2 is the machine model updat

2012-10-28 Thread Peter Crosthwaite
The Device model was originally contributed by Kirill Batuzov / Samsung, as indicated by the (C) notice in hw/pl330.c. changed since v4: s/petalogix/xilinx in my email address. addressed reviewer comments from Igor mitsyanko and Peter Maydell (1/2) changed since v3: rebased against Makefile refac

[Qemu-devel] [PATCH] migrate: error message for ram_load size

2012-10-28 Thread Doug Goldstein
Report an error when ramblock's sizes mismatch with a suggestion to the user as to what went wrong. --- libvirt uses migration to save the state, however when performing a distro upgrade you might get an error starting your VMs up again without much detail. This patch attempts to remedy that with

[Qemu-devel] [RFC PATCH v2 1/5] define image_file_reset and image_blob_reset

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 39 +++ hw/loader.h | 18 ++ 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index ba01ca6..cadf58f 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -86,6 +86

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-28 Thread Evgeny Voevodin
On 10/27/2012 06:34 PM, Blue Swirl wrote: On Fri, Oct 26, 2012 at 6:32 AM, Evgeny Voevodin wrote: Today I made more precise testing with usage of --enable-profiler. Here is the test procedure: 1. Boot Linux Kernel 5 times. 2. For each iteration wait while "JIT cycles" is stable for ~10 seconds

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-28 Thread Amit Shah
On (Fri) 26 Oct 2012 [13:24:06], Anthony Liguori wrote: > "H. Peter Anvin" writes: > > > On 10/26/2012 08:42 AM, Anthony Liguori wrote: > >>> > >>> Is /dev/random even appropriate to feed rngd? > >>> > >>> rngd needs _a lot_ of entropy to even start working. Its randomness > >>> test works in gr

Re: [Qemu-devel] 1.1.1 -> 1.1.2 migrate /managedsave issue

2012-10-28 Thread Doug Goldstein
On Mon, Oct 22, 2012 at 6:23 AM, Avi Kivity wrote: > On 10/22/2012 09:04 AM, Philipp Hahn wrote: >> Hello Doug, >> >> On Saturday 20 October 2012 00:46:43 Doug Goldstein wrote: >>> I'm using libvirt 0.10.2 and I had qemu-kvm 1.1.1 running all my VMs. >> ... >>> I had upgraded to qemu-kvm 1.1.2 >>

[Qemu-devel] [RFC PATCH v2 0/5] optimization to loader

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin This series of 5 patches optimize the footprint of QEMU by registering reset private handlers to reload images when virtual machine reset. This is the first part of the patches which remove rom related functions in loader.c The second part will optimize memory regions

[Qemu-devel] [RFC PATCH v2 2/5] use reset handlers to reload kernel and initrd

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 64 ++ 1 files changed, 42 insertions(+), 22 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index cadf58f..9e2c3c8 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -151,7 +151,12 @@ int load_i

[Qemu-devel] [RFC PATCH v2 5/5] remove rom related functions in loader

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 166 --- hw/loader.h | 14 - vl.c|5 -- 3 files changed, 0 insertions(+), 185 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 2e7072b..5ef50e0 100644 --- a/hw/loader.c

[Qemu-devel] [RFC PATCH v2 4/5] replaece rom_add_blob* with image_blob_reset

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/arm_boot.c | 20 hw/elf_ops.h |9 - hw/exynos4210.c| 10 -- hw/highbank.c |9 - hw/lm32_hwsetup.h |9 - hw/loader.c| 23 +++ hw/mips_fulong2e.c

[Qemu-devel] [RFC PATCH v2 3/5] replace rom_add_file* with image_file_reset

2012-10-28 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/cirrus_vga.c |6 +- hw/pc.c |6 +- hw/pc_sysfw.c | 14 +++--- hw/pci.c| 10 -- hw/sga.c|6 +- hw/vga-isa.c|6 +- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/hw/c

[Qemu-devel] private handlers to reload images when virtual machine reset.

2012-10-28 Thread Olivia Yin
This is the first part of the patches which remove rom related functions in loader.c The second part will optimize memory regions which use rom_ptr. These patches are against the master branch of git://git.qemu.org/qemu.git. The v2 patches had been updated to replace tar_target_phys_addr_t with

Re: [Qemu-devel] [PATCH 4/5] target-xtensa: avoid using cpu_single_env

2012-10-28 Thread Max Filippov
On Sun, Oct 28, 2012 at 7:03 PM, Blue Swirl wrote: > Pass around CPUState instead of using global cpu_single_env. > > Signed-off-by: Blue Swirl > --- > target-xtensa/translate.c | 10 +- > 1 files changed, 5 insertions(+), 5 deletions(-) Acked-by: Max Filippov -- Thanks. -- Max

Re: [Qemu-devel] [RESEND PATCH v6 2/3] tcg: Add extended GETPC mechanism for MMU helpers with ldst optimization

2012-10-28 Thread Yeongkyoon Lee
On 2012년 10월 27일 23:29, Blue Swirl wrote: On Sat, Oct 20, 2012 at 7:05 AM, Yeongkyoon Lee wrote: Add GETPC_EXT which is used by MMU helpers to selectively calculate the code address of accessing guest memory when called from a qemu_ld/st optimized code or a C function. Currently, it supports on

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-28 Thread liu ping fan
On Fri, Oct 26, 2012 at 6:25 PM, Jan Kiszka wrote: > On 2012-10-26 05:08, liu ping fan wrote: >> On Fri, Oct 26, 2012 at 11:05 AM, liu ping fan wrote: >>> On Thu, Oct 25, 2012 at 5:04 PM, Avi Kivity wrote: On 10/25/2012 11:00 AM, Peter Maydell wrote: > On 23 October 2012 10:37, Avi Kivi

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-28 Thread liu ping fan
On Thu, Oct 25, 2012 at 9:34 PM, Jan Kiszka wrote: > On 2012-10-24 09:29, liu ping fan wrote: >> On Tue, Oct 23, 2012 at 5:04 PM, Jan Kiszka wrote: >>> On 2012-10-22 11:23, Liu Ping Fan wrote: Use local lock to protect e1000. When calling the system function, dropping the fine lock befo

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-28 Thread liu ping fan
On Fri, Oct 26, 2012 at 2:48 AM, Jan Kiszka wrote: > On 2012-10-25 19:02, Avi Kivity wrote: >> On 10/25/2012 06:39 PM, Jan Kiszka wrote: That doesn't work cross-thread. vcpu A: write to device X, dma-ing to device Y vcpu B: write to device Y, dma-ing to device X >>> >>> We

Re: [Qemu-devel] [PATCH 2/5] use reset handlers to reload kernel and initrd

2012-10-28 Thread Yin Olivia-R63875
Hi Wei-Ren, Thanks for the reminder. I'll update the patches and submit again. Best Regards, Olivia > -Original Message- > From: 陳韋任 (Wei-Ren Chen) [mailto:che...@iis.sinica.edu.tw] > Sent: Friday, October 26, 2012 5:32 PM > To: Yin Olivia-R63875 > Cc: qemu-...@nongnu.org; qemu-devel@non

[Qemu-devel] [PATCH] target-sparc: Revert setting cpu_dst to gen_dest_gpr

2012-10-28 Thread Richard Henderson
There is some read-after-write error within the OP=2 insns which prevents setting cpu_dst to the real output register. Until this is found and fixed, always write to a temporary first. Cc: Blue Swirl Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- target-sparc/translate.c | 2 +- 1 fi

Re: [Qemu-devel] [PATCH 1/5] disas: avoid using cpu_single_env

2012-10-28 Thread Richard Henderson
On 2012-10-29 02:03, Blue Swirl wrote: > Pass around CPUState instead of using global cpu_single_env. > > Signed-off-by: Blue Swirl > --- > disas.c | 149 > ++--- > disas.h |3 +- > qemu-log.h

Re: [Qemu-devel] [PATCH 1/4] qemu-char: Add new char backend CirMemCharDriver

2012-10-28 Thread Lei Li
On 10/27/2012 12:47 AM, Luiz Capitulino wrote: On Fri, 26 Oct 2012 19:21:49 +0800 Lei Li wrote: Signed-off-by: Lei Li --- qemu-char.c | 140 +++ qemu-config.c |3 + qemu-options.hx | 10 3 files changed, 153 insertions

Re: [Qemu-devel] [PATCH 4/4] HMP: Introduce console command

2012-10-28 Thread Lei Li
On 10/27/2012 01:43 AM, Luiz Capitulino wrote: On Fri, 26 Oct 2012 19:21:52 +0800 Lei Li wrote: Signed-off-by: Lei Li I still don't understand how this command, in its current form, is different from memchar-write. One more comment below. Hi Luiz, Yes, I have replied to it in patch serie

Re: [Qemu-devel] [PATCH 2/4] QAPI: Introduce memchar-write QMP command

2012-10-28 Thread Lei Li
On 10/27/2012 01:17 AM, Luiz Capitulino wrote: On Fri, 26 Oct 2012 19:21:50 +0800 Lei Li wrote: Signed-off-by: Lei Li --- hmp-commands.hx | 17 + hmp.c| 15 +++ hmp.h|1 + qapi-schema.json | 47 +++

Re: [Qemu-devel] [PATCH 3/4] QAPI: Introduce memchar-read QMP command

2012-10-28 Thread Lei Li
On 10/27/2012 01:39 AM, Luiz Capitulino wrote: On Fri, 26 Oct 2012 19:21:51 +0800 Lei Li wrote: Signed-off-by: Lei Li --- hmp-commands.hx | 19 ++ hmp.c| 19 ++ hmp.h|1 + qapi-schema.json | 27 ++

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] Make default boot order machine specific

2012-10-28 Thread David Gibson
On Thu, Oct 25, 2012 at 09:50:10PM +0100, Peter Maydell wrote: > On 25 October 2012 21:18, Anthony Liguori wrote: > > The other approach to this would be: > > > > static QEMUMachine pseries_machine = { > > .no_boot_order = 1, > > }; > > > > Which I think is what Peter is suggesting. I'm not a

[Qemu-devel] [PATCH v3 2/8] usb/ehci: Use class_data to init PCI variations

2012-10-28 Thread Peter Crosthwaite
Got rid of the duplication of the class init functions for the two PCI EHCI variants. The PCI specifics are passed in as as class_data and set by a common class_init function. Premeptively defined a new Class "EHCICLass" for the upcomming addition of new fields. The class_data is an instance of EH

[Qemu-devel] [PATCH v3 8/8] usb/ehci: Guard definition of EHCI_DEBUG

2012-10-28 Thread Peter Crosthwaite
Guard against re-definition of EHCI_DEBUG. Allows for turning on of debug info from configure (using --qemu-extra-cflags="-DEHCI_DEBUG=1") rather than source code hacking. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH v3 7/8] xilinx_zynq: add USB controllers

2012-10-28 Thread Peter Crosthwaite
Add the two usb controllers in Zynq. Signed-off-by: Peter Crosthwaite --- changed from v1: Simplified to use sysbus_create_simple - dont need prop anymore hw/xilinx_zynq.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55daf

[Qemu-devel] [PATCH v3 4/8] usb/ehci: Abstract away PCI DMA API

2012-10-28 Thread Peter Crosthwaite
Pull the DMAContext for the PCI DMA out at device init time and put it into the device state. Use dma_memory_read/write() instead of pci specific versions. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 6/8] usb/ehci: Add Sysbus variant and Xilinx Zynq USB

2012-10-28 Thread Peter Crosthwaite
Add QOM class definition helpers for sysbus attached EHCI implementations and added Xilinx Zynq USB implementation. Signed-off-by: Peter Crosthwaite --- changed from v2: Squashed Xilinx zynq Defintion into this patch. Otherwise complie fails due to werror and unsued ehci_sysbus_class_init fn. Dup

[Qemu-devel] [PATCH v3 5/8] usb/ehci: seperate out PCIisms

2012-10-28 Thread Peter Crosthwaite
Seperate the PCI stuff from the EHCI components. Extracted the PCIDevice out into a new wrapper struct to make EHCIState non-PCI-specific. Seperated tho non PCI init component out into a seperate "common" init function. Signed-off-by: Peter Crosthwaite --- Changed from v2: s/ehci_properties/ehci_

[Qemu-devel] [PATCH v3 3/8] usb/ehci: parameterise the register region offsets

2012-10-28 Thread Peter Crosthwaite
The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. Signed-off-by: Peter Crosthwaite --- changed from v2: Added strcut EHCIInfo to hold these two properties and added struct to class definition. This struct can be

[Qemu-devel] [PATCH v3 1/8] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-28 Thread Peter Crosthwaite
From: Peter Maydell Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use it in the sysbus-ohci device, which fixes a segfault wh

[Qemu-devel] [PATCH v3 0/8] Sysbus EHCI + Zynq USB.

2012-10-28 Thread Peter Crosthwaite
Added Sysbus variant of EHCI and attached it to Xilinx Zynq. The EHCI stuff is going to useful for Tegra too. See http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04100.html thread for the inital RFC discussion on this development. Regession tested using i386 Debian (dd of=/dev/sdx ...)

Re: [Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms

2012-10-28 Thread Peter Crosthwaite
On Sat, Oct 27, 2012 at 10:32 AM, Peter Crosthwaite wrote: > On Fri, Oct 26, 2012 at 10:24 PM, Gerd Hoffmann wrote: >> Hi, >> >>> +typedef struct EHCItfState { >>> +union { >>> +PCIDevice pcidev; >>> +}; >>> +struct EHCIState ehci; >>> +} EHCIItfState; >> >> I still think we

[Qemu-devel] [patch v5 6/8] memory: make mmio dispatch able to be out of biglock

2012-10-28 Thread Liu Ping Fan
Without biglock, we try to protect the mr by increase refcnt. If we can inc refcnt, go backward and resort to biglock. Another point is memory radix-tree can be flushed by another thread, so we should get the copy of terminal mr to survive from such issue. Signed-off-by: Liu Ping Fan --- docs/m

[Qemu-devel] [patch v5 8/8] vcpu: push mmio dispatcher out of big lock

2012-10-28 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- kvm-all.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index c2c6909..e92e43c 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1573,10 +1573,14 @@ int kvm_cpu_exec(CPUArchState *env) break; case K

[Qemu-devel] [patch v5 7/8] memory: introduce tls context to record nested dma

2012-10-28 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- cpus.c|3 ++ exec.c| 58 + qemu-thread.h |8 +++ vl.c |1 + 4 files changed, 70 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index 191cbf5..e67d80f 100

[Qemu-devel] [patch v5 0/8] push mmio dispatch out of big lock

2012-10-28 Thread Liu Ping Fan
v1: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03312.html v2: http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg01275.html v3: http://lists.nongnu.org/archive/html/qemu-devel/2012-09/msg01474.html v4: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg03857.html changes

[Qemu-devel] [patch v5 5/8] memory: introduce local lock for address space

2012-10-28 Thread Liu Ping Fan
For those address spaces which want to be able out of big lock, they will be protected by their own local. Signed-off-by: Liu Ping Fan --- memory.c | 11 ++- memory.h |5 - 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index 2f68d67..ff34ae

[Qemu-devel] [patch v5 2/8] qom: apply atomic on object's refcount

2012-10-28 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- include/qemu/object.h |3 ++- qom/object.c | 11 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index cc75fee..0c02614 100644 --- a/include/qemu/object.h +++ b/include/qemu/obj

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] Make default boot order machine specific

2012-10-28 Thread David Gibson
On Thu, Oct 25, 2012 at 06:01:16PM +0100, Peter Maydell wrote: > On 25 October 2012 15:38, Avik Sil wrote: > > @@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = { > > .init = clipper_init, > > .max_cpus = 4, > > .is_default = 1, > > +.default_machine_opts = DEFAULT_BOOT_O

[Qemu-devel] [patch v5 1/8] atomic: introduce atomic operations

2012-10-28 Thread Liu Ping Fan
If out of global lock, we will be challenged by SMP in low level, so need atomic ops. This file is a wrapper of GCC atomic builtin. Signed-off-by: Liu Ping Fan --- include/qemu/atomic.h | 63 + 1 files changed, 63 insertions(+), 0 deletions(-)

[Qemu-devel] [patch v5 4/8] pci: remove pci device from mem view when unplug

2012-10-28 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- hw/acpi_piix4.c |2 +- hw/pci.c| 13 - hw/pci.h|1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 15275cf..b45a016 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@

[Qemu-devel] [patch v5 3/8] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-10-28 Thread Liu Ping Fan
When device unplug has been ack by guest, we first remove it from memory to prevent incoming access from dispatcher. Then we isolate it from device composition tree Signed-off-by: Liu Ping Fan --- hw/qdev.c | 26 ++ hw/qdev.h |3 ++- 2 files changed, 28 insertions(+

[Qemu-devel] acpi_piix4 migration issue

2012-10-28 Thread Marcelo Tosatti
qemu-kvm 1.2 -> qemu-1.3 migration fails with Unknown savevm section type 48 load of migration failed Due to a fix in acpi_piix4 in qemu-kvm (attached at the end of the message). The problem is that qemu-kvm correctly uses 2 bytes for sts and 2 bytes for en fields (which is their allocated si

Re: [Qemu-devel] [PATCH v3] hw/qdev-properties.c: Improve diagnostic for setting property after realize

2012-10-28 Thread Igor Mitsyanko
On 10/19/2012 9:57 PM, Peter Maydell wrote: Now we have error_setg() we can improve the error message emitted if you attempt to set a property of a device after the device is realized (the previous message was "permission denied" which was not very informative). Signed-off-by: Peter Maydell ---

Re: [Qemu-devel] q35: usb keyboard trouble

2012-10-28 Thread Gabriel L. Somlo
On Fri, Oct 26, 2012 at 04:24:44PM -0400, Jason Baron wrote: > Thanks for the bug report! What OS are you running? I'm not seeing any > issue with -usbdevice keyboard on Fedora. I was using this: bin/qemu-system-x86_64 \ -M pc_q35 -L q35-seabios/out \ -usbdevice keyboard \ -hdd ./Fedora-

[Qemu-devel] [PATCH 2/5] kvm: avoid using cpu_single_env

2012-10-28 Thread Blue Swirl
Pass around CPUState instead of using global cpu_single_env. Signed-off-by: Blue Swirl --- target-i386/kvm.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3aa62b2..3329d5e 100644 --- a/target-i386/kvm.c

[Qemu-devel] [PATCH 3/5] target-unicore32: avoid using cpu_single_env

2012-10-28 Thread Blue Swirl
Pass around CPUState instead of using global cpu_single_env. Signed-off-by: Blue Swirl --- target-unicore32/softmmu.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-unicore32/softmmu.c b/target-unicore32/softmmu.c index 9c2c54c..fc27100 100644 --- a/target

[Qemu-devel] [PATCH 4/5] target-xtensa: avoid using cpu_single_env

2012-10-28 Thread Blue Swirl
Pass around CPUState instead of using global cpu_single_env. Signed-off-by: Blue Swirl --- target-xtensa/translate.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 82e8ccc..3c03775 100644 --- a/target-

[Qemu-devel] [PATCH 1/5] disas: avoid using cpu_single_env

2012-10-28 Thread Blue Swirl
Pass around CPUState instead of using global cpu_single_env. Signed-off-by: Blue Swirl --- disas.c | 149 ++--- disas.h |3 +- qemu-log.h|6 +- target-alpha/translate.c |2 +- ta

[Qemu-devel] [PATCH V5 3/3] hw/sd.c: add SD card save/load support

2012-10-28 Thread Igor Mitsyanko
This patch updates SD card model to support save/load of card's state. Signed-off-by: Igor Mitsyanko --- hw/sd.c | 89 +++-- 1 file changed, 64 insertions(+), 25 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index b2f211c..3c34d43 100644

Re: [Qemu-devel] [PATCH 06/12] migration: use migrate_fd_close in migrate_fd_cleanup

2012-10-28 Thread Paolo Bonzini
Il 28/10/2012 10:47, Orit Wasserman ha scritto: >> > if (s->file) { >> > DPRINTF("closing file\n"); >> > ret = qemu_fclose(s->file); >> > -s->file = NULL; > why remove this line? Good catch. Paolo

[Qemu-devel] [PATCH 0/5] cpu_single_env cleanup

2012-10-28 Thread Blue Swirl
In some cases it's pretty easy to avoid using global cpu_single_env since a local version is available. Blue Swirl (5): disas: avoid using cpu_single_env kvm: avoid using cpu_single_env target-unicore32: avoid using cpu_single_env target-xtensa: avoid using cpu_single_env target-i386: av

Re: [Qemu-devel] [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat

2012-10-28 Thread Igor Mitsyanko
On 10/28/2012 1:19 AM, Peter Maydell wrote: gcc will silently accept unrecognized -Wno-wombat warning suppression options (it only mentions them if it has to print a compiler warning for some other reason). Since we already run a check for whether gcc recognizes the warning options we use, we can

[Qemu-devel] [PATCH V5 2/3] vmstate: Add support for saving/loading bitmaps

2012-10-28 Thread Igor Mitsyanko
From: Peter Maydell Add support for saving/loading bitmap.h bitmaps in vmstate. Signed-off-by: Peter Maydell Tested-by: Igor Mitsyanko Reviewed-by: Juan Quintela --- savevm.c | 41 + vmstate.h | 13 + 2 files changed, 54 insertions(+) dif

[Qemu-devel] [PATCH V5 1/3] hw/sd.c: Fix erase for high capacity cards

2012-10-28 Thread Igor Mitsyanko
Standard capacity cards SDSC use byte unit address while SDHC and SDXC cards use block unit address (512 bytes) when setting ERASE_START and ERASE_END with CMD32 and CMD33, we have to account for this. Signed-off-by: Igor Mitsyanko --- hw/sd.c | 17 + hw/sd.h | 1 + 2 files chan

[Qemu-devel] [PATCH V5 0/3] SD card model save/load support

2012-10-28 Thread Igor Mitsyanko
This was a part of a bigger series which also included SD state qomification, but I decided to split them. PATCH1 Not actually related to vmstate, fixes a bug for high and extra capacity cards in erase function. Changelog: v4->v5 - changed commit message to clearly state that it's a bugfix; - us

[Qemu-devel] [PATCH 3/3] slirp: remove unused function u_sleep

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- slirp/misc.c | 14 -- slirp/misc.h |1 - 2 files changed, 0 insertions(+), 15 deletions(-) diff --git a/slirp/misc.c b/slirp/misc.c index 0bee864..664532a 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -253,20 +253,6 @@ void lprint(const char *for

[Qemu-devel] [PATCH 2/3] sun4c: remove unused functions

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- hw/sun4c_intctl.c | 23 --- hw/sun4m.h|4 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/hw/sun4c_intctl.c b/hw/sun4c_intctl.c index 8cd70ab..702e9f5 100644 --- a/hw/sun4c_intctl.c +++ b/hw/sun4c_intctl.c @@ -94

[Qemu-devel] [PATCH 1/3] m48t59: remove unused m48t59_set_addr

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- hw/m48t59.c |7 --- hw/nvram.h |1 - 2 files changed, 0 insertions(+), 8 deletions(-) diff --git a/hw/m48t59.c b/hw/m48t59.c index 9eb1a09..058d6e7 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -466,13 +466,6 @@ uint32_t m48t59_read (void *opaque, uint3

[Qemu-devel] [PATCH 0/3] remove unused functions

2012-10-28 Thread Blue Swirl
Remove some unused functions. Blue Swirl (3): m48t59: remove unused m48t59_set_addr sun4c: remove unused functions slirp: remove unused function u_sleep hw/m48t59.c |7 --- hw/nvram.h|1 - hw/sun4c_intctl.c | 23 --- hw/sun4m.h|4

[Qemu-devel] [PATCH v2 5/6] target-ppc: make some functions static

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- target-ppc/cpu.h|6 -- target-ppc/mmu_helper.c | 11 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index b34a1ff..a5e7c55 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1141

[Qemu-devel] [PATCH v2 1/6] target-sparc: make do_unaligned_access static

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- target-sparc/cpu.h |3 --- target-sparc/ldst_helper.c |8 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index a55fe08..7c689ee 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @

[Qemu-devel] [PATCH v2 2/6] vl.c: add missing static

2012-10-28 Thread Blue Swirl
Add missing 'static' qualifiers. Signed-off-by: Blue Swirl --- sysemu.h |5 - vl.c | 21 - 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sysemu.h b/sysemu.h index 0c39a3a..1683448 100644 --- a/sysemu.h +++ b/sysemu.h @@ -19,7 +19,6 @@ extern u

[Qemu-devel] [PATCH v2 6/6] exec: make some functions static

2012-10-28 Thread Blue Swirl
Signed-off-by: Blue Swirl --- cpu-common.h |5 - exec-all.h|2 -- exec.c| 15 +-- memory-internal.h |2 -- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 5f93089..d2fbafa 100644 --- a/cpu-com

[Qemu-devel] [PATCH v2 4/6] ppc: add missing static

2012-10-28 Thread Blue Swirl
Add missing 'static' qualifiers. Signed-off-by: Blue Swirl --- hw/adb.c |8 hw/adb.h |4 hw/nvram.h | 10 +- hw/ppc.c | 16 target-ppc/cpu.h |1 - 5 files changed, 13 insertions(+), 26 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 3/6] vnc: add missing static

2012-10-28 Thread Blue Swirl
Add missing 'static' qualifiers. Signed-off-by: Blue Swirl --- console.h |2 -- ui/vnc-jobs.c | 10 +- ui/vnc-jobs.h |1 - ui/vnc.c | 14 +++--- ui/vnc.h |5 - 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/console.h b/console.h

[Qemu-devel] [PATCH v2 0/6] static patches

2012-10-28 Thread Blue Swirl
v2: extract function removal patches, skip ARM Blue Swirl (6): target-sparc: make do_unaligned_access static vl.c: add missing static vnc: add missing static ppc: add missing static target-ppc: make some functions static exec: make some functions static console.h |

Re: [Qemu-devel] [PATCH 12/12] migration: move process_incoming_migration to a coroutine

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > The final part of incoming migration, which now consists of > process_incoming_migration for all protocols, is thus made non-blocking. > > Signed-off-by: Paolo Bonzini > --- > migration.c | 21 - > 1 file modificato, 20 inserzion

Re: [Qemu-devel] [PATCH 11/12] migration: handle EAGAIN while reading QEMUFile

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > This will never happen right now (the assertion would fail). The > next patch will set the socket or pipe in non-blocking mode, thus > enabling this part of the code. > > Coroutines can just stop whenever they want with qemu_coroutine_yield. > As soo

Re: [Qemu-devel] [PATCH 10/12] migration: move qemu_fclose to process_incoming_migration

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > The common suffix is now just process_incoming_migration. > > Signed-off-by: Paolo Bonzini > --- > migration-exec.c | 1 - > migration-fd.c | 1 - > migration-tcp.c | 1 - > migration-unix.c | 1 - > migration.c | 6 +- > 5 file modifica

Re: [Qemu-devel] [PATCH 09/12] migration: close socket QEMUFile from socket_close

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > The common suffix now is process_incoming_migration+qemu_fclose. > > Signed-off-by: Paolo Bonzini > --- > migration-tcp.c | 2 ++ > migration-unix.c | 2 ++ > savevm.c | 1 + > 3 file modificati, 5 inserzioni(+) > > diff --git a/migration-

Re: [Qemu-devel] [PATCH 08/12] migration: xxx_close will only be called once

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > No need to test s->fd again, it is tested in the caller. > > Signed-off-by: Paolo Bonzini > --- > migration-exec.c | 14 ++ > migration-fd.c | 33 +++-- > migration-tcp.c | 7 ++- > migration-unix.c |

Re: [Qemu-devel] [PATCH 07/12] migration: use closesocket, not close

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > Windows requires this. Migration does not quite work under Windows > but let's be uniform across QEMU. > > Signed-off-by: Paolo Bonzini > --- > migration-tcp.c | 6 +++--- > 1 file modificato, 3 inserzioni(+), 3 rimozioni(-) > > diff --git a/migra

Re: [Qemu-devel] [PATCH 06/12] migration: use migrate_fd_close in migrate_fd_cleanup

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > migrate_fd_cleanup will usually close the file descriptor via > buffered_file_close's call to migrate_fd_close. However, in the case > of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a > direct close() instead of using s->close(

Re: [Qemu-devel] [PATCH 05/12] migration: clean up server sockets and handlers before invoking process_incoming_migration

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > A first step towards making a common "suffix" for all migration protocols, > and moving it to process_incoming_migration. > > Signed-off-by: Paolo Bonzini > --- > migration-exec.c | 2 +- > migration-fd.c | 2 +- > migration-tcp.c | 7 +++ >

Re: [Qemu-devel] [PATCH 04/12] migration: replace qemu_stdio_fd with qemu_get_fd

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > migration-exec.c | 4 ++-- > migration-fd.c | 2 +- > qemu-file.h | 1 - > savevm.c | 11 --- > 4 file modificati, 3 inserzioni(+), 15 rimozioni(-) > > diff --git a/migration-exec.c b/mi

Re: [Qemu-devel] [PATCH 03/12] migration: add qemu_get_fd

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > buffered_file.c | 8 > qemu-file.h | 6 ++ > savevm.c| 27 +++ > 3 file modificati, 41 inserzioni(+) > > diff --git a/buffered_file.c b/buffered_file.c > index a

Re: [Qemu-devel] [PATCH 02/12] migration: consolidate QEMUFile methods in a single QEMUFileOps struct

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > buffered_file.c | 13 --- > qemu-file.h | 16 + > savevm.c| 108 > +++- > 3 file modificati, 79 inserzioni(+), 58 rimozioni(-) > > di

Re: [Qemu-devel] [PATCH 01/12] migration: unify stdio-based QEMUFile operations

2012-10-28 Thread Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > Now that qemu_fseek does not exist anymore, there is no reason to do > an fseek before fread/fwrite when operating on an stdio file. > Thus, unify the get/put_buffer callbacks used by qemu_fopen > with those used for pipes. > > Signed-off-by: Paolo Bo

Re: [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking

2012-10-28 Thread Orit Wasserman
On 10/26/2012 01:39 PM, Juan Quintela wrote: > Orit Wasserman wrote: >> On 10/18/2012 09:30 AM, Juan Quintela wrote: >>> Instead of testing each page individually, we search what is the next >>> dirty page with a bitmap operation. We have to reorganize the code to >>> move from a "for" loop, to a