Re: [Qemu-devel] virtio-net: configurable TX queue size

2017-05-06 Thread Wang, Wei W
On 05/06/2017 04:37 AM, Michael S. Tsirkin wrote: > On Fri, May 05, 2017 at 10:27:13AM +0800, Jason Wang wrote: > > > > > > On 2017年05月04日 18:58, Wang, Wei W wrote: > > > Hi, > > > > > > I want to re-open the discussion left long time ago: > > > https://lists.gnu.org/archive/html/qemu-devel/2015-11

[Qemu-devel] [Bug 1689003] [NEW] USB passthrough should not fail if SET CONFIGURATION fails

2017-05-06 Thread Manfred Härtel
Public bug reported: QEMU's USB passthrough was not working for my new smartphone. While analyzing the problem, I found out that a SET CONFIGURATION Request was NACKed by the USB device (probably because a SET CONFIGURATION request was already sent from the host to the device). So I wrote a simp

[Qemu-devel] [Bug 795866] Re: pci passthrough doesn´t work

2017-05-06 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/795866 Title: pci passthro

Re: [Qemu-devel] [PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS

2017-05-06 Thread Wang, Wei W
On 05/06/2017 06:29 AM, Michael S. Tsirkin wrote: > On Thu, May 04, 2017 at 04:50:12PM +0800, Wei Wang wrote: > > Add a new feature, VIRTIO_BALLOON_F_PAGE_CHUNKS, which enables the > > transfer of the ballooned (i.e. inflated/deflated) pages in chunks to > > the host. > > > > The implementation of

Re: [Qemu-devel] [PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ

2017-05-06 Thread Wang, Wei W
On 05/06/2017 06:21 AM, Michael S. Tsirkin wrote: > On Thu, Apr 27, 2017 at 02:33:44PM +0800, Wei Wang wrote: > > On 04/14/2017 01:08 AM, Michael S. Tsirkin wrote: > > > On Thu, Apr 13, 2017 at 05:35:08PM +0800, Wei Wang wrote: > > > > Add a new vq, miscq, to handle miscellaneous requests between t

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-05-06 Thread Wang, Wei W
On 05/06/2017 06:26 AM, Michael S. Tsirkin wrote: > On Thu, Apr 27, 2017 at 02:31:49PM +0800, Wei Wang wrote: > > On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: > > > On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: > > > > Hi Michael, could you please give some feedback? > > > I'm s

[Qemu-devel] [PATCH v13 09/12] iotests: Add test 179 to cover write zeroes with unmap

2017-05-06 Thread Eric Blake
No tests were covering write zeroes with unmap. Additionally, I needed to prove that my previous patches for correct status reporting and write zeroes optimizations actually had an impact. The test works for cluster_size between 8k and 2M (for smaller sizes, it fails because our allocation patter

[Qemu-devel] [PATCH v13 10/12] qcow2: Optimize write zero of unaligned tail cluster

2017-05-06 Thread Eric Blake
We've already improved discards to operate efficiently on the tail of an unaligned qcow2 image; it's time to make a similar improvement to write zeroes. The special case is only valid at the tail cluster of a file, where we must recognize that any sectors beyond the image end would implicitly read

[Qemu-devel] [PATCH v13 11/12] qcow2: Assert that cluster operations are aligned

2017-05-06 Thread Eric Blake
We already audited (in commit 0c1bd469) that qcow2_discard_clusters() is only passed cluster-aligned start values; but we can further tighten the assertion that the only unaligned end value is at EOF. Recent commits have taken advantage of an unaligned tail cluster, for both discard and write zero

[Qemu-devel] [PATCH v13 05/12] qcow2: Name typedef for cluster type

2017-05-06 Thread Eric Blake
Although it doesn't add all that much type safety (this is C, after all), it does add a bit of legibility to use the name QCow2ClusterType instead of a plain int. In particular, qcow2_get_cluster_offset() has an overloaded return type; a QCow2ClusterType on success, and -errno on failure; keeping

[Qemu-devel] [PATCH v13 04/12] qcow2: Correctly report status of preallocated zero clusters

2017-05-06 Thread Eric Blake
We were throwing away the preallocation information associated with zero clusters. But we should be matching the well-defined semantics in bdrv_get_block_status(), where (BDRV_BLOCK_ZERO | BDRV_BLOCK_OFFSET_VALID) informs the user which offset is reserved, while still reminding the user that readi

[Qemu-devel] [PATCH v13 08/12] iotests: Improve _filter_qemu_img_map

2017-05-06 Thread Eric Blake
Although _filter_qemu_img_map documents that it scrubs offsets, it was only doing so for human mode. Of the existing tests using the filter (97, 122, 150, 154, 176), two of them are affected, but it does not hurt the validity of the tests to not require particular mappings (another test, 66, uses

[Qemu-devel] [PATCH v13 02/12] qcow2: Use consistent switch indentation

2017-05-06 Thread Eric Blake
Fix a couple of inconsistent indentations, before an upcoming patch further tweaks the switch statements. (best viewed with 'git diff -b'). Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- v13: split off non-indentation changes v12: new patch --- block/qcow2-cluster.c | 32 +--

[Qemu-devel] [PATCH v13 12/12] qcow2: Discard/zero clusters by byte count

2017-05-06 Thread Eric Blake
Passing a byte offset, but sector count, when we ultimately want to operate on cluster granularity, is madness. Clean up the external interfaces to take both offset and count as bytes, while still keeping the assertion added previously that the caller must align the values to a cluster. Then rena

[Qemu-devel] [PATCH v13 00/12] qcow2 zero-cluster tweaks [was add blkdebug tests]

2017-05-06 Thread Eric Blake
I've collected several improvements for qcow2 zero-cluster handling. Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v13 Marked as v13 for "hysterical raisins", since it it the half of v10 [1] that was not resubmitted as v11 [2]. Depends on Max's block tree: https:/

[Qemu-devel] [PATCH v13 06/12] qcow2: Make distinction between zero cluster types obvious

2017-05-06 Thread Eric Blake
Treat plain zero clusters differently from allocated ones, so that we can simplify the logic of checking whether an offset is present. Do this by splitting QCOW2_CLUSTER_ZERO into two new enums, QCOW2_CLUSTER_ZERO_PLAIN and QCOW2_CLUSTER_ZERO_ALLOC. I tried to arrange the enum so that we could use

[Qemu-devel] [PATCH v13 07/12] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-05-06 Thread Eric Blake
Similar to discard_single_l2(), we should try to avoid dirtying the L2 cache when the cluster we are changing already has the right characteristics. Note that by the time we get to zero_single_l2(), BDRV_REQ_MAY_UNMAP is a requirement to unallocate a cluster (this is because the block layer clears

[Qemu-devel] [PATCH v13 03/12] block: Update comments on BDRV_BLOCK_* meanings

2017-05-06 Thread Eric Blake
We had some conflicting documentation: a nice 8-way table that described all possible combinations of DATA, ZERO, and OFFSET_VALID, contrasted with text that implied that OFFSET_VALID always meant raw data could be read directly. Furthermore, the text refers a lot to bs->file, even though the inte

[Qemu-devel] [PATCH v13 01/12] qcow2: Nicer variable names in qcow2_update_snapshot_refcount()

2017-05-06 Thread Eric Blake
In order to keep checkpatch happy when the next patch changes indentation, we first have to shorten some long lines. The easiest approach is to use a new variable in place of 'offset & L2E_OFFSET_MASK', except that 'offset' is the best name for that variable. Change '[old_]offset' to '[old_]entry

[Qemu-devel] slirp: question about using SMB on windows host with linux guest

2017-05-06 Thread FONNEMANN Mark
Hello- I am trying to shares files between Windows host and Linux guest using slirp’s built-in SMB server. I start QEMU 2.9.0 using the following: C:\Program Files\qemu>qemu-system-i386.exe -readconfig \Users\mfonnemann\qemu.cfg -net nic -net user,smb=\Users\mfonnemann\smb I then try to mount

Re: [Qemu-devel] [PATCH v12 04/10] qcow2: Make distinction between zero cluster types obvious

2017-05-06 Thread Eric Blake
On 05/05/2017 03:51 PM, Max Reitz wrote: > On 04.05.2017 05:07, Eric Blake wrote: >> Treat plain zero clusters differently from allocated ones, so that >> we can simplify the logic of checking whether an offset is present. >> Do this by splitting QCOW2_CLUSTER_ZERO into two new enums, >> QCOW2_CLUS

Re: [Qemu-devel] [PATCH 1/3] hw/block: Introduce rotational qdev property

2017-05-06 Thread Eric Blake
On 05/06/2017 07:43 AM, Aurelien Jarno wrote: > The Linux kernel uses different I/O scheduler depending if the block > device is a rotational device or not. Also it uses rotational devices > to add entropy to the random pool. > > This patch add a rotational qdev property so that the block device c

Re: [Qemu-devel] [PATCH 2/5] docker: Add bzip2 and hostname to fedora image

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/05/2017 12:23 AM, Fam Zheng wrote: It is used by qemu-iotests. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/

Re: [Qemu-devel] [PATCH 3/5] docker: Use unconfined security profile

2017-05-06 Thread Philippe Mathieu-Daudé
Hi Fam, Alex, Paolo, On 05/05/2017 12:23 AM, Fam Zheng wrote: Some by default blocked syscalls are required to run tests for example userfaultfd. Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/Makefile.include b/test

Re: [Qemu-devel] [PATCH 4/5] docker: Add libaio to fedora image

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/05/2017 12:23 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.doc

Re: [Qemu-devel] [PATCH 1/5] docker: Run tests with current user

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/05/2017 12:23 AM, Fam Zheng wrote: We've used --add-current-user to create a user in the image, use it to run tests, because root has too much priviledge, and can surprise test cases. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 2

Re: [Qemu-devel] [PATCH v2 10/14] target/sh4: optimize gen_write_sr using extract op

2017-05-06 Thread Philippe Mathieu-Daudé
Lovely! What about a Coccinelle meta-script to catch similar (ab)uses? Phil. On 05/06/2017 08:14 AM, Aurelien Jarno wrote: This doesn't change the generated code on x86, but optimizes it on most RISC architectures and makes the code simpler to read. Signed-off-by: Aurelien Jarno Reviewed-b

Re: [Qemu-devel] [PATCH v2 06/14] target/sh4: fix BS_EXCP exit

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 08:14 AM, Aurelien Jarno wrote: In case of exception, there is no need to call tcg_gen_exit_tb as the exception helper won't return. Also fix a few cases where BS_BRANCH is called instead of BS_EXCP. Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé --- targ

Re: [Qemu-devel] [PATCH v2 03/14] target/sh4: do not include DELAY_SLOT_TRUE in the TB state

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 08:14 AM, Aurelien Jarno wrote: DELAY_SLOT_TRUE is used as a dynamic condition for the branch after the delay slot instruction. It is not used in code generation, so there is no need to including in the TB state. Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH v2 01/14] target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 08:14 AM, Aurelien Jarno wrote: There is a confusion (and not only in the SH4 target) between tb->flags, env->flags and ctx->flags. To avoid it, split ctx->flags into ctx->tbflags and ctx->envflags. ctx->tbflags stays unchanged during the whole TB translation, while ctx->envflags ev

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/arm/exynos: Move RAM initialization next boards

2017-05-06 Thread Krzysztof Kozlowski
On Sat, May 06, 2017 at 01:05:19PM -0300, Philippe Mathieu-Daudé wrote: > Hi Krzysztof, > > Please modify RAM -> DRAM in subject/description so there is no confusion > about also moving the IRAM (which is SoC specific). > > With this: > Reviewed-by: Philippe Mathieu-Daudé Sure, thanks for revie

Re: [Qemu-devel] [PATCH 3/3] ide: export rotational qdev property

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 09:43 AM, Aurelien Jarno wrote: Export the rotational qdev property in the IDENTIFY request. Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé --- hw/ide/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 0b48b64

Re: [Qemu-devel] [PATCH 1/3] hw/block: Introduce rotational qdev property

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 09:43 AM, Aurelien Jarno wrote: The Linux kernel uses different I/O scheduler depending if the block device is a rotational device or not. Also it uses rotational devices to add entropy to the random pool. This patch add a rotational qdev property so that the block device can be co

Re: [Qemu-devel] [PATCH 2/3] scsi-disk: export rotational qdev property

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 09:43 AM, Aurelien Jarno wrote: Export the rotational qdev property to the block device characteristics VPD page. Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/

Re: [Qemu-devel] [PATCH 3/3] hw/arm/exynos: QOM-ify the SoC

2017-05-06 Thread Philippe Mathieu-Daudé
On 05/06/2017 12:24 PM, Krzysztof Kozlowski wrote: Convert the Exynos4210 SoC code into a QOM model which is a preferred approach instead of directly initializing SoC-related devices from the board file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/exy

Re: [Qemu-devel] [PATCH 2/3] hw/arm/exynos: Declare local variables in some order

2017-05-06 Thread Philippe Mathieu-Daudé
Aesthetic. Reviewed-by: Philippe Mathieu-Daudé On 05/06/2017 12:24 PM, Krzysztof Kozlowski wrote: Bring some more readability by declaring local function variables, first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski --- hw/arm/e

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/arm/exynos: Move RAM initialization next boards

2017-05-06 Thread Philippe Mathieu-Daudé
Hi Krzysztof, Please modify RAM -> DRAM in subject/description so there is no confusion about also moving the IRAM (which is SoC specific). With this: Reviewed-by: Philippe Mathieu-Daudé On 05/06/2017 12:24 PM, Krzysztof Kozlowski wrote: Before QOM-ifying the Exynos4 SoC model, move the RAM

[Qemu-devel] [PATCH 1/3] hw/arm/exynos: Move RAM initialization next boards

2017-05-06 Thread Krzysztof Kozlowski
Before QOM-ifying the Exynos4 SoC model, move the RAM initialization from exynos4210.c to exynos4_boards.c because RAM is board specific, not SoC. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 20 +- hw/arm/exynos4_boards.c | 50

[Qemu-devel] [PATCH 3/3] hw/arm/exynos: QOM-ify the SoC

2017-05-06 Thread Krzysztof Kozlowski
Convert the Exynos4210 SoC code into a QOM model which is a preferred approach instead of directly initializing SoC-related devices from the board file. Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 18 +++--- hw/arm/exynos4_boards.c | 9 ++--- include

[Qemu-devel] [PATCH 2/3] hw/arm/exynos: Declare local variables in some order

2017-05-06 Thread Krzysztof Kozlowski
Bring some more readability by declaring local function variables, first initialized ones and then the rest (with reversed-christmas-tree order). Signed-off-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/exynos4210.c

[Qemu-devel] [PATCH 0/3] hw/arm/exynos: QOM-ify the SoC

2017-05-06 Thread Krzysztof Kozlowski
Hi, Convert the Exynos4210 SoC driver into QOM model. No external dependencies, rebased on v2.9.0-363-g0de9191deb14. Best regards, Krzysztof Krzysztof Kozlowski (3): hw/arm/exynos: Move RAM initialization next boards hw/arm/exynos: Declare local variables in some order hw/arm/exynos: QOM-

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-06 Thread FONNEMANN Mark
>So, in your /etc/nsswitch.conf, use >hosts: files dns This resolved the problem. I am now able to do DNS queries using nslookup. Thanks for all your help! Mark.

Re: [Qemu-devel] [PATCH v4 1/1] slirp: add SOCKS5 support

2017-05-06 Thread Laurent Vivier
Le 06/05/2017 à 01:27, Samuel Thibault a écrit : > Hello, > Hi, > Laurent Vivier, on sam. 06 mai 2017 00:48:33 +0200, wrote: >> @@ -617,6 +622,10 @@ void slirp_pollfds_poll(GArray *pollfds, int >> select_error) >> * Check sockets for reading >> */ >>

[Qemu-devel] qemu_savevm_state_begin

2017-05-06 Thread ali saeedi
Hi what is the difference between functions "qemu_savevm_state_begin" and "qemu_savevm_state_header" in migration_thread? thanks a lot

[Qemu-devel] [PATCH 2/3] scsi-disk: export rotational qdev property

2017-05-06 Thread Aurelien Jarno
Export the rotational qdev property to the block device characteristics VPD page. Signed-off-by: Aurelien Jarno --- hw/scsi/scsi-disk.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index a53f058621..21b7e21a23 100644 --- a/hw/scsi/

[Qemu-devel] [PATCH 1/3] hw/block: Introduce rotational qdev property

2017-05-06 Thread Aurelien Jarno
The Linux kernel uses different I/O scheduler depending if the block device is a rotational device or not. Also it uses rotational devices to add entropy to the random pool. This patch add a rotational qdev property so that the block device can be configured as a rotational device or a non-rotatio

[Qemu-devel] [PATCH 3/3] ide: export rotational qdev property

2017-05-06 Thread Aurelien Jarno
Export the rotational qdev property in the IDENTIFY request. Signed-off-by: Aurelien Jarno --- hw/ide/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 0b48b64d3a..1aa76b0d90 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -191,6 +191,9 @@ static

Re: [Qemu-devel] [PATCH v4 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-05-06 Thread Marc-André Lureau
On Thu, May 4, 2017 at 3:29 PM Amarnath Valluri wrote: > buffer reallocation is very unlikely to be backend specific. Hence move > inside > the tis. > > Signed-off-by: Amarnath Valluri > Reviewed-by: Marc-André Lureau (Please resend the whole series, so we can easily test and grab it thanks t

Re: [Qemu-devel] [PATCH v6 15/25] tcg/s390: Implement goto_ptr

2017-05-06 Thread Aurelien Jarno
On 2017-05-02 12:22, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/s390/tcg-target.h | 2 +- > tcg/s390/tcg-target.inc.c | 24 +--- > 2 files changed, 22 insertions(+), 4 deletions(-) > > diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.

Re: [Qemu-devel] [PATCH v6 18/25] target/s390: Use tcg_gen_lookup_and_goto_ptr

2017-05-06 Thread Aurelien Jarno
On 2017-05-02 12:22, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/s390x/translate.c | 17 - > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/target/s390x/translate.c b/target/s390x/translate.c > index 01c6217..f7c2123 100644 > ---

Re: [Qemu-devel] [PATCH v6 13/25] tcg/aarch64: Implement goto_ptr

2017-05-06 Thread Aurelien Jarno
On 2017-05-02 12:22, Richard Henderson wrote: > Measurements: > > SPECint06 (test set), x86_64-linux-user. Host: APM > 64-bit ARMv8 (Atlas/A57) @ 2.4 GHz > > 1.45x > +-+---

Re: [Qemu-devel] [PATCH] mips: set CP0 Debug DExcCode for SDBBP instruction

2017-05-06 Thread Aurelien Jarno
On 2017-05-02 15:03, Pavel Dovgalyuk wrote: > From: Pavel Dovgalyuk > > This patch fixes setting DExcCode field of CP0 Debug register > when SDBBP instruction is executed. According to EJTAG specification, > this field must be set to the value 9 (Bp). > > Signed-off-by: Pavel Dovgalyuk > --- >

[Qemu-devel] vmstate_save_state

2017-05-06 Thread ali saeedi
what does "vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0)" function call do in "qemu_savevm_state_header" function in savevm.c at line 968 ? why has "savevm_state" been passed to this function? thanks a lot

[Qemu-devel] [PATCH v2 01/14] target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags

2017-05-06 Thread Aurelien Jarno
There is a confusion (and not only in the SH4 target) between tb->flags, env->flags and ctx->flags. To avoid it, split ctx->flags into ctx->tbflags and ctx->envflags. ctx->tbflags stays unchanged during the whole TB translation, while ctx->envflags evolves and is kept in sync with env->flags using

[Qemu-devel] [PATCH v2 14/14] target/sh4: trap unaligned accesses

2017-05-06 Thread Aurelien Jarno
SH4 requires that memory accesses are naturally aligned, except for the SH4-A movua.l instructions which can do unaligned loads. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Aurelien Jarno --- target/sh4/cpu.c | 1 + target/sh4/cpu.h | 4 target/sh4/op_helper.c | 19 +++

[Qemu-devel] [PATCH v2 07/14] target/sh4: only save flags state at the end of the TB

2017-05-06 Thread Aurelien Jarno
There is no need to save flags when entering and exiting the delay slot. They can be saved only when reaching the end of the TB. If the TB is interrupted before by an exception, they will be restored using restore_state_to_opc. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 69 ++

[Qemu-devel] [PATCH v2 08/14] target/sh4: fold ctx->bstate = BS_BRANCH into gen_conditional_jump

2017-05-06 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 8cee7d333f..a4c7a0895b 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -279,6 +279,7 @@ s

[Qemu-devel] [PATCH v2 10/14] target/sh4: optimize gen_write_sr using extract op

2017-05-06 Thread Aurelien Jarno
This doesn't change the generated code on x86, but optimizes it on most RISC architectures and makes the code simpler to read. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4

[Qemu-devel] [PATCH v2 13/14] target/sh4: movua.l is an SH4-A only instruction

2017-05-06 Thread Aurelien Jarno
At the same time change the comment describing the instruction the same way than other instruction, so that the code is easier to read and search. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 26 +++--- 1 file changed, 15 ins

[Qemu-devel] [PATCH v2 09/14] target/sh4: optimize gen_store_fpr64

2017-05-06 Thread Aurelien Jarno
Isuing extrh and avoiding intermediate temps. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index a4c7a0895b..b4e5606098 100644 --- a/target/sh4/translate.c +++

[Qemu-devel] [PATCH v2 02/14] target/sh4: get rid of DELAY_SLOT_CLEARME

2017-05-06 Thread Aurelien Jarno
Now that ctx->flags has been split, it becomes clear that DELAY_SLOT_CLEARME has not impact on the code generation: in both case ctx->envflags is cleared, either by clearing all the flags, or by setting it to 0. This is left-over from pre-TCG era. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by

[Qemu-devel] [PATCH v2 03/14] target/sh4: do not include DELAY_SLOT_TRUE in the TB state

2017-05-06 Thread Aurelien Jarno
DELAY_SLOT_TRUE is used as a dynamic condition for the branch after the delay slot instruction. It is not used in code generation, so there is no need to including in the TB state. Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

[Qemu-devel] [PATCH v2 06/14] target/sh4: fix BS_EXCP exit

2017-05-06 Thread Aurelien Jarno
In case of exception, there is no need to call tcg_gen_exit_tb as the exception helper won't return. Also fix a few cases where BS_BRANCH is called instead of BS_EXCP. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH v2 04/14] target/sh4: move DELAY_SLOT_TRUE flag into a separate global

2017-05-06 Thread Aurelien Jarno
Instead of using one bit of the env flags to store the condition of the next delay slot, use a separate global. It simplifies reading and writing the flags variable and also removes some confusion between ctx->envflags and env->flags. Note that the global is first transfered to a temp in order to

[Qemu-devel] [PATCH v2 12/14] target/sh4: implement tas.b using atomic helper

2017-05-06 Thread Aurelien Jarno
We only emulate UP SH4, however as the tas.b instruction is used in the GNU libc, this improve linux-user emulation. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/target/sh4/translate.c b/target/s

[Qemu-devel] [PATCH v2 05/14] target/sh4: fix BS_STOP exit

2017-05-06 Thread Aurelien Jarno
When stopping the translation because the state has changed, goto_tb should not be used as it might link TB with different flags. Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/

[Qemu-devel] [PATCH v2 11/14] target/sh4: generate fences for SH4

2017-05-06 Thread Aurelien Jarno
synco is a SH4-A only instruction. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Aurelien Jarno --- target/sh4/translate.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 8c766eed2a..9fe2e2d4d9 100644 --- a/

[Qemu-devel] [PATCH v2 00/14] target/sh4: misc fixes, cleanup and optimizations

2017-05-06 Thread Aurelien Jarno
This patch series try to improve the SH4 target by using the (more or less) recently introduced TCG features. It also fixes some issues spot when writting the patches (linking of TB with different flags, SH4-A specific instructions allowed on SH4) and correctly trap unaligned accesses. v2: - Add s

[Qemu-devel] [PULL 0/1] tcg-mips queue

2017-05-06 Thread Aurelien Jarno
The following changes since commit 12a95f320a36ef66f724a49bb05e4fb553ac5dbe: Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging (2017-05-04 13:44:32 +0100) are available in the git repository at: git://git.aurel32.net/qemu.git tags/pull-tcg-mips-20170506 for yo

[Qemu-devel] [PULL 1/1] tcg/mips: fix field extraction opcode

2017-05-06 Thread Aurelien Jarno
The "msb" argument should correspond to (len - 1). Signed-off-by: Aurelien Jarno --- tcg/mips/tcg-target.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c index 01ac7b2c81..2a7e1c7f5b 100644 --- a/tcg/mips/tcg-targ

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-06 Thread Samuel Thibault
FONNEMANN Mark, on sam. 06 mai 2017 04:18:52 +, wrote: > >That's so weird there's no packet log. Does your guest perhaps have the > >strace tool? Or perhaps you >can manage to copy it over from another VM, > >since it only depends on libc. > > See attached file. Ok, so for some reason it do

Re: [Qemu-devel] [Qemu-devel RFC v3 4/5] msf2: Add Smartfusion2 SoC.

2017-05-06 Thread sundeep subbaraya
Hi Alistair, On Sat, May 6, 2017 at 5:23 AM, Alistair Francis wrote: > On Fri, May 5, 2017 at 9:14 AM, sundeep subbaraya > wrote: >> Hi Alistair, >> >> On Fri, May 5, 2017 at 3:51 AM, Alistair Francis >> wrote: >>> On Fri, Apr 28, 2017 at 9:51 AM, Subbaraya Sundeep >>> wrote: Smartfusion

Re: [Qemu-devel] [RFC PATCH v1 0/5] Enable virtio-scsi boot from /dev/sgX

2017-05-06 Thread Paolo Bonzini
On 05/05/2017 18:12, Eric Farman wrote: > > > On 05/05/2017 11:13 AM, Paolo Bonzini wrote: >> >> >> On 05/05/2017 17:03, Eric Farman wrote: >>> We get a value of x3f when sending that to a scsi-disk from bios >>> code. That's fully emulated though, in scsi_disk_emulate_inquiry. And >>> th

Re: [Qemu-devel] [PATCH v5 0/5] Memory leak fixes

2017-05-06 Thread Paolo Bonzini
On 04/05/2017 00:38, Marc-André Lureau wrote: > Hi, > > A new series of leaks spotted by ASAN. Mostly after introducing of the > test-hmp. Would it be useful having a configure --enable-asan, and > enabled by default with --enable-debug? Yes, --enable-asan would be a nice idea, and we can also

Re: [Qemu-devel] [RFC PATCH v1 8/9] util/qemu-thread-*: add qemu_lock, locked and unlock trace events

2017-05-06 Thread Paolo Bonzini
On 05/05/2017 17:59, Alex Bennée wrote: > I'll re-spin my trace analysis script and the lock trace point once that > pull request is merged. I would be nice if we could associate locks with > names though as the QemuMutex * is basically just an anonymous handle. > Would it be overly extravagant t

[Qemu-devel] MigrationParams

2017-05-06 Thread ali saeedi
Hi what are 'blk' and 'shared' boolean variables in MigrationParams structure in migration.h? thanks a lot