[Qemu-devel] [Bug 1373362] Re: qemu-2.1.1 i386-softmmu compile error: q35_dsdt_applesmc_sta undeclared

2014-09-24 Thread Thomas Eschenbacher
** Attachment added: "make log with "make -d" (lots of debug info)" https://bugs.launchpad.net/qemu/+bug/1373362/+attachment/4214389/+files/qemu-build-debug.log.xz -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launc

[Qemu-devel] [Bug 1373362] Re: qemu-2.1.1 i386-softmmu compile error: q35_dsdt_applesmc_sta undeclared

2014-09-24 Thread Thomas Eschenbacher
sorry, but this has nothing to do with gentoo patches. Just to prove it, I did the following: cd /var/tmp git clone git://git.qemu.org/qemu.git mkdir qemu-build cd qemu-build ../qemu/configure --target-list=i386-softmmu make 2>&1 | tee ../qemu-build.log xz ../qemu-build.log rm -Rf * ../qemu/confi

Re: [Qemu-devel] [PATCH] qemu-socket: Eliminate silly QERR_ macros

2014-09-24 Thread Markus Armbruster
Markus Armbruster writes: > The QERR_ macros are leftovers from the days of "rich" error objects. > They're used with error_set() and qerror_report(), and expand into the > first *two* arguments. This trickiness has become pointless. Clean > up. > > Signed-off-by: Markus Armbruster Forgot to

[Qemu-devel] [PATCH] qemu-socket: Eliminate silly QERR_ macros

2014-09-24 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 12

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Tony Breeds
On Thu, Sep 25, 2014 at 08:42:25AM +0200, Greg Kurz wrote: > Same path : ./scripts/get_maintainer.pl Thanks Greg. Now I know :) Tony. pgp2j8su8SSSV.pgp Description: PGP signature

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Markus Armbruster
Tony Breeds writes: > On Thu, Sep 25, 2014 at 08:21:27AM +0200, Markus Armbruster wrote: >> Please copy Kevin & Stefan for block patches. Doing that for you. I >> also copy Max, who left his fingerprints on commit 4f11aa8. > > Sorry. > > Is there a qemu version of get_maintainers.pl? Yes :) $

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Greg Kurz
On Thu, 25 Sep 2014 16:29:31 +1000 Tony Breeds wrote: > On Thu, Sep 25, 2014 at 08:21:27AM +0200, Markus Armbruster wrote: > > Please copy Kevin & Stefan for block patches. Doing that for you. I > > also copy Max, who left his fingerprints on commit 4f11aa8. > > Sorry. > > Is there a qemu ver

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Tony Breeds
On Thu, Sep 25, 2014 at 08:21:27AM +0200, Markus Armbruster wrote: > Please copy Kevin & Stefan for block patches. Doing that for you. I > also copy Max, who left his fingerprints on commit 4f11aa8. Sorry. Is there a qemu version of get_maintainers.pl? Tony. pgpYwsSX2dsBU.pgp Description: PG

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Markus Armbruster
Please copy Kevin & Stefan for block patches. Doing that for you. I also copy Max, who left his fingerprints on commit 4f11aa8. Tony Breeds writes: > The command > qemu-img convert -O raw inputimage.qcow2 outputimage.raw > > intermittently creates corrupted output images, when the input imag

Re: [Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-24 Thread Markus Armbruster
John Snow writes: > On 09/24/2014 10:35 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Instead of duplicating the logic for the if_ide >>> (bus,unit) mappings, rely on the blockdev layer >>> for managing those mappings for us, and use the >>> drive_get_by_index call instead. >>> >>> Th

[Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Tony Breeds
The command qemu-img convert -O raw inputimage.qcow2 outputimage.raw intermittently creates corrupted output images, when the input image is not yet fully synchronized to disk. This patch preferese the use of seek_hole checks to determine if the sector is present in the disk image. While we'

[Qemu-devel] [PATCH v3 4/7] scsi: Drop SCSIReqOps.cancel_io

2014-09-24 Thread Fam Zheng
The only two implementations are identical to each other, with nothing specific to device: they only call bdrv_aio_cancel with the SCSIRequest.aiocb. Let's move it to scsi-bus. Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c | 4 ++-- hw/scsi/scsi-disk.c| 14 -- hw/scsi/scs

[Qemu-devel] [PATCH v3 6/7] scsi: Introduce scsi_req_cancel_async

2014-09-24 Thread Fam Zheng
Devices will call this function to start an asynchronous cancellation. The bus->info->cancel will be called after the request is canceled. Devices will probably need to track a separate TMF request that triggers this cancellation, and wait until the cancellation is done before completing it. So we

[Qemu-devel] [PATCH v3 3/7] scsi-bus: Unify request unref in scsi_req_cancel

2014-09-24 Thread Fam Zheng
Before, scsi_req_cancel will take ownership of the canceled request and unref it. We did this because we didn't know whether AIO CB will be called or not during the cancelling, so we set the io_canceled flag before calling it, and skip unref in the potentially called callbacks, which is not very ni

[Qemu-devel] [PATCH v3 5/7] scsi: Introduce scsi_req_cancel_complete

2014-09-24 Thread Fam Zheng
Let the aio cb do the clean up and notification job after scsi_req_cancel, in preparation for asynchronous cancellation. Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c | 14 ++ hw/scsi/scsi-disk.c| 8 hw/scsi/scsi-generic.c | 1 + include/hw/scsi/scsi.h | 1 + 4

[Qemu-devel] [PATCH v3 7/7] virtio-scsi: Handle TMF request cancellation asynchronously

2014-09-24 Thread Fam Zheng
For VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET, use scsi_req_cancel_async to start the cancellation. Because each tmf command may cancel multiple requests, we need to use a counter to track the number of remaining requests we still need to wait for. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v3 2/7] scsi-generic: Handle canceled request in scsi_command_complete

2014-09-24 Thread Fam Zheng
Now that we always called the cb in bdrv_aio_cancel, let's make scsi-generic callbacks check io_canceled flag similarly to scsi-disk. Signed-off-by: Fam Zheng --- hw/scsi/scsi-generic.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-generic.c b/hw/scs

[Qemu-devel] [PATCH v3 1/7] scsi: Drop scsi_req_abort

2014-09-24 Thread Fam Zheng
The only user of this function is spapr_vscsi.c. We can convert to scsi_req_cancel plus adding a check in vscsi_request_cancelled. Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c| 15 --- hw/scsi/spapr_vscsi.c | 11 --- 2 files changed, 8 inse

[Qemu-devel] [PATCH v3 0/7] virtio-scsi: Asynchronous cancellation

2014-09-24 Thread Fam Zheng
v3: Address Paolo's comments: - scsi_req_canceled -> scsi_req_cancel_complete - Drop unnecessary changes in scsi_req_alloc and scsi_req_unref. - Update comment of scsi_req_cancel_async. - Add notifier only if not null. - Use slice allocator for VirtIOSCSICancelNotifier and

Re: [Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Tang Chen
On 09/24/2014 07:48 PM, Igor Mammedov wrote: Check if 'handler' implements HOTPLUG_HANDLER interface before setting it, if it's not then do nothing and leave bus not hotpluggable. That would allow to reuse the same code for creating bus for example 'scsi_bus_new()' for both hotpluggable and not

[Qemu-devel] [PATCH v2 0/7] add description field in ObjectProperty and PropertyInfo struct

2014-09-24 Thread arei.gonglei
From: Gonglei PATCH 1 and PATCH 2 are bugfixes. PATCH 3~7 add a description field in both ObjectProperty and PropertyInfo struct. The descriptions can serve as documentation in the code, and they can be used to provide better help. For example: Before this patch series: $./qemu-system-x86_64 -d

[Qemu-devel] [PATCH v2 4/7] qom: add description field in ObjectProperty struct

2014-09-24 Thread arei.gonglei
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Markus Armbruster Signed-off-by: Gonglei --- include/qom/object.h | 15 +++ qom/object.c | 14 ++

[Qemu-devel] [PATCH v2 6/7] qmp: print descriptions of object properties

2014-09-24 Thread arei.gonglei
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. For example: $./qemu-system-x86_64 -device virtio-blk-pci,? Before this patch: virtio-blk-pci.iothread=link virtio-blk-pci.x-data-plane=bool virtio-blk-pci.scsi=bool virtio-blk-p

[Qemu-devel] [PATCH v2 3/7] qdev: add description field in PropertyInfo struct

2014-09-24 Thread arei.gonglei
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Markus Armbruster Signed-off-by: Gonglei Signed-off-by: Paolo Bonzini --- hw/core/qdev-properties-system.c | 4 hw/core/qdev

[Qemu-devel] [PATCH v2 2/7] qom: add error handler for object alias property

2014-09-24 Thread arei.gonglei
From: Gonglei object_property_add_alias() is called at some places at present. And its parameter errp may not NULL, such as object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev),"iothread", &error_abort); This patch add error handler for security. Cc: Stefa

[Qemu-devel] [PATCH v2 5/7] qdev: set the object property's description to the qdev property's.

2014-09-24 Thread arei.gonglei
From: Gonglei Set all static qdev properties' descriptions to object property's description. When we call object_property_add_alias() adding alias properties to the source object on the target Object, set the object property's description to the source qdev property's. c: Paolo Bonzini Cc: Mic

[Qemu-devel] [PATCH v2 7/7] qdev: drop legacy_name from qdev properties

2014-09-24 Thread arei.gonglei
From: Gonglei The legacy_name is useless now, the better help information provied by description field of property. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Markus Armbruster Signed-off-by: Gonglei --- hw/core/qdev-properties-system.c | 4 hw/core/qdev-properties.c| 6 -

[Qemu-devel] [PATCH v2 1/7] qom: add error handler for object_property_print()

2014-09-24 Thread arei.gonglei
From: Gonglei Avoid the caller of object_property_print() leaking string argument's memory, such as qdev_print_props() when encounter errors. Cc: Paolo Bonzini Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- qom/object.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(

Re: [Qemu-devel] [PATCH v2 7/7] virtio-scsi: Handle TMF request cancellation asynchronously

2014-09-24 Thread Fam Zheng
On Wed, 09/24 13:18, Paolo Bonzini wrote: > Il 24/09/2014 10:27, Fam Zheng ha scritto: > > For VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET, > > use scsi_req_cancel_async to start the cancellation. > > > > Because each tmf command may cancel multiple requests, we need to use a

Re: [Qemu-devel] [PATCH 09/30] access BusState.allow_hotplug using wraper qbus_is_hotpluggable()

2014-09-24 Thread Tang Chen
On 09/24/2014 07:47 PM, Igor Mammedov wrote: it would allow transparently switch detection if Bus is hotpluggable from allow_hotplug field to hotplug_handler link and drop allow_hotplug field once all users are converted to hotplug handler API. Signed-off-by: Igor Mammedov --- hw/core/qdev.c

Re: [Qemu-devel] [PATCH 11/30] qdev: HotplugHandler: provide unplug callback

2014-09-24 Thread Tang Chen
On 09/24/2014 07:48 PM, Igor Mammedov wrote: it to be called for actual device removal and will allow to separate request and removal handling phases of x86-CPU devices and also it's a handler to be called for synchronously removable devices. Signed-off-by: Igor Mammedov --- unplug handling fo

Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown

2014-09-24 Thread Fam Zheng
On Wed, 09/24 10:05, Stefan Hajnoczi wrote: > On Tue, Sep 23, 2014 at 10:26:26AM +0800, Fam Zheng wrote: > > When we expand a number range, we just print "$id - unknown test, > > ignored", this is convenient if we want to run a range of tests. > > > > When we designate a test case number explicitl

Re: [Qemu-devel] [PATCH] virtio: Fix wrong type cast from pointer to long

2014-09-24 Thread Fam Zheng
On Wed, 09/24 05:44, Peter Maydell wrote: > On 24 September 2014 01:46, Fam Zheng wrote: > > On Wed, 09/24 07:20, Stefan Weil wrote: > >> Compiler warning (w32, w64): > >> > >> include/hw/virtio/virtio_ring.h:142:26: warning: > >> cast from pointer to integer of different size [-Wpointer-to-int-c

Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend

2014-09-24 Thread Alexey Kardashevskiy
On 09/24/2014 07:47 PM, Stefan Hajnoczi wrote: > On Tue, Sep 23, 2014 at 08:19:41PM +1000, Alexey Kardashevskiy wrote: >> This adds a stub for ohci_td_pkt() function (which traces packets) >> when configured without --enable-trace-backend >> >> Signed-off-by: Alexey Kardashevskiy >> --- >> >> It s

Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend

2014-09-24 Thread Alexey Kardashevskiy
On 09/23/2014 08:52 PM, Gerd Hoffmann wrote: > On Di, 2014-09-23 at 20:19 +1000, Alexey Kardashevskiy wrote: >> This adds a stub for ohci_td_pkt() function (which traces packets) >> when configured without --enable-trace-backend > > Ah, cool. Just noticed that, while doing usb patch queue test bu

[Qemu-devel] [PATCH] ohci: Split long traces to smaller ones

2014-09-24 Thread Alexey Kardashevskiy
Recent traces rework introduced 2 tracepoints with 13 and 20 arguments. When dtrace backend is selected (--enable-trace-backend=dtrace), compile fails as sys/sdt.h defines DTRACE_PROBE up to DTRACE_PROBE12 only. This splits long tracepoints. Signed-off-by: Alexey Kardashevskiy --- And this one

[Qemu-devel] [Bug 1373362] Re: qemu-2.1.1 i386-softmmu compile error: q35_dsdt_applesmc_sta undeclared

2014-09-24 Thread Iggy
The .orig file in there makes me think that Gentoo is applying some patches before building. You should open a bug with them and they can open a bug if there really is a problem upstream (which I believe is general practice with Gentoo anyways). -- You received this bug notification because you

Re: [Qemu-devel] [PATCH 1/6] blockdev: Orphaned drive search

2014-09-24 Thread John Snow
On 09/24/2014 10:06 AM, Markus Armbruster wrote: John Snow writes: When users use command line options like -hda, -cdrom, or even -drive if=ide, it is up to the board initialization routines to pick up these drives and create backing devices for them. Some boards, like Q35, have not been do

Re: [Qemu-devel] [edk2] OVMF, Q35 and USB keyboard/mouse

2014-09-24 Thread Gabriel L. Somlo
On Mon, Sep 22, 2014 at 10:40:04PM +0200, Laszlo Ersek wrote: > On 09/22/14 18:44, Paolo Bonzini wrote: > > Il 22/09/2014 00:43, Laszlo Ersek ha scritto: > >> // Bus 0, Device 1, Function 0 - PCI to ISA Bridge > >> // > >> PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x3c), 0x00); > >> PciWrite8 (P

Re: [Qemu-devel] [IGDVFIO] [PATCH 3/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 22:57, Alex Williamson ha scritto: > Right, that's the physical mapping, Andy's patches are mimicking that > behavior virtually. Seabios reserves memory, creates e820 entries, and > "maps" the hardware by writing to these registers. That triggers QEMU > to adjust the MemoryRegion in

Re: [Qemu-devel] [IGDVFIO] [PATCH 3/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 22:31 +0200, Paolo Bonzini wrote: > Il 24/09/2014 21:47, Alex Williamson ha scritto: > > So the opregion is mapped by a config write on the IGD device itself and > > the other 3 regions, that we know about so far, are mapped via writes to > > the host bridge. > > AFAIU the op

Re: [Qemu-devel] [PATCH v2 4/4] .travis.yml: remove "make check" from main matrix

2014-09-24 Thread Brian Jackson
On Wednesday, September 24, 2014 11:13:56 AM Alex Bennée wrote: > There are problems with unreliability in "make check" which still need > to be tracked down. As the tests are broadly the same for all targets if > added one explicit target to the matrix to run it. However this does > build all soft

Re: [Qemu-devel] [PATCH v2 2/4] .travis.yml: make the make slightly more parallel

2014-09-24 Thread Brian Jackson
On Wednesday, September 24, 2014 11:13:54 AM Alex Bennée wrote: > The Travis VMs have 1.5 cores so we might as well make some use of the > paralellism. > > Signed-off-by: Alex Bennée > Reviewed-by: Alexander Graf Reviewed-by: Brian Jackson > > diff --git a/.travis.yml b/.travis.yml > index 7

Re: [Qemu-devel] [PATCH v2 3/4] .travis.yml: pre-seed sub-modules for speed

2014-09-24 Thread Brian Jackson
On Wednesday, September 24, 2014 11:13:55 AM Alex Bennée wrote: > A significant portion of the build time is spent initialising all the > sub-modules we use in the source tree. Often this is almost as long as > the build itself. By pre-seeding the .git/modules tree this will > hopefully improve thi

[Qemu-devel] [PATCH 0/3] block: Fix filename generation for blkdebug and nbd

2014-09-24 Thread Max Reitz
This series fixes the filename generation in nbd and improves the one in blkdebug. Max Reitz (3): nbd: Fix filename generation blkdebug: Simplify and improve filename generation iotests: Plain blkdebug filename generation block/blkdebug.c | 98 +--

Re: [Qemu-devel] [IGDVFIO] [PATCH 3/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 21:47, Alex Williamson ha scritto: > So the opregion is mapped by a config write on the IGD device itself and > the other 3 regions, that we know about so far, are mapped via writes to > the host bridge. AFAIU the opregion is mapped by the (host) BIOS, that writes the address to a we

[Qemu-devel] [PATCH 1/3] nbd: Fix filename generation

2014-09-24 Thread Max Reitz
Export names may be used with nbd+unix, too, fix nbd_refresh_filename() accordingly. Also, for nbd+tcp, the documented path schema is "nbd://host[:port]/export", so use it. Furthermore, as can be seen from that schema, the port is optional. That makes six single cases for how the filename can be f

Re: [Qemu-devel] [PATCH 1/3] nbd: Fix filename generation

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 21:38, Max Reitz ha scritto: > Export names may be used with nbd+unix, too, fix nbd_refresh_filename() > accordingly. Also, for nbd+tcp, the documented path schema is > "nbd://host[:port]/export", so use it. Furthermore, as can be seen from > that schema, the port is optional. > > Th

[Qemu-devel] [PATCH 3/4] block: Add bdrv_filename()

2014-09-24 Thread Max Reitz
Split the part which actually refreshes the BlockDriverState.filename field off of bdrv_refresh_filename() into a more generic function bdrv_filename(), which first calls bdrv_refresh_filename() and then stores a qemu-usable filename into the given buffer instead of BlockDriverState.filename. Sinc

[Qemu-devel] [PATCH 0/4] block: Drop BDS.filename

2014-09-24 Thread Max Reitz
The BDS filename field is generally only used when opening disk images or emitting error or warning messages, the only exception to this rule is the map command of qemu-img. However, using exact_filename there instead should not be a problem. Therefore, we can drop the filename field from the Block

Re: [Qemu-devel] [IGDVFIO] [PATCH 4/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 14:20 +0100, Andrew Barnes wrote: > hw/pci/pci.c > > this patch adds: > * read / write host PCI config space > > patch > - > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > index 42995e6..041f6f1 100644 > --- a/hw/pci/pci.c > +++ b/hw/pci/pci.c > @@ -2,6 +2

[Qemu-devel] [PATCH 2/4] block: Avoid BlockDriverState.filename

2014-09-24 Thread Max Reitz
In places which directly pass a filename to the OS, we should not use the filename field at all but exact_filename instead (although the former currently equals the latter if that is set). In qemu-img's map command, we should be using the filename field; but since this commit prepares to remove th

[Qemu-devel] [PATCH 4/4] block: Drop BlockDriverState.filename

2014-09-24 Thread Max Reitz
That field is now only used during initialization of BlockDriverStates (opening images) and for error or warning messages. Performance is not that much of an issue here, so we can drop the field and replace its use by a call to bdrv_filename(). By doing so we can ensure the result always to be rece

[Qemu-devel] [PATCH 1/4] block: Change bdrv_get_encrypted_filename()

2014-09-24 Thread Max Reitz
Instead of returning a pointer to the filename, copy it into a buffer specified by the caller. While adapting the callers accordingly, this patch also fixes them apparently ignoring that this function's return value may be NULL. Signed-off-by: Max Reitz --- block.c | 20 +++

Re: [Qemu-devel] [IGDVFIO] [PATCH 3/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 14:20 +0100, Andrew Barnes wrote: > hw/pci-host/q35.c > > this patch adds: > * redirect some PCI config reads/writes to host > * memory map BSDM, BGSM, TSEG > > patch > - > > diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c > index a0a3068..05348ac 100

[Qemu-devel] [PATCH 3/3] iotests: Plain blkdebug filename generation

2014-09-24 Thread Max Reitz
Add a test whether blkdebug is able to generate a plain filename if given a configuration file and a file to be tested only. Signed-off-by: Max Reitz --- tests/qemu-iotests/099 | 9 - tests/qemu-iotests/099.out | 4 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH 2/3] blkdebug: Simplify and improve filename generation

2014-09-24 Thread Max Reitz
Instead of actually recreating the options from scratch, just reuse the options given for creating the BDS, which are the configuration file name and additional options. In case there are no additional options we can thus create a plain filename. This obviously results in a different output for qe

Re: [Qemu-devel] [IGDVFIO] [PATCH 2/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 14:20 +0100, Andrew Barnes wrote: > hw/misc/vfio.c > > this patch adds: > * memory map intel opregion > * mirroring of bdsm to guest's device 0 not hosts. > > patch > - > > diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c > index e88b610..54e549b 100644 > --

Re: [Qemu-devel] [IGDVFIO] [PATCH 1/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 14:20 +0100, Andrew Barnes wrote: > hw/isa/lpc_ich9.c > > this patch adds: > * debug output, if enabled > * enforces correct intel config, if enabled. (unsure if this is needed) > * redirects some PCI Config to host > * uses hosts LPC device id > > patch > --

Re: [Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic

2014-09-24 Thread John Snow
On 09/24/2014 10:35 AM, Markus Armbruster wrote: John Snow writes: Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI HBAs

Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master

2014-09-24 Thread Greg Kurz
On Tue, 23 Sep 2014 07:26:32 +0300 "Michael S. Tsirkin" wrote: > On Mon, Sep 22, 2014 at 07:28:57PM +0200, Greg Kurz wrote: > > On Thu, 18 Sep 2014 21:54:58 +0300 > > "Michael S. Tsirkin" wrote: > > > > > Current support for bus master (clearing OK bit) > > > together with the need to support g

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread Eric Blake
On 09/24/2014 03:44 AM, Stefan Hajnoczi wrote: > The blkdebug block driver is undocumented. Documenting it is worthwhile > since it offers powerful error injection features that are used by > qemu-iotests test cases. > > This document will make it easier for people to learn about and use > blkdeb

Re: [Qemu-devel] [IGDVFIO] [PATCH 1/8] RFC and help completing: Intel IGD Direct Assignment with VFIO

2014-09-24 Thread Eric Blake
On 09/24/2014 07:20 AM, Andrew Barnes wrote: > hw/isa/lpc_ich9.c > > this patch adds: > * debug output, if enabled > * enforces correct intel config, if enabled. (unsure if this is needed) > * redirects some PCI Config to host > * uses hosts LPC device id > > patch > - > Sty

Re: [Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer

2014-09-24 Thread Eric Blake
On 09/24/2014 09:21 AM, Benoît Canet wrote: > We will want to reuse this define in the future by making it common to > multiple > QEMU modules. > It would be safer that this define be an integer so we avoid strange float > rounding errors. > Do this conversion. > > Signed-off-by: Benoît Canet >

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread Max Reitz
On 24.09.2014 11:44, Stefan Hajnoczi wrote: The blkdebug block driver is undocumented. Documenting it is worthwhile since it offers powerful error injection features that are used by qemu-iotests test cases. This document will make it easier for people to learn about and use blkdebug. Signed-o

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread John Snow
On 09/24/2014 12:24 PM, Max Reitz wrote: On 24.09.2014 11:44, Stefan Hajnoczi wrote: The blkdebug block driver is undocumented. Documenting it is worthwhile since it offers powerful error injection features that are used by qemu-iotests test cases. This document will make it easier for peopl

Re: [Qemu-devel] [PATCH v4 11/19] qapi: Add tests of type bypass

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > For a few QMP commands, we are forced to pass an arbitrary type > without tracking it properly in QAPI. Among the existing clients, > this unnamed type was spelled 'dict', 'visitor', and '**'; this > patch standardizes on '**'. There is no difference to the generated > code

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-24 Thread Alex Williamson
On Wed, 2014-09-24 at 10:47 +0200, Frank Blaschka wrote: > On Mon, Sep 22, 2014 at 02:47:31PM -0600, Alex Williamson wrote: > > On Fri, 2014-09-19 at 13:54 +0200, frank.blasc...@de.ibm.com wrote: > > > This set of patches implements a vfio based solution for pci > > > pass-through on the s390 platf

Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 15:23:41 +0200 Gerd Hoffmann wrote: > Hi, > > > > Can't we do this in usb_bus_new instead of duplicating in every host > > > adapter? > > > > So you would make TYPE_USB_BUS the hotplug handler itself, instead of > > the controller? > > I was more thinking of just setting

Re: [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 14:04:46 +0200 Paolo Bonzini wrote: > Il 24/09/2014 13:48, Igor Mammedov ha scritto: > > @@ -239,10 +239,7 @@ void qdev_unplug(DeviceState *dev, Error **errp) > > hotplug_handler_unplug(dev->parent_bus->hotplug_handler, dev, > > errp); > > } > > } e

Re: [Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread Benoît Canet
The Wednesday 24 Sep 2014 à 10:44:14 (+0100), Stefan Hajnoczi wrote : > The blkdebug block driver is undocumented. Documenting it is worthwhile > since it offers powerful error injection features that are used by > qemu-iotests test cases. > > This document will make it easier for people to learn

Re: [Qemu-devel] [PATCH v3 0/7] Dynamic sysbus device allocation support

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:22, Alexander Graf ha scritto: > The idea can easily be extended to any sysbus device on any machine type > though. > Everything that a machine has to do is spawn a "platform-bus-device" and > generate > the correct device tree for the guest to see the new devices. I like this a

Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 15:00:41 +0200 Gerd Hoffmann wrote: > > @@ -81,7 +81,7 @@ void usb_bus_new(USBBus *bus, size_t bus_size, > > qbus_create_inplace(bus, bus_size, TYPE_USB_BUS, host, NULL); > > bus->ops = ops; > > bus->busnr = next_usb_bus++; > > -bus->qbus.allow_hotplug = 1;

Re: [Qemu-devel] [PATCH v3 2/7] sysbus: Make devices spawnable via -device

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:22, Alexander Graf ha scritto: > +static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque) > +{ > +error_report("Device '%s' can not be handled by this machine", > + qdev_fw_name(DEVICE(sbdev))); > +exit(1); > +} The firmware name is usually som

Re: [Qemu-devel] [PATCH v2 0/2] block: Catch simultaneous usage of options and their aliases

2014-09-24 Thread Markus Armbruster
Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:21, Benoît Canet ha scritto: > Reviewed-by: Eric Blake > Signed-off-by: Benoît Canet > --- > include/qemu/throttle.h | 2 -- > include/qemu/timer.h| 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h >

Re: [Qemu-devel] [PATCH 14/30] target-i386: ICC bus: replace BusState.allow_hotplug with hotplug_handler

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:30, Igor Mammedov ha scritto: >> > Can you make it an error instead? I guess that's related to the other >> > question---whether hotplug_handler_plug and/or hotplug_handler_unplug >> > should return an error if there is no callback. > For example that would make us in addition to

[Qemu-devel] [PATCH 1/2] console: add graphic_console_set_hwops

2014-09-24 Thread Gerd Hoffmann
Add a function to allow display emulations to switch the hwops function pointers. This is useful for devices which have two completely different operation modes. Typical case is the vga compatibility mode vs. native mode in qxl and the upcoming virtio-vga device. Signed-off-by: Gerd Hoffmann --

Re: [Qemu-devel] [PATCH v2 2/2] block: Catch simultaneous usage of options and their aliases

2014-09-24 Thread Benoît Canet
The Wednesday 24 Sep 2014 à 16:46:29 (+0200), Kevin Wolf wrote : > While thinking about precedence of conflicting block device options from > different sources, I noticed that you can specify both an option and its > legacy alias at the same time (e.g. readonly=on,read-only=off). Rather > than spec

[Qemu-devel] [PATCH 2/2] qxl: use graphic_console_set_hwops

2014-09-24 Thread Gerd Hoffmann
Simply switch function pointers when entering/leaving vga mode. Allows to remove wrapper functions which do nothing but dispatch calls depending on the current qxl mode. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 49 + 1 file changed, 9 in

Re: [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:21, Benoît Canet ha scritto: > Reviewed-by: Eric Blake > Signed-off-by: Benoît Canet > --- > include/qemu/throttle.h | 2 -- > include/qemu/timer.h| 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h >

Re: [Qemu-devel] [PATCH 0/6] Q35: Implement -cdrom/-hda sugar

2014-09-24 Thread Markus Armbruster
John Snow writes: > The Q35 board initialization does not currently bother to look > for any drives added by the various syntactical sugar shorthands > to be added to the AHCI HBA. These include -hda through -hdd, > -cdrom, and -drive if=ide shorthands. > > An obstacle to having implemented this

Re: [Qemu-devel] [PATCH 14/30] target-i386: ICC bus: replace BusState.allow_hotplug with hotplug_handler

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 16:50:17 +0200 Paolo Bonzini wrote: > Il 24/09/2014 16:37, Igor Mammedov ha scritto: > >> > If you do this, aren't you enabling CPU hot-unplug? Should > >> > hotplug_handler_plug and/or hotplug_handler_unplug return an error if > >> > there is no callback? > > hotplug/unplug

Re: [Qemu-devel] [PATCH 6/6] q35/ahci: Pick up -cdrom and -hda options

2014-09-24 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: > >> This patch implements the backend for the Q35 board >> for us to be able to pick up and use drives defined >> by the -cdrom, -hda, or -drive if=ide shorthand options. >> >> A workaround for these command line options not previously >> working as

[Qemu-devel] [PATCH v3 3/3] util: Infrastructure for computing recent averages

2014-09-24 Thread Benoît Canet
The module takes care of computing minimal and maximal values over the time slice duration. Suggested-by: Paolo Bonzini Signed-off-by: Benoît Canet --- include/qemu/timed-average.h | 60 + tests/Makefile | 2 + tests/test-timed-average.c | 89 ++

Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplicated expressions

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > On 09/24/2014 05:58 AM, Markus Armbruster wrote: > >> >> We have separate name spaces for events, commands and types. Works for >> me. A single name space would work for me, too. > > I thought about that too. Our conventions are that commands are > all-lower-case, events

[Qemu-devel] [PATCH v3 0/3] timed average infrastructure for use in block statistics

2014-09-24 Thread Benoît Canet
Hi, Here is the new iteration of the timed average module. A better algorithm avoiding unwanted noise has been implemented and the test have been rewritten as suggested. Best regards in V3: Add Eric rev by of patch 2 drop unneeded (double) casts [Eric] Implement new algo

Re: [Qemu-devel] [PATCH v2 1/2] block: Specify -drive legacy option aliases in array

2014-09-24 Thread Benoît Canet
The Wednesday 24 Sep 2014 à 16:46:28 (+0200), Kevin Wolf wrote : > Instead of a series of qemu_opt_rename() calls, use an array that > contains all of the renames and call qemu_opt_rename() in a loop. This > will keep the code readable even when we add an error return to > qemu_opt_rename(). > > S

[Qemu-devel] [PATCH v3 7/7] e500: Add support for eTSEC in device tree

2014-09-24 Thread Alexander Graf
This patch adds support to expose eTSEC devices in the dynamically created guest facing device tree. This allows us to expose eTSEC devices into guests without changes in the machine file. Because we can now tell the guest about eTSEC devices this patch allows the user to specify eTSEC devices via

[Qemu-devel] [PATCH v3 3/7] sysbus: Expose IRQ enumeration helpers

2014-09-24 Thread Alexander Graf
Sysbus devices can get their IRQ lines connected to other devices. It is possible to figure out which IRQ line a connection is on and whether a sysbus device even provides an IRQ connector at a specific offset. This patch exposes helpers to make this information publicly accessible. We will need i

[Qemu-devel] [PATCH v3 2/7] sysbus: Make devices spawnable via -device

2014-09-24 Thread Alexander Graf
Now that we can properly map sysbus devices that haven't been connected to something forcefully by C code, we can allow the -device command line option to spawn them. For machines that don't implement dynamic sysbus assignment in their board files we add a new bool "has_dynamic_sysbus" to the mach

[Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer

2014-09-24 Thread Benoît Canet
We will want to reuse this define in the future by making it common to multiple QEMU modules. It would be safer that this define be an integer so we avoid strange float rounding errors. Do this conversion. Signed-off-by: Benoît Canet --- include/qemu/throttle.h | 2 +- 1 file changed, 1 insertio

[Qemu-devel] [PATCH v3 6/7] PPC: e500: Support dynamically spawned sysbus devices

2014-09-24 Thread Alexander Graf
For e500 our approach to supporting dynamically spawned sysbus devices is to create a simple bus from the guest's point of view within which we map those devices dynamically. We allocate memory regions always within the "platform" hole in address space and map IRQs to predetermined IRQ lines that

[Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-24 Thread Benoît Canet
Reviewed-by: Eric Blake Signed-off-by: Benoît Canet --- include/qemu/throttle.h | 2 -- include/qemu/timer.h| 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 8f9e611..1c639d2 100644 --- a/include/qemu/throttle.h +++

[Qemu-devel] [PATCH v3 4/7] sysbus: Expose MMIO enumeration helper

2014-09-24 Thread Alexander Graf
Sysbus devices have a range of MMIO regions they expose. The exact number of regions is device specific and internal information to the device model. Expose whether a region exists via a public interface. That way our platform bus enumeration code can dynamically determine how many regions exist.

[Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper device

2014-09-24 Thread Alexander Graf
We need to support spawning of sysbus devices dynamically via the command line. The easiest way to represent these dynamically spawned devices in the guest's memory and IRQ layout is by preallocating some space for dynamic sysbus devices. This is what the "platform bus" device does. It is a sysbus

Re: [Qemu-devel] [PATCH 26/30] usb-storage: make its storage SCSI bus hotpluggable explicitly

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 14:50:41 +0200 Gerd Hoffmann wrote: > On Mi, 2014-09-24 at 11:48 +, Igor Mammedov wrote: > > usb-storage uses SCSI bus to provide underling storage > > (i.e. scsi-disk) and it's hotpluggable. > > No. usb-storage itself (the scsi hba) is hotpluggable, but the scsi > devic

[Qemu-devel] [PATCH v3 1/7] sysbus: Add dynamic sysbus device search

2014-09-24 Thread Alexander Graf
Sysbus devices can be spawned by C code or dynamically via the command line. In the latter case, we need to be able to find the dynamically created devices to do things with them. This patch adds a search helper that makes it easy to look for dynamically spawned sysbus devices. Signed-off-by: Ale

[Qemu-devel] [PATCH v3 0/7] Dynamic sysbus device allocation support

2014-09-24 Thread Alexander Graf
Platforms without ISA and/or PCI have had a seriously hard time in the dynamic device creation world of QEMU. Devices on these were modeled as SysBus devices which can only be instantiated in machine files, not through -device. Why is that so? For Sysbus devices we didn't know who should be respo

Re: [Qemu-devel] [PATCH 25/30] usb-bot: drop not needed "allow_hotplug = 0"

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 17:15, Igor Mammedov ha scritto: > But there is room for improvement here, > it it's possible to error out even earlier if usb-bot would be marked > as not hotpluggable device and add to qdev_device_add() check if > device is hotpluggable even before it's created. That would work too

  1   2   3   >