Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 02:23 PM, Wen Congyang wrote: > commit da51a335 adds all queues in .realize(). But if the > guest doesn't support multiqueue, we forget to remove them. And > we cannot handle the ctrl vq corretly. The guest will hang. > > Signed-off-by: Wen Congyang Thanks for the patch, some ques

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
- Original Message - > From: "Amit Shah" > To: "Pankaj Gupta" > Cc: qemu-devel@nongnu.org, m...@redhat.com > Sent: Wednesday, 15 July, 2015 12:09:57 PM > Subject: Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if > any after timer bumps up quota. > > On (Tue) 14 Jul

Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 02:59 PM, Jason Wang wrote: > > > On 07/15/2015 02:23 PM, Wen Congyang wrote: >> commit da51a335 adds all queues in .realize(). But if the >> guest doesn't support multiqueue, we forget to remove them. And >> we cannot handle the ctrl vq corretly. The guest will hang. >> >> Signed-o

Re: [Qemu-devel] [PATCH for-2.4] virtio-net: Flush incoming queues when DRIVER_OK is being set

2015-07-15 Thread Jason Wang
On 07/15/2015 11:02 AM, Fam Zheng wrote: > This patch fixes network hang after "stop" then "cont", while network > packets keep arriving. > > Tested both manually (tap, host pinging guest) and with Jason's qtest > series (plus his "[PATCH 2.4] socket: pass correct size in > net_socket_send()" fix

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 00:09, Aurelien Jarno wrote: >> > 2) 64-bit processors that have loads with 32-bit addresses. >> > >> >=> qemu_ld/qemu_st can use 32-bit addresses to do the >> > truncation >> > >> >aarch64, I think, falls under this group > I don't think that works. We don't want to

Re: [Qemu-devel] [PATCH v7 14/42] Return path: Send responses from destination to source

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:27], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add migrate_send_rp_message to send a message from destination to source > along the return path. > (It uses a mutex to let it be called from multiple threads) > Add migrate_send_rp_shut t

Re: [Qemu-devel] [PATCH 6/6] ARM: enable PMSAv7-style MPU on Cortex-M3/M4

2015-07-15 Thread Alex Züpke
Am 14.07.2015 um 19:49 schrieb Peter Maydell: > On 7 July 2015 at 19:25, Alex Zuepke wrote: > > A commit message that wasn't just the one-line summary would > be nice. Sometimes a patch really is trivial enough that it's > not worth describing in more than just a single line, but > those situatio

Re: [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-15 Thread Jason Wang
On 07/15/2015 02:01 PM, Fam Zheng wrote: > On Wed, 07/15 13:10, Jason Wang wrote: And can we do this without a bh? Otherwise, we may need to stop and restart the bh during vm stop and start? >>> A bh doesn't hurt when vm stop and restart (we get superfluous flush), >> The problem is qem

Re: [Qemu-devel] [PATCH v12 02/19] i.MX: Move serial initialization to init/realize of DeviceClass.

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Move constructor to DeviceClass methods > * imx_serial_init > * imx_serial_realize > > imx32_serial_properties is renamed to imx_serial_properties. > > Signed-off-by: Jean-Christophe Dubois > --- > > Changes since v1: > * not

Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 03:13 PM, Wen Congyang wrote: > On 07/15/2015 02:59 PM, Jason Wang wrote: >> >> On 07/15/2015 02:23 PM, Wen Congyang wrote: >>> commit da51a335 adds all queues in .realize(). But if the >>> guest doesn't support multiqueue, we forget to remove them. And >>> we cannot handle the ctrl

Re: [Qemu-devel] [PATCH] migration: reduce the count of strlen call

2015-07-15 Thread Juan Quintela
Liang Li wrote: > 'strlen' is called three times in 'save_page_header', it's > inefficient. > > Signed-off-by: Liang Li Reviewed-by: Juan Quintela Applied > --- > migration/ram.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/migration/ram.c b/migration/ra

Re: [Qemu-devel] [PATCH v12 03/19] i.MX:Fix Coding style for UART emulator.

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite One minor optional nit below. > --- > > Changes since v1: > * not present on v1 > > Changes since v2: > * not present on v2 > > Changes since v3: >

Re: [Qemu-devel] [RFC PATCH V2 0/3] Multithread TCG async_safe_work part.

2015-07-15 Thread Frederic Konrad
On 13/07/2015 13:53, Paolo Bonzini wrote: On 10/07/2015 18:08, fred.kon...@greensocs.com wrote: From: KONRAD Frederic This is the async_safe_work introduction bit of the Multithread TCG work. Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). It can be cloned here: http:

Re: [Qemu-devel] [PATCH v12 05/19] i.MX: Fix Coding style for AVIC emulator.

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite > --- > > Changes since v1: > * not present on v1 > > Changes since v2: > * not present on v2 > > Changes since v3: > * not present on v3 > > Change

Re: [Qemu-devel] [PATCH v12 07/19] i.MX: Fix Coding style for CCM emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite > --- > > Changes since v1: > * not present on v1 > > Changes since v2: > * not present on v2 > > Changes since v3: > * not present on v3 > > Change

Re: [Qemu-devel] [PATCH v7 15/42] Return path: Source handling of return path

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:28], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Open a return path, and handle messages that are received upon it. > > Signed-off-by: Dr. David Alan Gilbert > -/* migration thread support */ > +/* > + * Something bad happened to the RP

Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-15 Thread Michael Walle
Am 2015-07-14 13:07, schrieb Fam Zheng: On Tue, 07/14 13:02, Michael Walle wrote: Am 2015-07-14 09:53, schrieb Fam Zheng: >Drop .can_receive and move the semantics into minimac2_rx, by returning >0. > >That is once minimac2_rx returns 0, incoming packets will be queued >until the queue is explic

Re: [Qemu-devel] [PATCH v12 09/19] i.MX: Fix Coding style for EPIT emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite > --- > > Changes since v1: > * not present on v1 > > Changes since v2: > * not present on v2 > > Changes since v3: > * not present on v3 > > Change

Re: [Qemu-devel] [PATCH v12 11/19] i.MX: Fix Coding style for GPT emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite > --- > > Changes since v1: > * not present on v1 > > Changes since v2: > * not present on v2 > > Changes since v3: > * not present on v3 > > Change

[Qemu-devel] [PATCH V2] virtio-net: unbreak any layout

2015-07-15 Thread Jason Wang
Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611 ("virtio-net: byteswap virtio-net header") breaks any layout by requiring out_sg[0].iov_len >= n->guest_hdr_len. Fixing this by copying header to temporary buffer if swap is needed, and then use this buffer as part of out_sg. Fixes 032a74a1c0fcdd5fd1

[Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Juan Quintela
Previous commit only stored a valid state for migration. It stored the empty string for savevm. Now, we are also storing the current state for savevm. Signed-off-by: Juan Quintela --- include/migration/migration.h | 1 + migration/migration.c | 2 +- migration/savevm.c| 6 +

Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 07:29, Jason Wang wrote: > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Cc: qemu-bl...@nongnu.org > Signed-off-by: Jason Wang > --- > hw/block/virtio-blk.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > inde

Re: [Qemu-devel] [PATCH V2] virtio-net: unbreak any layout

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 09:56, Jason Wang wrote: > Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611 > ("virtio-net: byteswap virtio-net header") breaks any layout by > requiring out_sg[0].iov_len >= n->guest_hdr_len. Fixing this by > copying header to temporary buffer if swap is needed, and then use > this

Re: [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-15 Thread Fam Zheng
On Wed, 07/15 15:38, Jason Wang wrote: > > > On 07/15/2015 02:01 PM, Fam Zheng wrote: > > On Wed, 07/15 13:10, Jason Wang wrote: > And can we do this without a bh? Otherwise, we may need to stop and > restart the bh during vm stop and start? > >>> A bh doesn't hurt when vm stop and rest

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Aurelien Jarno
On 2015-07-15 09:31, Paolo Bonzini wrote: > Ok, I see your point. If you put it like this :) the fault definitely > lies in the backends. What I'm proposing would be in a new > tcg_reg_alloc_trunc function, and it would require implementing a > non-noop trunc. Why not reusing the existing trunc_

Re: [Qemu-devel] [PULL v3 05/22] cpu: Convert cpu_index into a bitmap

2015-07-15 Thread Igor Mammedov
On Wed, 15 Jul 2015 09:12:48 +0530 Bharata B Rao wrote: > On Tue, Jul 14, 2015 at 5:17 PM, Igor Mammedov > wrote: > > On Tue, 14 Jul 2015 16:08:54 +0530 > > Bharata B Rao wrote: > > > >> On Thu, Jul 09, 2015 at 03:23:55PM +0200, Andreas Färber wrote: > >> > From: Bharata B Rao > >> > > >> > Cu

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [09:56:22], Juan Quintela wrote: > Previous commit only stored a valid state for migration. It stored the > empty string for savevm. Now, we are also storing the current state for > savevm. Can you include some more information in the commit message? Like the commit hash in

Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 03:41 PM, Jason Wang wrote: > > > On 07/15/2015 03:13 PM, Wen Congyang wrote: >> On 07/15/2015 02:59 PM, Jason Wang wrote: >>> >>> On 07/15/2015 02:23 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we for

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [03:05:06], Pankaj Gupta wrote: > > > - Original Message - > > From: "Amit Shah" > > To: "Pankaj Gupta" > > Cc: qemu-devel@nongnu.org, m...@redhat.com > > Sent: Wednesday, 15 July, 2015 12:09:57 PM > > Subject: Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pendi

[Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen Congyang --- hw/net/virtio-net.c | 93 - 1

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Previous commit only stored a valid state for migration. It stored the > empty string for savevm. Now, we are also storing the current state for > savevm. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Looks OK to me; Chris

Re: [Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-15 Thread Juan Quintela
Li Zhijian wrote: > from commit 2ff6403, we make a mistake to call synchronize_rcu() > within rcu_read_lock()/rcu_read_unlock() > > Signed-off-by: Li Zhijian > Signed-off-by: Wen Congyang > Signed-off-by: Li Zhijian Hi my understanding is that commit d09a6fde1590ca3a45b608b6873a680f208dfeb5

Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 10:31, Jason Wang wrote: > > This must only be done for newer machine types only, or you change guest > > ABI for scsi=off. Effectively you have to split it in two properties, > > "scsi" and "always_set_f_scsi". > > And always_set_f_scsi is true only for legacy machine types? s/le

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Christian Borntraeger
Am 15.07.2015 um 10:18 schrieb Dr. David Alan Gilbert: > * Juan Quintela (quint...@redhat.com) wrote: >> Previous commit only stored a valid state for migration. It stored the >> empty string for savevm. Now, we are also storing the current state for >> savevm. >> >> Signed-off-by: Juan Quintela

Re: [Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 10:31, Juan Quintela wrote: > Li Zhijian wrote: >> > from commit 2ff6403, we make a mistake to call synchronize_rcu() >> > within rcu_read_lock()/rcu_read_unlock() >> > >> > Signed-off-by: Li Zhijian >> > Signed-off-by: Wen Congyang >> > Signed-off-by: Li Zhijian > Hi > > my un

Re: [Qemu-devel] [RFC PATCH V2 2/3] cpus: add a tcg_executing flag.

2015-07-15 Thread Frederic Konrad
On 13/07/2015 17:56, Alex Bennée wrote: fred.kon...@greensocs.com writes: From: KONRAD Frederic This flag indicates if the VCPU is currently executing TCG code. Signed-off-by: KONRAD Frederic Changes V1 -> V2: * do both tcg_executing = 0 or 1 in cpu_exec(). --- cpu-exec.c| 2 +

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [10:19:04], Juan Quintela wrote: > Amit Shah wrote: > > On (Wed) 15 Jul 2015 [09:56:22], Juan Quintela wrote: > >> Previous commit only stored a valid state for migration. It stored the > >> empty string for savevm. Now, we are also storing the current state for > >> savevm.

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 04:20 PM, Wen Congyang wrote: > commit da51a335 adds all queues in .realize(). But if the > guest doesn't support multiqueue, we forget to remove them. And > we cannot handle the ctrl vq corretly. The guest will hang. > > Signed-off-by: Wen Congyang > --- > hw/net/virtio-net.c | 9

Re: [Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-15 Thread Stefan Hajnoczi
On Tue, Jul 14, 2015 at 04:34:19PM +0800, Wen Congyang wrote: > On 07/14/2015 03:53 PM, Fam Zheng wrote: > > Since a90a742 "tap: Drop tap_can_send", all nics that returns false from > > .can_receive() are required to explicitly flush the incoming queue when the > > status of it is changing back to

Re: [Qemu-devel] [Qemu-block][PATCH]block/truncate: qcow2’s resize status is not showed to

2015-07-15 Thread Kevin Wolf
Am 15.07.2015 um 03:57 hat 김태하 geschrieben: > To put it briefly, when resize qcow2 image, the "file" tool detected increased > size. However, the "ls", “stat”, and “du” utility still don't know increased > size. The following patch enables to let userland tools - ls, du, stat - know > and apply cha

Re: [Qemu-devel] Patches

2015-07-15 Thread Stefan Hajnoczi
On Tue, Jul 14, 2015 at 10:58:41AM +0100, Peter Maydell wrote: > On 14 July 2015 at 09:12, Peter Crosthwaite > wrote: > > Hi Stefan, Peter, > > > > Is patches down? I don't see any patches for the last 3 days and there > > is definitely new things on list: > > > > $ ./patches fetch http://vmsplice

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 04:42 PM, Jason Wang wrote: > > > On 07/15/2015 04:20 PM, Wen Congyang wrote: >> commit da51a335 adds all queues in .realize(). But if the >> guest doesn't support multiqueue, we forget to remove them. And >> we cannot handle the ctrl vq corretly. The guest will hang. >> >> Signed-o

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 04:42 PM, Jason Wang wrote: > > > On 07/15/2015 04:20 PM, Wen Congyang wrote: >> commit da51a335 adds all queues in .realize(). But if the >> guest doesn't support multiqueue, we forget to remove them. And >> we cannot handle the ctrl vq corretly. The guest will hang. >> >> Signed-o

Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail

2015-07-15 Thread Cornelia Huck
On Wed, 15 Jul 2015 13:29:57 +0800 Jason Wang wrote: > Signed-off-by: Jason Wang > --- > hw/9pfs/virtio-9p-device.c | 3 ++- > hw/block/virtio-blk.c | 3 ++- > hw/char/virtio-serial-bus.c | 3 ++- > hw/display/virtio-gpu.c | 3 ++- > hw/input/virtio-input.c | 3 ++- > hw/net/virt

[Qemu-devel] [PULL 1/6] migration: Only change state after migration has finished

2015-07-15 Thread Juan Quintela
On previous change, we changed state at post load time if it was not running, special casing the "running" change. Now, we change any states at the end of the migration. Signed-off-by: Juan Quintela Tested-by: Christian Borntraeger --- migration/migration.c | 48 +++

[Qemu-devel] [PULL 0/6] Migration pull request

2015-07-15 Thread Juan Quintela
ailable in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20150715 for you to fetch changes up to 4915a5ad93e6c8ac77e2e5a007be178d50c7b019: migration: We also want to store the global state for savevm (2015-07-15 10:5

[Qemu-devel] [PULL 4/6] migration: Register global state section before loadvm

2015-07-15 Thread Juan Quintela
Otherwise, it is not found Signed-off-by: Juan Quintela --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 3f269dc..5856396 100644 --- a/vl.c +++ b/vl.c @@ -4615,6 +4615,7 @@ int main(int argc, char **argv, char **envp) } qemu_system_reset(V

[Qemu-devel] [PULL 5/6] migration: reduce the count of strlen call

2015-07-15 Thread Juan Quintela
From: Liang Li 'strlen' is called three times in 'save_page_header', it's inefficient. Signed-off-by: Liang Li Reviewed-by: Juan Quintela Reviewed-by: Amit Shat Signed-off-by: Juan Quintela --- migration/ram.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mi

[Qemu-devel] [PULL 6/6] migration: We also want to store the global state for savevm

2015-07-15 Thread Juan Quintela
Commit df4b1024526cae3479da3492d6371fd4a7324a03 introduced global_state section. But it only filled the state while doing migration. While doing a savevm, we stored an empty string as state. So when we did a loadvm, it complained that state was invalid. Fedora 21, 4.1.1, qemu 2.4.0-rc0 > ../../

[Qemu-devel] [PULL 3/6] migration: Write documetation for events capabilites

2015-07-15 Thread Juan Quintela
Reported-by: Jiri Denemark Signed-off-by: Juan Quintela --- qmp-commands.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/qmp-commands.hx b/qmp-commands.hx index e1bcc60..ba630b1 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3406,6 +3406,7 @@ Enable/Disable migration capabilities

[Qemu-devel] [PULL 2/6] migration: Trace event and migration event are different things

2015-07-15 Thread Juan Quintela
We can want the trace event even without migration events enabled. Reported-by: Wen Congyang Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migrati

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 05:04 PM, Wen Congyang wrote: > On 07/15/2015 04:42 PM, Jason Wang wrote: >> > >> > >> > On 07/15/2015 04:20 PM, Wen Congyang wrote: >>> >> commit da51a335 adds all queues in .realize(). But if the >>> >> guest doesn't support multiqueue, we forget to remove them. And >>> >> we ca

Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail

2015-07-15 Thread Jason Wang
On 07/15/2015 05:01 PM, Cornelia Huck wrote: > On Wed, 15 Jul 2015 13:29:57 +0800 > Jason Wang wrote: > >> Signed-off-by: Jason Wang >> --- >> hw/9pfs/virtio-9p-device.c | 3 ++- >> hw/block/virtio-blk.c | 3 ++- >> hw/char/virtio-serial-bus.c | 3 ++- >> hw/display/virtio-gpu.c | 3

Re: [Qemu-devel] [PATCH V2 0/5] Set correct blk feature for virtio 1.0

2015-07-15 Thread Cornelia Huck
On Wed, 15 Jul 2015 13:29:56 +0800 Jason Wang wrote: > Hi all: > > This series tries to set feature correctly for virtio-blk when virtio > 1.0 is supported. Two isssues were addressed according to the spec: > > - scsi passthrough was not support in 1.0. This is done by, 1) disable > scsi by d

[Qemu-devel] [PATCH v3 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen Congyang --- hw/net/virtio-net.c | 110 +++- 1

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Juan Quintela
Amit Shah wrote: > On (Wed) 15 Jul 2015 [09:56:22], Juan Quintela wrote: >> Previous commit only stored a valid state for migration. It stored the >> empty string for savevm. Now, we are also storing the current state for >> savevm. > > Can you include some more information in the commit message

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
> On (Wed) 15 Jul 2015 [03:05:06], Pankaj Gupta wrote: > > > > > > - Original Message - > > > From: "Amit Shah" > > > To: "Pankaj Gupta" > > > Cc: qemu-devel@nongnu.org, m...@redhat.com > > > Sent: Wednesday, 15 July, 2015 12:09:57 PM > > > Subject: Re: [Qemu-devel] [PATCH 2/2 v2] virt

Re: [Qemu-devel] [PATCH v7 16/42] Rework loadvm path for subloops

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:29], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Postcopy needs to have two migration streams loading concurrently; > one from memory (with the device state) and the other from the fd > with the memory transactions. > > Split the core of q

Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Jason Wang
On 07/15/2015 03:57 PM, Paolo Bonzini wrote: > > On 15/07/2015 07:29, Jason Wang wrote: >> Cc: Stefan Hajnoczi >> Cc: Kevin Wolf >> Cc: qemu-bl...@nongnu.org >> Signed-off-by: Jason Wang >> --- >> hw/block/virtio-blk.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --g

[Qemu-devel] [PATCH] target-i386: gdbserver: Return CS:IP as EIP on 16-bit mode

2015-07-15 Thread Ismael Luceno
While far from ideal, that seems to be what GDB and most other debuggers expect. Signed-off-by: Ismael Luceno --- target-i386/gdbstub.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-i386/gdbstub.c b/target-i386/gdbstub.c index ff99cfb..754ea77 100644 --- a/target

Re: [Qemu-devel] [PATCH v7 17/42] Add migration-capability boolean for postcopy-ram.

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [16:58:17], Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: > > On 06/16/2015 04:26 AM, Dr. David Alan Gilbert (git) wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > The 'postcopy ram' capability allows postcopy migration of RAM; > > > note that

Re: [Qemu-devel] [PATCH V2 0/5] Set correct blk feature for virtio 1.0

2015-07-15 Thread Jason Wang
On 07/15/2015 05:11 PM, Cornelia Huck wrote: > On Wed, 15 Jul 2015 13:29:56 +0800 > Jason Wang wrote: > >> Hi all: >> >> This series tries to set feature correctly for virtio-blk when virtio >> 1.0 is supported. Two isssues were addressed according to the spec: >> >> - scsi passthrough was not s

Re: [Qemu-devel] [PATCH v7 17/42] Add migration-capability boolean for postcopy-ram.

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:30], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The 'postcopy ram' capability allows postcopy migration of RAM; > note that the migration starts off in precopy mode until > postcopy mode is triggered (see the migrate_start_postcopy > patch

[Qemu-devel] [PATCH qemu v11 01/11] vmstate: Define VARRAY with VMS_ALLOC

2015-07-15 Thread Alexey Kardashevskiy
This allows dynamic allocation for migrating arrays. Already existing VMSTATE_VARRAY_UINT32 requires an array to be pre-allocated, however there are cases when the size is not known in advance and there is no real need to enforce it. This defines another variant of VMSTATE_VARRAY_UINT32 with WMS_

[Qemu-devel] [PATCH qemu v11 03/11] spapr_iommu: Move table allocation to helpers

2015-07-15 Thread Alexey Kardashevskiy
At the moment presence of vfio-pci devices on a bus affect the way the guest view table is allocated. If there is no vfio-pci on a PHB and the host kernel supports KVM acceleration of H_PUT_TCE, a table is allocated in KVM. However, if there is vfio-pci and we do yet not KVM acceleration for these,

[Qemu-devel] [PATCH qemu v11 08/11] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge

2015-07-15 Thread Alexey Kardashevskiy
sPAPRTCETable is handling 2 TCE tables already: 1) guest view of the TCE table - emulated devices use only this table; 2) hardware IOMMU table - VFIO PCI devices use it for actual work but it does not replace 1) and it is not visible to the guest. The initialization of this table is driven by vfi

[Qemu-devel] [PATCH qemu v11 09/11] spapr_pci: Enable vfio-pci hotplug

2015-07-15 Thread Alexey Kardashevskiy
sPAPR IOMMU is managing two copies of an TCE table: 1) a guest view of the table - this is what emulated devices use and this is where H_GET_TCE reads from; 2) a hardware TCE table - only present if there is at least one vfio-pci device on a PHB; it is updated via a memory listener on a PHB address

[Qemu-devel] [PATCH qemu v11 02/11] spapr_pci: Convert finish_realize() to dma_capabilities_update()+dma_init_window()

2015-07-15 Thread Alexey Kardashevskiy
This reworks finish_realize() which used to finalize DMA setup with an assumption that it will not change later. New callbacks supports various window parameters such as page and windows sizes. The new callback return error code rather than Error**. This is a mechanical change so no change in beh

[Qemu-devel] [PATCH qemu v11 04/11] spapr_iommu: Introduce "enabled" state for TCE table

2015-07-15 Thread Alexey Kardashevskiy
Currently TCE tables are created once at start and their size never changes. We are going to change that by introducing a Dynamic DMA windows support where DMA configuration may change during the guest execution. This changes spapr_tce_new_table() to create an empty stub object. Only LIOBN is assi

[Qemu-devel] [PATCH qemu v11 11/11] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2015-07-15 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) This implements DDW for emulated and VFIO devices. As all TCE root regions are mapped at 0 and 64bit long (and actual tables are child regions), this replaces mem

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Richard Henderson
On 07/14/2015 05:38 PM, Leon Alrae wrote: There seems to be an issue when trying to keep a pointer in bottom 32-bits of a 64-bit floating point register. Load and store instructions accessing this address for some reason use the whole 64-bit content of floating point register rather than truncate

[Qemu-devel] [PATCH qemu v11 05/11] spapr_iommu: Remove vfio_accel flag from sPAPRTCETable

2015-07-15 Thread Alexey Kardashevskiy
sPAPRTCETable has a vfio_accel flag which is passed to kvmppc_create_spapr_tce() and controls whether to create a guest view table in KVM as this depends on the host kernel ability to accelerate H_PUT_TCE for VFIO devices. We would set this flag at the moment when sPAPRTCETable is created in spapr_

[Qemu-devel] [PATCH qemu v11 06/11] spapr_iommu: Add root memory region

2015-07-15 Thread Alexey Kardashevskiy
We are going to have multiple DMA windows at different offsets on a PCI bus. For the sake of migration, we will have as many TCE table objects pre-created as many windows supported. So we need a way to map windows dynamically onto a PCI bus when migration of a table is completed but at this stage a

[Qemu-devel] [PATCH qemu v11 10/11] spapr_pci_vfio: Enable multiple groups per container

2015-07-15 Thread Alexey Kardashevskiy
This enables multiple IOMMU groups in one VFIO container which means that multiple devices from different groups can share the same IOMMU table (or tables if DDW). This removes a group id from vfio_container_ioctl(). The kernel support is required for this; if the host kernel does not have the sup

[Qemu-devel] [PATCH qemu v11 07/11] spapr_pci: Do complete reset of DMA config when resetting PHB

2015-07-15 Thread Alexey Kardashevskiy
On a system reset, DMA configuration has to reset too. At the moment it clears the table content. This is enough for the single table case but with DDW, we will also have to disable all DMA windows except the default one. Furthermore according to sPAPR, if the guest removed the default window and c

[Qemu-devel] [PATCH qemu v11 00/11] spapr: vfio: Enable Dynamic DMA windows (DDW)

2015-07-15 Thread Alexey Kardashevskiy
Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus where devices are allowed to do DMA. These ranges are called DMA windows. By default, there is a single DMA window, 1 or 2GB big, mapped at zero on a PCI bus. PAPR defines a DDW RTAS API which allows pseries guests queryin

[Qemu-devel] [RFC PATCH v0] spapr: Abort when hash table size requirement isn't met

2015-07-15 Thread Bharata B Rao
[This patch addresses an issue which is not prominently seen in mainline, but seen frequently only in David's spapr-next branch. Though it is possible to see this issue with mainline too, the current version of the patch is intended for David's tree.] QEMU requests for hash table allocation throug

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Richard Henderson
On 07/15/2015 09:06 AM, Aurelien Jarno wrote: On 2015-07-15 09:31, Paolo Bonzini wrote: Ok, I see your point. If you put it like this :) the fault definitely lies in the backends. What I'm proposing would be in a new tcg_reg_alloc_trunc function, and it would require implementing a non-noop tr

[Qemu-devel] [PATCH 4/7] ipxe: disable load file protocol

2015-07-15 Thread Gerd Hoffmann
Activate the opt-out added by one ipxe patch. Signed-off-by: Gerd Hoffmann --- roms/config.ipxe.general.h | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/config.ipxe.general.h b/roms/config.ipxe.general.h index 619ee4c..2df042a 100644 --- a/roms/config.ipxe.general.h +++ b/roms/config.i

[Qemu-devel] [PATCH 2/7] ipxe: update to 87981bb (qemu)

2015-07-15 Thread Gerd Hoffmann
Add two patches we've been struggling to get upstream. They are available from "git://git.qemu.org/ipxe.git qemu" git shortlog Gerd Hoffmann (1): [efi] make load file protocol optional Laszlo Ersek (1): efi_snp: improve compliance with the EFI_SIMPLE_NETWORK_PROTOCOL spe

[Qemu-devel] [PATCH 3/7] ipxe: rm local config in cleanup

2015-07-15 Thread Gerd Hoffmann
ipxe build now generates empty local header files in case they are not preset. Let's remove them on cleanup to make sure we store a fresh copy on the next build. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Makefile b/roms/Makefile inde

[Qemu-devel] [PATCH 6/7] ipxe: don't override GITVERSION

2015-07-15 Thread Gerd Hoffmann
We had build problems due to the git version checking in the ipxe build system in the past. Don't remember the details, but the problem seems to be gone now, so lets remove the workaround. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 1/7] ipxe: update from 35c53797 to 24112d9 (upstream/master)

2015-07-15 Thread Gerd Hoffmann
git shortlog Alex Williamson (1): [dhcp] Extract timing parameters out to config/dhcp.h Bernd Wiebelt (1): [tg3] Add support for BCM57766 Christian Hesse (3): [intel] Add PCI device IDs for Intel I218-LM and I218-V [build] Add missing "const" qualifiers

[Qemu-devel] [PATCH 5/7] ipxe: add qemu branding

2015-07-15 Thread Gerd Hoffmann
Apply qemu-project.org branding, so the official builds can easily be identified in the banner. Signed-off-by: Gerd Hoffmann --- roms/Makefile | 4 ++-- roms/config.ipxe.branding.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 roms/config.ipxe.brandin

[Qemu-devel] [PATCH 0/7] ipxe update, continued ...

2015-07-15 Thread Gerd Hoffmann
Hi, So, here we go with the next version. Removed the patch files, added them to a git branch instead, so we just update the submodule accordingly. qemu update is also here: git://git.kraxel.org/qemu rebase/roms-next ipxe branch is here: git://git.kraxel.org/ipxe qemu When going this rou

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Aurelien Jarno
On 2015-07-15 11:02, Richard Henderson wrote: > On 07/15/2015 09:06 AM, Aurelien Jarno wrote: > >On 2015-07-15 09:31, Paolo Bonzini wrote: > >>Ok, I see your point. If you put it like this :) the fault definitely > >>lies in the backends. What I'm proposing would be in a new > >>tcg_reg_alloc_tru

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Aurelien Jarno
On 2015-07-15 12:14, Aurelien Jarno wrote: > On 2015-07-15 11:02, Richard Henderson wrote: > > On 07/15/2015 09:06 AM, Aurelien Jarno wrote: > > >On 2015-07-15 09:31, Paolo Bonzini wrote: > > >>Ok, I see your point. If you put it like this :) the fault definitely > > >>lies in the backends. What

Re: [Qemu-devel] [PULL 0/6] Migration pull request

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [11:04:34], Juan Quintela wrote: > Hi > > This pull requset: > - small optimization by Li > - fixes global state with savevm (reported by John Snow) > - get migration traces for migration state changes even if migration > events are not enabled > - Change state after migrati

[Qemu-devel] [PATCH v2 for-2.4 01/12] xgmac: Drop packets with eth_can_rx is false.

2015-07-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- hw/net/xgmac.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index b068f3a..15fb681 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -312,10 +312,8 @@ static const MemoryReg

[Qemu-devel] [PATCH v2 for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-15 Thread Fam Zheng
v2: Don't use BH in patches 6 and 12. [Jason] Add Stefan's reviewed-by in all others. Drop trace point in patch 8 and move function body upward. [Michael] Since a90a742 "tap: Drop tap_can_send", all nics that returns false from .can_receive() are required to explicitly flush the incoming q

[Qemu-devel] [PATCH v2 for-2.4 03/12] eepro100: Drop nic_can_receive

2015-07-15 Thread Fam Zheng
nic_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but queuing the packets whe

[Qemu-devel] [PATCH v2 for-2.4 07/12] mcf_fec: Drop mcf_fec_can_receive

2015-07-15 Thread Fam Zheng
The semantics of .can_receive requires us to flush the queue explicitly when s->rx_enabled becomes true after it returns 0, but the packet being queued is not meaningful since the guest hasn't activated the card. Let's just drop the packet in this case. Signed-off-by: Fam Zheng Reviewed-by: Stefa

[Qemu-devel] [PATCH v2 for-2.4 02/12] pcnet: Drop pcnet_can_receive

2015-07-15 Thread Fam Zheng
pcnet_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but queuing the packets w

[Qemu-devel] [PATCH v2 for-2.4 12/12] axienet: Flush queued packets when rx is done

2015-07-15 Thread Fam Zheng
eth_can_rx checks s->rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until it is explicitly flushed. So we should flush it when s->rxsize is becoming zero. Squash eth_can_rx semantics into etx_rx and drop

[Qemu-devel] [PATCH v2 for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-15 Thread Fam Zheng
Drop .can_receive and move the semantics into minimac2_rx, by returning 0. That is once minimac2_rx returns 0, incoming packets will be queued until the queue is explicitly flushed. We do this when s->regs[R_STATE0] or s->regs[R_STATE1] is changed in minimac2_write. Also drop the unused trace poi

Re: [Qemu-devel] [PULL 0/6] Migration pull request

2015-07-15 Thread Juan Quintela
ges since commit 661725da09f47eb92d356fac10a4cf3b7ad1f61d: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150714' into > staging (2015-07-14 18:50:17 +0100) > > are available in the git repository at: > > git://github.com/juanquintela/qemu.git tags/migrat

[Qemu-devel] [PATCH v2 for-2.4 04/12] usbnet: Drop usbnet_can_receive

2015-07-15 Thread Fam Zheng
usbnet_receive already drops packet if rndis_state is not RNDIS_DATA_INITIALIZED, and queues packet if in buffer is not available. The only difference is s->dev.config but that is similar to rndis_state. Drop usbnet_can_receive and move these checks to usbnet_receive, so that we don't need to expl

[Qemu-devel] [PATCH v2 for-2.4 10/12] stellaris_enet: Flush queued packets when read done

2015-07-15 Thread Fam Zheng
If s->np reaches 31, the queue will be disabled by peer when it sees stellaris_enet_can_receive() returns false, until we explicitly flushes it which notifies the peer. Do this when guest is done reading all existing data. Move the semantics to stellaris_enet_receive, by returning 0 when the buffe

[Qemu-devel] [PATCH v2 for-2.4 05/12] etsec: Move etsec_can_receive into etsec_receive

2015-07-15 Thread Fam Zheng
When etsec_reset returns 0, peer would queue the packet as if .can_receive returns false. Drop etsec_can_receive and let etsec_receive carry the semantics. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- hw/net/fsl_etsec/etsec.c | 11 +-- hw/net/fsl_etsec/etsec.h | 2 +- hw/n

[Qemu-devel] [PATCH v2 for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-15 Thread Fam Zheng
The BH will be scheduled when etsec->rx_buffer_len is becoming 0, which is the condition of queuing. Signed-off-by: Fam Zheng --- hw/net/fsl_etsec/etsec.c | 11 ++- hw/net/fsl_etsec/etsec.h | 2 ++ hw/net/fsl_etsec/rings.c | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff

  1   2   3   >