Re: [Qemu-devel] [Qemu-ppc] [GIT PULL for qemu-pseries REPOST] pseries: Update SLOF firmware image

2019-08-24 Thread David Gibson
On Fri, Aug 23, 2019 at 02:09:44PM +1000, Alexey Kardashevskiy wrote: > > > On 14/08/2019 14:33, Aravinda Prasad wrote: > > > > > > On Tuesday 13 August 2019 07:47 PM, David Gibson wrote: > > > On Tue, Aug 13, 2019 at 01:00:24PM +0530, Aravinda Prasad wrote: > > > > > > > > > > > > On Monday

Re: [Qemu-devel] [PATCH] block: posix: Always allocate the first block

2019-08-24 Thread Nir Soffer
On Fri, Aug 23, 2019 at 8:53 PM Max Reitz wrote: > On 23.08.19 18:48, Nir Soffer wrote: > > On Fri, Aug 23, 2019 at 4:58 PM Max Reitz > > wrote: > > [...] > > > If you have a format layer that truncates the image to a fixed size > and > > does not write

Re: [Qemu-devel] [PATCH 8/9] exec: Delete DEVICE_HOST_ENDIAN

2019-08-24 Thread Richard Henderson
On 8/23/19 12:42 PM, Tony Nguyen wrote: > Simplify code with MemOp short hand for host endianness, 0. > > typedef enum MemOp { > /* snip */ > #ifdef HOST_WORDS_BIGENDIAN > MO_LE= MO_BSWAP, > MO_BE= 0, > #else > MO_LE= 0, > MO_BE= MO_BSWAP, > #endif >

Re: [Qemu-devel] [PATCH 9/9] memory: Delete memory_region_big_endian

2019-08-24 Thread Richard Henderson
On 8/23/19 12:42 PM, Tony Nguyen wrote: > memory_region_big_endian is no longer useful now we are consistently > using MemOp for endianness. > > Signed-off-by: Tony Nguyen > --- > memory.c | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 6/9] memory: Delete devend_memop

2019-08-24 Thread Richard Henderson
On 8/23/19 12:42 PM, Tony Nguyen wrote: > device_endian has been made redundant by MemOp. > > Signed-off-by: Tony Nguyen > --- > include/exec/memory.h | 3 --- > memory.c | 19 +-- > memory_ldst.inc.c | 18 ++ > 3 files changed, 7 insertions(+),

[Qemu-devel] [PATCH 6/6] tcg: Check for watchpoints in probe_write()

2019-08-24 Thread Richard Henderson
From: David Hildenbrand Let size > 0 indicate a promise to write to those bytes. Check for write watchpoints in the probed range. Suggested-by: Richard Henderson Signed-off-by: David Hildenbrand Message-Id: <20190823100741.9621-10-da...@redhat.com> [rth: Recompute index after tlb_fill; check

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

2019-08-24 Thread Richard Henderson
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_matches, since it doesn't actually have a cpu argument.

[Qemu-devel] [PATCH 2/6] exec: Factor out core logic of check_watchpoint()

2019-08-24 Thread Richard Henderson
From: David Hildenbrand We want to perform the same checks in probe_write() to trigger a cpu exit before doing any modifications. We'll have to pass a PC. Signed-off-by: David Hildenbrand Reviewed-by: Richard Henderson Message-Id: <20190823100741.9621-9-da...@redhat.com> [rth: Use vaddr for

[Qemu-devel] [PATCH 5/6] cputlb: Handle watchpoints via TLB_WATCHPOINT

2019-08-24 Thread Richard Henderson
The raising of exceptions from check_watchpoint, buried inside of the I/O subsystem, is fundamentally broken. We do not have the helper return address with which we can unwind guest state. Replace PHYS_SECTION_WATCH and io_mem_watch with TLB_WATCHPOINT. Move the call to cpu_check_watchpoint into

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

2019-08-24 Thread Richard Henderson
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 insertions(+), 24 deletions(-) diff --git

[Qemu-devel] [PATCH 0/6] exec: Cleanup watchpoints

2019-08-24 Thread Richard Henderson
As discussed with David earlier this week, the current implementation of watchpoints cannot work, at least reliably. We are raising an exception out of the middle of the i/o access path which does not even attempt to unwind the guest cpu state, nor does it have the information required to do so.

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

2019-08-24 Thread Richard Henderson
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. We can use the same mechanism to handle small pages.

Re: [Qemu-devel] [PATCH v1 9/9] tcg: Check for watchpoints in probe_write()

2019-08-24 Thread Richard Henderson
On 8/23/19 3:07 AM, David Hildenbrand wrote: > @@ -1071,8 +1072,23 @@ void probe_write(CPUArchState *env, target_ulong addr, > if (!VICTIM_TLB_HIT(addr_write, addr)) { > tlb_fill(env_cpu(env), addr, size, MMU_DATA_STORE, > mmu_idx, retaddr); > +

[Qemu-devel] [PATCH v29 5/8] target/avr: Add limited support for USART and 16 bit timer peripherals

2019-08-24 Thread Michael Rolnik
From: Sarah Harris These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins).

[Qemu-devel] [PATCH v29 7/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file

2019-08-24 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- MAINTAINERS | 6 ++ arch_init.c | 2 ++ configure | 7 +++ default-configs/avr-softmmu.mak | 5 + include/disas/dis-asm.h | 6 ++ include/sysemu/arch_init.h | 1 +

[Qemu-devel] [PATCH v29 3/8] target/avr: Add instruction decoding

2019-08-24 Thread Michael Rolnik
This includes: - encoding of all 16 bit instructions - encoding of all 32 bit instructions Signed-off-by: Michael Rolnik --- target/avr/insn.decode | 175 + 1 file changed, 175 insertions(+) create mode 100644 target/avr/insn.decode diff --git

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

2019-08-24 Thread Michael Rolnik
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 serial test Prinit out 'T' through

[Qemu-devel] [PATCH v29 4/8] target/avr: Add instruction translation

2019-08-24 Thread Michael Rolnik
This includes: - TCG translations for each instruction Signed-off-by: Michael Rolnik --- target/avr/translate.c | 2888 1 file changed, 2888 insertions(+) create mode 100644 target/avr/translate.c diff --git a/target/avr/translate.c

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

2019-08-24 Thread Michael Rolnik
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 --- gdb-xml/avr-cpu.xml| 49 target/avr/cpu-param.h | 37 +++ target/avr/cpu-qom.h | 54

[Qemu-devel] [PATCH v29 2/8] target/avr: Add instruction helpers

2019-08-24 Thread Michael Rolnik
From: Sarah Harris Stubs for unimplemented instructions and helpers for instructions that need to interact with QEMU. SPM and WDR are unimplemented because they require emulation of complex peripherals. The implementation of SLEEP is very limited due to the lack of peripherals to generate

[Qemu-devel] [PATCH v29 6/8] target/avr: Add example board configuration

2019-08-24 Thread Michael Rolnik
From: Sarah Harris A simple board setup that configures an AVR CPU to run a given firmware image. This is all that's useful to implement without peripheral emulation as AVR CPUs include a lot of on-board peripherals. NOTE: this is not a real board NOTE: it's used for CPU testing

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

2019-08-24 Thread Michael Rolnik
This series of patches adds 8bit AVR cores to QEMU. All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully tested yet. However I was able to execute simple code with functions. e.g fibonacci calculation. This series of patches include a non real, sample board. No fuses support

[Qemu-devel] [PATCH v2 2/2] nbd: Tolerate more errors to structured reply request

2019-08-24 Thread Eric Blake
A server may have a reason to reject a request for structured replies, beyond just not recognizing them as a valid request; similarly, it may have a reason for rejecting a request for a meta context. It doesn't hurt us to continue talking to such a server; otherwise 'qemu-nbd --list' of such a

[Qemu-devel] [PATCH v2 0/2] nbd: tolerate more errors to extension requests

2019-08-24 Thread Eric Blake
Since v1; - new patch 1 - adjust patch 2 to not set errp when not in strict mode Eric Blake (2): nbd: Use g_autofree in a few places nbd: Tolerate more errors to structured reply request block/nbd.c | 11 +++ nbd/client.c | 85 +++-

[Qemu-devel] [PATCH v2 1/2] nbd: Use g_autofree in a few places

2019-08-24 Thread Eric Blake
Thanks to our recent move to use glib's g_autofree, I can join the bandwagon. Getting rid of gotos is fun ;) There are probably more places where we could register cleanup functions and get rid of more gotos; this patch just focuses on the labels that existed merely to call g_free.

Re: [Qemu-devel] [PATCH 2/2] migration/qemu-file: fix potential buf waste for extra buf_index adjustment

2019-08-24 Thread Wei Yang
On Fri, Aug 23, 2019 at 02:05:02PM +0100, Dr. David Alan Gilbert wrote: >* Daniel P. Berrang? (berra...@redhat.com) wrote: >> On Fri, Aug 23, 2019 at 12:06:09PM +0100, Dr. David Alan Gilbert wrote: >> > (Copying Dan in) >> > >> > * Wei Yang (richardw.y...@linux.intel.com) wrote: >> > > In

Re: [Qemu-devel] [PATCH 2/2] migration/qemu-file: fix potential buf waste for extra buf_index adjustment

2019-08-24 Thread Wei Yang
On Fri, Aug 23, 2019 at 12:06:09PM +0100, Dr. David Alan Gilbert wrote: >(Copying Dan in) > >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> In add_to_iovec(), qemu_fflush() will be called if iovec is full. If >> this happens, buf_index is reset. Currently, this is not checked and >>

Re: [Qemu-devel] [PATCH v1 8/9] exec.c: Factor out core logic of check_watchpoint()

2019-08-24 Thread Richard Henderson
On 8/23/19 4:27 AM, David Hildenbrand wrote: > On 23.08.19 12:07, David Hildenbrand wrote: >> We want to perform the same checks in probe_write() to trigger a cpu >> exit before doing any modifications. We'll have to pass a PC. >> >> Signed-off-by: David Hildenbrand >> --- >> exec.c

Re: [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-24 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 19:21, Stefan Hajnoczi wrote: > On Thu, Aug 22, 2019 at 05:59:43PM +, Vladimir Sementsov-Ogievskiy wrote: >> 22.08.2019 20:39, Vladimir Sementsov-Ogievskiy wrote: >>> 22.08.2019 20:24, Vladimir Sementsov-Ogievskiy wrote: 22.08.2019 18:50, Stefan Hajnoczi wrote: > On Tue,

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

2019-08-24 Thread Vladimir Sementsov-Ogievskiy
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 result is enough. So fix the bug by just set permissions by

Re: [Qemu-devel] [PATCH v4 01/10] add device_legacy_reset function to prepare for reset api change

2019-08-24 Thread David Gibson
On Wed, Aug 21, 2019 at 06:33:32PM +0200, Damien Hedde wrote: > Provide a temporary device_legacy_reset function doing what > device_reset does to prepare for the transition with Resettable > API. > > All occurrence of device_reset in the code tree are also replaced > by device_legacy_reset. > >

Re: [Qemu-devel] [RFC PATCH 07/17] hw/i2c: Declare device little or big endian

2019-08-24 Thread David Gibson
On Sat, Aug 24, 2019 at 04:56:28AM +1000, Tony Nguyen wrote: > 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 > the device endianness as DEVICE_LITTLE_ENDIAN

Re: [Qemu-devel] [PATCH V2 1/2] tests.acceptance.avocado_qemu: Add support for powerpc

2019-08-24 Thread David Gibson
On Mon, Aug 19, 2019 at 01:58:20PM +0530, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Current acceptance test will not run properly in powerpc > environment due qemu target is different from arch, this > usually matches, except with bi-endian architectures like ppc64. >

Re: [Qemu-devel] [PATCH v5 0/8] target/ppc: Optimize emulation of some Altivec instructions

2019-08-24 Thread David Gibson
On Mon, Jul 15, 2019 at 04:22:46PM +0200, Stefan Brankovic wrote: > Optimize emulation of ten Altivec instructions: lvsl, lvsr, vsl, vsr, vpkpx, > vgbbd, vclzb, vclzh, vclzw and vclzd. > > This series buils up on and complements recent work of Thomas Murta, Mark > Cave-Ayland and Richard

Re: [Qemu-devel] more automated/public CI for QEMU pullreqs

2019-08-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 8/22/19 7:05 PM, Paolo Bonzini wrote: >> On 22/08/19 18:50, Dr. David Alan Gilbert wrote: >>> * Paolo Bonzini (pbonz...@redhat.com) wrote: On 22/08/19 18:31, Dr. David Alan Gilbert wrote: >> With both these points in mind, I think it is pretty hard

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

2019-08-24 Thread tony.nguyen
> -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 Python 3 only system, configure will no longer print the version. e.g. /*

Re: [Qemu-devel] [PATCH 0/3] mailmap: Clean up

2019-08-24 Thread Alex Bennée
Aleksandar Markovic writes: > 23.08.2019. 08.13, "Markus Armbruster" је написао/ла: >> >> Philippe Mathieu-Daudé writes: >> >> > Trivial cleanup of .mailmap to have a nice 'git shortlog' output. >> > >> > Philippe Mathieu-Daudé (3): >> > mailmap: Reorder by sections >> > mailmap: Update

Re: [Qemu-devel] [PATCH 1/1] protocol: Add NBD_CMD_FLAG_FAST_ZERO

2019-08-24 Thread Wouter Verhelst
On Fri, Aug 23, 2019 at 01:58:44PM -0500, Eric Blake wrote: > On 8/23/19 1:48 PM, Wouter Verhelst wrote: > > On Fri, Aug 23, 2019 at 09:34:26AM -0500, Eric Blake wrote: > >> +- bit 4, `NBD_CMD_FLAG_FAST_ZERO`; valid during > >> + `NBD_CMD_WRITE_ZEROES`. If set, but the server cannot perform the >