Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: > On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > > From: Amos Kong > > > > In virtio-net guest driver, currently we write MAC address to > > pci config space byte by byte, this means that we have an > > intermediate

[Qemu-devel] [PATCH] Add new DEFAULT_MACHINE_OPTIONS to q35 as well

2013-01-16 Thread Knut Omang
Without this a typical q35 based setup would no longer boot after commit e4ada29e909787f629626660b1561f6a680187d3 Signed-off-by: Knut Omang --- hw/pc_q35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pc_q35.c b/hw/pc_q35.c index 52d9976..d82353e 100644 --- a/hw/pc_q35.c +++ b/hw/pc_q3

Re: [Qemu-devel] [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr

2013-01-16 Thread Amos Kong
On Wed, Jan 16, 2013 at 02:20:39PM +0800, Jason Wang wrote: > On Wednesday, January 16, 2013 01:57:01 PM ak...@redhat.com wrote: > > From: Amos Kong > > > > Currently we write MAC address to pci config space byte by byte, > > this means that we have an intermediate step where mac is wrong. > > Th

Re: [Qemu-devel] [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 04:24:47PM +0800, Amos Kong wrote: > On Wed, Jan 16, 2013 at 02:20:39PM +0800, Jason Wang wrote: > > On Wednesday, January 16, 2013 01:57:01 PM ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > Currently we write MAC address to pci config space byte by byte, > > >

Re: [Qemu-devel] [PATCH] virtio-s390: add a reset function to virtio-s390 devices

2013-01-16 Thread KONRAD Frédéric
On 16/01/2013 05:52, mdroth wrote: On Thu, Jan 10, 2013 at 03:40:25PM +0100, Paolo Bonzini wrote: virtio-s390 devices are not being reset when their bus is. To fix this, add a reset method that forwards to virtio_reset. This is only needed because of the "strange" modeling of virtio devices; t

Re: [Qemu-devel] Fwd: [Users] oVirt Node (HyperVisor) - Memory Usage

2013-01-16 Thread Stefan Hajnoczi
On Tue, Jan 15, 2013 at 10:35:58AM +, Alex Leonhardt wrote: > Please could you see below post(s) to the oVirt users list regarding a > possible issue with memory usage by VMs running on qemu kvm ? It was mentioned that VSZ accounts for virtual memory, not used physical RAM. It's not a guarant

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: silencing pkg-config's check for curses

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 03:52:58AM +0400, Vadim Evard wrote: > From d10856f3b1d893b5d3c6ab213eb921d0a24e7766 Mon Sep 17 00:00:00 2001 > From: Vadim Evard > Date: Wed, 16 Jan 2013 03:45:44 +0400 > Subject: [PATCH] configure: silencing pkg-config's check for curses > > --- > configure |2 +- >

Re: [Qemu-devel] [PATCH 0/2] i2c: Add AT24Cxx EEPROM model

2013-01-16 Thread Jan Kiszka
On 2012-12-18 14:55, Stefan Hajnoczi wrote: > On Wed, Dec 12, 2012 at 10:44:10AM +0100, Jan Kiszka wrote: >> On 2012-11-19 15:24, Jan Kiszka wrote: >>> See patches for details. >>> >>> Jan Kiszka (2): >>> i2c: Introduce device address mask >>> Add AT24Cxx I2C EEPROM device model >>> >>> hw/Mak

Re: [Qemu-devel] [PATCH 0/2] i2c: Add AT24Cxx EEPROM model

2013-01-16 Thread Jan Kiszka
On 2012-12-18 15:26, Andreas Färber wrote: > Am 12.12.2012 10:44, schrieb Jan Kiszka: >> On 2012-11-19 15:24, Jan Kiszka wrote: >>> See patches for details. >>> >>> Jan Kiszka (2): >>> i2c: Introduce device address mask >>> Add AT24Cxx I2C EEPROM device model >>> >>> hw/Makefile.objs |2 +-

Re: [Qemu-devel] [RFC PATCH v4 13/30] piix_pci and pc_piix: refactor

2013-01-16 Thread Vasilis Liaskovitis
Hi, On Wed, Jan 16, 2013 at 03:20:40PM +0800, Hu Tao wrote: > Hi Vasilis, > > On Tue, Dec 18, 2012 at 01:41:41PM +0100, Vasilis Liaskovitis wrote: > > Refactor code so that chipset initialization is similar to q35. This will > > allow memory map initialization at chipset qdev init time for both >

[Qemu-devel] [PATCH] ide: Remove wrong assertion

2013-01-16 Thread Kevin Wolf
The Bus Master IDE Active bit (BM_STATUS_DMAING) is not only set when the request is still in flight, but also when it has completed and the size of the physical memory regions in the PRDT was larger than the transfer size. Signed-off-by: Kevin Wolf --- hw/ide/pci.c |1 - 1 files changed, 0

[Qemu-devel] [PATCH 2/2 v2] Add AT24Cxx I2C EEPROM device model

2013-01-16 Thread Jan Kiszka
This implements I2C EEPROMs of the AT24Cxx series. Sizes from 1Kbit to 1024Kbit are supported. Each EEPROM is backed by a block device. Its size can be explicitly specified by the "size" property (required for sizes < 512, the blockdev sector size) or is derived from the size of the backing block d

Re: [Qemu-devel] [PATCH] virtio-s390: add a reset function to virtio-s390 devices

2013-01-16 Thread Paolo Bonzini
Il 16/01/2013 09:42, KONRAD Frédéric ha scritto: >> >>> virtio-s390 devices are not being reset when their bus is. To fix >>> this, add a reset method that forwards to virtio_reset. This is >>> only needed because of the "strange" modeling of virtio devices; >>> the ->vdev link is being handled m

[Qemu-devel] [PATCH 10/10] chardev: add pty chardev support to chardev-add (qmp)

2013-01-16 Thread Gerd Hoffmann
The ptsname is returned directly, so there is no need to use query-chardev to figure the pty device path. Signed-off-by: Gerd Hoffmann --- qapi-schema.json |3 ++- qemu-char.c | 13 + qmp-commands.hx |5 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --g

[Qemu-devel] [PATCH 01/10] chardev: add error reporting for qemu_chr_new_from_opts

2013-01-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/char/char.h |3 ++- qemu-char.c | 24 +++- vl.c|9 ++--- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/include/char/char.h b/include/char/char.h index baa5d03..1952a10 100644 ---

[Qemu-devel] [PATCH 07/10] chardev: add serial chardev support to chardev-add (qmp)

2013-01-16 Thread Gerd Hoffmann
Similar to file, except that no separate in/out files are supported because it's pointless for direct device access. Also the special tty ioctl hooks (pass through linespeed settings etc) are activated on Unix. Signed-off-by: Gerd Hoffmann --- qapi-schema.json | 17 +++ qemu-char.

[Qemu-devel] [PATCH 05/10] chardev: add hmp hotplug commands

2013-01-16 Thread Gerd Hoffmann
Add chardev-add and chardev-remove commands to the human monitor. chardev-add accepts the same syntax as -chardev, chardev-remove expects a chardev id. Signed-off-by: Gerd Hoffmann --- hmp-commands.hx | 32 hmp.c | 23 +++ hmp.h

Re: [Qemu-devel] [PATCH] virtio-s390: add a reset function to virtio-s390 devices

2013-01-16 Thread Andreas Färber
Am 16.01.2013 11:10, schrieb Paolo Bonzini: > Il 16/01/2013 06:27, Andreas Färber ha scritto: >> Am 10.01.2013 15:40, schrieb Paolo Bonzini: >>> virtio-s390 devices are not being reset when their bus is. To fix >>> this, add a reset method that forwards to virtio_reset. This is >>> only needed be

Re: [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers

2013-01-16 Thread Paolo Bonzini
Il 16/01/2013 10:09, Jay Foad ha scritto: >> @@ -621,6 +627,87 @@ static TCGArg *tcg_constant_folding(TCGContext *s, >> uint16_t *tcg_opc_ptr, >> break; >> } >> >> +/* Simplify using known-zero bits */ >> +mask = -1; >> +switch (op) { >> +CASE_O

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

2013-01-16 Thread Paolo Bonzini
Il 15/01/2013 21:04, Laszlo Ersek ha scritto: > From : > > Traditional PCI config space access is achieved by writing a 32 bit > value to io port 0xcf8 to identify the bus, device, function and config > register. Port 0xcfc then contains the register in

[Qemu-devel] [PATCH 09/10] chardev: add socket chardev support to chardev-add (qmp)

2013-01-16 Thread Gerd Hoffmann
qemu_chr_open_socket is split into two functions. All initialization after creating the socket file handler is split away into the new qemu_chr_open_socket_fd function. chr->filename doesn't get filled from QemuOpts any more. Qemu gathers the information using getsockname and getnameinfo instead

[Qemu-devel] [PULL 00/10] chardev hotplug support

2013-01-16 Thread Gerd Hoffmann
Hi, Finally, after a bunch of review rounds, chardev hotplug support is ready for merge. please pull, Gerd The following changes since commit 249d41720b7dfbb5951b430b9eefdbee7464f515: qdev: Prepare "realized" property (2013-01-15 18:27:00 -0600) are available in the git repository at:

Re: [Qemu-devel] [PATCH] Add new DEFAULT_MACHINE_OPTIONS to q35 as well

2013-01-16 Thread Markus Armbruster
Knut Omang writes: > Without this a typical q35 based setup would no longer boot > after commit e4ada29e909787f629626660b1561f6a680187d3 > > Signed-off-by: Knut Omang > --- > hw/pc_q35.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/pc_q35.c b/hw/pc_q35.c > index 52d9976..d82353e

[Qemu-devel] [PATCH 04/10] chardev: add qmp hotplug commands, with null chardev support

2013-01-16 Thread Gerd Hoffmann
Add chardev-add and chardev-remove qmp commands. Hotplugging a null chardev is supported for now, more will be added later. Signed-off-by: Gerd Hoffmann --- qapi-schema.json | 49 + qemu-char.c | 53 +++

[Qemu-devel] [PATCH 06/10] chardev: add file chardev support to chardev-add (qmp)

2013-01-16 Thread Gerd Hoffmann
Add support for file chardevs. Output file is mandatory, input file is optional. Signed-off-by: Gerd Hoffmann --- qapi-schema.json | 16 +- qemu-char.c | 61 ++ qmp-commands.hx |8 ++- 3 files changed, 83 insertio

Re: [Qemu-devel] [PULL for-1.4 v2] Memory API ioport cleanups

2013-01-16 Thread Peter Maydell
On 16 January 2013 00:35, Anthony Liguori wrote: > Andreas Färber writes: >> Or how would I generate 0/M from my bash script? git-request-pull >> doesn't really fit into the "blurb" of a regular cover letter, coming >> with its own stats, so that I generate the mail headers by script. > > I don't

[Qemu-devel] [PATCH 08/10] chardev: add parallel chardev support to chardev-add (qmp)

2013-01-16 Thread Gerd Hoffmann
Also alias the old parport name to parallel for -chardev. Signed-off-by: Gerd Hoffmann --- qapi-schema.json |3 ++- qemu-char.c | 44 qemu-options.hx |5 - 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/qapi-schem

Re: [Qemu-devel] [RFC PATCH v4 13/30] piix_pci and pc_piix: refactor

2013-01-16 Thread Andreas Färber
Hi, Am 16.01.2013 10:36, schrieb Vasilis Liaskovitis: > On Wed, Jan 16, 2013 at 03:20:40PM +0800, Hu Tao wrote: >> On Tue, Dec 18, 2012 at 01:41:41PM +0100, Vasilis Liaskovitis wrote: >>> Refactor code so that chipset initialization is similar to q35. This will >>> allow memory map initialization

[Qemu-devel] [PATCH 02/10] chardev: fix QemuOpts lifecycle

2013-01-16 Thread Gerd Hoffmann
qemu_chr_new_from_opts handles QemuOpts release now, so callers don't have to worry. It will either be saved in CharDriverState, then released in qemu_chr_delete, or in the error case released instantly. Signed-off-by: Gerd Hoffmann --- include/char/char.h |1 + qemu-char.c | 20 +

[Qemu-devel] [PATCH 03/10] chardev: reduce chardev ifdef mess a bit

2013-01-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 16b33ac..ea15d35 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -856,6 +856,8 @@ static void cfmakeraw (struct termios *termio

[Qemu-devel] [PATCH] virtio-net: revert mac on reset

2013-01-16 Thread Michael S. Tsirkin
Once guest overrides virtio net primary mac, it retains the value set until qemu exit. This is inconsistent with standard nic behaviour. To fix, revert the mac to the original value on reset. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit

2013-01-16 Thread Markus Armbruster
Jeff Cody writes: > This is a bug that was caught by a coverity run by Markus. In > the error case when we errored out to exit_restore_open early in the > function, 'overlay_bs' was still NULL at that point, although it is > used to look up flags and perform a bdrv_reopen(). > > Move the overlay

[Qemu-devel] [PATCH 1/2] s390: Add a hypercall registration interface.

2013-01-16 Thread Cornelia Huck
Allow virtio machines to register for different diag500 function codes and convert s390-virtio to use it. Signed-off-by: Cornelia Huck --- hw/s390-virtio.c | 94 hw/s390-virtio.h | 23 +++ hw/s390x/Makefile.objs |

[Qemu-devel] [PATCH 0/2] s390-virtio: Some cleanups.

2013-01-16 Thread Cornelia Huck
Hi, here are two cleanup/refactoring patches for the s390-virtio code. They will make it easier for virtio-ccw, so I'd like to get them in before the bulk of the virtio-ccw related patches. The first one creates an interface for registering callbacks for diagnose 500, inspired by the spapr hcall

[Qemu-devel] [PATCH 2/2] s390-virtio: Factor out some initialization code.

2013-01-16 Thread Cornelia Huck
Some of the machine initialization for s390-virtio will be reused by virtio-ccw. Signed-off-by: Cornelia Huck --- hw/s390-virtio.c | 134 --- hw/s390-virtio.h | 6 +++ 2 files changed, 85 insertions(+), 55 deletions(-) diff --git a/hw/s390-v

Re: [Qemu-devel] [RFC qom-cpu 14/15] target-unicore32: Introduce QOM realizefn for UniCore32CPU

2013-01-16 Thread guanxuetao
> Introduce a realizefn and set realized = true in uc32_cpu_init(). > > Signed-off-by: Andreas F盲rber LGTM. Acked-by: Guan Xuetao > --- > target-unicore32/cpu.c| 15 +++ > target-unicore32/helper.c |2 +- > 2 Dateien ge盲ndert, 16 Zeilen hinzugef眉gt(+), 1 Zeile entfernt(-

Re: [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers

2013-01-16 Thread Jay Foad
> @@ -621,6 +627,87 @@ static TCGArg *tcg_constant_folding(TCGContext *s, > uint16_t *tcg_opc_ptr, > break; > } > > +/* Simplify using known-zero bits */ > +mask = -1; > +switch (op) { > +CASE_OP_32_64(ext8s): > +if ((temps[args[1]].

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 01:23:26PM +0800, Amos Kong wrote: > On Thu, Jan 10, 2013 at 10:57:05PM +0800, Jason Wang wrote: > > On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > Currently we write MAC address to pci config space byte by byte, > > > this means that we h

Re: [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order

2013-01-16 Thread Wanlong Gao
On 01/16/2013 01:42 AM, Michael S. Tsirkin wrote: > Order of arguments of kvm_virtio_pci_irqfd_release > got mixed up in all calls. > As a result users see assertions during cleanup. > > Reported-by: Laszlo Ersek > Signed-off-by: Michael S. Tsirkin Thank you, fixed my assertion here: hw/virtio-

Re: [Qemu-devel] [PATCH 1/2] s390: Add a hypercall registration interface.

2013-01-16 Thread Alexander Graf
On 16.01.2013, at 12:57, Cornelia Huck wrote: > Allow virtio machines to register for different diag500 function > codes and convert s390-virtio to use it. > > Signed-off-by: Cornelia Huck Nice cleanup :). One minor nitpick below > --- > hw/s390-virtio.c | 94 +

Re: [Qemu-devel] [PATCH 2/2] s390-virtio: Factor out some initialization code.

2013-01-16 Thread Alexander Graf
On 16.01.2013, at 12:57, Cornelia Huck wrote: > Some of the machine initialization for s390-virtio will be reused > by virtio-ccw. > > Signed-off-by: Cornelia Huck I would prefer to see this patch as part of the patch set that introduces the new s390 ccw machine, so I can check whether what i

[Qemu-devel] [PATCH v2] Add new DEFAULT_MACHINE_OPTIONS to q35 and ppc405

2013-01-16 Thread Knut Omang
Without this default q35/ppc405 based machines would no longer boot after commit e4ada29e909787f629626660b1561f6a680187d3 Signed-off-by: Knut Omang --- hw/pc_q35.c| 1 + hw/ppc405_boards.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/pc_q35.c b/hw/pc_q35.c index 52d9976..d823

Re: [Qemu-devel] [PATCH 2/2] s390-virtio: Factor out some initialization code.

2013-01-16 Thread Andreas Färber
Am 16.01.2013 12:57, schrieb Cornelia Huck: > diff --git a/hw/s390-virtio.h b/hw/s390-virtio.h > index cd88179..acd4846 100644 > --- a/hw/s390-virtio.h > +++ b/hw/s390-virtio.h > @@ -20,4 +20,10 @@ typedef int (*s390_virtio_fn)(uint64_t reg2, uint64_t > reg3, uint64_t reg4, >

Re: [Qemu-devel] [PATCH 1/2] s390: Add a hypercall registration interface.

2013-01-16 Thread Cornelia Huck
On Wed, 16 Jan 2013 13:17:34 +0100 Alexander Graf wrote: > > On 16.01.2013, at 12:57, Cornelia Huck wrote: > > > Allow virtio machines to register for different diag500 function > > codes and convert s390-virtio to use it. > > > > Signed-off-by: Cornelia Huck > > Nice cleanup :). One minor n

Re: [Qemu-devel] [PULL for-1.4 v2] Memory API ioport cleanups

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 11:12:45AM +, Peter Maydell wrote: > On 16 January 2013 00:35, Anthony Liguori wrote: > > Andreas Färber writes: > >> Or how would I generate 0/M from my bash script? git-request-pull > >> doesn't really fit into the "blurb" of a regular cover letter, coming > >> with

Re: [Qemu-devel] [PATCH 2/2] s390-virtio: Factor out some initialization code.

2013-01-16 Thread Cornelia Huck
On Wed, 16 Jan 2013 13:41:10 +0100 Andreas Färber wrote: > Am 16.01.2013 12:57, schrieb Cornelia Huck: > > diff --git a/hw/s390-virtio.h b/hw/s390-virtio.h > > index cd88179..acd4846 100644 > > --- a/hw/s390-virtio.h > > +++ b/hw/s390-virtio.h > > @@ -20,4 +20,10 @@ typedef int (*s390_virtio_fn)(

[Qemu-devel] [PATCH] s390: Add a hypercall registration interface.

2013-01-16 Thread Cornelia Huck
Allow virtio machines to register for different diag500 function codes and convert s390-virtio to use it. Signed-off-by: Cornelia Huck --- hw/s390-virtio.c | 90 +++- hw/s390-virtio.h | 22 +++ hw/s390x/Makefile.objs |

Re: [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit

2013-01-16 Thread Stefan Hajnoczi
On Tue, Jan 15, 2013 at 10:47:24AM -0500, Jeff Cody wrote: > This is a bug that was caught by a coverity run by Markus. In > the error case when we errored out to exit_restore_open early in the > function, 'overlay_bs' was still NULL at that point, although it is > used to look up flags and perfor

Re: [Qemu-devel] [RFC qom-cpu 03/15] target-i386: Update CPU to QOM realizefn

2013-01-16 Thread Igor Mammedov
On Wed, 16 Jan 2013 06:32:48 +0100 Andreas Färber wrote: > Adapt the signature of x86_cpu_realize(), hook up to > DeviceClass::realize and set realized = true in cpu_x86_init(). > > Signed-off-by: Andreas Färber > Cc: Eduardo Habkost > Cc: Igor Mammedov Reviewed-By: Igor Mammedov > --- > t

Re: [Qemu-devel] [PULL 00/10] chardev hotplug support

2013-01-16 Thread Eric Blake
On 01/16/2013 03:21 AM, Gerd Hoffmann wrote: > Hi, > > Finally, after a bunch of review rounds, chardev hotplug support > is ready for merge. > > please pull, > Gerd Did you intend to add my reviewed-by annotations to the various commit messages? -- Eric Blake eblake redhat com+1-919

Re: [Qemu-devel] [PATCH 8/8] s390: Add new channel I/O based virtio transport.

2013-01-16 Thread Alexander Graf
On 07.12.2012, at 13:50, Cornelia Huck wrote: > Add a new virtio transport that uses channel commands to perform > virtio operations. > > Add a new machine type s390-ccw that uses this virtio-ccw transport > and make it the default machine for s390. > > Signed-off-by: Cornelia Huck > --- > hw/

Re: [Qemu-devel] [PATCH] ide: Remove wrong assertion

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 10:54:34AM +0100, Kevin Wolf wrote: > The Bus Master IDE Active bit (BM_STATUS_DMAING) is not only set when > the request is still in flight, but also when it has completed and the > size of the physical memory regions in the PRDT was larger than the > transfer size. > > Si

Re: [Qemu-devel] [PATCH] virtio-net: revert mac on reset

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 01:45:21PM +0200, Michael S. Tsirkin wrote: > Once guest overrides virtio net primary mac, > it retains the value set until qemu exit. > This is inconsistent with standard nic behaviour. > To fix, revert the mac to the original value on reset. > > Signed-off-by: Michael S.

[Qemu-devel] [PATCH v2] s390-virtio hcall interface.

2013-01-16 Thread Cornelia Huck
Hi, here's the second version of the diag500 hcall registration interface, with the calling convention tweaked a bit. Cornelia Huck (1): s390: Add a hypercall registration interface. hw/s390-virtio.c | 90 +++- hw/s390-virtio.h |

Re: [Qemu-devel] [PATCH] virtio-net: revert mac on reset

2013-01-16 Thread Laszlo Ersek
On 01/16/13 12:45, Michael S. Tsirkin wrote: > Once guest overrides virtio net primary mac, > it retains the value set until qemu exit. > This is inconsistent with standard nic behaviour. > To fix, revert the mac to the original value on reset. > > Signed-off-by: Michael S. Tsirkin > --- > hw/vi

[Qemu-devel] [PATCH 4/8] pc: Fix unchecked strdup() by switching to fw_cfg_add_string()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index ba1f19d..bc5c33f 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -693,9 +693,7 @@ static void load_linux(void *fw_cfg, fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_AD

[Qemu-devel] [PATCH 5/8] sun4: Fix unchecked strdup() by switching to fw_cfg_add_string()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/sun4m.c | 12 +++- hw/sun4u.c | 4 +--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/sun4m.c b/hw/sun4m.c index 6f5de44..4264efd 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -1030,9 +1030,7 @@ static void sun4m_hw_init(const s

[Qemu-devel] [PATCH 8/8] vl: Use size_t for sizes in get_boot_devices_list()

2013-01-16 Thread Markus Armbruster
Code mixes uint32_t, int and size_t. Very unlikely to go wrong in practice, but clean it up anyway. Signed-off-by: Markus Armbruster --- hw/fw_cfg.c | 2 +- include/sysemu/sysemu.h | 2 +- vl.c| 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --g

Re: [Qemu-devel] [PATCH 8/8] s390: Add new channel I/O based virtio transport.

2013-01-16 Thread Alexander Graf
On 16.01.2013, at 14:24, Alexander Graf wrote: > > On 07.12.2012, at 13:50, Cornelia Huck wrote: > >> Add a new virtio transport that uses channel commands to perform >> virtio operations. >> >> Add a new machine type s390-ccw that uses this virtio-ccw transport >> and make it the default mach

Re: [Qemu-devel] [PATCH v2] Add new DEFAULT_MACHINE_OPTIONS to q35 and ppc405

2013-01-16 Thread Markus Armbruster
Knut Omang writes: > Without this default q35/ppc405 based machines would no longer boot > after commit e4ada29e909787f629626660b1561f6a680187d3 > > Signed-off-by: Knut Omang Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 8/8] s390: Add new channel I/O based virtio transport.

2013-01-16 Thread Cornelia Huck
On Wed, 16 Jan 2013 14:53:06 +0100 Alexander Graf wrote: > > On 16.01.2013, at 14:24, Alexander Graf wrote: > > > > > On 07.12.2012, at 13:50, Cornelia Huck wrote: > > > >> Add a new virtio transport that uses channel commands to perform > >> virtio operations. > >> > >> Add a new machine ty

[Qemu-devel] [PATCH 1/8] fw_cfg: Replace debug prints by tracepoints

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/fw_cfg.c | 25 ++--- trace-events | 7 +++ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 7c9480c..2fadf36 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -26,19 +26,10 @@ #include

Re: [Qemu-devel] [PATCH] sheepdog: add support for connecting to unix domain socket

2013-01-16 Thread Stefan Hajnoczi
On Tue, Jan 15, 2013 at 11:12:40PM +0900, MORITA Kazutaka wrote: > +static int set_nodelay(int fd) > +{ > +int opt = 1; > +return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, > sizeof(opt)); > +} > + Please split this into a separate patch that moves the function to util/osdep.c

[Qemu-devel] [PATCH 3/8] fw_cfg: New fw_cfg_add_string()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/fw_cfg.c | 7 +++ hw/fw_cfg.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 0361f68..3d6dd5f 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -385,6 +385,13 @@ void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint

Re: [Qemu-devel] [PATCH v9 1/5] Adding utility function net_checksum_add_cont() that allows checksum calculation of scattered data with odd chunk sizes

2013-01-16 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:09:42PM +0200, Dmitry Fleytman wrote: > +static inline uint32_t > +net_checksum_add(int len, uint8_t *buf) > +{ > +return net_checksum_add_cont(len, buf, 0); > +} > + > +static inline uint16_t > +net_raw_checksum(uint8_t *data, int length) > +{ > + return net_checksu

[Qemu-devel] [PATCH 7/8] fw_cfg: Use void *, size_t instead of uint8_t *, uint32_t for blobs

2013-01-16 Thread Markus Armbruster
Many callers pass size_t, which gets silently truncated to uint32_t. Harmless, because all practical sizes are well below 4GiB. Clean it up anyway. Size overflow now fails assertions. Bonus: saves a whole bunch of silly casts. Signed-off-by: Markus Armbruster --- hw/fw_cfg.c | 31 +++

[Qemu-devel] [PATCH 6/8] pc: Clean up bochs_bios_init()'s (non-)use of sizeof

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index bc5c33f..34cf79d 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -572,7 +572,7 @@ static void *bochs_bios_init(void) fw_cfg_add_bytes(fw_cfg, FW_CFG_SMBIO

[Qemu-devel] [PATCH 0/8] Fixes and cleanups around fw_cfg

2013-01-16 Thread Markus Armbruster
Markus Armbruster (8): fw_cfg: Replace debug prints by tracepoints fw_cfg: Dumb down fw_cfg_add_*() not to return success / failure fw_cfg: New fw_cfg_add_string() pc: Fix unchecked strdup() by switching to fw_cfg_add_string() sun4: Fix unchecked strdup() by switching to fw_cfg_add_string

[Qemu-devel] [PATCH 05/11] spice: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- ui/spice-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 3f2c565..bcc4199 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -848,8 +848,8 @@ static int qemu_spice_set_ticket(bool fail_

[Qemu-devel] [PATCH 06/11] virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- fsdev/virtfs-proxy-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 6b9afd3..36f6616 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@

[Qemu-devel] [PATCH 03/11] hw/9pfs: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/9pfs/virtio-9p-device.c | 2 +- hw/9pfs/virtio-9p-local.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 6eab7f7..74155fb 100644 --- a/hw/9pfs/virtio-9p-device.c +

[Qemu-devel] [PATCH 08/11] qemu-log: Plug trivial memory leak in cpu_set_log_filename()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-log.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qemu-log.c b/qemu-log.c index 64a1b88..1eadf1b 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -21,10 +21,12 @@ #include "qemu/log.h" #ifdef WIN32 -static const char

[Qemu-devel] [PATCH 2/8] fw_cfg: Dumb down fw_cfg_add_*() not to return success / failure

2013-01-16 Thread Markus Armbruster
No caller is checking the value, so all errors get ignored, usually silently. assert() instead. Signed-off-by: Markus Armbruster --- hw/fw_cfg.c | 43 --- hw/fw_cfg.h | 16 2 files changed, 24 insertions(+), 35 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH v9 4/5] Adding packet abstraction for VMWARE network devices

2013-01-16 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:09:45PM +0200, Dmitry Fleytman wrote: > --- > hw/vmxnet_rx_pkt.c | 187 ++ > hw/vmxnet_rx_pkt.h | 173 > hw/vmxnet_tx_pkt.c | 567 > + > hw/vmxnet_tx_pkt.h | 148 ++ > 4 fil

[Qemu-devel] [PATCH 00/11] Trivial memory allocation fixes & cleanups

2013-01-16 Thread Markus Armbruster
Markus Armbruster (11): g_malloc(0) and g_malloc0(0) return NULL; simplify g_strdup(NULL) returns NULL; simplify hw/9pfs: Fix unchecked strdup() by converting to g_strdup() readline: Fix unchecked strdup() by converting to g_strdup() spice: Fix unchecked strdup() by converting to g_strdup

Re: [Qemu-devel] [RFC V4 01/30] qcow2: Add deduplication to the qcow2 specification.

2013-01-16 Thread Benoît Canet
> I'd write this as CEIL(dedup_block_size / (32 + 8)) to make it clear > that it rounds up... Isn't it FLOOR instead of CEIL ? (off by one error) ? Benoît

[Qemu-devel] [PATCH 04/11] readline: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- readline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readline.c b/readline.c index a0c9638..d6e04d4 100644 --- a/readline.c +++ b/readline.c @@ -247,14 +247,14 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdl

[Qemu-devel] [PATCH 11/11] qemu-ga: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
I figure it's freed somewhere deep down in QAPI, with g_free(). Signed-off-by: Markus Armbruster --- qga/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands.c b/qga/commands.c index 7ffb35e..528b082 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -61,7

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: silencing pkg-config's check for curses

2013-01-16 Thread Anthony Liguori
Vadim Evard writes: >>From d10856f3b1d893b5d3c6ab213eb921d0a24e7766 Mon Sep 17 00:00:00 2001 > From: Vadim Evard > Date: Wed, 16 Jan 2013 03:45:44 +0400 > Subject: [PATCH] configure: silencing pkg-config's check for curses This is fubar above and it's missing a Signed-off-by. Please CC me whe

Re: [Qemu-devel] [PATCH v2] Add new DEFAULT_MACHINE_OPTIONS to q35 and ppc405

2013-01-16 Thread Anthony Liguori
Knut Omang writes: > Without this default q35/ppc405 based machines would no longer boot > after commit e4ada29e909787f629626660b1561f6a680187d3 > > Signed-off-by: Knut Omang Please post as a top-level patch. Doing it like this breaks threading. Regards, Anthony Liguori > --- > hw/pc_q35.c

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-16 Thread Anthony Liguori
Jason Wang writes: > On 01/15/2013 03:44 AM, Anthony Liguori wrote: >> Jason Wang writes: >> >>> Hello all: >>> >>> This seires is an update of last version of multiqueue virtio-net support. >>> >>> Recently, linux tap gets multiqueue support. This series implements basic >>> support for multiqu

[Qemu-devel] [PATCH 07/11] qemu-log: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-log.c b/qemu-log.c index b655b30..64a1b88 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -84,7 +84,7 @@ void qemu_set_log(int log_flags, bool use_own_buffers) void cpu_set_log

[Qemu-devel] [PATCH prep for-1.4? v2 0/2] prep_pci: Prepare for QOM realize

2013-01-16 Thread Andreas Färber
From: Andreas Färber Hello Anthony and Paolo, Here's a respin of the patch that prompted the big PCI host bridge refactoring. It embeds PCIBus and PCIDevice into the host bridge state QOM-style. Question: Is the use of object_unref() correct and future-proof now? I'm also adding a second patch

[Qemu-devel] [PATCH prep for-1.4? v2 2/2] prep_pci: Convert to QOM realizefn

2013-01-16 Thread Andreas Färber
From: Andreas Färber SysBusDeviceClass' initfn merely calls SysBusDeviceClass::init, so we can already hook up our own realizefn overwriting this behavior. A symmetric unrealizefn is not necessary, knowing that the child's unrealizefn is still no-op, too. Avoids ripping it out again when recursi

[Qemu-devel] [PATCH prep for-1.4? v2 1/2] prep_pci: Create PCIBus and PCIDevice in-place

2013-01-16 Thread Andreas Färber
From: Andreas Färber Prepares for QOM realizefn by removing object creation from qdev initfn. Signed-off-by: Andreas Färber --- hw/prep_pci.c | 59 - 1 Datei geändert, 46 Zeilen hinzugefügt(+), 13 Zeilen entfernt(-) diff --git a/hw/pre

[Qemu-devel] [PATCH 09/11] libcacard: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Note that we already free with g_free(). Signed-off-by: Markus Armbruster --- libcacard/vcard_emul_nss.c | 4 ++-- libcacard/vreader.c| 2 +- libcacard/vscclient.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_e

[Qemu-devel] [PATCH 01/11] g_malloc(0) and g_malloc0(0) return NULL; simplify

2013-01-16 Thread Markus Armbruster
Once upon a time, it was decided that qemu_malloc(0) should abort. Switching to glib retired that bright idea. Some code that was added to cope with it (e.g. in commits 702ef63, b76b6e9) is still around. Bury it. Signed-off-by: Markus Armbruster --- block/qcow2-refcount.c | 6 +- block/vdi.

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 09:09:49AM -0600, Anthony Liguori wrote: > Jason Wang writes: > > > On 01/15/2013 03:44 AM, Anthony Liguori wrote: > >> Jason Wang writes: > >> > >>> Hello all: > >>> > >>> This seires is an update of last version of multiqueue virtio-net support. > >>> > >>> Recently, li

[Qemu-devel] [PATCH 10/11] qapi: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Note that we already free with g_free(). Signed-off-by: Markus Armbruster --- qapi/qmp-registry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c index 70cdbca..28bbbe8 100644 --- a/qapi/qmp-registry.c +++ b/qapi/qmp-registry.c @@ -92

Re: [Qemu-devel] [PATCH v9 5/5] Adding VMXNET3 device implementation

2013-01-16 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:09:46PM +0200, Dmitry Fleytman wrote: > @@ -113,6 +113,8 @@ common-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o > common-obj-$(CONFIG_PCNET_COMMON) += pcnet.o > common-obj-$(CONFIG_E1000_PCI) += e1000.o > common-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o > +common-obj-$(CONFIG_V

[Qemu-devel] [PATCH 02/11] g_strdup(NULL) returns NULL; simplify

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/9pfs/virtio-9p-device.c | 6 +- hw/block-common.c | 4 +--- net/net.c | 4 +--- slirp/slirp.c | 8 ++-- util/qemu-option.c | 8 ++-- 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH v9 3/5] Adding common definitions for VMWARE devices

2013-01-16 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:09:44PM +0200, Dmitry Fleytman wrote: > diff --git a/eth.c b/eth.c > new file mode 100644 > index 000..a591ee5 > --- /dev/null > +++ b/eth.c > @@ -0,0 +1,219 @@ > +/* > + * QEMU network structures definitions and helper functions > + * > + * Copyright (c) 2012 Ravello

Re: [Qemu-devel] [PATCH v9 4/5] Adding packet abstraction for VMWARE network devices

2013-01-16 Thread Paolo Bonzini
Il 16/01/2013 15:48, Stefan Hajnoczi ha scritto: >> > hw/vmxnet_rx_pkt.c | 187 ++ >> > hw/vmxnet_rx_pkt.h | 173 >> > hw/vmxnet_tx_pkt.c | 567 >> > + >> > hw/vmxnet_tx_pkt.h | 148 ++ >> > 4 files c

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 09:59:14AM +0100, Stefan Hajnoczi wrote: > On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: > > On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > In virtio-net guest driver, currently we write MAC address to > >

[Qemu-devel] [RFC V5 00/62] QCOW2 deduplication

2013-01-16 Thread Benoît Canet
This 3 step patchset implements deduplication in QCOW2. First patchset create the core infrastructure for deduplication and enable it in QCOW2 image. It ends at "qcow2: Enable the deduplication feature." Second patchset implements some metrics in QMP. It ends at "qapi: Return virtual block device

[Qemu-devel] [RFC V5 02/62] qcow2: Add deduplication structures and fields.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2.h | 72 - 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/block/qcow2.h index 718b52b..b31b64e 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -43,6 +43,10 @@ #de

[Qemu-devel] [RFC V5 01/62] qcow2: Add deduplication to the qcow2 specification.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- docs/specs/qcow2.txt | 104 +- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 36a559d..d5f8072 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qco

[Qemu-devel] [RFC V5 06/62] qcow2: Add qcow2_dedup and related functions

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-dedup.c | 436 +++ block/qcow2.h |5 + 2 files changed, 441 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 4e99eb1..5901749 100644 --- a/block/qcow2-dedup.c +++ b/bl

[Qemu-devel] [RFC V5 08/62] qcow2: Implement qcow2_compute_cluster_hash.

2013-01-16 Thread Benoît Canet
Add detection of libgnutls used to compute SHA256 hashes Signed-off-by: Benoit Canet --- block/qcow2-dedup.c | 13 - configure | 22 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index a42

[Qemu-devel] [RFC V5 19/62] qcow2: Add a deduplication boolean to update_refcount.

2013-01-16 Thread Benoît Canet
This is needed for next commit which handle the deduplication refcount overflow case. Signed-off-by: Benoit Canet --- block/qcow2-dedup.c|2 +- block/qcow2-refcount.c | 20 +++- block/qcow2.h |2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff -

  1   2   3   4   5   >