[Qemu-devel] [Bug 1105670] [NEW] Converting vpc image to raw results in an image that is smaller than it should be.

2013-01-25 Thread Peter Rehley
Public bug reported: When using qemu-img to convert a 3GB dynamic vhd image to raw, the resultant image was smaller than what I was expecting. I was expecting a new raw image of size 3221225472bytes but the size generated was 3220955136bytes. I had similar results when I used a fixed vhd image

[Qemu-devel] [QEMU PATCH] m25p80.c: Return state to IDLE after COLLECTING

2013-01-25 Thread Peter Crosthwaite
Default to moving back to the IDLE state after the COLLECTING_DATA state. For a well behaved guest this patch has no consequence, but A bad guest could crash QEMU by using one of the erase commands followed by a longer than 5 byte argument (undefined behaviour). Signed-off-by: Peter Crosthwaite -

[Qemu-devel] [RFC] FDT as a git submodule?

2013-01-25 Thread Peter Crosthwaite
Hi All, For us CONFIG_FDT is compulsory, we cannot build a sensible QEMU without it. To make the build for us a little more user friendly could we add it as a git submodule the same way as its handled for pixman? By default FDT is not enable, but if at configure stage you specify --enable-fdt and

Re: [Qemu-devel] [PATCH] hw/m25p80.c: add WRSR(0x01) support

2013-01-25 Thread Peter Crosthwaite
Hi Dante, On Fri, Jan 25, 2013 at 5:25 PM, Peter Crosthwaite wrote: > Hi Dante, > > Sorry about the delay, and thanks for the contribution. Please run the > patch through the provided checkpatch script (scripts/checkpatch.pl). > There are a few whitespace errors that need to be fixed. Please also

Re: [Qemu-devel] [PATCH] hw/m25p80.c: add WRSR(0x01) support

2013-01-25 Thread Peter Crosthwaite
Hi Dante, Sorry about the delay, and thanks for the contribution. Please run the patch through the provided checkpatch script (scripts/checkpatch.pl). There are a few whitespace errors that need to be fixed. Please also see the comment below. Regards, Peter On Thu, Jan 17, 2013 at 10:17 PM, Dant

Re: [Qemu-devel] [PATCH v2 14/20] arm: add Faraday FTRTC011 RTC timer support

2013-01-25 Thread Paul Brook
> +qemu_mod_timer(s->qtimer, > +qemu_get_clock_ns(vm_clock) + get_ticks_per_sec()); This will not work reliably. You can not rely on timers triggering promptly. Plus you're loosing the time taken to execute the callback every tick. Additionally you can calculate values on deman

Re: [Qemu-devel] [PATCH v2 10/20] arm: add Faraday FTSDC010 MMC/SD controller support

2013-01-25 Thread Paul Brook
> +if (!(s->dcr & DCR_WR) && (s->datacnt > 0)) { > +ret = sd_read_data(s->card) > +| sd_read_data(s->card) << 8 > +| sd_read_data(s->card) << 16 > +| sd_read_data(s->card) << 24; > +s->datacnt -= 4; > +if (s

Re: [Qemu-devel] [PATCH] target-i386: kvm: prevent buffer overflow if -cpu foo, [x]level is too big

2013-01-25 Thread Marcelo Tosatti
On Thu, Jan 24, 2013 at 12:05:48AM +0100, Igor Mammedov wrote: > Stack corruption may occur if too big 'level' or 'xlevel' values passed > on command line with KVM enabled, due to limited size of cpuid_data > in kvm_arch_init_vcpu(). > > reproduces with: > qemu -enable-kvm -cpu qemu64,level=42949

Re: [Qemu-devel] [PATCH v2 06/20] arm: add Faraday FTMAC110 10/100Mbps ethernet support

2013-01-25 Thread Paul Brook
> The FTMAC110 is a high quality 10/100 Ethernet controller Which looks largely the same as the other ethernet controller you added in the previous patch. Paul

Re: [Qemu-devel] [PATCH v2 05/20] arm: add Faraday FTGMAC100 1Gbps ethernet support

2013-01-25 Thread Paul Brook
> In order to reduce the processing load of the host CPU, the FTGMAC100 > implements TCP, UDP, and IP V4 checksum generation and validation, and > supports VLAN tagging. I see no evidence of these features in the code. > +static void ftgmac100_read_desc(hwaddr addr, void *desc) > +{ > +int i;

Re: [Qemu-devel] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Paolo Bonzini
Il 25/01/2013 02:12, Alexander Graf ha scritto: > This patch moves all PowerPC specific hardware emulation except for > PREP to hw/ppc. NACK, I believe it's too early for this. For example spapr_llan.c could go under hw/net, and hw/*_pci.c under hw/pci just as well. Paolo > Signed-off-by: Alexa

Re: [Qemu-devel] [PATCH] block: Adds mirroring tests for resized images

2013-01-25 Thread Paolo Bonzini
Il 25/01/2013 19:57, Vishvananda Ishaya ha scritto: > This test verifies two mirroring issues are fixed with resized images: > > * sync='top' creates an image that is the proper size > * sync='full' doesn't cause an assertion failure and crash qemu > --- > These are tests for my patches for the

Re: [Qemu-devel] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 23:40, Paolo Bonzini wrote: > Il 25/01/2013 02:12, Alexander Graf ha scritto: >> This patch moves all PowerPC specific hardware emulation except for >> PREP to hw/ppc. > > NACK, I believe it's too early for this. > > For example spapr_llan.c could go under hw/net, and hw/*_pci

Re: [Qemu-devel] [PATCH v2 03/20] arm: add Faraday FTAPBBRG020 APB DMA support

2013-01-25 Thread Paul Brook
> The FTAPBBRG020 supports the DMA functions for the AHB-to-AHB, > AHB-to-APB, APB-to-AHB, and APB-to-APB transactions. All the timer code in this file looks suspect. As a general rule everything should be event driven and complete immediately (or at least schedule a BH for immediate action if

Re: [Qemu-devel] [PATCH v3] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set

2013-01-25 Thread Laszlo Ersek
On 01/25/13 18:23, Peter Maydell wrote: > On 25 January 2013 17:20, Laszlo Ersek wrote: >> The subscript operator [] is used here in the type name of a compound >> literal which is probably not what the script intends to catch. >> >> 1945 # check for spacing round square brackets; allowed: >>

Re: [Qemu-devel] [PATCH v2 20/20] arm: add generic ROM model for Faraday SoC platforms

2013-01-25 Thread Paul Brook
> Since the NAND and SPI flash memories do not support random access, > so most of the systems which use such memory as main storages > usually has some bootstrap code stored inside the embedded ROM of > its SoC, and the bootstrap code is responsible for SDRAM initialization > and then load the spe

Re: [Qemu-devel] [PATCH v2 19/20] arm: add Faraday FTKBC010 support for A369

2013-01-25 Thread Paul Brook
> From: Kuo-Jung Su > > Faraday keyboard/mouse controller (FTKBC010) is compliant with the > IBM PS/2 interface. Your description doesn't appear to match the code at all. Surely if this were true then you should be using the existing PS2 keyboard emulation. Paul

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:41, Scott Wood wrote: > On 01/25/2013 01:26:48 PM, Alexander Graf wrote: >> On 25.01.2013, at 20:06, Blue Swirl wrote: >> > On Fri, Jan 25, 2013 at 1:12 AM, Alexander Graf wrote: >> >> This patch moves all PowerPC specific hardware emulation except for >> >> PREP to hw/ppc.

Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions.

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:53, Blue Swirl wrote: > On Fri, Jan 25, 2013 at 7:28 PM, Alexander Graf wrote: >> >> On 25.01.2013, at 20:20, Blue Swirl wrote: >> >>> On Fri, Jan 25, 2013 at 12:48 PM, Alexander Graf wrote: From: Cornelia Huck Provide handlers for (most) channel I/O inst

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Eduardo Habkost
On Fri, Jan 25, 2013 at 07:55:32PM +0100, Andreas Färber wrote: > Am 23.01.2013 18:58, schrieb Eduardo Habkost: > > diff --git a/tests/Makefile b/tests/Makefile > > index d86e95a..4b98d4f 100644 > > --- a/tests/Makefile > > +++ b/tests/Makefile > > @@ -45,6 +45,10 @@ gcov-files-test-aio-$(CONFIG_WI

Re: [Qemu-devel] [PATCH v2 01/20] arm: add Faraday a36x SoC platform support

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 8:19 AM, Kuo-Jung Su wrote: > From: Kuo-Jung Su > > The Faraday A360/A369 EVB is a Faraday platform main board used for the > Faraday IP functional verification based on the well-known ARM AMBA 2.0 > architecture. This main board provides a fully verified microprocessor >

[Qemu-devel] [PATCH 15/24] block/vdi: Improve debug output for signature

2013-01-25 Thread Kevin Wolf
From: Stefan Weil The signature is a 32 bit value and needs up to 8 hex digits for printing. Signed-off-by: Stefan Weil Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/vdi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index

[Qemu-devel] [PATCH 12/24] mirror: support arbitrarily-sized iterations

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini Yet another optimization is to extend the mirroring iteration to include more adjacent dirty blocks. This limits the number of I/O operations and makes mirroring efficient even with a small granularity. Most of the infrastructure is already in place; we only need to put a lo

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Markus Armbruster
Blue Swirl writes: > On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: >> Am 17.01.2013 21:13, schrieb Blue Swirl: >>> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: Tell me what you consider the "correct" tab width for readers and I'll find a piece of QEMU code that was

[Qemu-devel] [PATCH 22/24] ahci: Add migration support

2013-01-25 Thread Kevin Wolf
From: Jason Baron Jason tested these patches by migrating Windows 7 and Fedora 17 guests (while under I/O) on both piix with ahci attached and on q35 (which has a built-in AHCI controller). Signed-off-by: Andreas Färber Signed-off-by: Jason Baron Signed-off-by: Kevin Wolf --- hw/ide/ahci.c |

[Qemu-devel] [PATCH 04/24] block: make round_to_clusters public

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini This is needed in the following patch. Reviewed-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 16 include/block/block.h |4 2 files changed, 12 insertions(+), 8 dele

[Qemu-devel] [PATCH 19/24] hbitmap: add assertion on hbitmap_iter_init

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini hbitmap_iter_init causes an out-of-bounds access when the "first" argument is or greater than or equal to the size of the bitmap. Forbid this with an assertion, and remove the failing testcase. Reported-by: Kevin Wolf Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Re

[Qemu-devel] [PATCH 09/24] mirror: switch mirror_iteration to AIO

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini There is really no change in the behavior of the job here, since there is still a maximum of one in-flight I/O operation between the source and the target. However, this patch already introduces the AIO callbacks (which are unmodified in the next patch) and some of the logic

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Eduardo Habkost
On Fri, Jan 25, 2013 at 05:47:46PM +, Blue Swirl wrote: > On Thu, Jan 24, 2013 at 12:07 PM, Eduardo Habkost wrote: > > On Wed, Jan 23, 2013 at 08:49:58PM +0100, Andreas Färber wrote: > >> Am 23.01.2013 18:58, schrieb Eduardo Habkost: [...] > >> > diff --git a/tests/Makefile b/tests/Makefile >

[Qemu-devel] [PATCH 05/24] mirror: perform COW if the cluster size is bigger than the granularity

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini When mirroring runs, the backing files for the target may not yet be ready. However, this means that a copy-on-write operation on the target would fill the missing sectors with zeros. Copy-on-write only happens if the granularity of the dirty bitmap is smaller than the clust

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 7:51 PM, Eduardo Habkost wrote: > On Fri, Jan 25, 2013 at 06:27:47PM +, Blue Swirl wrote: > [...] >> >> > [1] If I set gcov-files-test-x86-cpuid-y = target-i386/topology.h, I >> >> > get: >> >> > >> >> > GTESTER tests/test-x86-cpuid >> >> > Gcov report for target-i

[Qemu-devel] [PATCH 02/24] add hierarchical bitmap data type and test cases

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini HBitmaps provides an array of bits. The bits are stored as usual in an array of unsigned longs, but HBitmap is also optimized to provide fast iteration over set bits; going from one bit to the next is O(logB n) worst case, with B = sizeof(long) * CHAR_BIT: the result is low e

[Qemu-devel] [PATCH 18/24] mirror: do nothing on zero-sized disk

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini On a zero-sized disk we need to break out of the job successfully before bdrv_dirty_iter_init is called, otherwise you will get an assertion failure with the next patch. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: Laszlo Ersek Signed-off-by: Kevin Wol

Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions.

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 7:28 PM, Alexander Graf wrote: > > On 25.01.2013, at 20:20, Blue Swirl wrote: > >> On Fri, Jan 25, 2013 at 12:48 PM, Alexander Graf wrote: >>> From: Cornelia Huck >>> >>> Provide handlers for (most) channel I/O instructions. >>> >>> Signed-off-by: Cornelia Huck >>> Signe

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Eduardo Habkost
On Fri, Jan 25, 2013 at 06:27:47PM +, Blue Swirl wrote: [...] > >> > [1] If I set gcov-files-test-x86-cpuid-y = target-i386/topology.h, I get: > >> > > >> > GTESTER tests/test-x86-cpuid > >> > Gcov report for target-i386/topology.h: > >> > target-i386/topology.gcno:cannot open graph file

[Qemu-devel] [PATCH 21/24] ahci: Change data types in preparation for migration

2013-01-25 Thread Kevin Wolf
The size of an int depends on the host, so in order to be able to migrate these fields, make them either int32_t or bool, depending on the use. Signed-off-by: Kevin Wolf --- hw/ide/ahci.c |8 hw/ide/ahci.h |8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Scott Wood
On 01/25/2013 01:26:48 PM, Alexander Graf wrote: On 25.01.2013, at 20:06, Blue Swirl wrote: > On Fri, Jan 25, 2013 at 1:12 AM, Alexander Graf wrote: >> This patch moves all PowerPC specific hardware emulation except for >> PREP to hw/ppc. >> >> Signed-off-by: Alexander Graf >> --- >> MAINT

[Qemu-devel] [PATCH 03/24] block: implement dirty bitmap using HBitmap

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini This actually uses the dirty bitmap in the block layer, and converts mirroring to use an HBitmapIter. Reviewed-by: Laszlo Ersek (except block/mirror.c parts) Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c |

[Qemu-devel] [PATCH 07/24] block: allow customizing the granularity of the dirty bitmap

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block-migration.c |5 +++-- block.c | 17 ++--- block/mirror.c| 14 -- include/block/block.h |5 + qapi-schema.json |

Re: [Qemu-devel] [PATCH 18/21] openpic: add basic support for MPIC v4.2

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:28, Scott Wood wrote: > On 01/25/2013 01:23:52 PM, Blue Swirl wrote: >> On Fri, Jan 25, 2013 at 12:53 PM, Alexander Graf wrote: >> > + >> > +static int inttgt_to_output(int inttgt) >> > +{ >> > +int i; >> > + >> > +for (i = 0; i < ARRAY_SIZE(inttgt_output); i++) { >>

[Qemu-devel] [PATCH 17/24] block/vdi: Check for bad signature

2013-01-25 Thread Kevin Wolf
From: Stefan Weil vdi_open did not check for a bad signature. This check was only in vdi_probe. Signed-off-by: Stefan Weil Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/vdi.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/block/vdi.c b/block/vdi.c

[Qemu-devel] [PATCH 20/24] ahci: Remove unused AHCIDevice fields

2013-01-25 Thread Kevin Wolf
From: Jason Baron 'dma_status' and 'dma_cb' are written to, but never read. Remove these fields in preparation for AHCI migration bits. Signed-off-by: Jason Baron Reviewed-by: Juan Quintela Signed-off-by: Kevin Wolf --- hw/ide/ahci.c |8 ++-- hw/ide/ahci.h |2 -- 2 files changed,

Re: [Qemu-devel] [kvmarm] [RFC] Virtio-desktop: Virtio-based virtual desktop

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:04, Blue Swirl wrote: > On Thu, Jan 24, 2013 at 6:10 AM, Anup Patel wrote: >> Hi All, >> >> How about having a generic Virtio-based machine for emulating a virtual >> desktop ? > > I have also thought about this, current virtio design is not very > clean. On the downside,

Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions.

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:20, Blue Swirl wrote: > On Fri, Jan 25, 2013 at 12:48 PM, Alexander Graf wrote: >> From: Cornelia Huck >> >> Provide handlers for (most) channel I/O instructions. >> >> Signed-off-by: Cornelia Huck >> Signed-off-by: Alexander Graf >> --- >> target-s390x/cpu.h| 100

Re: [Qemu-devel] [PATCH 18/21] openpic: add basic support for MPIC v4.2

2013-01-25 Thread Scott Wood
On 01/25/2013 01:23:52 PM, Blue Swirl wrote: On Fri, Jan 25, 2013 at 12:53 PM, Alexander Graf wrote: > + > +static int inttgt_to_output(int inttgt) > +{ > +int i; > + > +for (i = 0; i < ARRAY_SIZE(inttgt_output); i++) { > +if (inttgt_output[i][0] == inttgt) { > +ret

Re: [Qemu-devel] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 20:06, Blue Swirl wrote: > On Fri, Jan 25, 2013 at 1:12 AM, Alexander Graf wrote: >> This patch moves all PowerPC specific hardware emulation except for >> PREP to hw/ppc. >> >> Signed-off-by: Alexander Graf >> --- >> MAINTAINERS | 20 ++-- >

[Qemu-devel] [PATCH 06/24] block: return count of dirty sectors, not chunks

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block-migration.c |2 +- block.c |5 ++--- block/mirror.c|2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/block-migr

[Qemu-devel] [PATCH 14/24] block: Use error code EMEDIUMTYPE for wrong format in some block drivers

2013-01-25 Thread Kevin Wolf
From: Stefan Weil This improves error reports for bochs, cow, qcow, qcow2, qed and vmdk when a file with the wrong format is selected. Signed-off-by: Stefan Weil Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/bochs.c |2 +- block/cow.c |2 +- block/qcow.c |2 +- b

Re: [Qemu-devel] [PATCH 18/21] openpic: add basic support for MPIC v4.2

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 12:53 PM, Alexander Graf wrote: > From: Scott Wood > > Besides the new value in the version register, this provides: > - ILR support, which includes: > - IDR becoming a pure CPU bitmap, allowing 32 CPUs > - machine check output support (though other parts of QEMU need

Re: [Qemu-devel] [PATCH 06/15] s390: Add channel I/O instructions.

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 12:48 PM, Alexander Graf wrote: > From: Cornelia Huck > > Provide handlers for (most) channel I/O instructions. > > Signed-off-by: Cornelia Huck > Signed-off-by: Alexander Graf > --- > target-s390x/cpu.h| 100 +++ > target-s390x/ioinst.c | 716 > +

[Qemu-devel] [PATCH 11/24] mirror: support more than one in-flight AIO operation

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini With AIO support in place, we can start copying more than one chunk in parallel. This patch introduces the required infrastructure for this: the buffer is split into multiple granularity-sized chunks, and there is a free list to access them. Because of copy-on-write, a singl

[Qemu-devel] [PATCH 10/24] mirror: add buf-size argument to drive-mirror

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini This makes sense when the next commit starts using the extra buffer space to perform many I/O operations asynchronously. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/mirror.c |8 blockdev.c |9 - hmp.

Re: [Qemu-devel] [PATCH V2 11/20] tap: support enabling or disabling a queue

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 10:35 AM, Jason Wang wrote: > This patch introduce a new bit - enabled in TAPState which tracks whether a > specific queue/fd is enabled. The tap/fd is enabled during initialization and > could be enabled/disabled by tap_enalbe() and tap_disable() which calls > platform >

[Qemu-devel] [PATCH 23/24] block: Create proper size file for disk mirror

2013-01-25 Thread Kevin Wolf
From: Vishvananda Ishaya The qmp monitor command to mirror a disk was passing -1 for size along with the disk's backing file. This size of the resulting disk is the size of the backing file, which is incorrect if the disk has been resized. Therefore we should always pass in the size of the curren

Re: [Qemu-devel] (change __FUNCTION__ to __func__ according to qemu coding style)

2013-01-25 Thread Luigi Rizzo
On Fri, Jan 25, 2013 at 9:23 AM, Michael Tokarev wrote: > > --- > v2: change __FUNCTION__ to __func__ according to qemu coding style > > will do. However it does not seem a highly followed standard :) lrizzo@netmap:~/work-qemu/qemu-git-head-20130121$ grep -r __FUNCTION__ . | wc 3442119

Re: [Qemu-devel] [PATCH] PPC: Move ppc specific hw emulation to hw/ppc

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 1:12 AM, Alexander Graf wrote: > This patch moves all PowerPC specific hardware emulation except for > PREP to hw/ppc. > > Signed-off-by: Alexander Graf > --- > MAINTAINERS | 20 ++-- > hw/Makefile.objs | 16 +--

Re: [Qemu-devel] [RFC] Virtio-desktop: Virtio-based virtual desktop

2013-01-25 Thread Blue Swirl
On Thu, Jan 24, 2013 at 6:10 AM, Anup Patel wrote: > Hi All, > > How about having a generic Virtio-based machine for emulating a virtual > desktop ? I have also thought about this, current virtio design is not very clean. On the downside, pure no-legacy approach might not work well if you want th

[Qemu-devel] [PATCH] block: Adds mirroring tests for resized images

2013-01-25 Thread Vishvananda Ishaya
This test verifies two mirroring issues are fixed with resized images: * sync='top' creates an image that is the proper size * sync='full' doesn't cause an assertion failure and crash qemu --- These are tests for my patches for the following bugs: https://bugs.launchpad.net/qemu/+bug/1103868 ht

Re: [Qemu-devel] [PATCH V2 6/6] hw/mdio: Use bitbang core for smc91c111 network device

2013-01-25 Thread Paul Brook
> @@ -44,6 +45,10 @@ typedef struct { > uint8_t int_level; > uint8_t int_mask; > MemoryRegion mmio; > + > +/* MDIO bus and the attached phy */ > +struct qemu_mdio mdio_bus; > +struct qemu_phy phy; > } smc91c111_state; > > static const VMStateDescription vmstate_smc91c1

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Andreas Färber
Am 23.01.2013 18:58, schrieb Eduardo Habkost: > diff --git a/tests/Makefile b/tests/Makefile > index d86e95a..4b98d4f 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -45,6 +45,10 @@ gcov-files-test-aio-$(CONFIG_WIN32) = aio-win32.c > gcov-files-test-aio-$(CONFIG_POSIX) = aio-posix.c > c

[Qemu-devel] [PATCH 24/24] ide: Add fall through annotations

2013-01-25 Thread Kevin Wolf
Add comments to help static analysers detect that these cases are intentional, and clean up some whitespace in the environment of these comments. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster --- hw/ide/core.c | 33 + 1 files changed, 25 insertions(+

Re: [Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions

2013-01-25 Thread Eric Blake
On 01/25/2013 11:40 AM, Richard Henderson wrote: > On 2013-01-25 10:16, Eric Blake wrote: >>> >Which is exactly the case for all three errors reported in this series. >>> >I know of no other good way to arrange this pattern. >> #ifdef SOMETHING >> # define SOMETHING_WITNESS 1 >> #else >> # define S

[Qemu-devel] [PATCH 16/24] block/vdi: Improved return values from vdi_open

2013-01-25 Thread Kevin Wolf
From: Stefan Weil vdi_open returned -1 in case of any error, but it should return an error code (negative value of errno or -EMEDIUMTYPE). Signed-off-by: Stefan Weil Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/vdi.c | 17 ++--- 1 files changed, 14 insertions(+),

[Qemu-devel] [PATCH 13/24] block: Add special error code for wrong format

2013-01-25 Thread Kevin Wolf
From: Stefan Weil The block drivers need a special error code for "wrong format". >From the available error codes EMEDIUMTYPE fits best. It is not available on all platforms, so a definition in qemu-common.h and a specific error report are needed. Signed-off-by: Stefan Weil Reviewed-by: Eric Bl

[Qemu-devel] [PATCH 08/24] mirror: allow customizing the granularity

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini The desired granularity may be very different depending on the kind of operation (e.g. continuous replication vs. collapse-to-raw) and whether the VM is expected to perform lots of I/O while mirroring is in progress. Allow the user to customize it, while providing a sane defa

[Qemu-devel] [PULL 00/24] Block patches

2013-01-25 Thread Kevin Wolf
The following changes since commit 11c29918be32be5b00f367c7da9724a5cddbbb0f: Merge remote-tracking branch 'bonzini/scsi-next' into staging (2013-01-24 12:56:02 -0600) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Jason Baron (2): ahci: Remove unu

[Qemu-devel] [PATCH 01/24] host-utils: add ffsl

2013-01-25 Thread Kevin Wolf
From: Paolo Bonzini We can provide fast versions based on the other functions defined by host-utils.h. Some care is required on glibc, which provides ffsl already. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- include/qemu/host-utils.h | 26 +++

Re: [Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions

2013-01-25 Thread Richard Henderson
On 2013-01-25 10:16, Eric Blake wrote: >Which is exactly the case for all three errors reported in this series. >I know of no other good way to arrange this pattern. #ifdef SOMETHING # define SOMETHING_WITNESS 1 #else # define SOMETHING_WITNESS 0 #endif if (foo && SOMETHING_WITNESS) { bar(

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Andreas Färber
Am 25.01.2013 19:07, schrieb Blue Swirl: > On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: >> Am 17.01.2013 21:13, schrieb Blue Swirl: >>> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: Tell me what you consider the "correct" tab width for readers and I'll find a piece o

Re: [Qemu-devel] [PATCH] block: Create proper size file for disk mirror

2013-01-25 Thread Kevin Wolf
Am 25.01.2013 19:13, schrieb Eric Blake: > On 01/25/2013 11:10 AM, Vishvananda Ishaya wrote: >> >> On Jan 25, 2013, at 1:18 AM, Kevin Wolf wrote: >> >>> Am 24.01.2013 19:00, schrieb Vishvananda Ishaya: The qmp monitor command to mirror a disk was passing -1 for size along with the disk's

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Blue Swirl
On Fri, Jan 25, 2013 at 6:01 PM, Eduardo Habkost wrote: > On Fri, Jan 25, 2013 at 05:47:46PM +, Blue Swirl wrote: >> On Thu, Jan 24, 2013 at 12:07 PM, Eduardo Habkost >> wrote: >> > On Wed, Jan 23, 2013 at 08:49:58PM +0100, Andreas Färber wrote: >> >> Am 23.01.2013 18:58, schrieb Eduardo Hab

Re: [Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions

2013-01-25 Thread Eric Blake
On 01/25/2013 11:10 AM, Richard Henderson wrote: > Checkpatch doesn't work well with the pattern > > #ifdef SOMETHING > if (foo) { > bar(); > } else > #endif > { > baz1(); > baz2(); > } > > Which is exactly the case for all three errors reported in this se

Re: [Qemu-devel] [PATCH V11 2/4] Create four opts list related functions

2013-01-25 Thread Blue Swirl
On Thu, Jan 24, 2013 at 6:59 PM, Markus Armbruster wrote: > Dong Xu Wang writes: > >> This patch will create 4 functions, count_opts_list, append_opts_list, >> free_opts_list and print_opts_list, they will used in following commits. >> >> Signed-off-by: Dong Xu Wang >> --- >> v6->v7): >> 1) Fix

Re: [Qemu-devel] [PATCH] block: Create proper size file for disk mirror

2013-01-25 Thread Eric Blake
On 01/25/2013 11:10 AM, Vishvananda Ishaya wrote: > > On Jan 25, 2013, at 1:18 AM, Kevin Wolf wrote: > >> Am 24.01.2013 19:00, schrieb Vishvananda Ishaya: >>> The qmp monitor command to mirror a disk was passing -1 for size >>> along with the disk's backing file. This size of the resulting disk

Re: [Qemu-devel] [PATCH V5 03/13] block: add bdrv_can_read_snapshot() function

2013-01-25 Thread Eric Blake
On 01/23/2013 07:57 PM, Wenchao Xia wrote: > Compared to bdrv_can_snapshot(), this function return whether > bs* is ready to read snapshot info from instead of write. If yes, > caller can then query snapshot information, but taking snapshot > is not always possible for that *bs may be read only.

Re: [Qemu-devel] [PATCH v2] vmware_vga: fix out of bounds and invalid rects updating

2013-01-25 Thread BALATON Zoltan
On Fri, 25 Jan 2013, Michael Tokarev wrote: But since vmsvga_update_rect() has other sanity checks already, I'm adding the missing ones there as well. Cc'ing BALATON Zoltan and Andrzej Zaborowski who shows in `git blame' output and may know something in this area. I've proposed this patch befo

Re: [Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions

2013-01-25 Thread Richard Henderson
On 2013-01-25 06:18, Anthony Liguori wrote: Hi, Thank you for submitting your patch series. checkpatch.pl has detected that one or more of the patches in this series violate the QEMU coding style. If you believe this message was sent in error, please ignore it or respond here with an explanati

Re: [Qemu-devel] [PATCH] block: Create proper size file for disk mirror

2013-01-25 Thread Vishvananda Ishaya
On Jan 25, 2013, at 1:18 AM, Kevin Wolf wrote: > Am 24.01.2013 19:00, schrieb Vishvananda Ishaya: >> The qmp monitor command to mirror a disk was passing -1 for size >> along with the disk's backing file. This size of the resulting disk >> is the size of the backing file, which is incorrect if t

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Blue Swirl
On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: > Am 17.01.2013 21:13, schrieb Blue Swirl: >> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: >>> Tell me what you consider the "correct" tab width for readers and I'll >>> find a piece of QEMU code that was authored for a different t

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-25 Thread Paul Brook
> To be able to create generic GPIO devices or other devices that have GPIO > like pins (e.g MDIO), and hook those up to external buses through common > frameworks, we need agreement on how to model tristate pins. > A tristate pin model, or at least agreement on how to model these with > multiple q

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions

2013-01-25 Thread Blue Swirl
On Thu, Jan 24, 2013 at 12:07 PM, Eduardo Habkost wrote: > On Wed, Jan 23, 2013 at 08:49:58PM +0100, Andreas Färber wrote: >> Am 23.01.2013 18:58, schrieb Eduardo Habkost: >> > This introduces utility functions for the APIC ID calculation, based on: >> > Intel® 64 Architecture Processor Topology

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 6/9] pc: Set fw_cfg data based on APIC ID calculation

2013-01-25 Thread Eduardo Habkost
On Fri, Jan 25, 2013 at 05:22:33PM +, Blue Swirl wrote: > On Wed, Jan 23, 2013 at 5:09 PM, Eduardo Habkost wrote: > > On Wed, Jan 23, 2013 at 05:33:25PM +0100, Andreas Färber wrote: [...] > >> > -numa_fw_cfg = g_new0(uint64_t, 1 + max_cpus + nb_numa_nodes); > >> > +numa_fw_cfg = g_new0

Re: [Qemu-devel] [PATCH v3] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set

2013-01-25 Thread Peter Maydell
On 25 January 2013 17:20, Laszlo Ersek wrote: > The subscript operator [] is used here in the type name of a compound > literal which is probably not what the script intends to catch. > > 1945 # check for spacing round square brackets; allowed: > 1946 # 1. with a type on the left -- int []

[Qemu-devel] [PATCH v2] vmware_vga: fix out of bounds and invalid rects updating

2013-01-25 Thread Michael Tokarev
This is a follow up for several attempts to fix this issue. Previous incarnations: 1. http://thread.gmane.org/gmane.linux.ubuntu.bugs.general/3156089 https://bugs.launchpad.net/bugs/918791 "qemu-kvm dies when using vmvga driver and unity in the guest" bug. Fix by Serge Hallyn: https://launchpadl

[Qemu-devel] (no subject)

2013-01-25 Thread Michael Tokarev
--- v2: change __FUNCTION__ to __func__ according to qemu coding style

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 6/9] pc: Set fw_cfg data based on APIC ID calculation

2013-01-25 Thread Blue Swirl
On Wed, Jan 23, 2013 at 5:09 PM, Eduardo Habkost wrote: > On Wed, Jan 23, 2013 at 05:33:25PM +0100, Andreas Färber wrote: >> Am 22.01.2013 21:25, schrieb Eduardo Habkost: >> > This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), >> > so the NUMA table can be based on the APIC IDs

Re: [Qemu-devel] [PATCH v3] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set

2013-01-25 Thread Laszlo Ersek
Hi, On 01/25/13 15:18, Anthony Liguori wrote: > If you believe this message was sent in error, please ignore it > or respond here with an explanation. > > Otherwise, please correct the coding style issues and resubmit a > new version of the patch. > > For more information about QEMU coding styl

Re: [Qemu-devel] [PATCH] vmware_vga: fix out of bounds and invalid rects updating

2013-01-25 Thread Michael Tokarev
25.01.2013 21:08, Anthony Liguori wrote: > Michael Tokarev writes: > >> 25.01.2013 18:15, Anthony Liguori wrote: >>> WARNING: __func__ should be used instead of gcc specific __FUNCTION__ >>> #73: FILE: hw/vmware_vga.c:300: >>> +fprintf(stderr, "%s: update x was < 0 (%d)\n", __FUNCTION__,

[Qemu-devel] [PATCH] target-cris/helper.c: Update Coding Style

2013-01-25 Thread Andreas Färber
Reindent, add missing braces and drop/adjust whitespace. Prepares for CPUArchState-to-CPUState field movements in cpu_cris_handle_mmu_fault(), do_interruptv10() and do_interrupt(). The remaining functions were so minor that they can be fixed in one go. Signed-off-by: Andreas Färber --- target-c

Re: [Qemu-devel] trace: weird issues with makefile dependencies

2013-01-25 Thread Blue Swirl
On Tue, Jan 22, 2013 at 4:40 PM, Paolo Bonzini wrote: > Il 22/01/2013 15:59, Stefan Hajnoczi ha scritto: >> Why not seriously default to ./build/ for build products and get rid of >> class in-tree builds? >> >> The build still happens inside the working tree by default but it will >> be in a dedic

Re: [Qemu-devel] [PATCH] vmware_vga: fix out of bounds and invalid rects updating

2013-01-25 Thread Anthony Liguori
Michael Tokarev writes: > 25.01.2013 18:15, Anthony Liguori wrote: >> Hi, >> >> Thank you for submitting your patch series. checkpatch.pl has >> detected that one or more of the patches in this series violate >> the QEMU coding style. >> >> If you believe this message was sent in error, please

Re: [Qemu-devel] [PATCH v2 1/3] move socket_set_nodelay to osdep.c

2013-01-25 Thread Blue Swirl
On Tue, Jan 22, 2013 at 9:36 AM, Stefan Hajnoczi wrote: > On Mon, Jan 21, 2013 at 09:23:28AM +0900, MORITA Kazutaka wrote: >> diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c >> index 1542e43..abc6662 100644 >> --- a/slirp/tcp_subr.c >> +++ b/slirp/tcp_subr.c >> @@ -429,8 +429,7 @@ tcp_connect(str

Re: [Qemu-devel] [PATCH 1/1] sclpconsole: Dont instantiate sclpconsole with nodefaults

2013-01-25 Thread Alexander Graf
On 25.01.2013, at 17:00, Christian Borntraeger wrote: > libvirt specifies nodefaults and creates an sclp console with special > parameters. Let qemu follow nodefaults and dont create an sclp > console if nodefaults is specified. > > Signed-off-by: Christian Borntraeger Thanks, applied to s390-

Re: [Qemu-devel] [PATCH 5/5] PPC: e500: Select MPIC v4.2 on ppce500 platform

2013-01-25 Thread Scott Wood
On 01/25/2013 10:38:39 AM, Scott Wood wrote: On 01/25/2013 07:03:02 AM, Alexander Graf wrote: On 22.01.2013, at 02:53, Scott Wood wrote: > The compatible string is changed to fsl,mpic on all e500 platforms, to > advertise the existence of BRR1. This matches what the device tree will > ha

[Qemu-devel] [PATCH v10 5/7] trace: [default] Port to generic event information and new control interface

2013-01-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- trace/default.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trace/default.c b/trace/default.c index c9b27a2..6e07a47 100644 --- a/trace/default.c +++ b/trace/default.c @@ -1,7 +1,7 @@ /* * Default implementation for backend init

[Qemu-devel] [PATCH v10 2/7] trace: Provide a generic tracing event descriptor

2013-01-25 Thread Lluís Vilanova
Uses tracetool to generate a backend-independent tracing event description (struct TraceEvent). The values for such structure are generated with the non-public "events" backend ("events-c" frontend). The generation of the defines to check if an event is statically enabled is also moved to the "ev

Re: [Qemu-devel] [PATCH 5/5] PPC: e500: Select MPIC v4.2 on ppce500 platform

2013-01-25 Thread Scott Wood
On 01/25/2013 07:03:02 AM, Alexander Graf wrote: On 22.01.2013, at 02:53, Scott Wood wrote: > The compatible string is changed to fsl,mpic on all e500 platforms, to > advertise the existence of BRR1. This matches what the device tree will > have on real hardware. > > With MPIC v4.2 max_cp

[Qemu-devel] [PATCH v10 0/7] trace: Generic event state description

2013-01-25 Thread Lluís Vilanova
Provides a generic event state description structure (TraceEvent) and a more detailed event control and query interface. This is achieved by creating a new "non-public" tracing backend (i.e., not selectable by the user at configure time) that will generate the appropriate event description informa

[Qemu-devel] [PATCH v10 1/7] trace: [tracetool] Explicitly identify public backends

2013-01-25 Thread Lluís Vilanova
Public backends are those printed by "--list-backends" and thus considered valid by the configure script. Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |4 ++-- scripts/tracetool/backend/__init__.py | 16 +++- scripts/tracetool/backend/dtrace.py |

[Qemu-devel] [PATCH v10 6/7] trace: [simple] Port to generic event information and new control interface

2013-01-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py | 18 +- trace/simple.c | 32 +--- trace/simple.h |6 +- 3 files changed, 11 insertions(+), 45 deletions(-) diff --git a/scripts

  1   2   3   4   >