Re: [Qemu-devel] [PATCH v2] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread P J P
+-- On Fri, 8 Jan 2016, John Snow wrote --+ | > ide_state->status = READY_STAT | ERR_STAT; | > ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag); | > +ncq_tfs->used = 0; | > } | | Thanks, applied to my IDE tree: | | https://github.com/jnsnow/qemu/commits/ide | https://github

[Qemu-devel] [PULL 10/11] qtest/ahci: ATAPI data tests

2016-01-08 Thread John Snow
Simple I/O tests for DMA and PIO pathways in the AHCI HBA. I believe at this point in time all of the common, major IO pathways in BMDMA and AHCI are covered by qtests now. Signed-off-by: John Snow Message-id: 1452282920-21550-9-git-send-email-js...@redhat.com --- tests/ahci-test.c | 97 +++

[Qemu-devel] [PULL 11/11] libqos/ahci: organize header

2016-01-08 Thread John Snow
Organize the prototypes into nice little sections. Signed-off-by: John Snow Message-id: 1452282920-21550-10-git-send-email-js...@redhat.com --- tests/libqos/ahci.h | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/libqos/ahci.h b/tes

[Qemu-devel] [PULL 09/11] libqos/ahci: add ahci_exec

2016-01-08 Thread John Snow
add ahci_exec, which is a standard purpose flexible command dispatcher and tester for the AHCI device. The intent is to eventually cut down on the absurd amount of boilerplate inside of the AHCI qtest. Signed-off-by: John Snow Message-id: 1452282920-21550-8-git-send-email-js...@redhat.com --- te

[Qemu-devel] [PULL 07/11] libqos: allow zero-size allocations

2016-01-08 Thread John Snow
As part of streamlining the AHCI tests interface, it'd be nice if specying a size of zero could be handled without special branches and the allocator could handle this special case gracefully. This lets me use the "ahci_io" macros for non-data commands, too, which moves me forward towards shepherd

[Qemu-devel] [PULL 08/11] libqos/ahci: allow nondata commands for ahci_io variants

2016-01-08 Thread John Snow
These variants try to set a data offset, even if you don't specify one. In the cases where the offset is zero and it's a nondata command, just ignore the instruction. Signed-off-by: John Snow Message-id: 1452282920-21550-7-git-send-email-js...@redhat.com --- tests/ahci-test.c | 14 ++--

[Qemu-devel] [PULL 03/11] ahci-test: fix memory leak

2016-01-08 Thread John Snow
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow Message-id: 1452282920-21550-2-git-send-email-js...@redhat.com --- tests/ahci-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 0888506..f4945dc

[Qemu-devel] [PULL 05/11] libqos/ahci: ATAPI identify

2016-01-08 Thread John Snow
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow Message-id: 1452282920-21550-4-git-send-email-js...@redhat.com --- tests/ahci-test.c | 8 +++- tests/libqos/ahci.c | 5 + tests/libqos/ahci.h | 1 + 3 files changed, 13 insertions(+),

[Qemu-devel] [PULL 04/11] libqos/ahci: ATAPI support

2016-01-08 Thread John Snow
Add pathways to tolerate ATAPI commands. Notably, unlike ATA, each SCSI command's layout is a little different, so support will have to be patched in for each command as we want to test them in e.g. ahci_command_set_sizes and ahci_command_set_offset. For now, I'm adding support for 0x28, READ (10

[Qemu-devel] [PULL 06/11] libqos/ahci: Switch to mutable properties

2016-01-08 Thread John Snow
ATAPI commands are, unfortunately, weird in that they can be either DMA or PIO depending on a header bit. In order to accommodate them, I'll need to make AHCI command properties mutable so we can toggle between which "flavor" of ATAPI command we want to test. The default ATAPI transfer mechanism i

[Qemu-devel] [PULL 01/11] macio: fix overflow in lba to offset conversion for ATAPI devices

2016-01-08 Thread John Snow
From: Mark Cave-Ayland As the IDEState lba field is an int32_t, make sure we cast to int64_t before shifting to calculate the offset. Otherwise we end up with an overflow when trying to access sectors beyond 2GB as can occur when using DVD images. [Maintainer edit: fixed extraneous parentheses.

[Qemu-devel] [PULL 02/11] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread John Snow
From: Prasad J Pandit When processing NCQ commands, ACHI device emulation prepares a NCQ transfer object; To which an aio control block(aiocb) object is assigned in 'execute_ncq_command'. In case, when the NCQ command is invalid, the 'aiocb' object is not assigned, and NCQ transfer object is left

[Qemu-devel] [PULL 00/11] Ide patches

2016-01-08 Thread John Snow
The following changes since commit 38a762fec63fd5c035aae29ba9a77d357e21e4a7: Merge remote-tracking branch 'remotes/berrange/tags/pull-crypto-fixes-2015-12-23-1' into staging (2015-12-23 13:53:32 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull

Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-08 Thread Eric Blake
On 01/08/2016 01:37 AM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen-host-pci-device.c | 134 > ++- > hw/xen/xen-host-pci-device.h | 5 +- > hw/xen/xen_pt.c | 13 +++-- > 3 f

Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription

2016-01-08 Thread John Snow
On 01/06/2016 04:17 PM, Mark Cave-Ayland wrote: > On 06/01/16 20:57, John Snow wrote: > >> On 01/06/2016 03:37 PM, Mark Cave-Ayland wrote: >>> Make sure that we include the value of dma_active in the migration stream. >>> >>> Signed-off-by: Mark Cave-Ayland >>> --- >>> hw/ide/macio.c |3 ++

Re: [Qemu-devel] [PATCH v2 0/9] ahci: atapi qtests

2016-01-08 Thread John Snow
On 01/08/2016 02:55 PM, John Snow wrote: > Add ATAPI support into libqos/ahci, and write a few tests for it. > > This is the last "batch" of planned qtests for s/ata -- basic i/o > testing of HDDs and CDROMs on both PCI and AHCI should be complete > after this series. > > v2: Rebase and resend

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard I agree with Greg's comments, too. -corey On 01/05/2016 11:29 AM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 51 -- 1 file changed, 49 insertions(+), 2 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard On 01/05/2016 11:29 AM, Cédric Le Goater wrote: This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_b

Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-08 Thread Corey Minyard
On 01/06/2016 02:14 AM, Cédric Le Goater wrote: On 01/05/2016 08:59 PM, Eric Blake wrote: On 01/05/2016 10:29 AM, Cédric Le Goater wrote: [meta-comment] Your messages were not marked in-reply-to: the 0/8 cover letter, but came through as separate threads. This makes it harder to follow, especi

Re: [Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_init_sensor() API

2016-01-08 Thread Corey Minyard
The way the SDR and sensors are handled currently in the code I wrote is far from ideal, it's not scalable. In my mind, the BMC in qemu would never be a very elaborate one, you would use an external BMC for that. There are a couple of issues to deal with here: We need support for SDRs besides

Re: [Qemu-devel] [PATCH v2] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread John Snow
On 01/08/2016 02:48 PM, P J P wrote: > From: Prasad J Pandit > > When processing NCQ commands, ACHI device emulation prepares a > NCQ transfer object; To which an aio control block(aiocb) object > is assigned in 'execute_ncq_command'. In case, when the NCQ > command is invalid, the 'aiocb' obje

[Qemu-devel] [PATCH v2 2/9] libqos/ahci: ATAPI support

2016-01-08 Thread John Snow
Add pathways to tolerate ATAPI commands. Notably, unlike ATA, each SCSI command's layout is a little different, so support will have to be patched in for each command as we want to test them in e.g. ahci_command_set_sizes and ahci_command_set_offset. For now, I'm adding support for 0x28, READ (10

[Qemu-devel] [PATCH v2 7/9] libqos/ahci: add ahci_exec

2016-01-08 Thread John Snow
add ahci_exec, which is a standard purpose flexible command dispatcher and tester for the AHCI device. The intent is to eventually cut down on the absurd amount of boilerplate inside of the AHCI qtest. Signed-off-by: John Snow --- tests/libqos/ahci.c | 76

[Qemu-devel] [PATCH v2 9/9] libqos/ahci: organize header

2016-01-08 Thread John Snow
Organize the prototypes into nice little sections. Signed-off-by: John Snow --- tests/libqos/ahci.h | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h index 2c2d2fc..69dc4d7 100644 --- a/tests/libqo

[Qemu-devel] [PATCH v2 4/9] libqos/ahci: Switch to mutable properties

2016-01-08 Thread John Snow
ATAPI commands are, unfortunately, weird in that they can be either DMA or PIO depending on a header bit. In order to accommodate them, I'll need to make AHCI command properties mutable so we can toggle between which "flavor" of ATAPI command we want to test. The default ATAPI transfer mechanism i

[Qemu-devel] [PATCH v2 8/9] qtest/ahci: ATAPI data tests

2016-01-08 Thread John Snow
Simple I/O tests for DMA and PIO pathways in the AHCI HBA. I believe at this point in time all of the common, major IO pathways in BMDMA and AHCI are covered by qtests now. Signed-off-by: John Snow --- tests/ahci-test.c | 97 +++ 1 file change

[Qemu-devel] [PATCH v2 5/9] libqos: allow zero-size allocations

2016-01-08 Thread John Snow
As part of streamlining the AHCI tests interface, it'd be nice if specying a size of zero could be handled without special branches and the allocator could handle this special case gracefully. This lets me use the "ahci_io" macros for non-data commands, too, which moves me forward towards shepherd

[Qemu-devel] [PATCH v2 3/9] libqos/ahci: ATAPI identify

2016-01-08 Thread John Snow
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow --- tests/ahci-test.c | 8 +++- tests/libqos/ahci.c | 5 + tests/libqos/ahci.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/ahci-test.c b/tests/ahci-test

[Qemu-devel] [PATCH v2 0/9] ahci: atapi qtests

2016-01-08 Thread John Snow
Add ATAPI support into libqos/ahci, and write a few tests for it. This is the last "batch" of planned qtests for s/ata -- basic i/o testing of HDDs and CDROMs on both PCI and AHCI should be complete after this series. v2: Rebase and resend for 2.6. ___

[Qemu-devel] [PATCH v2 6/9] libqos/ahci: allow nondata commands for ahci_io variants

2016-01-08 Thread John Snow
These variants try to set a data offset, even if you don't specify one. In the cases where the offset is zero and it's a nondata command, just ignore the instruction. Signed-off-by: John Snow --- tests/ahci-test.c | 14 ++ tests/libqos/ahci.c | 3 +++ 2 files changed, 5 insertions

[Qemu-devel] [PATCH v2 1/9] ahci-test: fix memory leak

2016-01-08 Thread John Snow
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow --- tests/ahci-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 0888506..f4945dc 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -104

Re: [Qemu-devel] [PATCH v2] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread John Snow
On 01/08/2016 02:48 PM, P J P wrote: > From: Prasad J Pandit > > When processing NCQ commands, ACHI device emulation prepares a > NCQ transfer object; To which an aio control block(aiocb) object > is assigned in 'execute_ncq_command'. In case, when the NCQ > command is invalid, the 'aiocb' obje

Re: [Qemu-devel] [PATCH 6/8] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard This looks good. Though this file is getting uncomfortably large, I may have to look at splitting it up. -corey On 01/05/2016 11:30 AM, Cédric Le Goater wrote: SET_SENSOR_READING is a complex IPMI command (IPMI spec : "35.17 Set Sensor Reading And Event Status Comma

[Qemu-devel] [PATCH v2] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread P J P
From: Prasad J Pandit When processing NCQ commands, ACHI device emulation prepares a NCQ transfer object; To which an aio control block(aiocb) object is assigned in 'execute_ncq_command'. In case, when the NCQ command is invalid, the 'aiocb' object is not assigned, and NCQ transfer object is left

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-08 Thread Corey Minyard
On 01/05/2016 11:29 AM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 60586a67104e..c3a06d0ac7e4 1

Re: [Qemu-devel] [PATCH 4/8] ipmi: add FRU support

2016-01-08 Thread Corey Minyard
On 01/05/2016 11:29 AM, Cédric Le Goater wrote: This patch provides a simplistic FRU support for the IPMI BMC simulator. The FRU area contains 32 entries * 256 bytes which should be enough to start some simulation. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 119

Re: [Qemu-devel] [PATCH] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread P J P
+-- On Fri, 8 Jan 2016, John Snow wrote --+ | In both of these error pathways, AIOCB is actually never assigned to | begin with. True, it's mentioned in the commit message. | So it's not necessarily a use-after-free. Yes, right. | I think it should be safe to put ncq_tfs->used = 0 directl

[Qemu-devel] [PATCH v1 1/1] arm_gic: Include the GIC ArchRev in the ICPIDR2 register

2016-01-08 Thread Alistair Francis
The ARM GIC documentation (page 4-119) describes that bits 7 to 4 of the ICPIDR2 register should include the GIC architecture version. This patche ORs the version into the existing return value. Signed-off-by: Alistair Francis Tested-by: Sören Brinkmann --- hw/intc/arm_gic.c | 4 1 file c

Re: [Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 04:19:42PM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > Hi all > > > > Version 2 of this series is even longer. :-) > > > > Back in 2015 summer one of our OPW interns Linda Jacobson explored the > > possibility of making 9pfs work on Xen. It turned out lots of co

Re: [Qemu-devel] [PATCH v2 12/27] 9pfs: use V9fsBlob to transmit xattr

2016-01-08 Thread Wei Liu
On Sat, Jan 09, 2016 at 12:18:40AM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: > >> Wei Liu writes: > >> > >> > And make v9fs_pack static function. Now we only need to export > >> > v9fs_{,un}marshal to device. > >> >

Re: [Qemu-devel] [PATCH v2 27/27] 9pfs: disentangle V9fsState

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 11:39:37AM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > V9fsState now only contains generic fields. Introduce V9fsVirtioState > > for virtio transport. Change virtio-pci and virtio-ccw to use > > V9fsVirtioState. Handle transport enumeration in generic routines.

Re: [Qemu-devel] [PATCH v2 12/27] 9pfs: use V9fsBlob to transmit xattr

2016-01-08 Thread Aneesh Kumar K.V
Wei Liu writes: > On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: >> Wei Liu writes: >> >> > And make v9fs_pack static function. Now we only need to export >> > v9fs_{,un}marshal to device. >> > >> > Signed-off-by: Wei Liu >> > --- >> > fsdev/virtio-9p-marshal.c | 4 ++-- >>

Re: [Qemu-devel] [PATCH] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread John Snow
On 01/08/2016 07:08 AM, P J P wrote: > From: Prasad J Pandit > > When processing NCQ commands, ACHI device emulation prepares a > NCQ transfer object; To which an aio control block(aiocb) object > is assigned in 'execute_ncq_command'. In case, when the NCQ > command is invalid, the 'aiocb' obje

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-08 Thread Laszlo Ersek
On 01/08/16 18:45, Igor Mammedov wrote: > On Fri, 8 Jan 2016 13:58:03 +0100 > Gerd Hoffmann wrote: > >> This patch extends the functionality of the max-ram-below-4g option >> to also allow increasing lowmem. Use case: Give as much memory as >> possible to legacy non-PAE guests. >> >> While bein

Re: [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new

2016-01-08 Thread Paolo Bonzini
On 08/01/2016 17:24, Daniel P. Berrange wrote: >> > if (nbd_send_negotiate(client)) { >> > +shutdown(csock, 2); >> > +close(csock); >> > g_free(client); >> > -return NULL; >> > +ret = -1; >> > +goto out; > If you simply make this failure code

Re: [Qemu-devel] [PATCH] qdev: free qemu-opts when the QOM path goes away

2016-01-08 Thread Paolo Bonzini
On 05/11/2015 13:06, Andreas Färber wrote: > Am 04.11.2015 um 19:34 schrieb Markus Armbruster: >> Paolo Bonzini writes: >> >>> Otherwise there is a race where the DEVICE_DELETED event has been sent but >>> attempts to reuse the ID will fail. >>> >>> Reported-by: Michael S. Tsirkin >>> Signed-of

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2016-01-08 Thread Denis V. Lunev
On 01/08/2016 08:54 PM, Eric Blake wrote: On 01/08/2016 09:40 AM, Denis V. Lunev wrote: Markus' series to add a prefixing notation would be better to use here (although I didn't check if he caught this one in that series already): https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03495.h

Re: [Qemu-devel] [PATCH v2 21/27] 9pfs: factor out virtio_9p_push_and_notify

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 03:27:49PM +0530, Aneesh Kumar K.V wrote: [...] > > How is this different from pdu_push_notify added by [PATCH 18/27] > #18 is encapsulating functionality into pdu_* function family. This patch is encapsulating virtio specific code into virtio specific function. The two

Re: [Qemu-devel] [PATCH v2 12/27] 9pfs: use V9fsBlob to transmit xattr

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > And make v9fs_pack static function. Now we only need to export > > v9fs_{,un}marshal to device. > > > > Signed-off-by: Wei Liu > > --- > > fsdev/virtio-9p-marshal.c | 4 ++-- > > fsdev/virtio-9p-marshal.h

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2016-01-08 Thread Eric Blake
On 01/08/2016 09:40 AM, Denis V. Lunev wrote: Markus' series to add a prefixing notation would be better to use here (although I didn't check if he caught this one in that series already): https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03495.html >>> this series is not yet

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-08 Thread Igor Mammedov
On Fri, 8 Jan 2016 13:58:03 +0100 Gerd Hoffmann wrote: > This patch extends the functionality of the max-ram-below-4g option > to also allow increasing lowmem. Use case: Give as much memory as > possible to legacy non-PAE guests. > > While being at it also rework the lowmem calculation logic a

[Qemu-devel] [PATCH 2/2] block: remove legacy_dinfo at blk_detach_dev time

2016-01-08 Thread Paolo Bonzini
Currently, blockdev_del_drive does a blk_unref (and before it blockdev_auto_del did the same) that will cause blk_delete to be called and the DriveInfo to be freed. But really, we want to free the drive info as soon as the device is detached, even if there are other references for whatever reason,

[Qemu-devel] [PATCH 1/2] block: detach devices from DriveInfo at unrealize time

2016-01-08 Thread Paolo Bonzini
Instead of delaying blk_detach_dev and blockdev_auto_del until the object is finalized and properties are released, do that as soon as possible. This patch replaces blockdev_mark_auto_del calls with blk_detach_dev and blockdev_del_drive (the latter is a combination of the former blockdev_mark_auto

Re: [Qemu-devel] [PATCH v4 1/5] Use qemu_strtoul instead of strtol

2016-01-08 Thread Eric Blake
On 01/08/2016 01:37 AM, Cao jin wrote: > strtol() don`t guarantee errno to be ERANGE on overflow. I stand slightly corrected: C99 requires ERANGE on overflow, but not EINVAL; it is POSIX that adds EINVAL, but does not properly require it. At any rate, my main point was that errno is not always pr

[Qemu-devel] [RFC PATCH 0/2] Early release of -drive QemuOpts

2016-01-08 Thread Paolo Bonzini
In short, this patch gets rid of blockdev_mark_auto_del and blockdev_auto_del. With these patches, it is possible to create a new -drive with the same id as soon as the DEVICE_DELETED event is delivered (which equals to unrealize). I'm sorry I'm not able to explain the history (and probably do no

[Qemu-devel] [PATCH] pc: acpi: fix build fail on w32

2016-01-08 Thread Igor Mammedov
build fail with warnings on w32 compiler: hw/acpi/memory_hotplug_acpi_table.c: In function ‘build_memory_hotplug_aml’: hw/acpi/memory_hotplug_acpi_table.c:148: warning: integer constant is too large for ‘long’ type hw/acpi/memory_hotplug_acpi_table.c:149: warning: integer constant is too large for

Re: [Qemu-devel] [PATCH] hmp: avoid redundant null termination of buffer

2016-01-08 Thread P J P
+-- On Fri, 8 Jan 2016, Wolfgang Bumiller wrote --+ | On Fri, Jan 08, 2016 at 07:29:31PM +0530, P J P wrote: | > + if (!strncmp(keyname_buf, "<-", 2)) | > and remove the 'keyname_len' altogether. | | This wouldn't catch '<' without '-'. (`sendkey <`) | Also, strncmp with a length of 1 (in the or

Re: [Qemu-devel] [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-08 Thread Igor Mammedov
On Fri, 8 Jan 2016 11:40:53 +0800 Xiao Guangrong wrote: > On 01/07/2016 07:04 PM, Igor Mammedov wrote: > > On Wed, 6 Jan 2016 23:39:04 +0800 > > Xiao Guangrong wrote: > > > >> On 01/06/2016 11:23 PM, Igor Mammedov wrote: > >>> On Tue, 5 Jan 2016 02:52:05 +0800 > >>> Xiao Guangrong wrote: >

[Qemu-devel] [RFC PATCH 2/3] tb-annotation: Add control flow graph mapper

2016-01-08 Thread Peer Adelt
Added helper function at the start of every TranslationBlock that maps the sequence of static basic blocks (obtained from the XML file) to the current TranslationBlock. The helper also accumulates the values that are annotated on the corresponding edges of the control flow graph. Signed-off-by: Pe

[Qemu-devel] [RFC PATCH 0/3] TranslationBlock annotation mechanism

2016-01-08 Thread Peer Adelt
Hey guys We have developed a generic concept to annotate TranslationBlocks during runtime. The initial idea was to use it for time annotation with data from static analysis tools. However, we have kept this approach as generic as possible to allow other kinds of annotation (e.g. power consumption

[Qemu-devel] [RFC PATCH 3/3] tb-annotation: Activate annotation extension

2016-01-08 Thread Peer Adelt
This changeset activates the TranslationBlock annotation mechanism for the QEMU system mode. Signed-off-by: Peer Adelt --- Makefile| 5 +++-- Makefile.objs | 4 Makefile.target | 4 +++- configure | 13 + qemu-op

[Qemu-devel] [RFC PATCH 1/3] tb-annotation: Added annotation XML file parser

2016-01-08 Thread Peer Adelt
The XML file contains a control flow graph, where each edge is annotated with a context-dependent value. The parser reads this information into a data structure within CPUState. Signed-off-by: Peer Adelt --- include/qom/cpu.h| 9 ++ include/tb-annotation/tb-annotati

[Qemu-devel] [PATCH] qapi: Update docs to match recent generated changes, part 2

2016-01-08 Thread Eric Blake
[Either worth squashing into a single patch with the posted v8 14.5/35 and sinking it to the end of the series, or else splitting it into pieces and squashing per patch that makes a change to generated output] Signed-off-by: Eric Blake --- v9: new patch --- docs/qapi-code-gen.txt | 51 +

Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params

2016-01-08 Thread Richard Henderson
On 01/08/2016 08:25 AM, Edgar E. Iglesias wrote: > To do so, we'd need to first emit the insn_start and then after translating > the > given target-insn, update the insn_start parameters with the decoded insn > details. Fair enough. > Any thoughts on this approach? Or ideas on better options to

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2016-01-08 Thread Denis V. Lunev
On 01/08/2016 07:14 PM, Eric Blake wrote: On 01/08/2016 04:27 AM, Denis V. Lunev wrote: /* Delete old snapshots of the same name */ if (name && bdrv_all_delete_snapshot(name, &bs1, &local_err) < 0) { -monitor_printf(mon, - "Error while deleting snap

Re: [Qemu-devel] [PATCH v2] target-mips: Fix ALIGN instruction when bp=0

2016-01-08 Thread Leon Alrae
Hi Miodrag, Thanks for the fix; I've applied it to the target-mips queue (in future please send patches inline). Thanks, Leon On 04/01/16 15:52, Miodrag Dinic wrote: > Hello Aurelien, > > thanks for your comments and review. > Version 2 of the patch is in the attachment. > > Diff between versi

[Qemu-devel] [RFC 2/2] gen-icount: Use tcg_set_insn_param

2016-01-08 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use tcg_set_insn_param() instead of directly accessing internal tcg data structures to update an insn param. Signed-off-by: Edgar E. Iglesias --- include/exec/gen-icount.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/exe

[Qemu-devel] [RFC 1/2] tcg: Add tcg_set_insn_param

2016-01-08 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add tcg_set_insn_param as a mechanism to modify an insn parameter after emiting the insn. This is useful for icount and also for embedding fault information for a specific insn. Signed-off-by: Edgar E. Iglesias --- tcg/tcg.h | 6 ++ 1 file changed, 6 insertions(+)

[Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params

2016-01-08 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, On AArch64, when some load/stores trap under specific conditions, a set of detailed info describing the insn is provided to the trap handler (e.g size of the access, target registers, insn-length mode etc). This specific info is known at translation time and Peter s

Re: [Qemu-devel] [PATCH] ether/slirp: Avoid redefinition of the same constants

2016-01-08 Thread Alex Bennée
Dr. David Alan Gilbert (git) writes: > From: "Dr. David Alan Gilbert" > > eth.h and slirp.h both define ETH_ALEN and ETH_P_IP > rtl8139.c and eth.h both define ETH_HLEN > > Move the related constant (ETH_P_ARP) from slirp.h to eth.h, and > remove the duplicates; make slirp.h include eth.h Revi

Re: [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new

2016-01-08 Thread Daniel P. Berrange
On Wed, Dec 30, 2015 at 01:49:25PM +0800, Fam Zheng wrote: > In preparation for an async implementation, introduce a callback and > move the shutdown/close to the function. > > Signed-off-by: Fam Zheng > --- > blockdev-nbd.c | 5 ++--- > include/block/nbd.h | 6 -- > nbd.c

Re: [Qemu-devel] [PULL 00/59] acpi dsdt rework, misc fixes

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 15:08, Michael S. Tsirkin wrote: > The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into > staging (2016-01-08 12:50:19 +) > > are availa

Re: [Qemu-devel] [PATCH] arm64: kernel: fix PMUv3 registers unconditional access

2016-01-08 Thread Lorenzo Pieralisi
On Fri, Jan 08, 2016 at 03:33:00PM +, Will Deacon wrote: [...] > > /* EL2 debug */ > > + mrs x0, id_aa64dfr0_el1 // Check ID_AA64DFR0_EL1 PMUVer > > + ubfxx0, x0, #8, #4 > > + cmp x0, #1 > > + b.ne4f // Skip if no PMUv3 pres

Re: [Qemu-devel] [PATCH] Add optionrom compatible with fw_cfg DMA version

2016-01-08 Thread Paolo Bonzini
On 08/01/2016 17:05, Marc Marí wrote: >> > Do you even need to go to 32-bit mode? The only reason to do so in >> > the original ROM was to do a "rep insb" above 1 GB, but here fw_cfg >> > can do DMA to high addresses for you. > There's no need of course. I was looking at the original ROM and I d

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2016-01-08 Thread Eric Blake
On 01/08/2016 04:27 AM, Denis V. Lunev wrote: >>> /* Delete old snapshots of the same name */ >>> if (name && bdrv_all_delete_snapshot(name, &bs1, &local_err) < >>> 0) { >>> -monitor_printf(mon, >>> - "Error while deleting snapshot on device >>> '%s': %s

Re: [Qemu-devel] [PATCH 5/6] nvdimm acpi: let qemu handle _DSM method

2016-01-08 Thread Igor Mammedov
On Fri, 8 Jan 2016 12:01:54 +0800 Xiao Guangrong wrote: > On 01/07/2016 10:22 PM, Igor Mammedov wrote: > > On Tue, 5 Jan 2016 02:52:07 +0800 > > Xiao Guangrong wrote: > > > >> If dsm memory is successfully patched, we let qemu fully emulate > >> the dsm method > >> > >> This patch saves _DSM

Re: [Qemu-devel] [PATCH] Add optionrom compatible with fw_cfg DMA version

2016-01-08 Thread Marc Marí
On Fri, 8 Jan 2016 16:54:07 +0100 Paolo Bonzini wrote: > > > On 08/01/2016 15:58, Marc Marí wrote: > > > > +static inline uint16_t readw_addr32(const void *addr) { > > +uint16_t val; > > +asm("addr32 movw %1, %0" : "=r"(val) : "g"(addr)); > > +barrier(); > > +return val; > > +}

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Greg Kurz
On Fri, 8 Jan 2016 16:25:18 +0100 Laurent Vivier wrote: > > > On 08/01/2016 15:19, Greg Kurz wrote: > > On Thu, 7 Jan 2016 19:32:37 +0100 > > Laurent Vivier wrote: > >> > > > > Sorry for the late answer to this one, I got diverted :) > > > >> > >> On 07/01/2016 12:32, Greg Kurz wrote: > >>>

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-08 Thread Igor Mammedov
On Fri, 8 Jan 2016 12:21:09 +0800 Xiao Guangrong wrote: > On 01/07/2016 05:21 PM, Igor Mammedov wrote: > > On Wed, 6 Jan 2016 01:07:45 +0800 > > Xiao Guangrong wrote: > > > >> On 01/06/2016 12:43 AM, Michael S. Tsirkin wrote: > >> > > Yes - if address is static, you need to put it outsid

[Qemu-devel] [RFC PATCH 1/2] softmmu_template: add smmu_helper, convert VICTIM_TLB_HIT

2016-01-08 Thread Alex Bennée
This lays the ground work for a re-factoring of the softmmu template code. The patch introduces inline "smmu_helper" functions where common (or almost common) code can be placed. Arguments that the compiler picks up as constant can then be used to eliminate legs of code in the inline fragments. Th

Re: [Qemu-devel] [PATCH] Add optionrom compatible with fw_cfg DMA version

2016-01-08 Thread Paolo Bonzini
On 08/01/2016 15:58, Marc Marí wrote: > > +static inline uint16_t readw_addr32(const void *addr) { > +uint16_t val; > +asm("addr32 movw %1, %0" : "=r"(val) : "g"(addr)); > +barrier(); > +return val; > +} > + Does SeaBIOS ensure that DS base is zero here? > +static void transiti

[Qemu-devel] [RFC PATCH 2/2] softmmu: simplify helper_*_st_name with smmu_helper(do_unl_store)

2016-01-08 Thread Alex Bennée
From: Alvise Rigo Attempting to simplify the helper_*_st_name, wrap the do_unaligned_access code into an shared inline function. As this also removes the goto statement the inline code is expanded twice in each helper. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana CC: Alvise Rigo

[Qemu-devel] [RFC PATCH 0/2] Attempt to clean-up softmmu templates

2016-01-08 Thread Alex Bennée
Hi, While reviewing Alvise's LL/SC patches we were discussing how to avoid duplication in some of the re-factoring work. The softmmu_template.h code has a lot of duplication in due to BE and LE helpers. By pushing code into an inline helper we can let the compiler do the hard work of optimising aw

[Qemu-devel] [PATCH] serial: transmit within the programmed baud rate

2016-01-08 Thread Paolo Bonzini
Code for throttling the serial port was removed by upstream commit fcfb4d6 ("serial: add flow control to transmit", 2013-03-05). Add it back. The only non-obvious change is that tsr_retry can now become nonzero also in loopback mode, so the assignment is moved out of the "if". Signed-off-by: Pao

Re: [Qemu-devel] [PATCH] arm64: kernel: fix PMUv3 registers unconditional access

2016-01-08 Thread Will Deacon
Hi Lorenzo, On Fri, Jan 08, 2016 at 12:54:27PM +, Lorenzo Pieralisi wrote: > The Performance Monitors extension is an optional feature of the > AArch64 architecture, therefore, in order to access Performance > Monitors registers safely, the kernel should detect the PMUv3 unit > presence throug

Re: [Qemu-devel] Block I/O Tracing

2016-01-08 Thread Luis Pabon
Great summary Stefan. I think you are correct, and it is definitely non-trivial to get the accuracy of the trace as close as possible to real-world timings. Sometimes, like in the block driver IO responses or caching algorithm studies, having the IO trace of an application be 'close' enough could

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Laurent Vivier
On 08/01/2016 15:19, Greg Kurz wrote: > On Thu, 7 Jan 2016 19:32:37 +0100 > Laurent Vivier wrote: >> > > Sorry for the late answer to this one, I got diverted :) > >> >> On 07/01/2016 12:32, Greg Kurz wrote: >>> When running a fully emulated device in cross-endian conditions, including >>> a v

Re: [Qemu-devel] [PATCH 1/3] sun4u: split out NPT and INT_DIS into separate CPUTimer fields

2016-01-08 Thread Mark Cave-Ayland
On 08/01/16 14:55, Peter Maydell wrote: > On 8 January 2016 at 14:34, Mark Cave-Ayland > wrote: >> I'm not particularly worried about sun4u for the moment as there are >> already other reasons why migration would fail, e.g. no >> VMStateDescription for storing PCI interrupt state in the apb host

[Qemu-devel] [PULL 03/59] hw/i386: fill in the CENTURY field of the FADT (FACP) ACPI table

2016-01-08 Thread Michael S. Tsirkin
From: Laszlo Ersek The ACPI specification (minimally versions 1.0b through 6.0) define the FADT.CENTURY field as: The RTC CMOS RAM index to the century of data value (hundred and thousand year decimals). If this field contains a zero, then the RTC centenary feature is not supported. If thi

[Qemu-devel] [PULL 01/59] nvdimm: fix header pointer in nvdimm_build_nfit()

2016-01-08 Thread Michael S. Tsirkin
From: Haozhong Zhang In the current nvdimm_build_nfit(), the pointer 'header' initially equals to table_data->data + table_data->len. However, the following g_array_append_vals(table_data, structures->data, structures->len) may resize and relocate table_data->data[]. Therefore, the usage of 'head

[Qemu-devel] [PULL 00/59] acpi dsdt rework, misc fixes

2016-01-08 Thread Michael S. Tsirkin
The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qem

[Qemu-devel] [PULL 02/59] igd-passthrough: fix use of host_pci_config_read

2016-01-08 Thread Michael S. Tsirkin
From: Cao jin Fix the bug introduced by 595a4f07: function host_pci_config_read() should be pass-by-reference, not value. This probably means this function never worked for anyone. Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-host/piix.c

Re: [Qemu-devel] [PATCH 00/25] target-sparc improvements

2016-01-08 Thread Richard Henderson
On 12/29/2015 10:59 AM, Mark Cave-Ayland wrote: > If there are explicit bug-fixes related to above then my preference > would be to have them as a separate patchset outside of the performance > improvements, but then if this isn't feasible then I don't feel that > this should block getting this pat

Re: [Qemu-devel] [PULL 00/55] acpi, pc features

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 14:19, Michael S. Tsirkin wrote: > The following changes since commit 5dc42c186d63b7b338594fc071cf290805dcc5a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-12-22 14:21:42 +) > > are available in the git repository at:

Re: [Qemu-devel] Qemu linux-user que

2016-01-08 Thread John Paul Adrian Glaubitz
On 01/08/2016 03:03 PM, Laurent Vivier wrote: > I think you can add the ones from Adrian: > > [PATCH 1/2] linux-user: Update m68k syscall definitions to match Linux 4.4. > [PATCH 2/2] linux-user: Add SOCKOP_sendmmsg and SOCKOP_recvmmsg socket > call, wire them up. Oh, I'd really appreciate that a

[Qemu-devel] [PATCH] Add optionrom compatible with fw_cfg DMA version

2016-01-08 Thread Marc Marí
This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí --- .gitignore| 4 + hw/i386/pc.c | 9 +- hw/nvram/fw_cfg.c | 2 +- include/hw/nvram/fw_cfg.h | 1 + pc-bios/optionrom/Makefile| 8 +- pc-bios/o

Re: [Qemu-devel] [PATCH] arm64: kernel: fix PMUv3 registers unconditional access

2016-01-08 Thread Guenter Roeck
On Fri, Jan 08, 2016 at 12:54:27PM +, Lorenzo Pieralisi wrote: > The Performance Monitors extension is an optional feature of the > AArch64 architecture, therefore, in order to access Performance > Monitors registers safely, the kernel should detect the PMUv3 unit > presence through the ID_AA64

Re: [Qemu-devel] [PATCH 1/3] sun4u: split out NPT and INT_DIS into separate CPUTimer fields

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 14:34, Mark Cave-Ayland wrote: > I'm not particularly worried about sun4u for the moment as there are > already other reasons why migration would fail, e.g. no > VMStateDescription for storing PCI interrupt state in the apb host bridge. > > Last time I checked sun4m migration

Re: [Qemu-devel] [PATCH 04/10] hw/sd: Add QOM bus which SD cards plug in to

2016-01-08 Thread Peter Crosthwaite
On Thu, Jan 7, 2016 at 10:09 AM, Peter Maydell wrote: > On 20 December 2015 at 20:51, Peter Crosthwaite > wrote: >> On Sun, Dec 20, 2015 at 9:10 AM, Peter Maydell >> wrote: >>> For user-level back compat I think we need to retain "might have >>> an sdcard object with no block backend, and that

[Qemu-devel] [PULL 54/59] pc: acpi: remove unused ASL templates and related blobs/utils

2016-01-08 Thread Michael S. Tsirkin
From: Igor Mammedov QEMU now uses internally composed DSDT so drop now empty *.dsl templates and related *.generated binary blobs. Also since templates are not used anymore/obolete remove utility scripts used for extracting/patching AML blobs compiled by IASL and for updating them in git tree.

  1   2   3   >