[Qemu-devel] [PATCH for 2.3 2/2] virtio-net: fix the upper bound when trying to delete queues

2015-03-19 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net

[Qemu-devel] [PATCH for 2.3 1/2] virtio-net: validate backend queue numbers against bus limitation

2015-03-19 Thread Jason Wang
We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation. Fixing this by doing the validation and fail early. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 7 +++ 1 file changed

[Qemu-devel] [Bug 1401798] Re: Qemu 2.2.0 savevm crash.

2015-03-19 Thread changlimin
I think I get the reason. >From Qemu 2.2.0, in qcow2_open: l2_cache_size = >MAX(DEFAULT_L2_CACHE_BYTE_SIZE/s->cluster_size, MIN_L2_CACHE_SIZE); Here DEFAULT_L2_CACHE_BYTE_SIZE=1M, MIN_L2_CACHE_SIZE=1. If the cluster_size < 1M, the l2_cache_size will be greater than 1, it is ok. If the cluster

Re: [Qemu-devel] [PATCH V4 00/19] Support more virtio queues

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 01:24:53PM +0800, Jason Wang wrote: > > > On Wed, Mar 18, 2015 at 8:58 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 18, 2015 at 05:34:50PM +0800, Jason Wang wrote: > >> We current limit the max virtio queues to 64. This is not sufficient > >> to support multiqueue devices

Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline

2015-03-19 Thread Gerd Hoffmann
Hi, > +case QEMU_OPTION_fwcfg: > +opts = qemu_opts_parse(qemu_find_opts("fw_cfg"), optarg, 0); > +if (opts == NULL) { > +exit(1); > +} That is fine here. > +fw_cfg_option_add(opts); That should be

[Qemu-devel] [PATCH 1/1] virtio: serial: expose a 'guest_writable' callback for users

2015-03-19 Thread Amit Shah
Users of virtio-serial may want to know when a port becomes writable. A port can stop accepting writes if the guest port is open but not being read from. In this case, data gets queued up in the virtqueue, and after the vq is full, writes to the port do not succeed. When the guest reads off a vq

Re: [Qemu-devel] [PATCH V4 00/19] Support more virtio queues

2015-03-19 Thread Jason Wang
On Thu, Mar 19, 2015 at 3:32 PM, Michael S. Tsirkin wrote: On Thu, Mar 19, 2015 at 01:24:53PM +0800, Jason Wang wrote: On Wed, Mar 18, 2015 at 8:58 PM, Michael S. Tsirkin wrote: >On Wed, Mar 18, 2015 at 05:34:50PM +0800, Jason Wang wrote: >> We current limit the max virtio queues to

Re: [Qemu-devel] [PATCH 2/4] virtio-input: core code & base class

2015-03-19 Thread Gerd Hoffmann
Hi, > > > if yes we'll eventually want to take > > > the header from there. > > > > Yes, we can do that, for both linux input layer and virtio-input (once > > merged upstream) headers, then go build this on non-linux hosts too. > > > > I'd suggest to do that as incremental patch, after gue

Re: [Qemu-devel] [v5 12/12] migration: Add commands to set and query parameter

2015-03-19 Thread Markus Armbruster
"Li, Liang Z" writes: >> > +# >> > +# Migration parameter information >> > +# >> > +# @compress-level: compression level >> > +# >> > +# @compress-threads: compression thread count # # >> > +@decompress-threads: decompression thread count # # Since: 2.3 ## { >> > +'union': 'MigrationParameterStat

Re: [Qemu-devel] [PATCH V2] pc-dimm: Add description for device list.

2015-03-19 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-19 Thread Stefan Assmann
On 18.03.2015 23:06, Shannon Nelson wrote: > On Wed, Mar 18, 2015 at 3:01 PM, Shannon Nelson > wrote: >> >> >> On Wed, Mar 18, 2015 at 8:40 AM, jacob jacob wrote: >>> >>> On Wed, Mar 18, 2015 at 11:24 AM, Bandan Das wrote: Actually, Stefan suggests that support for this card is still s

Re: [Qemu-devel] [PATCH v2 5/5] fw_cfg: insert fw_cfg file blobs via qemu cmdline

2015-03-19 Thread Markus Armbruster
[...] > The one other thing I may not have comprehended was the part about > >> Which reminds me: Going for QemuOpts would be very useful (gives >> -readconfig support), and it would solve the init order issue too. >> Instead of having your custom storage you just let QemuOpts parse and >> store t

Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-19 Thread Michael Tokarev
12.03.2015 17:57, Paolo Bonzini wrote: > monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP > command add_fd). Free it. Applied to -trivial, with a tiny change: > +fdinfo = monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true : > false, > +

Re: [Qemu-devel] [PATCH v3] vl: fix resource leak with monitor_fdset_add_fd

2015-03-19 Thread Michael Tokarev
15.03.2015 12:16, Paolo Bonzini wrote: > monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP > command add_fd). Free it. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: line length [Fam], pass &error_abort [Shannon] > v2->v3: use "!!" instead of "? true : false" [Mar

Re: [Qemu-devel] [PATCH] qtest/ahci: Fix clang 3.5.0 error

2015-03-19 Thread Michael Tokarev
17.03.2015 23:58, John Snow wrote: > A thinko that clang 3.5.0 caught. > Thankfully does not introduce any new failures. Applied to trivial, changing subject to the one suggested by Markus. Thanks, /mjt

Re: [Qemu-devel] [PATCH v2] Fix typos in comments

2015-03-19 Thread Michael Tokarev
17.03.2015 17:53, Viswesh wrote: > The commit message is changed per review comments of Peter Maydell. > This should be good now. Applied to -trivial, without the above comment. Actually it was enough to send the first version, it's easy to fix up commit comment than to resend single patches like

Re: [Qemu-devel] [PATCH] hmp: Fix texinfo documentation

2015-03-19 Thread Michael Tokarev
10.03.2015 15:23, Markus Armbruster wrote: > Several issues: > > * Commands i and o lack @item. Their one-liner documentation gets > squashed into the preceding command print. Add the obvious @item. > > * Commands i, o and cpu-add lack @findex. The function index doesn't > have them. Add

Re: [Qemu-devel] [PATCH] elf-loader: Fix truncation warning from coverity

2015-03-19 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] elf-loader: Add missing error handling for call of lseek

2015-03-19 Thread Michael Tokarev
Applied to trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix resource leak

2015-03-19 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt, who don't really expect another thanks! to his thanks!.. ;)

[Qemu-devel] How to emit errors with nice location information (was: [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline)

2015-03-19 Thread Markus Armbruster
"Gabriel L. Somlo" writes: > On Tue, Mar 17, 2015 at 12:28:20PM +0100, Laszlo Ersek wrote: >> > + >> > +void fw_cfg_option_add(QemuOpts *opts) >> > +{ >> > +const char *name = qemu_opt_get(opts, "name"); >> > +const char *file = qemu_opt_get(opts, "file"); >> > + >> > +if (name == NUL

Re: [Qemu-devel] [PATCH for-2.4 0/8] memory: enable unlocked PIO/MMIO in KVM

2015-03-19 Thread Paolo Bonzini
On 18/03/2015 16:04, Jan Kiszka wrote: > On 2015-03-18 15:52, Paolo Bonzini wrote: >> >> >> On 18/03/2015 15:33, Jan Kiszka wrote: >>> Just in time: I'm planning to rebase our queue soon, specifically to >>> benefit from RCU support. Will let you know if it works on top of this >>> series. >> >>

[Qemu-devel] [PULL 07/24] qom: Fix warning from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: qom/cpu.c:99:5: warning: returning void-valued expression Cc: Andreas Färber Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- qom/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/cpu.c b/qom/cpu.c index 970377e..108b

[Qemu-devel] [PULL 00/24] Trivial patches for 2015-03-19

2015-03-19 Thread Michael Tokarev
Here's another trivial-patches pull request, it comes very close to the release because I was too busy last 2 weeks to do anything useful with the trivial-patches queue, and because it accumulated quite a few patches since that. Here, there are many code defects fixes found by coverity and sparse,

[Qemu-devel] [PULL 16/24] pc-dimm: Add description for device list.

2015-03-19 Thread Michael Tokarev
From: Paulo Vital The pc-dimm option presented on device list (by argument "-device \?") is the unique option that don't have any information about it. This patch adds a description for the pc-dimm device to help users to identify it. Signed-off-by: Paulo Vital Reviewed-by: Igor Mammedov Signe

[Qemu-devel] [PULL 15/24] configure: enable kvm on x32

2015-03-19 Thread Michael Tokarev
Here's a trivial change to enable kvm on x32 architecture. I'm not 100% sure the result works correctly in all cases, but this is a good start and in theory everything should work. Signed-off-by: Adam Borowski Signed-off-by: Michael Tokarev Acked-by: Paolo Bonzini --- configure | 4 +++- 1 fil

[Qemu-devel] [PULL 09/24] block/qapi: Fix Sparse warning

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse reports this warning: block/qapi.c:417:47: warning: too long initializer-string for array of char(no space for nul char) Replacing the string by an array of characters fixes this warning. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- block/qapi.c |

[Qemu-devel] [PULL 21/24] hmp: Fix texinfo documentation

2015-03-19 Thread Michael Tokarev
From: Markus Armbruster Several issues: * Commands i and o lack @item. Their one-liner documentation gets squashed into the preceding command print. Add the obvious @item. * Commands i, o and cpu-add lack @findex. The function index doesn't have them. Add the obvious @findex. * Commit

[Qemu-devel] [PULL 03/24] 9pfs: Fix warnings from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: 9pfs/virtio-9p.c:1953:9: warning: returning void-valued expression 9pfs/virtio-9p-handle.c:143:5: warning: returning void-valued expression 9pfs/virtio-9p-handle.c:160:5: warning: returning void-valued expression 9pfs/virtio-9p-local.c:384:5: warning: returning v

[Qemu-devel] [PULL 14/24] error: Replace error_report() & error_free() with error_report_err()

2015-03-19 Thread Michael Tokarev
From: zhanghailiang This is a continuation of the work started in commit 565f65d27: "error: Use error_report_err() where appropriate" Signed-off-by: zhanghailiang Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- hw/arm/virt.c | 2 +- savevm.c |

[Qemu-devel] [PULL 24/24] qga/commands-posix: Fix resource leak

2015-03-19 Thread Michael Tokarev
From: Shannon Zhao It's detected by coverity. Close the dirfd. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Stefan Weil Reviewed-by: zhanghailiang Signed-off-by: Michael Tokarev --- qga/commands-posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/command

[Qemu-devel] [PULL 18/24] vl: fix resource leak with monitor_fdset_add_fd

2015-03-19 Thread Michael Tokarev
From: Paolo Bonzini monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP command add_fd). Free it. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- vl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Chen Fan
On 03/17/2015 06:39 PM, Andreas Färber wrote: Am 17.03.2015 um 10:08 schrieb Chen Fan: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and switch to bu

[Qemu-devel] [PULL 20/24] Fix typos in comments

2015-03-19 Thread Michael Tokarev
From: Viswesh Reviewed-by: Peter Maydell Signed-off-by: Viswesh Signed-off-by: Michael Tokarev --- fsdev/virtfs-proxy-helper.c | 2 +- target-tricore/translate.c | 22 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev

[Qemu-devel] [PULL 01/24] cris: remove unused cris_cond15 declarations

2015-03-19 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Stefan Weil --- disas/cris.c | 13 + target-cris/opcode-cris.h | 10 -- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/disas/cris.c b/disas/cris.c index 9dfb4e3..e6cff7a 100644 --- a/disas/cris.c +++ b/d

[Qemu-devel] [PULL 06/24] target-mips: Fix warning from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: target-mips/dsp_helper.c:3681:5: warning: returning void-valued expression Cc: Aurelien Jarno Cc: Leon Alrae Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- target-mips/dsp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Qemu-devel] [PULL 12/24] qmp: Drop unused .user_print from command definitions

2015-03-19 Thread Michael Tokarev
From: Markus Armbruster .user_print isn't used with QMP commands, only with HMP commands. Copied over when QMP got its own command table in commit 82a56f0. Most of them have been dropped since, but a few stragglers remain. Drop them. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Sig

Re: [Qemu-devel] [PATCH V4 00/19] Support more virtio queues

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 03:42:56PM +0800, Jason Wang wrote: > > > On Thu, Mar 19, 2015 at 3:32 PM, Michael S. Tsirkin wrote: > >On Thu, Mar 19, 2015 at 01:24:53PM +0800, Jason Wang wrote: > >> On Wed, Mar 18, 2015 at 8:58 PM, Michael S. Tsirkin > >> wrote: > >> >On Wed, Mar 18, 2015 at 05:34

[Qemu-devel] [PULL 08/24] Fix remaining warnings from Sparse (void return)

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: hw/display/vga.c:2000:5: warning: returning void-valued expression hw/intc/arm_gic.c:707:9: warning: returning void-valued expression hw/intc/etraxfs_pic.c:138:9: warning: returning void-valued expression hw/nvram/fw_cfg.c:475:5: warning: returning void-valued ex

[Qemu-devel] [PULL 10/24] target-moxie: Fix warnings from Sparse (one-bit signed bitfield)

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Report from Sparse: target-moxie/mmu.h:9:12: error: dubious one-bit signed bitfield target-moxie/mmu.h:10:12: error: dubious one-bit signed bitfield target-moxie/mmu.h:11:12: error: dubious one-bit signed bitfield target-moxie/mmu.h:12:12: error: dubious one-bit signed bitfield

Re: [Qemu-devel] [PATCH 2/4] virtio-input: core code & base class

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 08:45:29AM +0100, Gerd Hoffmann wrote: > Hi, > > > > > if yes we'll eventually want to take > > > > the header from there. > > > > > > Yes, we can do that, for both linux input layer and virtio-input (once > > > merged upstream) headers, then go build this on non-lin

Re: [Qemu-devel] [PULL 02/29] s390x/ipl: support diagnose 308 subcodes 5 and 6

2015-03-19 Thread Paolo Bonzini
On 18/02/2015 21:21, Christian Borntraeger wrote: > From: Fan Zhang > > To support dynamically updating the IPL device from inside the KVM > guest on the s390 platform, DIAG 308 instruction is intercepted > in QEMU to handle the request. > > Subcode 5 allows to specify a new boot device, which

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-19 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Mar 18, 2015 at 05:59:51PM +, Dr. David Alan Gilbert wrote: > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > On Fri, Mar 13, 2015 at 11:19:06AM +, Dr. David Alan Gilbert wrote: > > > > * David Gibson (da...@gibson.dr

[Qemu-devel] [PULL 22/24] elf-loader: Fix truncation warning from coverity

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Coverity reports a truncation due to cast operation on operand reltab->sh_size from 64 bits to 32 bits for calls of load_at. Fix the types of the function arguments to match their use in function load_at: the offset is used for lseek which takes an off_t parameter, the size is

[Qemu-devel] [PULL 19/24] qtest/ahci: Fix a bit mask expression

2015-03-19 Thread Michael Tokarev
From: John Snow A thinko that clang 3.5.0 caught. Thankfully does not introduce any new failures. Signed-off-by: John Snow Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- tests/ahci-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ahci-test.c

[Qemu-devel] [PULL 05/24] arm/nseries: Fix warnings from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: arm/nseries.c:1406:5: warning: returning void-valued expression arm/nseries.c:1411:5: warning: returning void-valued expression Cc: Andrzej Zaborowski Cc: Peter Maydell Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/arm/nseries.c | 4 ++--

[Qemu-devel] [PULL 02/24] backends: Fix warning from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: backends/tpm.c:39:5: warning: returning void-valued expression Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- backends/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/tpm.c b/backends/tpm.c index 01860c4..4efe

[Qemu-devel] [PULL 17/24] smbios: add max speed comdline option for type-17 (meory device) structure

2015-03-19 Thread Michael Tokarev
From: "Gabriel L. Somlo" Signed-off-by: Gabriel Somlo Acked-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- hw/i386/smbios.c | 10 -- qemu-options.hx | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c index f2e9ab6..134

[Qemu-devel] [PULL 04/24] omap: Fix warnings from Sparse

2015-03-19 Thread Michael Tokarev
From: Stefan Weil Sparse report: arm/omap1.c:1015:9: warning: returning void-valued expression arm/omap1.c:1084:9: warning: returning void-valued expression arm/omap1.c:1178:9: warning: returning void-valued expression arm/omap1.c:1287:9: warning: returning void-valued expression arm/omap1.c:138

Re: [Qemu-devel] [PATCH V14 2/3] pc: add a Virtual Machine Generation ID device

2015-03-19 Thread Michael S. Tsirkin
On Wed, Mar 11, 2015 at 04:35:41PM +1100, David Gibson wrote: > > > > So it boils down to the fact that windows thinks it's RAM, > > > It thinks it's PCI Standard RAM Controller not RAM itself. > > > > > > > so it binds a generic driver to it, but then we get > > > According to device manager no d

Re: [Qemu-devel] [PATCH V4 19/19] virtio-pci: introduce auto_msix_bar_size property

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 01:23:12PM +0800, Jason Wang wrote: > > > On Wed, Mar 18, 2015 at 8:57 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 18, 2015 at 05:35:09PM +0800, Jason Wang wrote: > >> Currently we don't support more than 128 MSI-X vectors for a pci > >> devices, trying to use vector=129

Re: [Qemu-devel] [PATCH V4 19/19] virtio-pci: introduce auto_msix_bar_size property

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 01:23:56PM +0800, Jason Wang wrote: > > > On Wed, Mar 18, 2015 at 8:57 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 18, 2015 at 05:35:09PM +0800, Jason Wang wrote: > >> Currently we don't support more than 128 MSI-X vectors for a pci > >> devices, trying to use vector=129

[Qemu-devel] [PATCH v11 1/9] linux-headers: update VFIO header for VFIO platform/amba drivers

2015-03-19 Thread Eric Auger
Update according to the vfio.h header found in ssh://g...@git.linaro.org/people/eric.auger/linux.git branch 4.0-rc3-v14 --- v10 -> v11: - only includes header modifications related to vfio platform driver v14 and not those related to "vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1"

[Qemu-devel] [PATCH v11 2/9] hw/vfio/platform: vfio-platform skeleton

2015-03-19 Thread Eric Auger
Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger --- v10 -> v11: x Take into account Alex Bennee's comments: - use g_malloc0_n instead of g_malloc0 - use block declarations when possible - r

[Qemu-devel] [PATCH v11 0/9] KVM platform device passthrough

2015-03-19 Thread Eric Auger
This series aims at enabling KVM platform device passthrough. Kernel dependencies were pulled for 4.1-rc0 (vfio platform driver and irqfd for ARM) This series now only relies on the following QEMU series that allows to instantiate the VFIO platform device from QEMU command line: [1] [PATCH v11 0

[Qemu-devel] [PATCH v11 9/9] hw/vfio/platform: add irqfd support

2015-03-19 Thread Eric Auger
This patch aims at optimizing IRQ handling using irqfd framework. Instead of handling the eventfds on user-side they are handled on kernel side using - the KVM irqfd framework, - the VFIO driver virqfd framework. the virtual IRQ completion is trapped at interrupt controller This removes the need

[Qemu-devel] [PATCH v11 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-03-19 Thread Eric Auger
Add a reset notify function that enables to start the propagation of interrupts to the guest. Signed-off-by: Eric Auger --- v10 -> v11: - comment reword v8 -> v9: - handle failure in vfio_irq_starter --- hw/vfio/platform.c | 64 + include/hw

[Qemu-devel] [PATCH v11 3/9] hw/vfio/platform: add irq assignment

2015-03-19 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. The mechanics to start the IRQ handling is not yet there through. Signed-off-by: Eric Auger --- v10 -> v11: - use block declaration when possible - change order of

[Qemu-devel] [PATCH v11 5/9] hw/arm/virt: start VFIO IRQ propagation

2015-03-19 Thread Eric Auger
Although the dynamic instantiation of VFIO QEMU devices already is possible, VFIO IRQ signaling is not yet started. This patch enables IRQ forwarding by registering a reset notifier that kick off VFIO signaling for all VFIO devices. Such mechanism is requested because the VFIO IRQ binding is handl

[Qemu-devel] [PATCH v11 7/9] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-03-19 Thread Eric Auger
This patch allows the instantiation of the vfio-calxeda-xgmac device from the QEMU command line (-device vfio-calxeda-xgmac,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Eric Auger --- v10 -> v11

[Qemu-devel] [PATCH v11 6/9] hw/vfio/platform: calxeda xgmac device

2015-03-19 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that derives from it. Signed-off-by: Eric Auger Reviewed-by: Alex Bennee --- v10 -> v11: - add Alex Reviewed-by - move virt modifications in a separate patch v8 -> v9: - renamed calxeda_xgmac.c into calx

Re: [Qemu-devel] [PATCH V4 18/19] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 01:19:23PM +0800, Jason Wang wrote: > > > On Wed, Mar 18, 2015 at 8:52 PM, Michael S. Tsirkin wrote: > >On Wed, Mar 18, 2015 at 05:35:08PM +0800, Jason Wang wrote: > >> This patch let msix_init_exclusive_bar() can accept bar_size parameter > >> other than a hard-coded lim

Re: [Qemu-devel] [PATCH for 2.3 1/2] virtio-net: validate backend queue numbers against bus limitation

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 03:05:51PM +0800, Jason Wang wrote: > We don't validate the backend queue numbers against bus limitation, > this will easily crash qemu if it exceeds the limitation. Fixing this > by doing the validation and fail early. Can you please include the qemu command line that cras

[Qemu-devel] [PATCH v11 8/9] linux-headers: update arm/arm64 KVM headers for irqfd

2015-03-19 Thread Eric Auger
Update according to arm/arm64 kvm.h headers found in ssh://git.linaro.org/people/eric.auger/linux.git branch irqfd_v9_stdalone_official_release Signed-off-by: Eric Auger --- linux-headers/asm-arm/kvm.h | 3 +++ linux-headers/asm-arm64/kvm.h | 3 +++ 2 files changed, 6 insertions(+) diff --git

Re: [Qemu-devel] [PATCH for 2.3 2/2] virtio-net: fix the upper bound when trying to delete queues

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 03:05:52PM +0800, Jason Wang wrote: > Virtqueue were indexed from zero, so don't delete virtqueue whose > index is n->max_queues * 2 + 1. But what's the current behaviour? Can it lead to aborts? virtio_del_queue does: if (n < 0 || n >= VIRTIO_PCI_QUEUE_MAX) { ab

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Chen Fan
On 03/18/2015 12:29 AM, Igor Mammedov wrote: On Tue, 17 Mar 2015 17:08:30 +0800 Chen Fan wrote: ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and s

Re: [Qemu-devel] [PATCH 1/1] virtio: serial: expose a 'guest_writable' callback for users

2015-03-19 Thread Markus Armbruster
Amit Shah writes: > Users of virtio-serial may want to know when a port becomes writable. A > port can stop accepting writes if the guest port is open but not being > read from. In this case, data gets queued up in the virtqueue, and > after the vq is full, writes to the port do not succeed. >

Re: [Qemu-devel] [PATCH v10 3/7] hw/vfio/platform: add irq assignment

2015-03-19 Thread Eric Auger
Hi Alex, On 02/17/2015 12:24 PM, Alex Bennée wrote: > > Eric Auger writes: > >> This patch adds the code requested to assign interrupts to >> a guest. The interrupts are mediated through user handled >> eventfds only. >> >> The mechanics to start the IRQ handling is not yet there through. >> >>

[Qemu-devel] [PULL 23/24] elf-loader: Add missing error handling for call of lseek

2015-03-19 Thread Michael Tokarev
From: Stefan Weil This fixes a warning from Coverity. Signed-off-by: Stefan Weil Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- include/hw/elf_ops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 16a627b..

[Qemu-devel] [PULL 11/24] hmp: Fix definition of command quit

2015-03-19 Thread Michael Tokarev
From: Markus Armbruster The command handler is a union of two function types. If cmd->user_print is set, handle_user_command() calls cmd->mhandler.cmd_new(), else cmd->mhandler.cmd(). Command definitions must therefore either set both user_print() and mhandler.cmd_new(), or only mhandler.cmd().

[Qemu-devel] [PULL 13/24] arm: fix memory leak

2015-03-19 Thread Michael Tokarev
From: Gonglei Cc: Michael Tokarev Cc: Peter Maydell Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- hw/arm/digic_boards.c | 1 + hw/arm/highbank.c | 1 + hw/arm/vexpress.c | 3 ++- hw/arm/virt.c | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Igor Mammedov
On Thu, 19 Mar 2015 18:08:32 +0800 Chen Fan wrote: > > On 03/18/2015 12:29 AM, Igor Mammedov wrote: > > On Tue, 17 Mar 2015 17:08:30 +0800 > > Chen Fan wrote: > > > >> ICC bus was invented only to provide hotplug capability to > >> CPU and APIC because at the time being hotplug was available on

[Qemu-devel] [Bug 1433081] Re: kvm hardware error 0xffffffff with vfio-pci VGA passthrough

2015-03-19 Thread v2min
Thank you for reviewing this. Removed VirtualBox and tried again, unfortunately same error. Terminal results and dmesg snippets below. ---terminal- v2min@v2min:~$ sudo ./vm1 KVM: entry failed, hardware error 0x RAX=000

[Qemu-devel] [Bug 1433081] Re: kvm hardware error 0xffffffff with vfio-pci VGA passthrough

2015-03-19 Thread v2min
** Attachment added: "KVM-HardwareError-dmesg_report.txt" https://bugs.launchpad.net/qemu/+bug/1433081/+attachment/4349775/+files/KVM-HardwareError-dmesg_report.txt -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.laun

[Qemu-devel] [PULL for-2.3] virtio-serial guest_writable callback

2015-03-19 Thread Amit Shah
The following changes since commit 17b11a1406fdc43b5022f32a6fbfcb005a353b38: Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20150316' into staging (2015-03-16 18:27:13 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-seri

Re: [Qemu-devel] [PATCH] raw-posix: Deprecate host floppy passthrough

2015-03-19 Thread Kevin Wolf
Am 17.03.2015 um 17:02 hat Markus Armbruster geschrieben: > Raise your hand if you have a physical floppy drive in a computer > you've powered on in 2015. Okay, I see we got a few weirdos in the > audience. That's okay, weirdos are welcome here. > > Kidding aside, media change detection doesn't

Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline

2015-03-19 Thread Laszlo Ersek
On 03/18/15 21:06, Gabriel L. Somlo wrote: > On Tue, Mar 17, 2015 at 12:49:50PM +0100, Gerd Hoffmann wrote: [snip] >> Which reminds me: Going for QemuOpts would be very useful (gives >> -readconfig support), and it would solve the init order issue too. >> Instead of having your custom storage yo

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-19 Thread Ian Campbell
On Thu, 2015-03-19 at 10:07 +0800, Chen, Tiejun wrote: > > This duplicates the code from above. I think this would be best done as: > > > > static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config) > > { > > if (b_info->u.hvm.gfx_passthru_kind != LIBXL_GFX_PASSTHRU_KIND_DEFAULT)

[Qemu-devel] [PATCH for-2.3 v2] raw-posix: Deprecate aio=threads fallback without O_DIRECT

2015-03-19 Thread Kevin Wolf
Currently, if the user requests aio=native, but forgets to choose a cache mode that sets O_DIRECT, that request is silently ignored and raw falls back to aio=threads. Deprecate that behaviour so we can make it an error in future qemu versions. Signed-off-by: Kevin Wolf --- v2: - Use error_printf

Re: [Qemu-devel] [PATCH 1/1] virtio: serial: expose a 'guest_writable' callback for users

2015-03-19 Thread Amit Shah
On (Thu) 19 Mar 2015 [11:21:04], Markus Armbruster wrote: > Amit Shah writes: > > > Users of virtio-serial may want to know when a port becomes writable. A > > port can stop accepting writes if the guest port is open but not being > > read from. In this case, data gets queued up in the virtqueu

Re: [Qemu-devel] [PATCH 1/1] virtio: serial: expose a 'guest_writable' callback for users

2015-03-19 Thread Peter Maydell
On 19 March 2015 at 11:03, Amit Shah wrote: > On (Thu) 19 Mar 2015 [11:21:04], Markus Armbruster wrote: >> Amit Shah writes: >> >> > + * This is dependent on both, the guest and host ends being >> > + * connected. >> >> Sounds awkward. Perhaps: This is dependent on both the guest

Re: [Qemu-devel] [PULL 00/19] Misc bugfixes for 2.3.0-rc1

2015-03-19 Thread Peter Maydell
On 18 March 2015 at 11:24, Paolo Bonzini wrote: > The following changes since commit cd232acfa0d70002fed89e9293f04afda577a513: > > Update version for v2.3.0-rc0 release (2015-03-17 18:58:33 +) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstre

Re: [Qemu-devel] [PATCH for-2.3 v2] raw-posix: Deprecate aio=threads fallback without O_DIRECT

2015-03-19 Thread Markus Armbruster
Kevin Wolf writes: > Currently, if the user requests aio=native, but forgets to choose a > cache mode that sets O_DIRECT, that request is silently ignored and raw > falls back to aio=threads. > > Deprecate that behaviour so we can make it an error in future qemu > versions. > > Signed-off-by: Kev

Re: [Qemu-devel] [PATCH] block: Fix blockdev-backup not to use funky error class

2015-03-19 Thread Kevin Wolf
Am 17.03.2015 um 08:36 hat Markus Armbruster geschrieben: > Error classes are a leftover from the days of "rich" error objects. > New code should always use ERROR_CLASS_GENERIC_ERROR. Commit > b7b9d39..7c6a4ab added uses of ERROR_CLASS_DEVICE_NOT_FOUND. Replace > them. > > Signed-off-by: Markus

Re: [Qemu-devel] [PATCH V14 2/3] pc: add a Virtual Machine Generation ID device

2015-03-19 Thread Gal Hammer
On 19/03/2015 11:50, Michael S. Tsirkin wrote: On Wed, Mar 11, 2015 at 04:35:41PM +1100, David Gibson wrote: So it boils down to the fact that windows thinks it's RAM, It thinks it's PCI Standard RAM Controller not RAM itself. so it binds a generic driver to it, but then we get According to

Re: [Qemu-devel] [PATCH 2/4] virtio-input: core code & base class

2015-03-19 Thread Gerd Hoffmann
Hi, > > Adding not-yet upstream files to the list of headers to sync over from > > linux isn't sane IMHO. > > > > cheers, > > Gerd > > > > Of course it isn't. But you can sync it manually. Once it's upstream, > add it to list for automated sync. Hmm, well, not that simple, there is no whit

Re: [Qemu-devel] [PATCH 2/4] virtio-input: core code & base class

2015-03-19 Thread Michael S. Tsirkin
On Thu, Mar 19, 2015 at 12:33:01PM +0100, Gerd Hoffmann wrote: > Hi, > > > > Adding not-yet upstream files to the list of headers to sync over from > > > linux isn't sane IMHO. > > > > > > cheers, > > > Gerd > > > > > > > Of course it isn't. But you can sync it manually. Once it's upstream,

Re: [Qemu-devel] IO port 0x61 is multiple used

2015-03-19 Thread Gerd Hoffmann
On Di, 2015-03-17 at 15:11 +0800, Gonglei wrote: > On 2015/3/15 20:49, Weidong Huang wrote: > > Hi ALL: > > > > IO port 0x61 is used by pc speaker and NMI reason port. > > > > This is ambiguous. How to distinguish in QEMU? > > > > I see that NMI reason port is not realized in QEMU. > > > > But

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Andreas Färber
Am 19.03.2015 um 10:07 schrieb Chen Fan: > when I use 'make check' to run the test case. seems failure. > > GTESTER check-qtest-x86_64 > blkdebug: Suspended request 'A' > blkdebug: Resuming request 'A' > main-loop: WARNING: I/O thread spun for 1000 iterations > main-loop: WARNING: I/O thread spun

Re: [Qemu-devel] [PATCH] block: Fix blockdev-backup not to use funky error class

2015-03-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 17.03.2015 um 08:36 hat Markus Armbruster geschrieben: >> Error classes are a leftover from the days of "rich" error objects. >> New code should always use ERROR_CLASS_GENERIC_ERROR. Commit >> b7b9d39..7c6a4ab added uses of ERROR_CLASS_DEVICE_NOT_FOUND. Replace >> them.

Re: [Qemu-devel] IO port 0x61 is multiple used

2015-03-19 Thread Jan Kiszka
On 2015-03-19 12:41, Gerd Hoffmann wrote: > On Di, 2015-03-17 at 15:11 +0800, Gonglei wrote: >> On 2015/3/15 20:49, Weidong Huang wrote: >>> Hi ALL: >>> >>> IO port 0x61 is used by pc speaker and NMI reason port. >>> >>> This is ambiguous. How to distinguish in QEMU? That register is a mess functi

[Qemu-devel] [PATCH] pcspk: Fix I/O port name

2015-03-19 Thread Jan Kiszka
Probably a copy&paste bug. Fixing it helps identifying the device model behind port 0x61. Signed-off-by: Jan Kiszka --- hw/audio/pcspk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index 1d81bbe..5266fb5 100644 --- a/hw/audio/pcspk.c ++

Re: [Qemu-devel] [PULL 0/8] pci, virtio bugfixes for 2.3

2015-03-19 Thread Peter Maydell
On 18 March 2015 at 12:34, Michael S. Tsirkin wrote: > The following changes since commit 18bf9e2f379334306530cbfd44218748eceaf67d: > > virtio-scsi: remove empty wrapper for cmd (2015-03-11 18:24:30 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/ms

[Qemu-devel] [PULL v2 for-2.3] virtio-serial: guest_writable callback

2015-03-19 Thread Amit Shah
The following changes since commit 17b11a1406fdc43b5022f32a6fbfcb005a353b38: Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20150316' into staging (2015-03-16 18:27:13 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-seri

Re: [Qemu-devel] [PATCH 1/1] virtio: serial: expose a 'guest_writable' callback for users

2015-03-19 Thread Amit Shah
On (Thu) 19 Mar 2015 [11:10:40], Peter Maydell wrote: > On 19 March 2015 at 11:03, Amit Shah wrote: > > On (Thu) 19 Mar 2015 [11:21:04], Markus Armbruster wrote: > >> Amit Shah writes: > >> > >> > + * This is dependent on both, the guest and host ends being > >> > + * connected. >

Re: [Qemu-devel] [PULL for-2.3 00/13] usb patch queue.

2015-03-19 Thread Peter Maydell
On 18 March 2015 at 13:07, Gerd Hoffmann wrote: > Hi, > > Here is the usb patch queue for 2.3-rc1. Grow a bit larger than I'd > like it to be. But I've somehow missed I had patches lingering in the > usb queue while preparing the -rc0 pulls, and there also have been some > bugfixes coming in p

[Qemu-devel] [PATCH v2 0/3] qemu-img convert: Rewrite copying logic

2015-03-19 Thread Kevin Wolf
See the commit message of patch 2 for the background. v2: - Rebased. Commit f1d3cd79 changed many bdrv_* calls to blk_* calls. This version tries to keep those conversions and use BlockBackend where qemu.git master does or where it makes sense. Added patch 1 to get blk_write_zeroes(). - Rena

[Qemu-devel] [PATCH v2 1/3] block-backend: Expose bdrv_write_zeroes()

2015-03-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 11 +++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 48b6e4c..93e46f3 100644 --- a/block/block-backend.c +++ b/block/block-backend.

[Qemu-devel] [PATCH v2 2/3] qemu-img convert: Rewrite copying logic

2015-03-19 Thread Kevin Wolf
The implementation of qemu-img convert is (a) messy, (b) buggy, and (c) less efficient than possible. The changes required to beat some sense into it are massive enough that incremental changes would only make my and the reviewers' life harder. So throw it away and reimplement it from scratch. Let

[Qemu-devel] [PATCH v2 3/3] qemu-iotests: Some qemu-img convert tests

2015-03-19 Thread Kevin Wolf
This adds a regression test for some problems that the qemu-img convert rewrite just fixed. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/122 | 223 + tests/qemu-iotests/122.out | 209 ++ tests/qemu-iotest

  1   2   3   >