Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/27/2015 02:39 PM, Jason Wang wrote: On 07/27/2015 01:27 PM, Yang Hongyang wrote: On 07/23/2015 01:59 PM, Jason Wang wrote: On 07/22/2015 06:55 PM, Yang Hongyang wrote: This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO:

Re: [Qemu-devel] [PATCH RFC v2 08/47] qapi-visit: Fix generated code when schema has forward refs

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:21 PM, Markus Armbruster wrote: >> The visit_type_implicit_FOO() are generated on demand, right before >> their first use. Used by visit_type_STRUCT_fields() when STRUCT has >> base FOO, and by visit_type_UNION() when flat UNION has member a FOO. >> >> If t

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Jason Wang
On 07/27/2015 03:00 PM, Yang Hongyang wrote: > > > On 07/27/2015 02:39 PM, Jason Wang wrote: >> >> >> On 07/27/2015 01:27 PM, Yang Hongyang wrote: >>> On 07/23/2015 01:59 PM, Jason Wang wrote: On 07/22/2015 06:55 PM, Yang Hongyang wrote: > This patch add a net filter between ne

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Jason Wang
On 07/27/2015 01:51 PM, Yang Hongyang wrote: > On 07/27/2015 12:49 PM, Jason Wang wrote: >> >> >> On 07/27/2015 11:54 AM, Yang Hongyang wrote: >>> >>> >>> On 07/27/2015 11:24 AM, Jason Wang wrote: On 07/24/2015 04:04 PM, Yang Hongyang wrote: > Hi Jason, > > On 07/24/201

Re: [Qemu-devel] [PATCH v7 34/42] Postcopy: Use helpers to map pages during migration

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:47], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > In postcopy, the destination guest is running at the same time > as it's receiving pages; as we receive new pages we must put > them into the guests address space atomically to avoid a runnin

Re: [Qemu-devel] [PATCH] virtio-serial: fix ANY_LAYOUT

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 12:11:36PM +0530, Amit Shah wrote: > On (Mon) 27 Jul 2015 [09:37:47], Michael S. Tsirkin wrote: > > Don't assume a specific layout for control messages. > > Required by virtio 1. > > > > Signed-off-by: Michael S. Tsirkin > > Reviewed-by: Amit Shah > > > --- > > hw/char

Re: [Qemu-devel] [PATCH] virtio-serial: fix ANY_LAYOUT

2015-07-27 Thread Jason Wang
On 07/27/2015 02:37 PM, Michael S. Tsirkin wrote: > Don't assume a specific layout for control messages. > Required by virtio 1. > > Signed-off-by: Michael S. Tsirkin > --- > hw/char/virtio-serial-bus.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/char/virtio-se

Re: [Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:48], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Once we're in postcopy the source processors are stopped and memory > shouldn't change any more, so there's no need to look at the dirty > map. > > There are two notes to this: > 1) If we

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/27/2015 03:31 PM, Jason Wang wrote: On 07/27/2015 03:00 PM, Yang Hongyang wrote: On 07/27/2015 02:39 PM, Jason Wang wrote: On 07/27/2015 01:27 PM, Yang Hongyang wrote: On 07/23/2015 01:59 PM, Jason Wang wrote: On 07/22/2015 06:55 PM, Yang Hongyang wrote: This patch add a net fi

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Yang Hongyang
On 07/27/2015 03:37 PM, Jason Wang wrote: On 07/27/2015 01:51 PM, Yang Hongyang wrote: On 07/27/2015 12:49 PM, Jason Wang wrote: On 07/27/2015 11:54 AM, Yang Hongyang wrote: On 07/27/2015 11:24 AM, Jason Wang wrote: On 07/24/2015 04:04 PM, Yang Hongyang wrote: Hi Jason, On 07/24/201

Re: [Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/21/2015 06:43 AM, Eric Blake wrote: >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> A command's 'data' must be a struct type, given either as a >>> dictionary, or as struct type name. >>> >>> Existing test case data-int.json covers simple type 'int'. Add test >

Re: [Qemu-devel] selecting VIRTIO_INPUT and VIRTIO_VGA

2015-07-27 Thread Marc Zyngier
Hi Gerd, On 25/07/15 10:49, Gerd Hoffmann wrote: > Hi, > >>> I agree. Also, as far as I understood Marc, his hope was that the fix to >>> halfway working VGA emulation would be virtio-gpu. > > Note we have both virtio-vga and virtio-gpu-pci. virtio-vga has vga > compatibility built-in, other

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Jason Wang
On 07/27/2015 01:51 PM, Yang Hongyang wrote: > On 07/27/2015 12:49 PM, Jason Wang wrote: >> >> >> On 07/27/2015 11:54 AM, Yang Hongyang wrote: >>> >>> >>> On 07/27/2015 11:24 AM, Jason Wang wrote: On 07/24/2015 04:04 PM, Yang Hongyang wrote: > Hi Jason, > > On 07/24/201

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Jason Wang
On 07/27/2015 03:45 PM, Yang Hongyang wrote: > On 07/27/2015 03:31 PM, Jason Wang wrote: >> >> >> On 07/27/2015 03:00 PM, Yang Hongyang wrote: >>> >>> >>> On 07/27/2015 02:39 PM, Jason Wang wrote: On 07/27/2015 01:27 PM, Yang Hongyang wrote: > On 07/23/2015 01:59 PM, Jason Wang

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Jason Wang
On 07/27/2015 03:49 PM, Yang Hongyang wrote: > On 07/27/2015 03:37 PM, Jason Wang wrote: >> >> >> On 07/27/2015 01:51 PM, Yang Hongyang wrote: >>> On 07/27/2015 12:49 PM, Jason Wang wrote: On 07/27/2015 11:54 AM, Yang Hongyang wrote: > > > On 07/27/2015 11:24 AM, Jason

Re: [Qemu-devel] [PATCH RFC v2 19/47] qapi: Generated code cleanup

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Clean up white-space, brace placement, and superfluous > > Incomplete sentence. I bet it's because your editor line-wrapped, and > the rest of your sentence was something like '#ifndef in a .c file.' > (see [1] below), then

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Yang Hongyang
On 07/27/2015 03:53 PM, Jason Wang wrote: On 07/27/2015 01:51 PM, Yang Hongyang wrote: On 07/27/2015 12:49 PM, Jason Wang wrote: On 07/27/2015 11:54 AM, Yang Hongyang wrote: On 07/27/2015 11:24 AM, Jason Wang wrote: On 07/24/2015 04:04 PM, Yang Hongyang wrote: Hi Jason, On 07/24/201

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3] pci: allow 0 address for PCI IO/MEM regions

2015-07-27 Thread Laurent Vivier
Alex, could you ACK this patch ? It's not perfect and it will be removed later, but for the moment it allows to hotplug PCI card in pseries. Laurent On 24/07/2015 10:35, Laurent Vivier wrote: > Some kernels program a 0 address for io regions. PCI 3.0 spec > section 6.2.5.1 doesn't seem to disal

Re: [Qemu-devel] [PATCH for-2.5 01/10] tcg/optimize: optimize temps tracking

2015-07-27 Thread Paolo Bonzini
On 24/07/2015 18:30, Aurelien Jarno wrote: > The tcg_temp_info structure uses 24 bytes per temp. Now that we emulate > vector registers on most guests, it's not uncommon to have more than 100 > used temps. This means we have initialize more than 2kB at least twice > per TB, often more when there

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Yang Hongyang
On 07/27/2015 04:06 PM, Jason Wang wrote: On 07/27/2015 03:49 PM, Yang Hongyang wrote: On 07/27/2015 03:37 PM, Jason Wang wrote: On 07/27/2015 01:51 PM, Yang Hongyang wrote: On 07/27/2015 12:49 PM, Jason Wang wrote: On 07/27/2015 11:54 AM, Yang Hongyang wrote: On 07/27/2015 11:24 AM,

Re: [Qemu-devel] [PATCH for-2.5 03/10] tcg/optimize: track const/copy status separately

2015-07-27 Thread Paolo Bonzini
On 24/07/2015 18:30, Aurelien Jarno wrote: > Use two bools to track constants and copies instead of an enum. > > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno > --- > tcg/optimize.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --gi

Re: [Qemu-devel] [PATCH v2] hw/arm/virt: Add high MMIO PCI region, 2G in size

2015-07-27 Thread Igor Mammedov
On Fri, 24 Jul 2015 14:08:33 +0300 Pavel Fedin wrote: > This large region is necessary for some devices like ivshmem and video cards > > Signed-off-by: Pavel Fedin Looks like this patch misses respective ACPI hunks, Cold you add them to hw/arm/virt-acpi-build.c:acpi_dsdt_add_pci(), pls? > ---

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/27/2015 04:01 PM, Jason Wang wrote: On 07/27/2015 03:45 PM, Yang Hongyang wrote: On 07/27/2015 03:31 PM, Jason Wang wrote: On 07/27/2015 03:00 PM, Yang Hongyang wrote: On 07/27/2015 02:39 PM, Jason Wang wrote: On 07/27/2015 01:27 PM, Yang Hongyang wrote: On 07/23/2015 01:59 PM,

Re: [Qemu-devel] BIOS regression since v2.3.0 (misaligned longword i/o to address 0xffff)

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 08:36, Stefan Weil wrote: > commit 457ba42878bd9f704e5a6c1c7bc7fcced686fe4e > Author: Paolo Bonzini > Date: Thu May 15 13:22:28 2014 +0200 > > smm: complete SMM setup > > SMI generation requires two bits to be set in PIIX4, one for APMC > interrupts specifically and

Re: [Qemu-devel] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Hannes Reinecke
On 07/27/2015 10:51 AM, Salva Peiró wrote: > This patch fixes a QEMU SEGFAULT when a write operation is performed on > the memory region of the PCI BAR 3 (base address space). > When a writeb(0xe000) is performed the .write function is invoked to > handle the write access, however, since the .w

Re: [Qemu-devel] [PATCH for-2.5 01/10] tcg/optimize: optimize temps tracking

2015-07-27 Thread Aurelien Jarno
On 2015-07-27 10:21, Paolo Bonzini wrote: > > > On 24/07/2015 18:30, Aurelien Jarno wrote: > > The tcg_temp_info structure uses 24 bytes per temp. Now that we emulate > > vector registers on most guests, it's not uncommon to have more than 100 > > used temps. This means we have initialize more th

Re: [Qemu-devel] [PATCH for-2.5 03/10] tcg/optimize: track const/copy status separately

2015-07-27 Thread Aurelien Jarno
On 2015-07-27 10:25, Paolo Bonzini wrote: > > > On 24/07/2015 18:30, Aurelien Jarno wrote: > > Use two bools to track constants and copies instead of an enum. > > > > Cc: Richard Henderson > > Signed-off-by: Aurelien Jarno > > --- > > tcg/optimize.c | 30 +++--- > > 1

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Jason Wang
On 07/27/2015 04:39 PM, Yang Hongyang wrote: > On 07/27/2015 04:01 PM, Jason Wang wrote: >> >> On 07/27/2015 03:45 PM, Yang Hongyang wrote: >>> On 07/27/2015 03:31 PM, Jason Wang wrote: On 07/27/2015 03:00 PM, Yang Hongyang wrote: > > > On 07/27/2015 02:39 PM, Jason Wan

Re: [Qemu-devel] [PATCH RFC v2 21/47] qapi: New QAPISchema intermediate reperesentation

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> The QAPI code generators work with a syntax tree (nested dictionaries) >> plus a few symbol tables (also dictionaties) on the side. > > s/dictionaties/dictionaries/ Will fix. >> They have clearly outgrown these simple data

Re: [Qemu-devel] [PATCH] acpi: fix pvpanic device is not shown in ui

2015-07-27 Thread Igor Mammedov
On Sun, 26 Jul 2015 11:00:51 +0300 Gal Hammer wrote: > Commit 2332333c added a _STA method that hides the device. The fact > that the device is not shown in the gui make it harder to install its > Windows' device. > > https://bugzilla.redhat.com/show_bug.cgi?id=1238141 > > Signed-off-by: Gal Ha

Re: [Qemu-devel] BIOS regression since v2.3.0 (misaligned longword i/o to address 0xffff)

2015-07-27 Thread Stefan Weil
Am 27.07.2015 um 10:46 schrieb Paolo Bonzini: > On 27/07/2015 08:36, Stefan Weil wrote: >> commit 457ba42878bd9f704e5a6c1c7bc7fcced686fe4e >> Author: Paolo Bonzini >> Date: Thu May 15 13:22:28 2014 +0200 >> >> smm: complete SMM setup >> >> SMI generation requires two bits to be set in PI

Re: [Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Igor Mammedov
On Fri, 24 Jul 2015 20:16:00 +0200 Laszlo Ersek wrote: > Otherwise on reboot firmware might think (due to APMC_EN remaining set > from the previous boot) that SMI support is absent. Reviewed-by: Igor Mammedov > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Gerd Hoffmann > Cc: Paolo B

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> New methods c_name(), c_type(), c_null(), json_type(), >> alternate_qtype(). >> >> Signed-off-by: Markus Armbruster >> --- >> scripts/qapi.py | 72 >> +++-- >> 1 file ch

Re: [Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM

2015-07-27 Thread Igor Mammedov
On Fri, 24 Jul 2015 20:16:01 +0200 Laszlo Ersek wrote: > Commit fba72476c6 ("ich9: add smm_enabled field and arguments") detached > SMM availability from kvm_enabled(). However, the comment in pm_reset() > was not updated; let's do it now. > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc:

Re: [Qemu-devel] BIOS regression since v2.3.0 (misaligned longword i/o to address 0xffff)

2015-07-27 Thread Stefan Weil
Am 27.07.2015 um 11:32 schrieb Stefan Weil: > Am 27.07.2015 um 10:46 schrieb Paolo Bonzini: >> On 27/07/2015 08:36, Stefan Weil wrote: >>> commit 457ba42878bd9f704e5a6c1c7bc7fcced686fe4e >>> Author: Paolo Bonzini >>> Date: Thu May 15 13:22:28 2014 +0200 >>> >>> smm: complete SMM setup >>> >>

[Qemu-devel] [PATCH V4 0/3] Set correct blk feature for virtio 1.0

2015-07-27 Thread Jason Wang
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 through: 1) let get_features() can fail 2) fail the get_features() when both scsi and virti

[Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Jason Wang
SCSI passthrough was no longer supported in virtio 1.0, so this patch fail the get_features() when both 1.0 and scsi is set. And also only advertise VIRTIO_BLK_F_SCSI for legacy virtio-blk device. Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 10 +- 1 file changed, 9 insertions(+

[Qemu-devel] [PATCH V4 1/3] virtio: get_features() can fail

2015-07-27 Thread Jason Wang
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/virtio-net.c | 3 ++- hw/scsi/vhost-scsi.c| 3 ++- hw/scsi/

[Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Jason Wang
Chapter 6.3 of spec said " Transitional devices MUST offer, and if offered by the device transitional drivers MUST accept the following: VIRTIO_F_ANY_LAYOUT (27) " So this patch only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-bl...@nongnu.org Signed-o

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> New methods c_name(), c_type(), c_null(), json_type(), >> alternate_qtype(). >> >> Signed-off-by: Markus Armbruster >> --- >> scripts/qapi.py | 72 >> +++-- >> 1 file ch

Re: [Qemu-devel] [PATCH v7 18/42] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2015-07-27 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:31], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > The state of the postcopy process is managed via a series of messages; > >* Add wrappers and handlers for sending/receiving these message

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/27/2015 05:16 PM, Jason Wang wrote: [...] I think this won't work for the buffer case? If we want the buffer case to work under this, we should modify the generic netdev layer code, to check the return value of the filter function call. But checking return value is rather simpler than a n

Re: [Qemu-devel] [Bug 1469946] Re: guest can't get IP when create guest with bridge.

2015-07-27 Thread Stefan Hajnoczi
On Mon, Jul 20, 2015 at 07:46:55AM -, chao zhou wrote: > Does the bug's patch has merged in qemu.git? > I test the latest qemu.git(commit:5b5e8cdd7da7a2214dd062afff5b866234aab228), > the bug still can reproduce. Please git fetch origin and try again. pgpomCmzPUD0l.pgp Description: PGP signa

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Stefan Hajnoczi
On Tue, Jul 21, 2015 at 10:49:29AM +0100, Stefan Hajnoczi wrote: > On Tue, Jul 21, 2015 at 08:13:42AM +0200, Jan Kiszka wrote: > > On 2015-07-20 17:01, Stefan Hajnoczi wrote: > > > On Mon, Jul 20, 2015 at 2:12 PM, Vasiliy Tolstov > > > wrote: > > >> 2015-07-20 14:55 GMT+03:00 zhanghailiang > > >

Re: [Qemu-devel] [PATCH for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 04:24, Wen Congyang wrote: > +/* Wait for one thread to report a quiescent state and try again. > + * Release rcu_registry_lock, so rcu_(un)register_thread() doesn't > + * wait too much time. Note: rcu_unregister_thread() may remove > + * the node fro

Re: [Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 08:25, arei.gong...@huawei.com wrote: > +++ b/hw/scsi/vhost-scsi.c > @@ -117,7 +117,7 @@ static int vhost_scsi_start(VHostSCSI *s) > * enabling/disabling irqfd. > */ > for (i = 0; i < s->dev.nvqs; i++) { > -vhost_virtqueue_mask(&s->dev, vdev, i, false); > +

Re: [Qemu-devel] [PATCH v2] main-loop: fix qemu_notify_event for aio_notify optimization

2015-07-27 Thread Stefan Hajnoczi
On Fri, Jul 24, 2015 at 01:42:55PM +0200, Paolo Bonzini wrote: > aio_notify can be optimized away, and in fact almost always will. However, > qemu_notify_event is used in places where this is incorrect---most notably, > when handling SIGTERM. When aio_notify is optimized away, it is possible that

Re: [Qemu-devel] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 10:57, Hannes Reinecke wrote: > Acked-by: Hannes Reinecke Thanks, applied for 2.4. Paolo

Re: [Qemu-devel] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-27 Thread Stefan Hajnoczi
On Fri, Jul 24, 2015 at 11:37:50AM -0400, Programmingkid wrote: > > On Jul 24, 2015, at 11:00 AM, Stefan Hajnoczi wrote: > > > On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: > >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t > >> mediaIterator, char *bsdPath, CFI

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 11:49, Jason Wang wrote: > +if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { No double underscores in userspace code. Longstanding so it can be fixed after 2.4 is out---but please remember to do it. > +if (s->conf.scsi) { > +error_setg(errp, "Virt

Re: [Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 11:49, Jason Wang wrote: > So this patch only clear VIRTIO_F_LAYOUT for legacy device. > > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Cc: qemu-bl...@nongnu.org > Signed-off-by: Jason Wang > --- > hw/block/virtio-blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [Qemu-devel] [PATCH 0/9] For QEMU 2.5: Add a net filter and a netbuffer plugin based on the filter

2015-07-27 Thread Daniel P. Berrange
On Sun, Jul 26, 2015 at 10:13:55PM +0800, Yang Hongyang wrote: > Thank you, and sorry to Daniel that I forgot to CC you... > > On 07/25/2015 01:06 PM, zhanghailiang wrote: > [...] > >> > >> +--+ +-+ > >> +--+ |filter| |frontend

Re: [Qemu-devel] [PATCH for 2.4 2/3] net/dp8393x: specify memory operations for PROM PROM

2015-07-27 Thread Paolo Bonzini
On 26/07/2015 22:35, Hervé Poussineau wrote: > +memory_region_init_ram(&s->prom, OBJECT(dev), > + "dp8393x-prom", SONIC_PROM_SIZE, &local_err); > +if (local_err) { > +error_propagate(errp, local_err); > +return; > +} > +memory_region_set_r

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > Hi Jason, > > On 07/24/2015 10:12 AM, Jason Wang wrote: > > > > > >On 07/24/2015 10:04 AM, Dong, Eddie wrote: > >>Hi Stefan: > >>Thanks for your comments! > >> > >>>On Mon, Jul 20, 2015 at 02:42:33PM +0800, Li Zhijian wrote: > We are plannin

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Cornelia Huck
On Mon, 27 Jul 2015 12:28:23 +0200 Paolo Bonzini wrote: > On 27/07/2015 11:49, Jason Wang wrote: > > +if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { > > No double underscores in userspace code. Longstanding so it can be > fixed after 2.4 is out---but please remember to do it. Th

Re: [Qemu-devel] [PATCH for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-27 Thread Wen Congyang
On 07/27/2015 06:17 PM, Paolo Bonzini wrote: > > > On 27/07/2015 04:24, Wen Congyang wrote: >> +/* Wait for one thread to report a quiescent state and try again. >> + * Release rcu_registry_lock, so rcu_(un)register_thread() doesn't >> + * wait too much time. Note: rcu_unr

Re: [Qemu-devel] [PATCH for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 12:44, Wen Congyang wrote: > > * rcu_register_thread() may add nodes to ®istry; it will not > > * wake up synchronize_rcu, but that is okay because at least > > another > > * thread must exit its RCU read-side critical section before > > * synchr

Re: [Qemu-devel] [PATCH for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-27 Thread Wen Congyang
On 07/27/2015 06:52 PM, Paolo Bonzini wrote: > > > On 27/07/2015 12:44, Wen Congyang wrote: >>> * rcu_register_thread() may add nodes to ®istry; it will not >>> * wake up synchronize_rcu, but that is okay because at least >>> another >>> * thread must exit its RCU read

[Qemu-devel] [PATCH v2 for-2.5 12/12] tcg: update README about size changing ops

2015-07-27 Thread Aurelien Jarno
Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/README | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tcg/README b/tcg/README index 61b3899..a22f251 100644 --- a/tcg/README +++ b/tcg/README @@ -466,13 +466,25 @@ On a 32 bit target, all 64 bit

[Qemu-devel] [PATCH v2 for-2.5 05/12] tcg/optimize: track const/copy status separately

2015-07-27 Thread Aurelien Jarno
Instead of using an enum which could be either a copy or a const, track them separately. Constants are tracked through a bool. Copies are tracked by initializing temp's next_copy and prev_copy to itself, allowing to simplify the code a bit. Cc: Richard Henderson Signed-off-by: Aurelien Jarno ---

[Qemu-devel] [PATCH v2 for-2.5 11/12] tcg/optimize: do not remember garbage high bits for 32-bit ops

2015-07-27 Thread Aurelien Jarno
Now that we have real size changing ops, we don't need to mark high bits of the destination as garbage. The goal of the optimizer is to predict the value of the temps (and not of the registers) and do simplifications when possible. The problem there is therefore not the fact that those bits are not

[Qemu-devel] [PATCH v2 for-2.5 08/12] tcg: don't abuse TCG type in tcg_gen_trunc_shr_i64_i32

2015-07-27 Thread Aurelien Jarno
The tcg_gen_trunc_shr_i64_i32 function takes a 64-bit argument and returns a 32-bit value. Directly call tcg_gen_op3 with the correct types instead of calling tcg_gen_op3i_i32 and abusing the TCG types. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/tcg-op.c | 4 ++-- 1 fi

[Qemu-devel] [PATCH v2 for-2.5 07/12] tcg: rename trunc_shr_i32 into trunc_shr_i64_i32

2015-07-27 Thread Aurelien Jarno
The op is sometimes named trunc_shr_i32 and sometimes trunc_shr_i64_i32, and the name in the README doesn't match the name offered to the frontends. Always use the long name to make it clear it is a size changing op. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/README

[Qemu-devel] [PATCH v2 for-2.5 03/12] tcg/optimize: optimize temps tracking

2015-07-27 Thread Aurelien Jarno
The tcg_temp_info structure uses 24 bytes per temp. Now that we emulate vector registers on most guests, it's not uncommon to have more than 100 used temps. This means we have initialize more than 2kB at least twice per TB, often more when there is a few goto_tb. Instead used a TCGTempSet bit arra

[Qemu-devel] [PATCH v2 for-2.5 00/12] tcg: improve optimizer

2015-07-27 Thread Aurelien Jarno
This patchset improves the optimizer in 3 different ways: - by optimizing temp tracking using a bit array - by allowing constants to have copy - by differentiating 32 <-> 64 bits conversions from moves in the frontend by using specific instructions The latter change introduces 2 new mandator

[Qemu-devel] [PATCH v2 for-2.5 10/12] tcg/optimize: add optimizations for ext_i32_i64 and extu_i32_i64 ops

2015-07-27 Thread Aurelien Jarno
They behave the same as ext32s_i64 and ext32u_i64 from the constant folding and zero propagation point of view, except that they can't be replaced by a mov, so we don't compute the affected value. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/optimize.c | 13 + 1 file

[Qemu-devel] [PATCH for-2.4 02/12] tcg: mark temps as mem_coherent = 0 for mov with a constant

2015-07-27 Thread Aurelien Jarno
When a constant has to be loaded in a mov op, we fail to set mem_coherent = 0. This patch fixes that. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 9a2508b..0892a9b 100644 --- a/tcg/tcg.c +++ b/t

[Qemu-devel] [PATCH v2 for-2.5 04/12] tcg/optimize: add temp_is_const and temp_is_copy functions

2015-07-27 Thread Aurelien Jarno
Add two accessor functions temp_is_const and temp_is_copy, to make the code more readable and make code change easier. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/optimize.c | 131 ++--- 1 file changed, 60 insertions(+), 71 del

[Qemu-devel] [PATCH v2 for-2.5 09/12] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-27 Thread Aurelien Jarno
Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a 32-bit value is always converted to a 64-bit value and not propagated through the register allocator or the optimizer. Cc: Andrzej Zaborowski Cc: Alexander Graf Cc: Blue Swirl Cc: Claudio Fontana Cc: Claudio Fontana Cc: Richa

[Qemu-devel] [PATCH v2 for-2.5 06/12] tcg/optimize: allow constant to have copies

2015-07-27 Thread Aurelien Jarno
Now that copies and constants are tracked separately, we can allow constant to have copies, deferring the choice to use a register or a constant to the register allocation pass. This prevent this kind of regular constant reloading: -OUT: [size=338] +OUT: [size=298] mov-0x4(%r14),%ebp tes

[Qemu-devel] [PATCH for-2.4 01/12] tcg: correctly mark dead inputs for mov with a constant

2015-07-27 Thread Aurelien Jarno
When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark a temp as dead if the liveness analysis hints so. This fixes the following assert when configure with --enable-debug-tcg: qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type == TEMP_VAL_DEAD' failed.

[Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region

2015-07-27 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards Signed-off-by: Pavel Fedin --- Changes since v2: - Region size increased to 512G - Added ACPI description Changes since v1: - Region address changed to 512G, leaving more space for RAM --- hw/arm/virt-acpi-build.c | 8

[Qemu-devel] PING: [PATCH v4 0/2] QOM: object_property_add() performance improvement

2015-07-27 Thread Pavel Fedin
Ping!!! Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: qemu-devel-bounces+p.fedin=samsung@nongnu.org [mailto:qemu-devel- > bounces+p.fedin=samsung@nongnu.org] On Behalf Of Pavel Fedin > Sent: Tuesday, July 14, 20

Re: [Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start

2015-07-27 Thread Gonglei
On 2015/7/27 18:20, Paolo Bonzini wrote: > > > On 27/07/2015 08:25, arei.gong...@huawei.com wrote: >> +++ b/hw/scsi/vhost-scsi.c >> @@ -117,7 +117,7 @@ static int vhost_scsi_start(VHostSCSI *s) >> * enabling/disabling irqfd. >> */ >> for (i = 0; i < s->dev.nvqs; i++) { >> -

Re: [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement

2015-07-27 Thread Daniel P. Berrange
On Tue, Jul 14, 2015 at 12:38:59PM +0300, Pavel Fedin wrote: > The function originally behaves very badly when adding properties with "[*]" > suffix. Normally these are used for numbering IRQ pins. In order to find the > correct starting number the function started from zero and checked for > dupli

Re: [Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: > > > On 27/07/2015 11:49, Jason Wang wrote: > > So this patch only clear VIRTIO_F_LAYOUT for legacy device. > > > > Cc: Stefan Hajnoczi > > Cc: Kevin Wolf > > Cc: qemu-bl...@nongnu.org > > Signed-off-by: Jason Wang > > --- > > h

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 12:39:44PM +0200, Cornelia Huck wrote: > On Mon, 27 Jul 2015 12:28:23 +0200 > Paolo Bonzini wrote: > > > On 27/07/2015 11:49, Jason Wang wrote: > > > +if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { > > > > No double underscores in userspace code. Longstand

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread zhanghailiang
On 2015/7/27 18:13, Stefan Hajnoczi wrote: On Tue, Jul 21, 2015 at 10:49:29AM +0100, Stefan Hajnoczi wrote: On Tue, Jul 21, 2015 at 08:13:42AM +0200, Jan Kiszka wrote: On 2015-07-20 17:01, Stefan Hajnoczi wrote: On Mon, Jul 20, 2015 at 2:12 PM, Vasiliy Tolstov wrote: 2015-07-20 14:55 GMT+03:

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 12:28:23PM +0200, Paolo Bonzini wrote: > > > On 27/07/2015 11:49, Jason Wang wrote: > > +if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { > > No double underscores in userspace code. Longstanding so it can be > fixed after 2.4 is out---but please remember to

Re: [Qemu-devel] [PATCH v2 for-2.5 05/12] tcg/optimize: track const/copy status separately

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 12:56, Aurelien Jarno wrote: > temps[dst].next_copy = temps[src].next_copy; > temps[dst].prev_copy = src; > temps[temps[dst].next_copy].prev_copy = dst; > temps[src].next_copy = dst; This is: dst->next = src->next; dst->prev = src; d

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 13:26, Michael S. Tsirkin wrote: >>> > > +if (s->conf.scsi) { >>> > > +error_setg(errp, "Virtio 1.0 does not support scsi >>> > > passthrough!"); >> > >> > Unclear error message, as one would expect SCSI passthrough not to work >> > anyway for e.g. a disk backe

Re: [Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 13:22, Michael S. Tsirkin wrote: > > This patch is unnecessary, since the feature is added back below under > > "if (__virtio_has_feature(features, VIRTIO_F_VERSION_1))". > > It's needed so we can apply > virtio: set any_layout in virtio core Ah, okay. Paolo

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Samuel Thibault
Hello, I'm just back from vacancy with no Internet access, so will answer shortly :) Samuel

Re: [Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 13:11, Gonglei wrote: > On 2015/7/27 18:20, Paolo Bonzini wrote: >> >> >> On 27/07/2015 08:25, arei.gong...@huawei.com wrote: >>> +++ b/hw/scsi/vhost-scsi.c >>> @@ -117,7 +117,7 @@ static int vhost_scsi_start(VHostSCSI *s) >>> * enabling/disabling irqfd. >>> */ >>>

[Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Paolo Bonzini
Tweak the error message so that it does not mention SCSI passthrough. That can be confusing because you can have scsi=on even for file-backed image, which obviously do not support SCSI passthrough at the block layer level. Signed-off-by: Paolo Bonzini --- hw/block/virtio-blk.c | 2 +- 1 file ch

Re: [Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start

2015-07-27 Thread Gonglei
On 2015/7/27 19:35, Paolo Bonzini wrote: > > > On 27/07/2015 13:11, Gonglei wrote: >> On 2015/7/27 18:20, Paolo Bonzini wrote: >>> >>> >>> On 27/07/2015 08:25, arei.gong...@huawei.com wrote: +++ b/hw/scsi/vhost-scsi.c @@ -117,7 +117,7 @@ static int vhost_scsi_start(VHostSCSI *s)

Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement

2015-07-27 Thread Daniel P. Berrange
On Tue, Jul 14, 2015 at 12:39:01PM +0300, Pavel Fedin wrote: > Avoid repetitive lookup of every property in array starting from 0 by adding > one more property which caches last used index. Every time an array is > expanded the index is picked up from this cache. > > The property is a uint32_t and

[Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()

2015-07-27 Thread Paolo Bonzini
This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event(). Signed

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

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 11:49, 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 through: 1) > let get_features() can fai

[Qemu-devel] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread John Snow
The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-07-24 13:07:10 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/cve-2015-5154-pull-request

[Qemu-devel] [PULL 2/3] ide/atapi: Fix START STOP UNIT command completion

2015-07-27 Thread John Snow
From: Kevin Wolf The command must be completed on all code paths. START STOP UNIT with pwrcnd set should succeed without doing anything. Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hw/ide/atapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c inde

[Qemu-devel] [PULL 1/3] ide: Check array bounds before writing to io_buffer (CVE-2015-5154)

2015-07-27 Thread John Snow
From: Kevin Wolf If the end_transfer_func of a command is called because enough data has been read or written for the current PIO transfer, and it fails to correctly call the command completion functions, the DRQ bit in the status register and s->end_transfer_func may remain set. This allows the

[Qemu-devel] [PULL 3/3] ide: Clear DRQ after handling all expected accesses

2015-07-27 Thread John Snow
From: Kevin Wolf This is additional hardening against an end_transfer_func that fails to clear the DRQ status bit. The bit must be unset as soon as the PIO transfer has completed, so it's better to do this in a central place instead of duplicating the code in all commands (and forgetting it in so

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Stefan Priebe - Profihost AG
Am 27.07.2015 um 14:01 schrieb John Snow: > The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2015-07-24 13:07:10 +0100) > > are available in the git repository at: > > https://g

Re: [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Cornelia Huck
On Mon, 27 Jul 2015 13:41:32 +0200 Paolo Bonzini wrote: > Tweak the error message so that it does not mention SCSI passthrough. That > can be confusing because you can have scsi=on even for file-backed image, > which obviously do not support SCSI passthrough at the block layer level. > > Signed

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread John Snow
On 07/27/2015 08:10 AM, Stefan Priebe - Profihost AG wrote: > > Am 27.07.2015 um 14:01 schrieb John Snow: >> The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >> staging (2015-07-24 13:07:10

Re: [Qemu-devel] [PATCH 1/9] netdev: Add a net filter

2015-07-27 Thread Thomas Huth
On 24/07/15 12:55, Yang Hongyang wrote: > This patch add a net filter between network backend and NIC devices. > All packets will pass by this filter. > TODO: > multiqueue support. > > +--+ +-+ > +--+ |filter| |frontend(NIC)|

[Qemu-devel] [PATCH] kvm_ppc: remove kvmppc_timer_hack

2015-07-27 Thread Paolo Bonzini
QEMU does have an I/O thread now, that can be interrupted at any time because the VCPU thread runs outside the iothread mutex. Therefore, the kvmppc_timer_hack is obsolete. Remove it. Signed-off-by: Paolo Bonzini --- Notes: Untested! hw/ppc/e500.c| 4 hw/ppc/ppc

Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement

2015-07-27 Thread Markus Armbruster
Pavel Fedin writes: > Avoid repetitive lookup of every property in array starting from 0 by adding > one more property which caches last used index. Every time an array is > expanded the index is picked up from this cache. > > The property is a uint32_t and its name is name of the array plus '#'

Re: [Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-27 Thread Eric Blake
On 07/27/2015 01:50 AM, Markus Armbruster wrote: >>> This, on the other hand, seems valid from the wire format (it will >>> always be a dictionary). I guess the problem is that we generate a C >>> function signature based by calling out each member of the dictionary - >>> but how do you do that f

  1   2   3   4   >