Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Pankaj Gupta
> > > > Hi Dan, > > > > Thank you for the review. Please see my reply inline. > > > > > > > > Hi Pankaj, > > > > > > Some minor file placement comments below. > > > > Sure. > > > > > > > > On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > > > > > > > This patch adds virtio-pmem driver

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Pankaj Gupta
> > > > > > > > This patch adds 'DAXDEV_SYNC' flag which is set > > > > for nd_region doing synchronous flush. This later > > > > is used to disable MAP_SYNC functionality for > > > > ext4 & xfs filesystem for devices don't support > > > > synchronous flush. > > > > > > > > Signed-off-by: Pankaj

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_SYNC' flag which is set > > for nd_region doing synchronous flush. This later > > is used to disable MAP_SYNC functionality for > > ext4 & xfs filesystem for devices don't support > > synchronous flush. > > > > Signed-off-by: Pankaj Gupta > > --- > >

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 5:45 PM Pankaj Gupta wrote: > > > > > > > > > This patch adds 'DAXDEV_SYNC' flag which is set > > > for nd_region doing synchronous flush. This later > > > is used to disable MAP_SYNC functionality for > > > ext4 & xfs filesystem for devices don't support > > > synchronous

Re: [Qemu-devel] [PATCH v4 0/3] hw: edu: some fixes

2019-05-10 Thread Li Qiang
Peter Xu 于2019年5月11日周六 上午7:53写道: > On Fri, May 10, 2019 at 09:43:46AM -0700, Li Qiang wrote: > > Recently I am considering write a driver for edu device. > > I don't know why you wanted to write it, but there's one (though I > don't even remember whether it's working or not)... > > This is a

Re: [Qemu-devel] [PATCH v4 0/6] Extract build_mcfg

2019-05-10 Thread Wei Yang
On Fri, May 10, 2019 at 07:59:43PM -0400, Michael S. Tsirkin wrote: >I merged this will send pull request soon. > Ah, Thanks :-) -- Wei Yang Help you, Help me

Re: [Qemu-devel] [PATCH v4 0/6] Extract build_mcfg

2019-05-10 Thread Michael S. Tsirkin
I merged this will send pull request soon. On Fri, May 10, 2019 at 09:22:10PM +, Wei Yang wrote: > Hi, Igor > > You would take this one? Or what should I do next? > > On Fri, Apr 19, 2019 at 08:30:47AM +0800, Wei Yang wrote: > >This patch set tries to generalize MCFG table build process.

Re: [Qemu-devel] [PATCH v4 0/3] hw: edu: some fixes

2019-05-10 Thread Peter Xu
On Fri, May 10, 2019 at 09:43:46AM -0700, Li Qiang wrote: > Recently I am considering write a driver for edu device. I don't know why you wanted to write it, but there's one (though I don't even remember whether it's working or not)...

[Qemu-devel] [PATCH] migration/ram.c: fix typos in comments

2019-05-10 Thread Wei Yang
Signed-off-by: Wei Yang --- migration/ram.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 1def8122e9..720c2b73ca 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -888,7 +888,7 @@ struct { *- to make easier to

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Dan Williams
On Wed, May 8, 2019 at 4:19 AM Pankaj Gupta wrote: > > > Hi Dan, > > Thank you for the review. Please see my reply inline. > > > > > Hi Pankaj, > > > > Some minor file placement comments below. > > Sure. > > > > > On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > > > > > This patch adds

Re: [Qemu-devel] [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Pankaj Gupta
> > > > Hi Michael & Dan, > > > > Please review/ack the patch series from LIBNVDIMM & VIRTIO side. > > We have ack on ext4, xfs patches(4, 5 & 6) patch 2. Still need > > your ack on nvdimm patches(1 & 3) & virtio patch 2. > > I was planning to merge these via the nvdimm tree, not ack them.

[Qemu-devel] [PATCH] blockdev: fix missed target unref for drive-backup

2019-05-10 Thread John Snow
If the bitmap can't be used for whatever reason, we skip putting down the reference. Fix that. In practice, this means that if you attempt to gracefully exit QEMU after a backup command being rejected, bdrv_close_all will fail and tell you some unpleasant things via assert(). Reported-by: aihua

Re: [Qemu-devel] [PATCH] iotests: Filter 175's allocation information

2019-05-10 Thread Nir Soffer
On Sat, May 11, 2019 at 12:19 AM Max Reitz wrote: > It is possible for an empty file to take up blocks on a filesystem. > Make iotest 175 take this into account. > > Reported-by: Thomas Huth > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/175 | 15 +++ >

Re: [Qemu-devel] [PATCH v4 0/6] Extract build_mcfg

2019-05-10 Thread Wei Yang
Hi, Igor You would take this one? Or what should I do next? On Fri, Apr 19, 2019 at 08:30:47AM +0800, Wei Yang wrote: >This patch set tries to generalize MCFG table build process. And it is >based on one un-merged patch from Igor, which is included in this serials. > >v3->v4: >* adjust

[Qemu-devel] [PATCH] iotests: Filter 175's allocation information

2019-05-10 Thread Max Reitz
It is possible for an empty file to take up blocks on a filesystem. Make iotest 175 take this into account. Reported-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/175 | 15 +++ tests/qemu-iotests/175.out | 8 2 files changed, 15 insertions(+), 8

Re: [Qemu-devel] [Qemu-block] Failing QEMU iotest 175

2019-05-10 Thread Nir Soffer
On Sat, May 4, 2019 at 12:32 AM Nir Soffer wrote: > > > On Fri, May 3, 2019, 23:21 Eric Blake wrote: > >> ... >> >>> == creating image with preallocation off == >> >>> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 >> preallocation=off >> >>> -size=1048576, blocks=0 >> >>>

[Qemu-devel] [PATCH] block/file-posix: Truncate in xfs_write_zeroes()

2019-05-10 Thread Max Reitz
XFS_IOC_ZERO_RANGE does not increase the file length: $ touch foo $ xfs_io -c 'zero 0 65536' foo $ stat -c "size=%s, blocks=%b" foo size=0, blocks=128 We do want writes beyond the EOF to automatically increase the file length, however. This is evidenced by the fact that iotest 061 is broken on

[Qemu-devel] [PATCH] blockdev: loosen restrictions on drive-backup source node

2019-05-10 Thread John Snow
We mandate that the source node must be a root node; but there's no reason I am aware of that it needs to be restricted to such. In some cases, we need to make sure that there's a medium present, but in the general case we can allow the backup job itself to do the graph checking. This patch helps

Re: [Qemu-devel] [PATCH v3 38/39] tcg/arm: Use LDRD to load tlb mask+table

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 5:32 PM Richard Henderson wrote: > > This changes the code generation for the tlb from e.g. > > ldr ip, [r6, #-0x10] > ldr r2, [r6, #-0xc] > and ip, ip, r4, lsr #8 > ldrd r0, r1, [r2, ip]! > ldr r2, [r2, #0x18]

Re: [Qemu-devel] [PATCH v3 39/39] tcg/arm: Remove mostly unreachable tlb special case

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 5:34 PM Richard Henderson wrote: > > There was nothing armv7 specific about the bic+cmp sequence, however > looking at the set of guests more closely shows that the 8-bit immediate > operand for the bic can only be satisfied with one guest in tree: > baseline m-profile --

Re: [Qemu-devel] [PATCH v3 37/39] tcg/aarch64: Use LDP to load tlb mask+table

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 5:29 PM Richard Henderson wrote: > > This changes the code generation for the tlb from e.g. > > ldur x0, [x19, #0xffe0] > ldur x1, [x19, #0xffe8] > and x0, x0, x20, lsr #8 > add x1, x1, x0 >

Re: [Qemu-devel] [PATCH v3 36/39] cpu: Remove CPU_COMMON

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 5:32 PM Richard Henderson wrote: > > This macro is now always empty, so remove it. This leaves the > entire contents of CPUArchState under the control of the guest > architecture. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alistair

Re: [Qemu-devel] [PATCH v3 35/39] cpu: Move the softmmu tlb to CPUNegativeOffsetState

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 5:29 PM Richard Henderson wrote: > > We have for some time had code within the tcg backends to > handle large positive offsets from env. This move makes > sure that need not happen. Indeed, we are able to assert > at build time that simple offsets suffice for all hosts. >

Re: [Qemu-devel] [PATCH v2 16/16] hw/intc/nvic: Use object_initialize_child for correct reference counting

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:48 AM Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get

Re: [Qemu-devel] [PATCH v2 14/16] hw/microblaze/zynqmp: Use object_initialize_child for correct ref. counting

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:52 AM Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get

Re: [Qemu-devel] [PATCH v2 13/16] hw/microblaze/zynqmp: Use object_initialize_child for correct ref. counting

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:46 AM Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get

Re: [Qemu-devel] [PATCH v2 12/16] hw/microblaze/zynqmp: Let the SoC manage the IPI devices

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:39 AM Philippe Mathieu-Daudé wrote: > > The Inter Processor Interrupt is a block part of the SoC, not the > "machine" (See Zynq UltraScale+ Device TRM UG1085, "Platform > Management Unit", Power Domains and Islands). > > Move the IPI management from the machine to the

Re: [Qemu-devel] [PATCH v2 11/16] hw/microblaze/zynqmp: Move the IPI state into the PMUSoC state

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:43 AM Philippe Mathieu-Daudé wrote: > > The Inter Processor Interrupt is a block part of the SoC, not the > "machine" (talking about machine is borderline with the PMU, since > it is embedded into the ZynqMP SoC, but currentl QEMU doesn't > support multi-arch cores). > >

Re: [Qemu-devel] [PATCH v2 08/16] hw/arm: Use object_initialize_child for correct reference counting

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:47 AM Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get

[Qemu-devel] [PATCH] configure: Disable slirp if --disable-system

2019-05-10 Thread Richard Henderson
For linux-user, there is no need to add slirp to the set of git modules checked out, nor build it. This also avoids a makefile bug wrt insufficient dependencies on subdir-slirp. If slirp/ is not initially present, the dependencies that check it out are associated with softmmu, which then

Re: [Qemu-devel] [PATCH 0/2] i386: "unavailable-features" QOM property

2019-05-10 Thread Eduardo Habkost
On Thu, May 09, 2019 at 06:36:18PM +0200, Jiri Denemark wrote: > On Thu, May 09, 2019 at 18:06:03 +0200, Igor Mammedov wrote: > > On Thu, 9 May 2019 10:56:17 -0300 > > Eduardo Habkost wrote: > > > > > On Thu, May 09, 2019 at 03:35:37PM +0200, Jiri Denemark wrote: > > > > Would this

Re: [Qemu-devel] [PATCH] Makefile: Fix inclusion of the config-devices.mak.d Kconfig dependencies

2019-05-10 Thread Paolo Bonzini
On 10/05/19 03:20, Thomas Huth wrote: > The Makefile tries to include device Kconfig dependencies via > > -include $(SUBDIR_DEVICES_MAK_DEP) > > and thus expects files that match *-softmmu/config-devices.mak.d ... > However, the minikconf script currently generates files a la >

Re: [Qemu-devel] [PATCH 0/2] i386: "unavailable-features" QOM property

2019-05-10 Thread Eduardo Habkost
On Fri, May 10, 2019 at 01:33:03PM +0200, Jiri Denemark wrote: > On Thu, May 09, 2019 at 13:08:25 -0300, Eduardo Habkost wrote: > > On Thu, May 09, 2019 at 05:26:16PM +0200, Jiri Denemark wrote: > > > On Thu, May 09, 2019 at 10:56:17 -0300, Eduardo Habkost wrote: > > > > On Thu, May 09, 2019 at

Re: [Qemu-devel] [PATCH v2 06/16] hw/arm/bcm2835: Use object_initialize_child for correct ref. counting

2019-05-10 Thread Alistair Francis
On Tue, May 7, 2019 at 9:36 AM Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and object_property_add_child() > increase the reference counter of the new object, so one of the > references has to be dropped afterwards to get

Re: [Qemu-devel] [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 8:52 AM Pankaj Gupta wrote: > > Hi Michael & Dan, > > Please review/ack the patch series from LIBNVDIMM & VIRTIO side. > We have ack on ext4, xfs patches(4, 5 & 6) patch 2. Still need > your ack on nvdimm patches(1 & 3) & virtio patch 2. I was planning to merge these

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Dan Williams
On Fri, May 10, 2019 at 8:53 AM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_SYNC' flag which is set > for nd_region doing synchronous flush. This later > is used to disable MAP_SYNC functionality for > ext4 & xfs filesystem for devices don't support > synchronous flush. > > Signed-off-by:

[Qemu-devel] [PULL 3/5] cputlb: Drop attribute flatten

2019-05-10 Thread Alex Bennée
From: Richard Henderson Going to approach this problem via __attribute__((always_inline)) instead, but full conversion will take several steps. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Tested-by: Mark Cave-Ayland diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index

[Qemu-devel] [PULL 2/5] cputlb: Move TLB_RECHECK handling into load/store_helper

2019-05-10 Thread Alex Bennée
From: Richard Henderson Having this in io_readx/io_writex meant that we forgot to re-compute index after tlb_fill. It also means we can use the normal aligned memory load path. It also fixes a bug in that we had cached a use of index across a tlb_fill. Signed-off-by: Richard Henderson

[Qemu-devel] [PULL 0/5] demacro SoftMMU

2019-05-10 Thread Alex Bennée
The following changes since commit a6ae23831b05a11880b40f7d58e332c45a6b04f7: Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git

[Qemu-devel] [PULL 1/5] accel/tcg: demacro cputlb

2019-05-10 Thread Alex Bennée
Instead of expanding a series of macros to generate the load/store helpers we move stuff into common functions and rely on the compiler to eliminate the dead code for each variant. Signed-off-by: Alex Bennée Tested-by: Mark Cave-Ayland diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index

[Qemu-devel] [PULL 4/5] cputlb: Do unaligned load recursion to outermost function

2019-05-10 Thread Alex Bennée
From: Richard Henderson If we attempt to recurse from load_helper back to load_helper, even via intermediary, we do not get all of the constants expanded away as desired. But if we recurse back to the original helper (or a shim that has a consistent function signature), the operands are folded

[Qemu-devel] [PULL 5/5] cputlb: Do unaligned store recursion to outermost function

2019-05-10 Thread Alex Bennée
From: Richard Henderson This is less tricky than for loads, because we always fall back to single byte stores to implement unaligned stores. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Tested-by: Mark Cave-Ayland diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index

Re: [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()

2019-05-10 Thread Dr. David Alan Gilbert
* Richard Henderson (richard.hender...@linaro.org) wrote: > On 5/10/19 11:56 AM, Eduardo Habkost wrote: > > hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary. > > Not an actual bug, but this is reported as a defect by Coverity > > Scan (CID 1401346). > > > > Signed-off-by: Eduardo

Re: [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()

2019-05-10 Thread Richard Henderson
On 5/10/19 11:56 AM, Eduardo Habkost wrote: > hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary. > Not an actual bug, but this is reported as a defect by Coverity > Scan (CID 1401346). > > Signed-off-by: Eduardo Habkost > --- > monitor.c | 3 +-- > 1 file changed, 1 insertion(+), 2

[Qemu-devel] [PATCH] monitor: Fix gva2gpa coverityism

2019-05-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Coverity is complaining that while I'm checking the return value of mon_get_cpu(), I'm not actually using the checked value, I'm calling it again and thus it's worried I might get null; I don't think that's actually possible since i'm under lock anyway. However,

[Qemu-devel] [PATCH v2 4/4] iotests: add iotest 250 for testing blockdev-backup across iothread contexts

2019-05-10 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/250 | 129 + tests/qemu-iotests/250.out | 119 ++ tests/qemu-iotests/group | 1 + 3 files changed, 249 insertions(+) create mode 100755 tests/qemu-iotests/250 create mode

[Qemu-devel] [PATCH v2 3/4] iotests.py: rewrite run_job to be pickier

2019-05-10 Thread John Snow
Don't pull events out of the queue that don't belong to us; be choosier so that we can use this method to drive jobs that were launched by transactions that may have more jobs. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 32 +++- 1 file changed, 15

[Qemu-devel] [RFC PATCH] target/arm: semihosting docs, formatting and return clean-ups

2019-05-10 Thread Alex Bennée
This is a clean-up of the semihosting calls after reading ver 2.0 of the specification. There are a number of small fixes that seemed too insignificant to split into smaller patches: - add reference to the ARM semihosting spec - add some additional commentary on return values - fixup block

[Qemu-devel] [PATCH v2 0/4] blockdev-backup: don't check aio_context too early

2019-05-10 Thread John Snow
See patch one's commit message for justification. v2: added patch 4, with iotest framework adjustments in patches 2/3. John Snow (4): blockdev-backup: don't check aio_context too early iotests.py: do not use infinite waits iotests.py: rewrite run_job to be pickier iotests: add iotest 250

[Qemu-devel] [PATCH v2 2/4] iotests.py: do not use infinite waits

2019-05-10 Thread John Snow
Cap waits to 60 seconds so that iotests can fail gracefully if something goes wrong. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[Qemu-devel] [PATCH v2 1/4] blockdev-backup: don't check aio_context too early

2019-05-10 Thread John Snow
in blockdev_backup_prepare, we check to make sure that the target is associated with a compatible aio context. However, do_blockdev_backup is called later and has some logic to move the target to a compatible aio_context. The transaction version will fail certain commands needlessly early as a

[Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()

2019-05-10 Thread Eduardo Habkost
hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary. Not an actual bug, but this is reported as a defect by Coverity Scan (CID 1401346). Signed-off-by: Eduardo Habkost --- monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index

[Qemu-devel] [PULL v2 17/27] target/riscv: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
Note that env->pc is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from riscv_raise_exception. Cc: qemu-ri...@nongnu.org Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Richard

[Qemu-devel] [PULL v2 27/27] tcg: Use tlb_fill probe from tlb_vaddr_to_host

2019-05-10 Thread Richard Henderson
Most of the existing users would continue around a loop which would fault the tlb entry in via a normal load/store. But for AArch64 SVE we have an existing emulation bug wherein we would mark the first element of a no-fault vector load as faulted (within the FFR, not via exception) just because

[Qemu-devel] [PULL v2 18/27] target/s390x: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Cc: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/internal.h| 5 +-- target/s390x/cpu.c | 5 ++- target/s390x/excp_helper.c | 73 ++ target/s390x/mem_helper.c | 16

[Qemu-devel] [PULL v2 03/27] target/arm: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
Cc: qemu-...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/internals.h | 10 +++-- target/arm/cpu.c | 22 +- target/arm/helper.c| 98 ++ target/arm/op_helper.c | 29 ++--- 4 files changed,

[Qemu-devel] [PULL v2 06/27] target/i386: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
We do not support probing, but we do not need it yet either. Cc: Paolo Bonzini Cc: Eduardo Habkost Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/i386/cpu.h | 5 ++-- target/i386/cpu.c | 5 ++-- target/i386/excp_helper.c | 61

[Qemu-devel] [PULL v2 00/27] tcg: Add CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
/rth7680/qemu.git tags/pull-tcg-20190510 for you to fetch changes up to 4811e9095c0491bc6f5450e5012c9c4796b9e59d: tcg: Use tlb_fill probe from tlb_vaddr_to_host (2019-05-10 11:12:50 -0700) Add CPUClass::tlb_fill. Improve

[Qemu-devel] [PULL v2 12/27] target/mips: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
Note that env->active_tc.PC is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from do_raise_exception_err. Cc: Aleksandar Markovic Cc: Aleksandar Rikalo Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL v2 16/27] target/ppc: Convert to CPUClass::tlb_fill

2019-05-10 Thread Richard Henderson
Cc: qemu-...@nongnu.org Acked-by: David Gibson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/cpu.h| 7 +++ target/ppc/mmu_helper.c | 22 +- target/ppc/translate_init.inc.c | 5 ++--- target/ppc/user_only_helper.c

[Qemu-devel] [Bug 1718719] Re: qemu can't capture keys properly under wayland

2019-05-10 Thread Bug Watch Updater
Launchpad has imported 9 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=102475. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at

[Qemu-devel] [PATCH v3] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Ernest Esene
Add support for Linux I2C character device for I2C device passthrough For example: -chardev i2c,address=0x46,path=/dev/i2c-N,id=i2c-chardev QEMU supports emulation of I2C devices in software but currently can't passthrough to real I2C devices. This feature is needed by developers using QEMU for

Re: [Qemu-devel] [PULL 00/27] tcg: Add CPUClass::tlb_fill

2019-05-10 Thread Peter Maydell
in the Git repository at: > > https://github.com/rth7680/qemu.git tags/pull-tcg-20190510 > > for you to fetch changes up to 5f32c102ec3a0db4773d0f74b398191b578c0720: > > tcg: Use tlb_fill probe from tlb_v

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-10 Thread Max Reitz
On 10.05.19 18:20, Thomas Huth wrote: > On 10/05/2019 15.47, Max Reitz wrote: >> On 10.05.19 15:36, Thomas Huth wrote: >>> On 10/05/2019 15.34, Max Reitz wrote: On 10.05.19 06:29, Thomas Huth wrote: > On 09/05/2019 20.08, Max Reitz wrote: >> On 02.05.19 10:45, Thomas Huth wrote:

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-10 Thread Max Reitz
On 10.05.19 18:42, Thomas Huth wrote: > On 10/05/2019 15.54, Max Reitz wrote: >> On 28.04.19 17:18, Thomas Huth wrote: >>> QEMU iotest 175 is failing for me when I run it with -raw: >>> >>> $ ./check -raw 175 >>> QEMU -- >>>

[Qemu-devel] [PATCH v6 23/25] target/ppc: Use qemu_guest_getrandom for DARN

2019-05-10 Thread Richard Henderson
We now have an interface for guest visible random numbers. Acked-by: David Gibson Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- v5: Do not loop for darn64; use sizeof. --- target/ppc/int_helper.c | 39 +++ 1 file changed, 27

[Qemu-devel] [PATCH v6 24/25] target/ppc: Use gen_io_start/end around DARN

2019-05-10 Thread Richard Henderson
Generating a random number counts as I/O, as it cannot be replayed and produce the same results. Cc: David Gibson Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/translate.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v6 22/25] target/arm: Implement ARMv8.5-RNG

2019-05-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Log errors with -d unimp, for lack of a better flag. v6: Add ARM_CP_IO for -icount. --- target/arm/cpu.h| 5 + target/arm/cpu64.c | 1 + target/arm/helper.c | 44 3 files

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Ernest Esene
On Thu, May 09, 2019 at 02:00:56PM +0100, Stefan Hajnoczi wrote: > On Sat, May 04, 2019 at 07:11:19PM +0100, Ernest Esene wrote: > > Add support for Linux I2C character device for I2C device passthrough > > For example: > > -chardev linux-i2c,address=0x46,path=/dev/i2c-N,id=i2c-chardev > > There

[Qemu-devel] [PATCH v6 16/25] linux-user: Remove srand call

2019-05-10 Thread Richard Henderson
We no longer use rand() within linux-user. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index e455bff1b7..5d1c6a115b

Re: [Qemu-devel] [PATCH] configure: copy MacOS NDRV driver into sharedir for out-of-tree builds

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 18:18, Mark Cave-Ayland wrote: > > On 10/05/2019 17:49, Peter Maydell wrote: > > The comment above this bit of code says: > > > > # Caution: do not add files or directories here using wildcards. This > > # will result in problems later if a new file matching the wildcard is

[Qemu-devel] [PATCH v6 18/25] hw/misc/nrf51_rng: Use qemu_guest_getrandom_nofail

2019-05-10 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of error_abort directly. Cc: qemu-...@nongnu.org Reviewed-by: Laurent Vivier Reviewed-by: Joel Stanley Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v6 15/25] linux-user/aarch64: Use qemu_guest_getrandom for PAUTH keys

2019-05-10 Thread Richard Henderson
Use a better interface for random numbers than rand() * 3. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 2 -- linux-user/aarch64/cpu_loop.c | 29 ++-

[Qemu-devel] [PATCH v6 12/25] linux-user: Initialize pseudo-random seeds for all guest cpus

2019-05-10 Thread Richard Henderson
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created during clone; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v6 19/25] hw/misc/bcm2835_rng: Use qemu_guest_getrandom_nofail

2019-05-10 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Cc: qemu-...@nongnu.org Cc: Andrew Baumann Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[Qemu-devel] [PATCH v6 02/25] crypto: Merge crypto-obj-y into libqemuutil.a

2019-05-10 Thread Richard Henderson
We will shortly need this in the user-only binaries, so drop the split into system and tools binaries. Remove crypto-obj-y and crypto-aes-obj-y, moving the objects into util-obj-y. Reviewed-by: Laurent Vivier Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v6: Remove a

[Qemu-devel] [PATCH v6 05/25] crypto: Use O_CLOEXEC in qcrypto_random_init

2019-05-10 Thread Richard Henderson
Avoids leaking the /dev/urandom fd into any child processes. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v6 06/25] crypto: Use getrandom for qcrypto_random_bytes

2019-05-10 Thread Richard Henderson
Prefer it to direct use of /dev/urandom. Reviewed-by: Laurent Vivier Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v3: If getrandom is not present, fall back on /dev/(u)random. --- crypto/random-platform.c | 37 - configure

[Qemu-devel] [PATCH v6 09/25] ui/vnc: Use gcrypto_random_bytes for start_auth_vnc

2019-05-10 Thread Richard Henderson
Use a better interface for random numbers than rand(). Fail gracefully if for some reason we cannot use the crypto system. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v2: Use qcrypto_random_bytes, not

[Qemu-devel] [PATCH v6 20/25] hw/misc/exynos4210_rng: Use qemu_guest_getrandom

2019-05-10 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Cc: qemu-...@nongnu.org Cc: Igor Mitsyanko Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/misc/exynos4210_rng.c | 11

[Qemu-devel] [PATCH v6 17/25] aspeed/scu: Use qemu_guest_getrandom_nofail

2019-05-10 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Cc: qemu-...@nongnu.org Cc: Andrew Jeffery Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[Qemu-devel] [PATCH v6 25/25] target/i386: Implement CPUID_EXT_RDRAND

2019-05-10 Thread Richard Henderson
We now have an interface for guest visible random numbers. Cc: Paolo Bonzini Reviewed-by: Eduardo Habkost Signed-off-by: Richard Henderson --- v6: Add gen_io_start/end for -icount. --- target/i386/helper.h | 2 ++ target/i386/cpu.c| 5 ++-- target/i386/int_helper.c | 21

[Qemu-devel] [PATCH v6 14/25] linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM

2019-05-10 Thread Richard Henderson
Use a better interface for random numbers than rand * 16. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c

[Qemu-devel] [PATCH v6 10/25] util: Add qemu_guest_getrandom and associated routines

2019-05-10 Thread Richard Henderson
This routine is intended to produce high-quality random numbers to the guest. Normally, such numbers are crypto quality from the host, but a command-line option can force the use of a fully deterministic sequence for use while debugging. Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[Qemu-devel] [PATCH v6 13/25] linux-user: Call qcrypto_init if not using -seed

2019-05-10 Thread Richard Henderson
Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 7e704845c0..e455bff1b7 100644

[Qemu-devel] [PATCH v6 11/25] cpus: Initialize pseudo-random seeds for all guest cpus

2019-05-10 Thread Richard Henderson
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

[Qemu-devel] [PATCH v6 21/25] target/arm: Put all PAC keys into a structure

2019-05-10 Thread Richard Henderson
This allows us to use a single syscall to initialize them all. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 12 +++- linux-user/aarch64/cpu_loop.c | 6 +- linux-user/syscall.c | 10

[Qemu-devel] [PATCH v6 08/25] ui/vnc: Split out authentication_failed

2019-05-10 Thread Richard Henderson
There were 3 copies of this code, one of which used the wrong data size for the failure indicator. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- ui/vnc.c | 37

[Qemu-devel] [PATCH v6 07/25] crypto: Change the qcrypto_random_bytes buffer type to void*

2019-05-10 Thread Richard Henderson
Using uint8_t* merely requires useless casts for use with other types to be filled with randomness. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- include/crypto/random.h | 2 +- crypto/random-gcrypt.c |

[Qemu-devel] [PATCH v6 04/25] crypto: Do not fail for EINTR during qcrypto_random_bytes

2019-05-10 Thread Richard Henderson
We can always get EINTR for read; /dev/urandom is no exception. Rearrange the order of tests for likelihood; allow degenerate buflen==0 case to perform a no-op zero-length read. This means that the normal success path is a straight line with a single test for success. Reviewed-by: Laurent

[Qemu-devel] [PATCH v6 03/25] crypto: Reverse code blocks in random-platform.c

2019-05-10 Thread Richard Henderson
Use #ifdef _WIN32 instead of #ifndef _WIN32. This will make other tests easier to sequence. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 35 +--

[Qemu-devel] [PATCH v6 01/25] configure: Link test before auto-enabling crypto libraries

2019-05-10 Thread Richard Henderson
At least ubuntu 18.04 does not package static gnutls libraries. At least Fedora 30 does not ship static nettle and gcrypt libraries. Tested-by: Laurent Vivier Reviewed-by: Laurent Vivier Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v5: Include nettle, gcrypt. ---

[Qemu-devel] [PATCH v6 00/25] Add qemu_getrandom and ARMv8.5-RNG etc

2019-05-10 Thread Richard Henderson
Only the new patch 24 lacks review. Changes since v5: * Merge crypto-obj-y into util-obj-y (patch 2). * Fix leftover crypto-obj-aes-y reference (patch 2). * Add ARM_CP_IO to the RNG registers (patch 22). * Issue gen_io_start/end around ppc DARN (new patch 24). * Issue gen_io_start/end

Re: [Qemu-devel] [PATCH 0/3] Export machine type deprecation info through QMP

2019-05-10 Thread Daniel P . Berrangé
On Fri, May 10, 2019 at 02:17:11PM -0300, Eduardo Habkost wrote: > On Fri, May 10, 2019 at 11:29:53AM +0200, Markus Armbruster wrote: > [...] > > I'm afraid our command line is awkward both for machines and for humans, > > albeit for different reasons. > > > > For humans doing simple things, the

Re: [Qemu-devel] [PATCH 0/3] Export machine type deprecation info through QMP

2019-05-10 Thread Eduardo Habkost
On Fri, May 10, 2019 at 11:29:53AM +0200, Markus Armbruster wrote: [...] > >> >> > We could extend QAPI introspection to return that if necessary, > >> >> > right? > >> >> > >> >> I'm confident we can come up with *something*. It might kill the neat > >> >> and simple "use QAPI features to

Re: [Qemu-devel] [PATCH] configure: copy MacOS NDRV driver into sharedir for out-of-tree builds

2019-05-10 Thread Mark Cave-Ayland
On 10/05/2019 17:49, Peter Maydell wrote: > On Fri, 10 May 2019 at 17:37, Mark Cave-Ayland > wrote: >> >> Make sure that we include *.ndrv files with those being copied to sharedir >> during out-of-tree builds. This ensures that the MacOS driver is correctly >> located and loaded by

Re: [Qemu-devel] [PATCH v3 1/3] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-10 Thread Daniel P . Berrangé
On Fri, May 10, 2019 at 12:55:18PM -0400, Michael S. Tsirkin wrote: > On Fri, May 10, 2019 at 05:25:54PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 10, 2019 at 12:21:19PM -0400, Michael S. Tsirkin wrote: > > > On Fri, May 10, 2019 at 05:16:44PM +0100, Daniel P. Berrangé wrote: > > > > On

Re: [Qemu-devel] [PATCH 0/3] Export machine type deprecation info through QMP

2019-05-10 Thread Eduardo Habkost
On Fri, May 10, 2019 at 08:19:52AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Thu, May 09, 2019 at 10:14:52AM +0100, Daniel P. Berrangé wrote: > >> On Thu, May 09, 2019 at 10:31:46AM +0200, Markus Armbruster wrote: > >> > We've wandered into the QAPI vs. QOM swamp. Cc:

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Alex Bennée
Peter Maydell writes: > On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: >> >> For running system tests we want to be able to re-direct output to a >> file like we do with serial output. This does the wiring to allow us >> to treat semihosting like just another character output device. >> >>

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 17:59, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: > >> > >> For running system tests we want to be able to re-direct output to a > >> file like we do with serial output. This does the wiring to allow us > >> to

  1   2   3   4   >