Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Gonglei
On 2014/11/20 15:50, Jason Wang wrote: >>> Maybe just initialize iov unconditionally at the beginning and check >>> >> dot1q_buf instead of iov for the rest of the functions. (Need deal with >>> >> size < ETHER_ADDR_LEN * 2) >> > More complicated, because we can't initialize iov when >> > "size <

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Jason Wang
On 11/20/2014 04:05 PM, Gonglei wrote: > On 2014/11/20 15:50, Jason Wang wrote: > Maybe just initialize iov unconditionally at the beginning and check >> dot1q_buf instead of iov for the rest of the functions. (Need deal with >> size < ETHER_ADDR_LEN * 2) More complicated, because

Re: [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize

2014-11-20 Thread Gerd Hoffmann
Hi, > I don't know why RHEL7 SeaBIOS does not work on RHEL6. But note that > it's a really old version (0.12). Hmm, works for me on a quick smoke test. Do you remember what exactly broke and which version it was? Maybe the 1.7.2 -> 1.7.5 update fixed it? Or was it live-migration by chance?

Re: [Qemu-devel] [PATCH for-2.2] acpi-build: mark RAM dirty on table update

2014-11-20 Thread Igor Mammedov
On Thu, 20 Nov 2014 09:49:20 +0530 Amit Shah wrote: > On (Wed) 19 Nov 2014 [11:08:46], Igor Mammedov wrote: > > On Wed, 19 Nov 2014 12:51:00 +0530 > > Amit Shah wrote: > > > > > -static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray > > > > *blob, +static ram_addr_t acpi_add_rom_bl

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Gonglei
On 2014/11/20 16:11, Jason Wang wrote: > On 11/20/2014 04:05 PM, Gonglei wrote: >> On 2014/11/20 15:50, Jason Wang wrote: >> > Maybe just initialize iov unconditionally at the beginning and check >>> dot1q_buf instead of iov for the rest of the functions. (Need deal with >>> size < ETH

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Francesco Romani
- Original Message - > From: "Stefan Hajnoczi" > To: "Francesco Romani" > Cc: kw...@redhat.com, "Stefan Hajnoczi" , > mdr...@linux.vnet.ibm.com, qemu-devel@nongnu.org, > lcapitul...@redhat.com > Sent: Wednesday, November 19, 2014 4:52:51 PM > Subject: Re: [Qemu-devel] [RFC][PATCH v2] blo

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Jason Wang
On 11/20/2014 04:18 PM, Gonglei wrote: > On 2014/11/20 16:11, Jason Wang wrote: > >> On 11/20/2014 04:05 PM, Gonglei wrote: >>> On 2014/11/20 15:50, Jason Wang wrote: >>> >> Maybe just initialize iov unconditionally at the beginning and check dot1q_buf instead of iov for the rest of th

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-20 Thread Michael S. Tsirkin
On Wed, Nov 19, 2014 at 07:38:10PM -0500, Don Slutz wrote: > c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4 > > or > > c/s b154537ad07598377ebf98252fb7d2aff127983b > > moved the testing of xen_enabled() from pc_init1() to > pc_machine_initfn(). > > xen_enabled() does not return the correct value

Re: [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039

2014-11-20 Thread Max Reitz
On 2014-11-20 at 09:08, Mao Chuan Li wrote: The intention is to disable the core dump, if there is another way we can achieve that, switching to root is not necessary. Any other alternative way? Thanks! Mao Chuan Li Hi, I cannot think of a way; on the other hand, I don't think disabling the

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Gonglei
On 2014/11/20 16:24, Jason Wang wrote: > On 11/20/2014 04:18 PM, Gonglei wrote: >> On 2014/11/20 16:11, Jason Wang wrote: >> >>> On 11/20/2014 04:05 PM, Gonglei wrote: On 2014/11/20 15:50, Jason Wang wrote: >>> Maybe just initialize iov unconditionally at the beginning and check

[Qemu-devel] [PATCH v2] mips: Correctly save/restore the FP flush-to-zero state

2014-11-20 Thread Maciej W. Rozycki
Fix the FP state save/restore operations by saving the `flush_to_zero' rather than the `float_detect_tininess' setting. There is no provision for the latter in MIPS hardware, whereas the former is controlled by the CP1.FCSR.FS bit. As a result all the older saved state images are invalid as t

[Qemu-devel] [PATCH] pcie: fix improper use of negative value

2014-11-20 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 58455bd..2902f7d 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice

Re: [Qemu-devel] [PATCH for-2.3 2/4] blockdev: check for BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE

2014-11-20 Thread Max Reitz
On 2014-11-19 at 15:19, Stefan Hajnoczi wrote: The BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE op blocker exists but was never used! Let's fix that so snapshot delete can be blocked. Signed-off-by: Stefan Hajnoczi --- blockdev.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Max Reitz

[Qemu-devel] [PATCH] vnc-enc-tight: fix Arguments in wrong order

2014-11-20 Thread arei.gonglei
From: Gonglei Arguments in wrong order (SWAPPED_ARGUMENTS) The positions of arguments in the call to tight_fill_palette do not match the ordering of the parameters: &fg is passed to bg &bg is passed to fg Cc: Gerd Hoffmann Signed-off-by: Gonglei --- ui/vnc-enc-tight.c | 2 +- 1 file changed

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-20 Thread Michael S. Tsirkin
On Wed, Nov 19, 2014 at 09:31:35AM -0700, Eric Blake wrote: > On 11/19/2014 09:06 AM, Michael S. Tsirkin wrote: > > This affects QMP right? > >>> > >>> I think later patches will tell how. CC'ing Eric. > >> > >> As far as I can tell, this is just correcting a reporting issue; the > >> existin

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-20 Thread Michael S. Tsirkin
On Wed, Nov 19, 2014 at 09:11:41PM -0700, Eric Blake wrote: > On 11/19/2014 05:38 PM, Don Slutz wrote: > > c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4 > > > > or > > > > c/s b154537ad07598377ebf98252fb7d2aff127983b > > > > moved the testing of xen_enabled() from pc_init1() to > > pc_machine_ini

Re: [Qemu-devel] [PATCH for-2.3 1/4] blockdev: acquire AioContext in blockdev-snapshot-delete-internal-sync

2014-11-20 Thread Max Reitz
On 2014-11-19 at 15:19, Stefan Hajnoczi wrote: Add dataplane support to the blockdev-snapshot-delete-internal-sync QMP command. By acquiring the AioContext we avoid race conditions with the dataplane thread which may also be accessing the BlockDriverState. Signed-off-by: Stefan Hajnoczi ---

Re: [Qemu-devel] [PATCH for-2.3 3/4] blockdev: acquire AioContext in eject, change, and block_passwd

2014-11-20 Thread Max Reitz
On 2014-11-19 at 15:19, Stefan Hajnoczi wrote: By acquiring the AioContext we avoid race conditions with the dataplane thread which may also be accessing the BlockDriverState. Fix up eject, change, and block_passwd in a single patch because qmp_eject() and qmp_change_blockdev() both call eject_d

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Paolo Bonzini
On 20/11/2014 09:24, Jason Wang wrote: > On 11/20/2014 04:18 PM, Gonglei wrote: >> On 2014/11/20 16:11, Jason Wang wrote: >> >>> On 11/20/2014 04:05 PM, Gonglei wrote: On 2014/11/20 15:50, Jason Wang wrote: >>> Maybe just initialize iov unconditionally at the beginning and check >>>

Re: [Qemu-devel] [PATCH for-2.3 4/4] blockdev: acquire AioContext in change-backing-file

2014-11-20 Thread Max Reitz
On 2014-11-19 at 15:19, Stefan Hajnoczi wrote: Add dataplane support to the change-backing-file QMP commands. By acquiring the AioContext we avoid race conditions with the dataplane thread which may also be accessing the BlockDriverState. Note that this command operates on both bs and a node in

Re: [Qemu-devel] [PATCH for-2.3 0/4] blockdev: support dataplane in remaining QMP commands

2014-11-20 Thread Max Reitz
On 2014-11-19 at 15:19, Stefan Hajnoczi wrote: This patch series adds virtio-blk dataplane support for the following QMP commands: * eject * change * change-backing-file * block_passwd * blockdev-snapshot-delete-internal-sync This requires acquiring and releasing the BlockDriverState'

Re: [Qemu-devel] Fwd: Re: Tunneled Migration with Non-Shared Storage

2014-11-20 Thread Dr. David Alan Gilbert
* Gary R Hook (grhookatw...@gmail.com) wrote: > Ugh, I wish I could teach Thunderbird to understand how to reply to a > newsgroup. > > Apologies to Paolo for the direct note. > > On 11/19/14 4:19 AM, Paolo Bonzini wrote: > > > > > >On 19/11/2014 10:35, Dr. David Alan Gilbert wrote: > >>* Paolo Bo

Re: [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize

2014-11-20 Thread Paolo Bonzini
On 20/11/2014 09:12, Gerd Hoffmann wrote: > Hi, > >> I don't know why RHEL7 SeaBIOS does not work on RHEL6. But note that >> it's a really old version (0.12). > > Hmm, works for me on a quick smoke test. Do you remember what exactly > broke and which version it was? Maybe the 1.7.2 -> 1.7.

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-20 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 20/11/2014 01:58, Eduardo Habkost wrote: > > if (pc_machine->vmport == VMPORT_AUTO) { > > no_vmport = xen_enabled(); > > } else { > > no_vmport = (pc_machine->vmport == VMPORT_ON); > > } > > I'm still not sure

Re: [Qemu-devel] [PATCH 3/4] pcnet: fix Negative array index read

2014-11-20 Thread Paolo Bonzini
On 20/11/2014 08:38, Gonglei wrote: > On 2014/11/20 15:08, Paolo Bonzini wrote: > >> >> >> On 20/11/2014 07:44, Gonglei wrote: >>> Maybe not, since two branch are "if and else if" not "if and else", >>> so this change make the below code segment's wide ... > bcnt = 4096 - GET_FIELD(tmd.l

Re: [Qemu-devel] [PATCH v2 0/3] Migration-safe ACPI table sizing algorithm

2014-11-20 Thread Paolo Bonzini
On 20/11/2014 08:55, Michael S. Tsirkin wrote: > On Thu, Nov 20, 2014 at 08:11:05AM +0100, Paolo Bonzini wrote: >> >> >> On 20/11/2014 07:55, Michael S. Tsirkin wrote: >>> I thought we agreed we'll consider alternate approaches after 2.2? >>> I would prefer not to have yet another mode to support

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Kevin Wolf
Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > +void bdrv_set_usage_threshold(BlockDriverState *bs, int64_t > > threshold_bytes) > > +{ > > +BlockDriverState *target_bs = bs; > > +if (bs->file) { > > +

[Qemu-devel] [PATCH v2] persistent dirty bitmap: add QDB file spec.

2014-11-20 Thread Vladimir Sementsov-Ogievskiy
QDB file is for storing dirty bitmap. The specification is based on qcow2 specification. Saving several bitmaps is necessary when server shutdowns during backup. In this case 2 tables for each disk are available. One collected for a previous period and one active. Though this feature is discussabl

Re: [Qemu-devel] [PATCH v2] persistent dirty bitmap: add QDB file spec.

2014-11-20 Thread Vladimir Sementsov-Ogievskiy
Also, it may be better to make this as qcow2 extension. And bitmap will be saved in separate qcow2 file, which will contain only the bitmap(s) and no other data (no disk, no snapshots). Best regards, Vladimir On 20.11.2014 13:34, Vladimir Sementsov-Ogievskiy wrote: QDB file is for storing dir

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-20 Thread Paolo Bonzini
On 20/11/2014 11:00, Dr. David Alan Gilbert wrote: >> > I'm still not sure why the configuration should differ for "-M pc" >> > depending on whether xen is enabled. > I think this goes back to: > > commit 1611977c3d8fdbdac6090cbd1fcee4aed6d9 > Author: Anthony PERARD > Date: Tue May 3 17:0

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 11:30:53AM +0100, Kevin Wolf wrote: > Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > > +void bdrv_set_usage_threshold(BlockDriverState *bs, int64_t > > > threshold_bytes) > > > +{ > > > +

[Qemu-devel] [PATCH] target-mips: gdbstub: Clean up FPU register handling

2014-11-20 Thread Maciej W. Rozycki
Rewrite the FPU register access parts of `mips_cpu_gdb_read_register' and `mips_cpu_gdb_write_register' for consistency between each other. Signed-off-by: Maciej W. Rozycki --- Hi, This is the FPU register handling cleanup previously promised. It was regression-tested by running the GDB test

[Qemu-devel] [PATCH] target-mips: Also apply the CP0.Status mask to MTTC0

2014-11-20 Thread Maciej W. Rozycki
Make CP0.Status writes made with the MTTC0 instruction respect this register's mask just like all the other places. Also preserve the current values of masked out bits. Signed-off-by: Maciej W. Rozycki --- Hi, This should be obvious. Also quite obviously, we are missing a lot of stuff in thi

Re: [Qemu-devel] [Spice-devel] screen freezed for 2-3 minutes on spice connect on xen windows 7 domU's with qxl after save/restore

2014-11-20 Thread Fabio Fantoni
Il 13/11/2014 13:22, Fabio Fantoni ha scritto: Il 13/11/2014 11:14, Fabio Fantoni ha scritto: Il 19/09/2014 15:18, Fabio Fantoni ha scritto: Il 12/09/2014 16:46, Fabio Fantoni ha scritto: Il 08/07/2014 12:34, Fabio Fantoni ha scritto: Il 08/07/2014 12:06, Fabio Fantoni ha scritto: Il 08/07/2

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Paolo Bonzini
On 24/06/2014 08:23, Gonglei (Arei) wrote: >> -Original Message- >> From: Juan Quintela [mailto:quint...@redhat.com] >> Sent: Friday, March 21, 2014 9:26 PM >> To: Gonglei (Arei) >> Cc: qemu-devel@nongnu.org; owass...@redhat.com; pbonz...@redhat.com; >> ebl...@redhat.com; dgilb...@redhat.

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Kevin Wolf
Am 20.11.2014 um 12:04 hat Stefan Hajnoczi geschrieben: > On Thu, Nov 20, 2014 at 11:30:53AM +0100, Kevin Wolf wrote: > > Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > > > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > > > +void bdrv_set_usage_threshold(BlockDrive

[Qemu-devel] [PATCH v2 for-2.2 0/4] net: fix high impact outstanding defects reported by Coverity

2014-11-20 Thread arei.gonglei
From: Gonglei Please see details in every patch. v2 -> v1: - rewrite patch 3 and patch 4 by Paolo's suggestion. Thanks. - add Jason's R-b tag in patch 1~3. Thanks too. Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: Jason Wang Gonglei (4): net/slirp: fix memory leak net/socket: fix Uninitia

[Qemu-devel] [PATCH v2 for-2.2 1/4] net/slirp: fix memory leak

2014-11-20 Thread arei.gonglei
From: Gonglei commit b412eb61 introduce 'cmd:' target for guestfwd, and fwd don't be used in this scenario, and will leak memory in true branch with 'cmd:'. Let's allocate memory for fwd variable just in else statement. Cc: Alexander Graf Signed-off-by: Gonglei Reviewed-by: Jason Wang --- ne

[Qemu-devel] [PATCH v2 for-2.2 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread arei.gonglei
From: Gonglei Coverity spot: Assigning: iov = struct iovec [3]({{buf, 12UL}, {(void *)dot1q_buf, 4UL}, {buf + 12, size - 12}}) (address of temporary variable of type struct iovec [3]). out_of_scope: Temporary variable of type struct iovec [3] goes

[Qemu-devel] [PATCH v2 for-2.2 2/4] net/socket: fix Uninitialized scalar variable

2014-11-20 Thread arei.gonglei
From: Gonglei If is_connected parameter is false, the saddr variable will no initialize. Coverity report: uninit_use: Using uninitialized value saddr.sin_port. We don't need add saddr information to nc->info_str when is_connected is false. Signed-off-by: Gonglei Reviewed-by: Jason Wang --- n

Re: [Qemu-devel] [PATCH v2] persistent dirty bitmap: add QDB file spec.

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 01:41:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Also, it may be better to make this as qcow2 extension. And bitmap will be > saved in separate qcow2 file, which will contain only the bitmap(s) and no > other data (no disk, no snapshots). I think you are on to someth

[Qemu-devel] [PATCH v2 for-2.2 3/4] pcnet: fix Negative array index read

2014-11-20 Thread arei.gonglei
From: Gonglei s->xmit_pos maybe assigned to a negative value (-1), but in this branch variable s->xmit_pos as an index to array s->buffer. Let's add a check for s->xmit_pos. Signed-off-by: Gonglei Signed-off-by: Paolo Bonzini Reviewed-by: Jason Wang --- hw/net/pcnet.c | 55 ++

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Gonglei
On 2014/11/20 19:30, Paolo Bonzini wrote: > > > On 24/06/2014 08:23, Gonglei (Arei) wrote: >>> -Original Message- >>> From: Juan Quintela [mailto:quint...@redhat.com] >>> Sent: Friday, March 21, 2014 9:26 PM >>> To: Gonglei (Arei) >>> Cc: qemu-devel@nongnu.org; owass...@redhat.com; pbonz

[Qemu-devel] [Bug 1394550] [NEW] qemu: linux kernel too old to load a ram disk

2014-11-20 Thread Arsen.Shnurkov
Public bug reported: I was built kernel-genkernel-x86_64-3.17.3-gentoo-gnu and initramfs-genkernel-x86_64-3.17.3-gentoo-gnu in Gentoo Linux from sys- kernel/gentoo-sources/gentoo-sources-3.17.3.ebuild When I run this kernel with switches -kernel -initrd -append (and others), qemu gives

Re: [Qemu-devel] [PATCH v4 33/47] Postcopy: Postcopy startup in migration thread

2014-11-20 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > From: "Dr. David Alan Gilbert" > > > > Rework the migration thread to setup and start postcopy. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > include/migration/migration

Re: [Qemu-devel] [PATCH 2/4] net/socket: fix Uninitialized scalar variable

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 01:57:12PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > If is_connected parameter is false, the saddr > variable will no initialize. Coverity report: > uninit_use: Using uninitialized value saddr.sin_port. > > We don't need add saddr information to nc->info_s

Re: [Qemu-devel] [PATCH 0/4] net: fix high impact outstanding defects reported by Coverity

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 01:57:10PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Please see details in every patch. > > Cc: Paolo Bonzini > Cc: Stefan Hajnoczi > > Gonglei (4): > net/slirp: fix memory leak > net/socket: fix Uninitialized scalar variable > pcnet: fix Negative

Re: [Qemu-devel] [PATCH v2 0/3] Migration-safe ACPI table sizing algorithm

2014-11-20 Thread Michael S. Tsirkin
On Thu, Nov 20, 2014 at 11:04:13AM +0100, Paolo Bonzini wrote: > > > On 20/11/2014 08:55, Michael S. Tsirkin wrote: > > On Thu, Nov 20, 2014 at 08:11:05AM +0100, Paolo Bonzini wrote: > >> > >> > >> On 20/11/2014 07:55, Michael S. Tsirkin wrote: > >>> I thought we agreed we'll consider alternate a

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Kirill Batuzov
On Wed, 19 Nov 2014, Peter Maydell wrote: > > Not for 2.2, Fair enough. > and I'm still not really convinced in > general that it's worthwhile at all. > I'm surprised that this small patch caused so much controversy. It seems very simple and straightforward to me. This patch fixes a memory lea

Re: [Qemu-devel] [PATCH 0/4] net: fix high impact outstanding defects reported by Coverity

2014-11-20 Thread Gonglei
On 2014/11/20 19:51, Stefan Hajnoczi wrote: > On Thu, Nov 20, 2014 at 01:57:10PM +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> Please see details in every patch. >> >> Cc: Paolo Bonzini >> Cc: Stefan Hajnoczi >> >> Gonglei (4): >> net/slirp: fix memory leak >> net/socket: fix

Re: [Qemu-devel] [PATCH 1/4] net/slirp: fix memory leak

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 01:57:11PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > commit b412eb61 introduce 'cmd:' target for guestfwd, > and fwd don't be used in this scenario, and will leak > memory in true branch with 'cmd:'. Let's allocate memory > for fwd variable just in else sta

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Peter Maydell
On 20 November 2014 11:53, Kirill Batuzov wrote: > I'm surprised that this small patch caused so much controversy. It seems > very simple and straightforward to me. > > This patch fixes a memory leak. The fact that it indeed was a memory > leak is indicated by Valgrind output (Memcheck's false-pos

[Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Liviu Ionescu
For standalone emulation, the image must be specified via -kernel, but when using QEMU as a GDB server, the presence of -kernel is no longer mandatory, since the image can be loaded by the GDB client. Signed-off-by: Liviu Ionescu --- hw/arm/armv7m.c | 3 ++- include/sysemu/sysemu.h | 1 +

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB

2014-11-20 Thread Liviu Ionescu
Hi, with the latest submitted patches, the functionality I expect for qemu-system-arm is complete. (I have some more cosmetic suggestions, to be discussed later). to test the functionality, you can download an unit test application from: https://dl.dropboxusercontent.com/u/78151643/gcm

[Qemu-devel] [PATCH v3 0/4] Add TriCore RCPW, RCRR, RCRW, RLC and RCR instructions

2014-11-20 Thread Bastian Koppelmann
Hi, this patch depends on the previous TriCore patches (https://patchwork.ozlabs.org/patch/405459/) and will hopefully end up in 2.3 QEMU. Other than adding the RCPW, RCRR, RCRW, RLC and RCR instructions, it cleans up how ISA versions in the feature bitmask are handled, to simplify the checks,

[Qemu-devel] [PATCH v3 3/4] target-tricore: Add instructions of RLC opcode format

2014-11-20 Thread Bastian Koppelmann
Add instructions of RLC opcode format. Add helper psw_write/read. Add microcode generator gen_mtcr/mfcr, which loads/stores a value to a core special function register, which are defined in csfr.def Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/csfr.def

[Qemu-devel] [PATCH v3 4/4] target-tricore: Add instructions of RCR opcode format

2014-11-20 Thread Bastian Koppelmann
Add instructions of RCR opcode format. Add helper for madd32/64_ssov and madd32/64_suov. Add helper for msub32/64_ssov and msub32/64_suov. Add microcode generator function madd/msub for 32bit and 64bit, which calculate a mul and a add/sub. OPC2_32_RCR_MSUB_U_32 -> OPC2_32_RCR_MSUB_U_32. Signed-of

[Qemu-devel] [PATCH v3 1/4] target-tricore: Make TRICORE_FEATURES implying others.

2014-11-20 Thread Bastian Koppelmann
Since all the TriCore instructionsets are subsets of each other (1.3 C 1.3.1 C 1.6), make the features implying each other, e.g 1.6 also has 1.3.1 and 1.3. This way we only need to check our features for the instructionset, where a instruction was first introduced. Signed-off-by: Bastian Koppelm

[Qemu-devel] [PATCH v3 2/4] target-tricore: Add instructions of RCPW, RCRR and RCRW opcode format

2014-11-20 Thread Bastian Koppelmann
Add instructions of RCPW, RCRR and RCRW opcode format. Add microcode generator function gen_insert. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 132 +++-- 1 file changed, 129 insertions(+), 3 deletions

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Amit Shah
On (Thu) 20 Nov 2014 [19:39:11], Gonglei wrote: > The static variables in migration_bitmap_sync will not be reset in > the case of a second attempted migration. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > >>> > >>> Good catch. Applied.. > >>> > >> > >> Hi, Ju

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Peter Maydell
On 20 November 2014 12:05, Liviu Ionescu wrote: > For standalone emulation, the image must be specified via -kernel, > but when using QEMU as a GDB server, the presence of -kernel is > no longer mandatory, since the image can be loaded by the GDB client. I think the correct fix for this issue is:

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 24/06/2014 08:23, Gonglei (Arei) wrote: > >> -Original Message- > >> From: Juan Quintela [mailto:quint...@redhat.com] > >> Sent: Friday, March 21, 2014 9:26 PM > >> To: Gonglei (Arei) > >> Cc: qemu-devel@nongnu.org; owass...@redhat.com

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Liviu Ionescu
On 20 Nov 2014, at 14:29, Peter Maydell wrote: >> -if (!kernel_filename && !qtest_enabled()) { >> +if (!kernel_filename && !qtest_enabled() && !with_gdb) { >> fprintf(stderr, "Guest image must be specified (using -kernel)\n"); >> exit(1); >> } > > just delete this en

Re: [Qemu-devel] [PATCH] i386/helper: add cpu dump APIC information

2014-11-20 Thread Paolo Bonzini
On 22/07/2014 05:00, Chen Fan wrote: > When KVM exit reason is KVM_EXIT_SHUTDOWN, there will cause > guest to reset, but we can't get any information to fix. > we knew KVM handle triple fault will set exit_reason to > KVM_EXIT_SHUTDOWN, so we also should dump the APIC information > to help to fix

Re: [Qemu-devel] [PATCH v2 for-2.2 0/4] net: fix high impact outstanding defects reported by Coverity

2014-11-20 Thread Paolo Bonzini
Reviewed-by: Paolo Bonzini Thanks! Paolo On 20/11/2014 12:34, arei.gong...@huawei.com wrote: > From: Gonglei > > Please see details in every patch. > > v2 -> v1: > - rewrite patch 3 and patch 4 by Paolo's suggestion. Thanks. > - add Jason's R-b tag in patch 1~3. Thanks too. > > Cc: Paolo

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Thu) 20 Nov 2014 [19:39:11], Gonglei wrote: > > The static variables in migration_bitmap_sync will not be reset in > > the case of a second attempted migration. > > > > Signed-off-by: ChenLiang > > Signed-off-by: Gonglei > >

Re: [Qemu-devel] [PATCH 1/4] virtio-mmio: introduce set_host_notifier()

2014-11-20 Thread Shannon Zhao
On 2014/11/19 15:47, Fam Zheng wrote: > On Tue, 11/04 20:47, Shannon Zhao wrote: >> set_host_notifier() is introduced into virtio-mmio now. Most of codes came >> from virtio-pci. >> >> Signed-off-by: Ying-Shiuan Pan >> Signed-off-by: Li Liu >> Signed-off-by: Shannon Zhao >> --- >> hw/virtio/vir

[Qemu-devel] [PATCH 3/3] hmp: Expose read-only option for 'change'

2014-11-20 Thread Max Reitz
Expose the new read-only option of qmp_change_blockdev() for the 'change' HMP command. Signed-off-by: Max Reitz --- hmp-commands.hx | 24 +--- hmp.c | 17 - 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/hmp-commands.hx b/hmp-command

[Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev

2014-11-20 Thread Max Reitz
The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not (again, floppy drives). Therefore, it should be possible to change the read-only state of blo

[Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev

2014-11-20 Thread Max Reitz
Add an option to qmp_change_blockdev() which allows changing the read-only status of the block device to be changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may find it useful to

[Qemu-devel] [PATCH 2/3] qmp: Expose read-only option for 'change'

2014-11-20 Thread Max Reitz
Expose the new read-only option of qmp_change_blockdev() for the 'change' QMP command. Leave it unset for HMP for now. Signed-off-by: Max Reitz --- hmp.c| 2 +- qapi-schema.json | 7 ++- qmp-commands.hx | 24 +++- qmp.c| 15 --- 4 fi

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Peter Maydell
On 20 November 2014 12:34, Liviu Ionescu wrote: > > On 20 Nov 2014, at 14:29, Peter Maydell wrote: > >>> -if (!kernel_filename && !qtest_enabled()) { >>> +if (!kernel_filename && !qtest_enabled() && !with_gdb) { >>> fprintf(stderr, "Guest image must be specified (using -kernel)\n"

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Amit Shah
On (Thu) 20 Nov 2014 [12:35:54], Dr. David Alan Gilbert wrote: > * Amit Shah (amit.s...@redhat.com) wrote: > > On (Thu) 20 Nov 2014 [19:39:11], Gonglei wrote: > > > The static variables in migration_bitmap_sync will not be reset in > > > the case of a second attempted migration. > > > >>>

[Qemu-devel] [PULL] migration: fix for unbreaking stats/autoconverge on repeat migrations

2014-11-20 Thread Amit Shah
The following changes since commit af3ff19b48f0bbf3a8bd35c47460358e8c6ae5e5: Update version for v2.2.0-rc2 release (2014-11-18 18:00:58 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/migration.git tags/for-2.2-2 for you to fetch changes up to 6c1b

[Qemu-devel] [RFC] Break cross migration from qemu-1.5 to qemu-2.1. because of input/hid rewriting

2014-11-20 Thread Gonglei
Hi, Gerd I encounter a problem that breaking migration from qemu-1.5 to qemu-2.1. The error message as below: qemu-system-x86_64: hw/input/hid.c:121: hid_pointer_event: Assertion `hs->n < 16' failed. Qemu assert in hid_pointer_event(). I get the value of hs->n which is 16 by reproduction. And

Re: [Qemu-devel] [PATCH] migration: static variables will not be reset at second migration

2014-11-20 Thread Gonglei
On 2014/11/20 21:00, Amit Shah wrote: > On (Thu) 20 Nov 2014 [12:35:54], Dr. David Alan Gilbert wrote: >> * Amit Shah (amit.s...@redhat.com) wrote: >>> On (Thu) 20 Nov 2014 [19:39:11], Gonglei wrote: The static variables in migration_bitmap_sync will not be reset in the case of a

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Liviu Ionescu
On 20 Nov 2014, at 14:50, Peter Maydell wrote: > Same thing as if you start a hardware board with nothing loaded > into the flash. (Probably this means "go into an infinite loop > of taking exceptions".) hmmm... and you consider this behaviour to meet the user-friendly requirements? I tried it

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Peter Maydell
On 20 November 2014 13:09, Liviu Ionescu wrote: > > On 20 Nov 2014, at 14:50, Peter Maydell wrote: > >> Same thing as if you start a hardware board with nothing loaded >> into the flash. (Probably this means "go into an infinite loop >> of taking exceptions".) > > hmmm... and you consider this be

Re: [Qemu-devel] [PATCH] armv7m: optional -kernel if -gdb present

2014-11-20 Thread Liviu Ionescu
On 20 Nov 2014, at 15:20, Peter Maydell wrote: > ... However the solutions you're proposing > are often specific to M-profile ARM, ok, I'll keep this local to my branch. what about the previous patch, is it acceptable? regards, Liviu

[Qemu-devel] How to access guest memory from qemu device internal

2014-11-20 Thread Kaiyuan
Hello, all I added a custom device to qemu. This device is attached to sysbus by mmio and has an address register in which device should access the guest memory the register point to. I write a bare-metal program that pass an address like 0x1234ABCD to this address register. Inside qemu device

Re: [Qemu-devel] [PATCH] Add -semihosting-config ....cmdline=string.

2014-11-20 Thread Peter Maydell
On 19 November 2014 22:05, Liviu Ionescu wrote: > A new sub-option was added to -semihosting-config to define the entire > semihosting command line (cmdline=string). > > This string is passed down to armv7m.c; if not defined, for > compatibility reasons, the -kernel -append values are used. > > Th

Re: [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize

2014-11-20 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Nov 19, 2014 at 11:16:57AM +0100, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > On Wed, Nov 19, 2014 at 10:19:22AM +0100, Juan Quintela wrote: >> >> "Michael S. Tsirkin" wrote: >> >> > On Tue, Nov 18, 2014 at 07:03:58AM +0100, Paolo Bon

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-20 Thread Max Reitz
On 2014-11-18 at 21:26, Eric Blake wrote: On 11/17/2014 05:06 AM, Max Reitz wrote: Umm, that sounds backwards from what you document. It's a good test of the _new_ reftable needing a second round of allocations. So keep it with corrected comments. But I think you _intended_ to write a test t

[Qemu-devel] [PULL 2.2 1/3] target-ppc: Fix breakpoint registers for e300

2014-11-20 Thread Alexander Graf
From: Fabien Chouteau In the previous patch, the registers were added to init_proc_G2LE instead of init_proc_e300. Signed-off-by: Fabien Chouteau Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 52 ++--- 1 file changed, 26 insertions(+),

[Qemu-devel] [PULL 2.2 3/3] target-ppc: Altivec's mtvscr Decodes Wrong Register

2014-11-20 Thread Alexander Graf
From: Tom Musta The Move to Vector Status and Control Register (mtvscr) instruction uses VRB as the source register. Fix the code generator to correctly decode the VRB field. That is, use "rB(ctx->opcode)" instead of "rD(ctx->opcode)". Signed-off-by: Tom Musta Signed-off-by: Alexander Graf -

[Qemu-devel] [PULL 2.2 2/3] kvm: Fix memory slot page alignment logic

2014-11-20 Thread Alexander Graf
Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment requirements. Unfortunately, that logic is broken. It tries to calculate the sta

[Qemu-devel] [PULL 2.2 0/3] ppc patch queue 2014-11-20

2014-11-20 Thread Alexander Graf
Hi Peter, This is my current patch queue for ppc. Please pull. Alex The following changes since commit af3ff19b48f0bbf3a8bd35c47460358e8c6ae5e5: Update version for v2.2.0-rc2 release (2014-11-18 18:00:58 +) are available in the git repository at: git://github.com/agraf/qemu.git tags

Re: [Qemu-devel] [PULL] migration: fix for unbreaking stats/autoconverge on repeat migrations

2014-11-20 Thread Peter Maydell
On 20 November 2014 12:59, Amit Shah wrote: > The following changes since commit af3ff19b48f0bbf3a8bd35c47460358e8c6ae5e5: > > Update version for v2.2.0-rc2 release (2014-11-18 18:00:58 +) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/qemu/amit/migration

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-20 Thread Max Reitz
On 2014-11-19 at 06:52, Eric Blake wrote: On 11/18/2014 01:26 PM, Eric Blake wrote: Now, in response to your question about some other 3-pass inducing pattern, let's think back to v1, where you questioned what would happen if a hole in the reftable gets turned into data due to a later allocatio

Re: [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize

2014-11-20 Thread Michael S. Tsirkin
On Thu, Nov 20, 2014 at 02:35:14PM +0100, Markus Armbruster wrote: > What am I missing here that can justify the complexity of partially > overriding target configuration in the migration stream plus > infrastructure for resizing memory? The justification is that sizing it properly is an unsolved

Re: [Qemu-devel] [PATCH] target-ppc: Load/Store Vector Element Storage Alignment

2014-11-20 Thread Alexander Graf
On 17.11.14 21:58, Tom Musta wrote: > The Load Vector Element Indexed and Store Vector Element Indexed > instructions compute an effective address in the usual manner. > However, they truncate that address to the natural boundary. > For example, the lvewx instruction will ignore the least signifi

Re: [Qemu-devel] [2.3 V2 PATCH 2/6] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-20 Thread Alexander Graf
On 12.11.14 22:46, Tom Musta wrote: > The Floating Point Move instructions (fmr., fabs., fnabs., fneg., > and fcpsgn.) incorrectly copy FPSCR[FPCC] instead of [FX,FEX,VX,OX]. > Furthermore, the current code does this via a call to gen_compute_fprf, > which is awkward since these instructions do n

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Kirill Batuzov
> On 20 November 2014 11:53, Kirill Batuzov wrote: > > I'm surprised that this small patch caused so much controversy. It seems > > very simple and straightforward to me. > > > > This patch fixes a memory leak. The fact that it indeed was a memory > > leak is indicated by Valgrind output (Memcheck

Re: [Qemu-devel] [PATCH v6] qcow2: Buffer L1 table in snapshot refcount update

2014-11-20 Thread Max Reitz
On 2014-11-11 at 16:27, Max Reitz wrote: From: Zhang Haoyu Buffer the active L1 table in qcow2_update_snapshot_refcount() in order to prevent in-place conversion of the L1 table buffer in the BDRVQcowState to big endian and back, which would lead to data corruption if that buffer was accessed c

Re: [Qemu-devel] [2.3 V2 PATCH 2/6] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-20 Thread Tom Musta
On 11/20/2014 8:14 AM, Alexander Graf wrote: > > > On 12.11.14 22:46, Tom Musta wrote: >> The Floating Point Move instructions (fmr., fabs., fnabs., fneg., >> and fcpsgn.) incorrectly copy FPSCR[FPCC] instead of [FX,FEX,VX,OX]. >> Furthermore, the current code does this via a call to gen_compute_

Re: [Qemu-devel] [2.3 V2 PATCH 2/6] target-ppc: Fix Floating Point Move Instructions That Set CR1

2014-11-20 Thread Alexander Graf
On 20.11.14 15:32, Tom Musta wrote: > On 11/20/2014 8:14 AM, Alexander Graf wrote: >> >> >> On 12.11.14 22:46, Tom Musta wrote: >>> The Floating Point Move instructions (fmr., fabs., fnabs., fneg., >>> and fcpsgn.) incorrectly copy FPSCR[FPCC] instead of [FX,FEX,VX,OX]. >>> Furthermore, the curre

Re: [Qemu-devel] [2.3 V2 PATCH 0/6] target-ppc: Assorted Floating Point Bugs and Cleanup

2014-11-20 Thread Alexander Graf
On 12.11.14 22:45, Tom Musta wrote: > This patch series corrects some issues with floating point emulation > on Power. > > Patch 1 corrects a corner case in the square root instructions, which > incorrectly react to NaN whose sign bit is a 1. > > Patches 2-6 correct a rather pervasive problem w

[Qemu-devel] Embroidery Patches

2014-11-20 Thread l...@rich-leaders.com
Dear Sir/Madam, Good day! This is Lisa from WellSucceed Embroidery. WellSucceed Embroidery is a factory direct manufacturer of patches.We can supply high quality embroidered patches, woven patches, and PVC patches. Both small patch and back patches can be produced in our factory. Sew on, Iron

Re: [Qemu-devel] [PULL 2.2 0/3] ppc patch queue 2014-11-20

2014-11-20 Thread Peter Maydell
On 20 November 2014 13:55, Alexander Graf wrote: > Hi Peter, > > This is my current patch queue for ppc. Please pull. > > Alex > > > The following changes since commit af3ff19b48f0bbf3a8bd35c47460358e8c6ae5e5: > > Update version for v2.2.0-rc2 release (2014-11-18 18:00:58 +) > > are availab

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-20 Thread Eduardo Habkost
On Thu, Nov 20, 2014 at 12:00:19PM +0100, Paolo Bonzini wrote: > > > On 20/11/2014 11:00, Dr. David Alan Gilbert wrote: > >> > I'm still not sure why the configuration should differ for "-M pc" > >> > depending on whether xen is enabled. > > I think this goes back to: > > > > commit 1611977c3d8f

  1   2   3   >