Re: [Qemu-devel] [PATCH v29 0/8] QEMU AVR 8 bit cores

2019-08-26 Thread Pavel Dovgalyuk
Hi! Can you provide a link to the repository for easier testing of your code? Pavel Dovgalyuk > -Original Message- > From: Michael Rolnik [mailto:mrol...@gmail.com] > Sent: Saturday, August 24, 2019 9:46 PM > To: qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@redhat.com

Re: [Qemu-devel] [PATCH v29 1/8] target/avr: Add outward facing interfaces and core CPU logic

2019-08-26 Thread Thomas Huth
On 24/08/2019 20.46, Michael Rolnik wrote: > From: Sarah Harris > > This includes: > - CPU data structures > - object model classes and functions > - migration functions > - GDB hooks > > Signed-off-by: Michael Rolnik > Acked-by: Igor Mammedov > --- If the patch is originally from Sarah Harri

Re: [Qemu-devel] [PATCH qemu] spapr: Render full FDT on ibm, client-architecture-support

2019-08-26 Thread David Gibson
On Mon, Aug 26, 2019 at 02:31:26PM +1000, Alexey Kardashevskiy wrote: > The ibm,client-architecture-support call is a way for the guest to > negotiate capabilities with a hypervisor. It is implemented as: > - the guest calls SLOF via client interface; > - SLOF calls QEMU (H_CAS hypercall) with an o

Re: [Qemu-devel] [PATCH 1/6] exec: Move user-only watchpoint stubs inline

2019-08-26 Thread David Hildenbrand
On 24.08.19 23:34, Richard Henderson wrote: > Let the user-only watchpoint stubs resolve to empty inline functions. > > Signed-off-by: Richard Henderson > --- > include/hw/core/cpu.h | 23 +++ > exec.c| 26 ++ > 2 files changed, 25 inse

Re: [Qemu-devel] [PATCH v29 0/8] QEMU AVR 8 bit cores

2019-08-26 Thread Michael Rolnik
Hi Pavel. https://github.com/michaelrolnik/qemu-avr/tree/avr-v29 Regards, Michael On Mon, Aug 26, 2019 at 10:09 AM Pavel Dovgalyuk wrote: > Hi! > > Can you provide a link to the repository for easier testing of your code? > > Pavel Dovgalyuk > > > -Original Message- > > From: Michael R

[Qemu-devel] [PATCH v2 5/7] mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well

2019-08-26 Thread David Hildenbrand
Let's call it also for CONFIG_USER_ONLY. While at it, add a FIXME and get rid of one local variable. MIPS code probably needs a bigger refactoring in regards of ensure_writable_pages(), similar to s390x, so for example, watchpoints can be handled reliably later. The actually accessed addresses sho

[Qemu-devel] [PATCH v2 0/7] tcg: probe_write() refactorings

2019-08-26 Thread David Hildenbrand
Based on tcg-next. The last two patches from v1 are now part of "[PATCH 0/6] exec: Cleanup watchpoints" from richard. Fix and refactore some things around probe_write() in s390x code. Introduce probe_write() for CONFIG_USER_ONLY. This is the first step of some changes necessary to handle fault-sa

[Qemu-devel] [PATCH v2 1/7] s390x/tcg: Use guest_addr_valid() instead of h2g_valid() in probe_write_access()

2019-08-26 Thread David Hildenbrand
If I'm not completely wrong, we are dealing with guest addresses here and not with host addresses. Use the right check. Fixes: c5a7392cfb96 ("s390x/tcg: Provide probe_write_access helper") Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 2 +- 1 fi

[Qemu-devel] [PATCH v2 2/7] s390x/tcg: Fix length calculation in probe_write_access()

2019-08-26 Thread David Hildenbrand
Hm... how did that "-" slip in (-TAGRET_PAGE_SIZE would be correct). This currently makes us exceed one page in a single probe_write() call, essentially leaving some memory unchecked. Fixes: c5a7392cfb96 ("s390x/tcg: Provide probe_write_access helper") Reviewed-by: Richard Henderson Signed-off-by

[Qemu-devel] [PATCH v2 4/7] tcg: Enforce single page access in probe_write()

2019-08-26 Thread David Hildenbrand
Let's enforce the interface restriction. Signed-off-by: David Hildenbrand --- accel/tcg/cputlb.c| 2 ++ accel/tcg/user-exec.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 7fc7aa9482..09fe4cdcc4 100644 --- a/accel/tcg/cputlb.c +++ b/acce

[Qemu-devel] [PATCH v2 3/7] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code

2019-08-26 Thread David Hildenbrand
Factor it out into common code. Similar to the !CONFIG_USER_ONLY variant, let's not allow to cross page boundaries. Signed-off-by: David Hildenbrand --- accel/tcg/user-exec.c | 15 +++ include/exec/exec-all.h | 4 ++-- target/s390x/mem_helper.c | 7 --- 3 files changed, 1

[Qemu-devel] [PATCH v2 6/7] hppa/tcg: Call probe_write() also for CONFIG_USER_ONLY

2019-08-26 Thread David Hildenbrand
We now have a variant for CONFIG_USER_ONLY as well. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/hppa/op_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index df0f1361ef..f0516e81f1 100644 --- a/target

[Qemu-devel] [PATCH v2 7/7] s390x/tcg: Pass a size to probe_write() in do_csst()

2019-08-26 Thread David Hildenbrand
... and also call it for CONFIG_USER_ONLY. This function probably will also need some refactoring in regards to probing, however, we'll have to come back to that later, once cleaning up the other mem helpers. The alignment check always makes sure that the write access falls into a single page. Re

Re: [Qemu-devel] [PATCH v29 1/8] target/avr: Add outward facing interfaces and core CPU logic

2019-08-26 Thread Michael Rolnik
the commit was originally mine. Then Sarah rearranged it, signed and submitted. She no longer maintains it. So' I believe I can remove her sob. what do you think?. Michael On Mon, Aug 26, 2019 at 10:21 AM Thomas Huth wrote: > On 24/08/2019 20.46, Michael Rolnik wrote: > > From: Sarah Harris >

Re: [Qemu-devel] [PATCH v29 1/8] target/avr: Add outward facing interfaces and core CPU logic

2019-08-26 Thread Thomas Huth
On 26/08/2019 09.53, Michael Rolnik wrote: > the commit was originally mine. Then Sarah rearranged it, signed and > submitted. She no longer maintains it. So' I believe I can remove her sob. > what do you think?. Fine for me, but maybe you should mention her in the patch description if she made si

Re: [Qemu-devel] [PATCH] qemu-file: Rework old qemu_fflush comment

2019-08-26 Thread Stefano Garzarella
On Fri, Aug 23, 2019 at 11:39:46AM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Commit 11808bb removed the non-iovec based write support, > the comment hung on. > > Signed-off-by: Dr. David Alan Gilbert > --- > migration/qemu-file.c | 5 ++--- > 1 file change

Re: [Qemu-devel] [PATCH 3/3] audio: paaudio: ability to specify stream name

2019-08-26 Thread Maxim Levitsky
On Mon, 2019-08-26 at 02:29 +0200, Kővágó, Zoltán wrote: > This can be used to identify stream in tools like pavucontrol when one > creates multiple -audiodevs or runs multiple qemu instances. > > Signed-off-by: Kővágó, Zoltán > --- > qapi/audio.json | 6 ++ > audio/paaudio.c | 4 ++-- > 2 f

Re: [Qemu-devel] [PATCH 2/3] audio: paaudio: fix client name

2019-08-26 Thread Maxim Levitsky
On Mon, 2019-08-26 at 02:29 +0200, Kővágó, Zoltán wrote: > pa_context_new expects a client name, not a server socket path. > > Signed-off-by: Kővágó, Zoltán > --- > audio/paaudio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/audio/paaudio.c b/audio/paaudio.c > index

Re: [Qemu-devel] [PATCH] linux-user: Support gdb 'qOffsets' query for ELF

2019-08-26 Thread Laurent Vivier
Le 17/08/2019 à 01:34, Josh Kunz via Qemu-devel a écrit : > This is needed to support debugging PIE ELF binaries running under QEMU > user mode. Currently, `code_offset` and `data_offset` remain unset for > all ELF binaries, so GDB is unable to correctly locate the position of > the binary's text a

Re: [Qemu-devel] [PATCH 1/3] audio: omitting audiodev= parameter is only deprecated

2019-08-26 Thread Maxim Levitsky
On Mon, 2019-08-26 at 02:29 +0200, Kővágó, Zoltán wrote: > Unfortunately, changes introduced in af2041ed2d "audio: audiodev= > parameters no longer optional when -audiodev present" breaks backward > compatibility. This patch changes the error into a deprecation warning. > > Signed-off-by: Kővágó,

Re: [Qemu-devel] [Qemu-ppc] [PULL 1/2] spapr: Reset CAS & IRQ subsystem after devices

2019-08-26 Thread David Gibson
On Fri, Aug 23, 2019 at 03:47:52PM +0200, Laurent Vivier wrote: > On 23/08/2019 07:39, David Gibson wrote: > > On Thu, Aug 22, 2019 at 10:07:09PM +0200, Laurent Vivier wrote: > >> On 13/08/2019 08:59, David Gibson wrote: > >>> This fixes a nasty regression in qemu-4.1 for the 'pseries' machine, > >

Re: [Qemu-devel] [PATCH 3/6] cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK

2019-08-26 Thread David Hildenbrand
On 24.08.19 23:34, Richard Henderson wrote: > We had two different mechanisms to force a recheck of the tlb. > > Before TLB_RECHECK was introduced, we had a PAGE_WRITE_INV bit > that would immediate set TLB_INVALID_MASK, which automatically > means that a second check of the tlb entry fails. > >

Re: [Qemu-devel] [PATCH 4/6] exec: Factor out cpu_watchpoint_address_matches

2019-08-26 Thread David Hildenbrand
On 24.08.19 23:34, Richard Henderson wrote: > We want to move the check for watchpoints from > memory_region_section_get_iotlb to tlb_set_page_with_attrs. > Isolate the loop over watchpoints to an exported function. > > Rename the existing cpu_watchpoint_address_matches to > watchpoint_address_mat

Re: [Qemu-devel] [Qemu-arm] [PATCH 10/11] target/arm: Use unallocated_encoding for aarch32

2019-08-26 Thread Laurent Desnogues
Hi Richard, On Wed, Aug 7, 2019 at 6:54 AM Richard Henderson wrote: > > Promote this function from aarch64 to fully general use. > Use it to unify the code sequences for generating illegal > opcode exceptions. > > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.h | 2 -- >

Re: [Qemu-devel] [PATCH v3 0/3] qcow2: add zstd cluster compression

2019-08-26 Thread Denis Plotnikov
Ping! On 19.08.2019 18:00, Denis Plotnikov wrote: > v3: > * relax the compression type setting requirement when >the compression type is not zlib [Eric, Kevin] > * add compression type values to the spec [Eric] > * fix wording in the spec and descriptions [Eric] > * fix functions descriptions

[Qemu-devel] [PATCH] pseries: Fix compat_pvr on reset

2019-08-26 Thread Laurent Vivier
If we a migrate P8 machine to a P9 machine, the migration fails on destination with: error while loading state for instance 0x1 of device 'cpu' load of migration failed: Operation not permitted This is caused because the compat_pvr field is only present for the first CPU. Originally, spapr_ma

Re: [Qemu-devel] [PATCH v29 8/8] target/avr: Add tests

2019-08-26 Thread Alex Bennée
Michael Rolnik writes: > 1. Avocado test > The test is based on > https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo > demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out. > it also demostrates that timer and IRQ are working > > 2. Boot ser

Re: [Qemu-devel] [PATCH v1 2/4] s390x/tcg: Introduce probe_read_access()

2019-08-26 Thread David Hildenbrand
On 22.08.19 09:01, David Hildenbrand wrote: > On 22.08.19 00:31, Richard Henderson wrote: >> On 8/21/19 2:33 PM, David Hildenbrand wrote: NOTDIRTY cannot fault at all. The associated rcu critical section is ugly enough to make me not want to do anything except continue to go through the

Re: [Qemu-devel] [PATCH] target/xtensa: linux-user: add call0 ABI support

2019-08-26 Thread Laurent Vivier
Le 26/08/2019 à 00:17, Max Filippov a écrit : > Xtensa binaries built for call0 ABI don't rotate register window on > function calls and returns. Invocation of signal handlers from the > kernel is therefore different in windowed and call0 ABIs. > There's currently no way to determine xtensa ELF bin

[Qemu-devel] [PATCH v5 1/3] qemu-thread: Add qemu_cond_timedwait

2019-08-26 Thread Yury Kotov
Signed-off-by: Yury Kotov --- include/qemu/thread.h| 18 ++ util/qemu-thread-posix.c | 40 util/qemu-thread-win32.c | 16 util/qsp.c | 18 ++ 4 files changed, 80 insertions(+), 12 deletions

[Qemu-devel] [PATCH v5 3/3] tests/migration: Add a test for auto converge

2019-08-26 Thread Yury Kotov
Signed-off-by: Yury Kotov Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 120 + 1 file changed, 109 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index b87ba99a9e..e5caf93dfa 100644 --- a/tes

[Qemu-devel] [PATCH v5 0/3] High downtime with 95+ throttle pct

2019-08-26 Thread Yury Kotov
Hi, V5: * Updated sleep loop in throttle_thread at the suggestion of Paolo Bonzini * Fixed hanging of test V4: * The test was simplified to prevent false fails. V3: * Rebase fixes (migrate_set_parameter -> migrate_set_parameter_int) V2: * Added a test * Fixed qemu_cond_timedwait for qsp I wrot

[Qemu-devel] [PATCH v5 2/3] cpus: Fix throttling during vm_stop

2019-08-26 Thread Yury Kotov
Throttling thread sleeps in VCPU thread. For high throttle percentage this sleep is more than 10ms. E.g. for 60% - 15ms, for 99% - 990ms. vm_stop() kicks all VCPUs and waits for them. It's called at the end of migration and because of the long sleep the migration downtime might be more than 100ms e

Re: [Qemu-devel] [PATCH v5 3/3] tests/migration: Add a test for auto converge

2019-08-26 Thread Yury Kotov
David, I kept your Reviewed-by, but could you take another look at the test? I've made many changes in it. Thanks! 26.08.2019, 13:39, "Yury Kotov" : > Signed-off-by: Yury Kotov > Reviewed-by: Dr. David Alan Gilbert > --- >  tests/migration-test.c | 120 +

Re: [Qemu-devel] [PATCH] block: fix permission update in bdrv_replace_node

2019-08-26 Thread Max Reitz
On 24.08.19 12:07, Vladimir Sementsov-Ogievskiy wrote: > It's wrong to OR shared permissions. It may lead to crash on further > permission updates. > Also, no needs to consider previously calculated permissions, as at > this point we already bind all new parents and bdrv_get_cumulative_perm > resul

Re: [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap

2019-08-26 Thread dovgaluk
This patch breaks the execution recording. While vCPU tries to lock replay mutex in main while loop, vga causes dirty memory sync and do_run_on_cpu call. This call waits for vCPU to process the work queue. Pavel Dovgalyuk Paolo Bonzini писал 2019-08-20 09:59: There is a race between TCG and acc

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Max Reitz
On 26.08.19 00:03, Nir Soffer wrote: > When creating an image with preallocation "off" or "falloc", the first > block of the image is typically not allocated. When using Gluster > storage backed by XFS filesystem, reading this block using direct I/O > succeeds regardless of request length, fooling

Re: [Qemu-devel] [RFC PATCH] migration/postcopy: skip compression when postcopy is active

2019-08-26 Thread Wei Yang
On Fri, Aug 23, 2019 at 05:27:01PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> Now postcopy is not compatible with compression. And we disable setting >> these two capability at the same time. While we can still leverage >> compress before postcopy is

Re: [Qemu-devel] [PATCH v2 2/2] iotests: Test allocate_first_block() with O_DIRECT

2019-08-26 Thread Max Reitz
On 26.08.19 00:03, Nir Soffer wrote: > Using block_resize we can test allocate_first_block() with file > descriptor opened with O_DIRECT, ensuring that it works for any size > larger than 4096 bytes. > > Testing smaller sizes is tricky as the result depends on the filesystem > used for testing. Fo

Re: [Qemu-devel] [PATCH v3] virtio pmem: user document

2019-08-26 Thread Cornelia Huck
On Wed, 21 Aug 2019 17:46:24 +0530 Pankaj Gupta wrote: > This patch documents the steps to use virtio pmem. > It also documents other useful information about > virtio pmem e.g use-case, comparison with Qemu NVDIMM > backend and current limitations. > > Signed-off-by: Pankaj Gupta > --- > v3->v

Re: [Qemu-devel] [RFC PATCH] migration/postcopy: enable compress with postcopy

2019-08-26 Thread Wei Yang
On Fri, Aug 23, 2019 at 04:59:19PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> This patch enable compress with postcopy. >> >> This is a RFC and based on some unmerged patch >> >> "migration: extract ram_load_precopy" >> "migration/postcopy: skip

Re: [Qemu-devel] [PATCH] pseries: Fix compat_pvr on reset

2019-08-26 Thread David Gibson
On Mon, Aug 26, 2019 at 11:08:12AM +0200, Laurent Vivier wrote: > If we a migrate P8 machine to a P9 machine, the migration fails on > destination with: > > error while loading state for instance 0x1 of device 'cpu' > load of migration failed: Operation not permitted > > This is caused becaus

Re: [Qemu-devel] [PATCH] configure: more resilient Python version capture

2019-08-26 Thread Cleber Rosa
On Sat, Aug 24, 2019 at 07:32:24AM +, tony.ngu...@bt.com wrote: > > -python_version=$($python -V 2>&1 | sed -e 's/Python\ //') > > +python_version=$(python2 -c 'import sys; print("%d.%d.%d" % > > (sys.version_info[0], sys.version_info[1], sys.version_info[2]))' > > 2>/dev/null) > > On a Pyth

Re: [Qemu-devel] [PATCH 06/13] qcrypto-luks: implement more rigorous header checking

2019-08-26 Thread Eric Blake
On 8/25/19 11:08 AM, Maxim Levitsky wrote: >>> I'd do a separate check for stripes and active fields, and then give a >>> specific error message for each. That way if this does ever trigger >>> in practice will immediately understand which check failed. >>> >>> Also using '%d' rather than '%i' is

Re: [Qemu-devel] [PATCH 16/25] audio: add mixeng option (documentation)

2019-08-26 Thread Eric Blake
On 8/25/19 1:46 PM, Kővágó, Zoltán wrote: > This will allow us to disable mixeng when we use a decent backend. > > Disabling mixeng have a few advantages: > * we no longer convert the audio output from one format to another, when > the underlying audio system would just convert it to a third for

Re: [Qemu-devel] [PATCH 06/13] qcrypto-luks: implement more rigorous header checking

2019-08-26 Thread Maxim Levitsky
On Mon, 2019-08-26 at 08:31 -0500, Eric Blake wrote: > On 8/25/19 11:08 AM, Maxim Levitsky wrote: > > > > > I'd do a separate check for stripes and active fields, and then give a > > > > specific error message for each. That way if this does ever trigger > > > > in practice will immediately unders

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Eric Blake
On 8/25/19 5:03 PM, Nir Soffer wrote: > When creating an image with preallocation "off" or "falloc", the first > block of the image is typically not allocated. When using Gluster > storage backed by XFS filesystem, reading this block using direct I/O > succeeds regardless of request length, fooling

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Eric Blake
On 8/26/19 7:31 AM, Max Reitz wrote: >> # the file size. This function hides the resulting difference in the >> # stat -c '%b' output. >> # Parameter 1: Number of blocks an empty file occupies >> -# Parameter 2: Image size in bytes >> +# Parameter 2: Minimal number of blocks in an image >> +#

[Qemu-devel] [PATCH v2 00/13] RFC crypto/luks: preparation for encryption key managment

2019-08-26 Thread Maxim Levitsky
Hi! This patch series is the refactoring/preparation part of the former patch series I had sent which adds support for luks key management. I tried my best to address all the comments that were given during the review, and I would like to use that opportunity to thanks again for the review I was

[Qemu-devel] [PATCH v2 02/13] block-crypto: misc refactoring

2019-08-26 Thread Maxim Levitsky
* rename the write_func to create_write_func, and init_func to create_init_func this is preparation for other write_func that will be used to update the encryption keys. No functional changes Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 12 ++---

[Qemu-devel] [PATCH v2 07/13] qcrypto-luks: use the parsed encryption settings in QCryptoBlockLUKS

2019-08-26 Thread Maxim Levitsky
Prior to that patch, the parsed encryptio settings were alrady stored into the QCryptoBlockLUKS but not used anywhere but in qcrypto_block_luks_get_info Using them simplifies the code Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 169 +--- 1 fil

[Qemu-devel] [PATCH v2 03/13] qcrypto-luks: rename some fields in QCryptoBlockLUKSHeader

2019-08-26 Thread Maxim Levitsky
* key_bytes -> master_key_len * payload_offset = payload_offset_sector (to emphasise that this isn't byte offset) * key_offset -> key_offset_sector - same as above for luks slots Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 91 +++-- 1 file cha

[Qemu-devel] [PATCH v2 01/13] introduce g_autowipe

2019-08-26 Thread Maxim Levitsky
Marking a pointer with g_autowipe, will not only free it at the scope exit, but also erase the data it points to just prior to freeing it. This is first attempt to implement this feature, as suggested by Daniel and Nir. The things that need to be verified prior to merging this is 1. Can we just

[Qemu-devel] [PATCH v2 09/13] qcrypto-block: extract check and parse header

2019-08-26 Thread Maxim Levitsky
This is just to make qcrypto_block_luks_open more reasonable in size. Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 254 +--- 1 file changed, 146 insertions(+), 108 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index b4dc6f

[Qemu-devel] [PATCH v2 11/13] qcrypto-luks: refactoring: simplify the math used for keyslot locations

2019-08-26 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 64 + 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index d713125925..6a43d97ce5 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks

[Qemu-devel] [PATCH v2 08/13] qcrypto-luks: extract store and load header

2019-08-26 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 166 +++- 1 file changed, 102 insertions(+), 64 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index cad65ae0aa..b4dc6fc899 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luk

[Qemu-devel] [PATCH v2 04/13] qcrypto-luks: don't overwrite cipher_mode in header

2019-08-26 Thread Maxim Levitsky
This way we can store the header we loaded, which will be used in key management code Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index f12fa2d270..e9ae3f6baa 100644 -

[Qemu-devel] [PATCH v2 10/13] qcrypto-luks: refactoring: extract store key function

2019-08-26 Thread Maxim Levitsky
This function will be used later to store new keys to the luks metadata Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 310 ++-- 1 file changed, 184 insertions(+), 126 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index cc9a

[Qemu-devel] [PATCH v2 13/13] qcrypto-luks: implement more rigorous header checking

2019-08-26 Thread Maxim Levitsky
Check that keyslots don't overlap with the data, and check that keyslots don't overlap with each other. (this is done using naive O(n^2) nested loops, but since there are just 8 keyslots, this doesn't really matter. Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 46 +

[Qemu-devel] [PATCH v2 05/13] qcrypto-luks: simplify masterkey and masterkey length

2019-08-26 Thread Maxim Levitsky
Let the caller allocate masterkey Always use master key len from the header Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index e9a

[Qemu-devel] [PATCH v2 12/13] qcrypto-luks: use g_autowipe

2019-08-26 Thread Maxim Levitsky
This patch makes the luks crypto driver use the g_autowipe to erase the master keys, and the passwords from the memory. Note that this is not a complete solution, since these keys are also present in the chipers, and in the secrets. Some of them still can be erased, at least at driver instance

Re: [Qemu-devel] [PATCH v2] pc: Don't make die-id mandatory unless necessary

2019-08-26 Thread Igor Mammedov
On Fri, 16 Aug 2019 14:07:50 -0300 Eduardo Habkost wrote: > We have this issue reported when using libvirt to hotplug CPUs: > https://bugzilla.redhat.com/show_bug.cgi?id=1741451 > > Basically, libvirt is not copying die-id from > query-hotpluggable-cpus, but die-id is now mandatory. > > We coul

[Qemu-devel] [PATCH v2 06/13] qcrypto-block: pass keyslot index rather that pointer to the keyslot

2019-08-26 Thread Maxim Levitsky
Another minor refactoring Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 331377293d..0d81f2ac61 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks.c @@ -410,7 +4

Re: [Qemu-devel] [POC Seabios PATCH] seabios: use isolated SMM address space for relocation

2019-08-26 Thread Igor Mammedov
On Fri, 16 Aug 2019 18:43:11 -0400 Boris Ostrovsky wrote: > On 8/16/19 7:24 AM, Igor Mammedov wrote: > > for purpose of demo SMRAM (at 0x3) is aliased at a in system > > address space > > for easy initialization of SMI entry point. > > Here is resulting debug output showing that RAM at 0

[Qemu-devel] [PATCH 01/19] hw/audio: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 02/19] hw/block: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if ununsed, re-declare as DEVICE_H

[Qemu-devel] [PATCH 00/19] Declare device little or big endian

2019-08-26 Thread Tony Nguyen
This series is an attempt to re-declare devices with DEVICE_NATIVE_ENDIAN as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN. This clean up was split out from an earlier series which collapsed byte swaps along the I/O path. On Wed, 7 Aug 2019 at 12:42, Paolo Bonzini wrote: > On 07/08/19 10:31, tony.ngu

[Qemu-devel] [PATCH 08/19] hw/i2c: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if ununsed, re-declare as DEVICE_H

[Qemu-devel] [PATCH 03/19] hw/char: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 05/19] hw/display: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 04/19] hw/core: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if ununsed, re-declare as DEVICE_H

[Qemu-devel] [PATCH 12/19] hw/isa: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 07/19] hw/gpio: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 06/19] hw/dma: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 19/19] build: Correct non-common common-obj-* to obj-*

2019-08-26 Thread Tony Nguyen
Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to compile. Signed-off-by: Tony Nguyen --- hw/block/Makef

[Qemu-devel] [PATCH 11/19] hw/ipack: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if ununsed, re-declare as DEVICE_H

[Qemu-devel] [PATCH 09/19] hw/input: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 10/19] hw/intc: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

Re: [Qemu-devel] [PATCH v2 3/7] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code

2019-08-26 Thread Richard Henderson
On 8/26/19 12:51 AM, David Hildenbrand wrote: > Factor it out into common code. Similar to the !CONFIG_USER_ONLY variant, > let's not allow to cross page boundaries. > > Signed-off-by: David Hildenbrand > --- > accel/tcg/user-exec.c | 15 +++ > include/exec/exec-all.h | 4 ++--

[Qemu-devel] [PATCH 13/19] hw/misc: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 16/19] hw/sd: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 14/19] hw/net: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 15/19] hw/pci-host: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 17/19] hw/ssi: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

[Qemu-devel] [PATCH 18/19] hw/timer: Declare device little or big endian

2019-08-26 Thread Tony Nguyen
For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_

Re: [Qemu-devel] [PATCH v2 4/7] tcg: Enforce single page access in probe_write()

2019-08-26 Thread Richard Henderson
On 8/26/19 12:51 AM, David Hildenbrand wrote: > Let's enforce the interface restriction. > > Signed-off-by: David Hildenbrand > --- > accel/tcg/cputlb.c| 2 ++ > accel/tcg/user-exec.c | 2 ++ > 2 files changed, 4 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary

2019-08-26 Thread Igor Mammedov
On Sat, 17 Aug 2019 08:17:48 +0200 Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Fri, Aug 16, 2019 at 03:20:11PM +0200, Igor Mammedov wrote: > >> On Thu, 15 Aug 2019 15:38:03 -0300 > >> Eduardo Habkost wrote: > >> > >> > We have this issue reported when using libvirt to hotp

[Qemu-devel] [Bug 1841442] [NEW] floating point emulation can fail to set FE_INEXACT

2019-08-26 Thread Paul Clarke
Public bug reported: Floating point emulation can fail to set FE_INEXACT in some circumstances. This shows up quite often in glibc's "math" tests. A similar test is attached. On ppc64le native: -- $ gcc nextafter.c -o nextafter -lm $ ./nextafter $(./nextafter) 0x0001 0.00 0x0 0x

[Qemu-devel] [PATCH 1/2] Revert "target/arm: Use unallocated_encoding for aarch32"

2019-08-26 Thread Richard Henderson
This reverts commit 3cb36637157088892e9e33ddb1034bffd1251d3b. Despite the fact that the text for the call to gen_exception_insn is identical for aarch64 and aarch32, the implementation inside gen_exception_insn is totally different. This fixes exceptions raised from aarch64. Reported-by: Laurent

[Qemu-devel] [PATCH 0/2] target/arm: Fix aarch64 illegal opcode exceptions

2019-08-26 Thread Richard Henderson
As Laurent pointed out, gen_exception_insn is very different between aarch64 and aarch32, so we shouldn't accidentally redirect one to the other. r~ Richard Henderson (2): Revert "target/arm: Use unallocated_encoding for aarch32" target/arm: Factor out unallocated_encoding for aarch32 tar

[Qemu-devel] [PATCH 2/2] target/arm: Factor out unallocated_encoding for aarch32

2019-08-26 Thread Richard Henderson
Make this a static function private to translate.c. Thus we can use the same idiom between aarch64 and aarch32 without actually sharing function implementations. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 3 +-- target/arm/translate.c | 22

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Nir Soffer
On Mon, Aug 26, 2019 at 4:46 PM Eric Blake wrote: > > On 8/25/19 5:03 PM, Nir Soffer wrote: > > When creating an image with preallocation "off" or "falloc", the first > > block of the image is typically not allocated. When using Gluster > > storage backed by XFS filesystem, reading this block usin

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Nir Soffer
On Mon, Aug 26, 2019 at 4:49 PM Eric Blake wrote: > > On 8/26/19 7:31 AM, Max Reitz wrote: > > >> # the file size. This function hides the resulting difference in the > >> # stat -c '%b' output. > >> # Parameter 1: Number of blocks an empty file occupies > >> -# Parameter 2: Image size in byte

Re: [Qemu-devel] [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-26 Thread Laszlo Ersek
On 08/23/19 17:25, Kinney, Michael D wrote: > Hi Jiewen, > > If a hot add CPU needs to run any code before the > first SMI, I would recommend is only executes code > from a write protected FLASH range without a stack > and then wait for the first SMI. "without a stack" looks very risky to me. Eve

Re: [Qemu-devel] [PATCH v2 1/2] virtio: add vhost-user-fs base device

2019-08-26 Thread Cornelia Huck
On Fri, 23 Aug 2019 18:56:56 +0100 "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The virtio-fs virtio device provides shared file system access using > the FUSE protocol carried ovew virtio. > The actual file server is implemented in an external vhost-user-fs device

Re: [Qemu-devel] [PATCH v2 2/2] virtio: add vhost-user-fs-pci device

2019-08-26 Thread Cornelia Huck
On Fri, 23 Aug 2019 18:56:57 +0100 "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Add the PCI version of vhost-user-fs. > > Launch QEMU like this: > > qemu -chardev socket,path=/tmp/vhost-fs.sock,id=chr0 >-device x-vhost-user-fs-pci,tag=myfs,chardev=chr0

[Qemu-devel] [Bug 1841442] Re: floating point emulation can fail to set FE_INEXACT

2019-08-26 Thread Richard Henderson
Well, maybe yes and maybe no. What you've done is choose two targets whose floating point emulation have not been well maintained. If I try this same test on aarch64, it passes: $ ~/a.out 0x0001 0x0001 0.00 0x0 0x18 FE_INEXACT FE_UNDERFLOW 0x 0.0

Re: [Qemu-devel] [PATCH v2 1/2] block: posix: Always allocate the first block

2019-08-26 Thread Nir Soffer
On Mon, Aug 26, 2019 at 3:31 PM Max Reitz wrote: > > On 26.08.19 00:03, Nir Soffer wrote: ... > > +/* > > + * Help alignment probing by allocating the first block. > > + * > > + * When reading with direct I/O from unallocated area on Gluster backed by > > XFS, > > + * reading succeeds regardless

[Qemu-devel] [PATCH v6 6/6] iotests: extend sleeping time under Valgrind

2019-08-26 Thread Andrey Shinkevich
To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/247 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test

[Qemu-devel] [PATCH v6 5/6] iotests: extended timeout under Valgrind

2019-08-26 Thread Andrey Shinkevich
As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- tests/qemu

  1   2   3   >