[Qemu-devel] [PATCH v2 06/30] target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor mode

2017-01-11 Thread Artyom Tarasenko
As described in Chapter 5.7.6 of the UltraSPARC Architecture 2005, outstanding disrupting exceptions that are destined for privileged mode can only cause a trap when the virtual processor is in nonprivileged or privileged mode and PSTATE.ie = 1. At all other times, they are held pending.

[Qemu-devel] [PATCH v2 22/30] target-sparc: allow 256M sized pages

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/mmu_helper.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 044e88c..fa70dc0 100644 --- a/target/sparc/mmu_helper.c +++

[Qemu-devel] [PATCH v2 29/30] target-sparc: move common cpu initialisation routines to sparc64.c

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- hw/sparc64/Makefile.objs | 1 + hw/sparc64/sparc64.c | 378 + hw/sparc64/sun4u.c | 348

[Qemu-devel] [PATCH v2 14/30] target-sparc: fix immediate UA2005 traps

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 7e399a3..23d4673 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@

[Qemu-devel] [PATCH v2 04/30] target-sparc: add UA2005 TTE bit #defines

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 17 + 1 file changed, 17 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 687e158..b41f5c5 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -304,19 +304,36 @@ enum {

[Qemu-devel] [PATCH v2 20/30] target-sparc: implement UA2005 TSB Pointers

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 2 + target/sparc/ldst_helper.c | 124 + 2 files changed, 104 insertions(+), 22 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index

[Qemu-devel] [PATCH v2 30/30] target-sparc: fix up niagara machine

2017-01-11 Thread Artyom Tarasenko
Remove the Niagara stub implementation from sun4u.c and add a machine, compatible with Legion simulator from the OpenSPARC T1 project. The machine uses the firmware supplied with the OpenSPARC T1 project, http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2 in the

[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread dcb
> so it is just as easy to write 'i ? ...' instead of the weirder > '(i * 2) ? ...'. I suspect it is just possible that the i * 2 expression is a typo for something else, perhaps i & 2 or i << 2 or i >> 2 or something else. I don't know the code so I am unable to offer better guidance. -- You

[Qemu-devel] [PATCH v2 03/30] target-sparc: use explicit mmu register pointers

2017-01-11 Thread Artyom Tarasenko
Use explicit register pointers while accessing D/I-MMU registers. Call cpu_unassigned_access on access to missing registers. Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target/sparc/cpu.h | 4 +++ target/sparc/ldst_helper.c

[Qemu-devel] [PATCH v2 18/30] target-sparc: replace the last tlb entry when no free entries left

2017-01-11 Thread Artyom Tarasenko
Implement the behavior described in the chapter 13.9.11 of UltraSPARC T1™ Supplement to the UltraSPARC Architecture 2005: "If a TLB Data-In replacement is attempted with all TLB entries locked and valid, the last TLB entry (entry 63) is replaced." Signed-off-by: Artyom Tarasenko

[Qemu-devel] [PATCH v2 23/30] target-sparc: implement auto-demapping for UA2005 CPUs

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/ldst_helper.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 0447d4e..57b3b97 100644 --- a/target/sparc/ldst_helper.c +++

[Qemu-devel] [PATCH v2 15/30] target-sparc: use direct address translation in hyperprivileged mode

2017-01-11 Thread Artyom Tarasenko
Please note that QEMU doesn't impelement Real->Physical address translation. The "Real Address" is always the "Physical Address". Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 7 +++

[Qemu-devel] [PATCH v6] hw/ssi/imx_spi.c: fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe Dubois
The i.MX SPI device was not de-asserting the CS line at the end of memory access. This triggered a SIGSEGV in Qemu when the sabrelite emulator was acessing a SPI flash memory. Whith this path the CS signal is correctly asserted and deasserted arround memory access. Assertion level is now based

[Qemu-devel] [PATCH v2 10/30] target-sparc: hypervisor mode takes over nucleus mode

2017-01-11 Thread Artyom Tarasenko
Accordinf to UA2005, 9.3.3 "Address Space Identifiers", "In hyperprivileged mode, all instruction fetches and loads and stores with implicit ASIs use a physical address, regardless of the value of TL". Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 4 ++--

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Alex Bligh
> On 11 Jan 2017, at 15:31, Vladimir Sementsov-Ogievskiy > wrote: > > >>> If an error occurs, the server SHOULD set the appropriate error code in > >>> the error field of an error chunk. However, if the error does not involve > >>> invalid usage (such as a request

[Qemu-devel] [PATCH v2 13/30] target-sparc: implement UA2005 rdhpstate and wrhpstate instructions

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target/sparc/translate.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 68677d3..7e399a3 100644 ---

[Qemu-devel] [PATCH v2 07/30] target-sparc: simplify replace_tlb_entry by using TTE_PGSIZE

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target/sparc/ldst_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 043cbf8..68eca86 100644 ---

Re: [Qemu-devel] [PATCH v4 03/25] block: Add BDS.backing_overridden

2017-01-11 Thread Eric Blake
On 01/11/2017 12:14 PM, Max Reitz wrote: > If the backing file is overridden, this most probably does change the > guest-visible data of a BDS. Therefore, we will need to consider this in > bdrv_refresh_filename(). > > Adding a new field to the BDS is not nice, but it is very simple and > exactly

[Qemu-devel] [PATCH v2 08/30] target-sparc: implement UA2005 scratchpad registers

2017-01-11 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target/sparc/asi.h | 1 + target/sparc/cpu.h | 1 + target/sparc/ldst_helper.c | 24 3 files changed, 26 insertions(+) diff --git a/target/sparc/asi.h b/target/sparc/asi.h index c9a1849..d8d6284

Re: [Qemu-devel] [Bug 1653384] Re: Assertion failed with USB pass through with XHCI controller

2017-01-11 Thread Gerd Hoffmann
On Mi, 2017-01-11 at 16:35 +, Fabian Lesniak wrote: > I examined xhci_kick_epctx (frame 6) and looked into xfer and > xfer->packet, maybe this helps: > (gdb) print *xfer > $2 = {epctx = 0x7fff5c745290, packet = {pid = 105, id = 1028964352, ep > = 0x58342660, stream = 0, iov = {iov =

[Qemu-devel] [PATCH v2 02/30] target-sparc: store cpu super- and hypervisor flags in TB

2017-01-11 Thread Artyom Tarasenko
Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 17 + target/sparc/translate.c | 24 +++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/target/sparc/cpu.h

[Qemu-devel] [PULL 31/33] Plumb the HAXM-based hardware acceleration support

2017-01-11 Thread Paolo Bonzini
From: Vincent Palatin Use the Intel HAX is kernel-based hardware acceleration module for Windows (similar to KVM on Linux). Based on the "target/i386: Add Intel HAX to android emulator" patch from David Chou Signed-off-by: Vincent Palatin

[Qemu-devel] [PATCH v2 01/30] target-sparc: ignore MMU-faults if MMU is disabled in hypervisor mode

2017-01-11 Thread Artyom Tarasenko
while IMMU/DMMU is disabled - ignore MMU-faults in hypervisorv mode or if CPU doesn't have hypervisor - signal TT_INSN_REAL_TRANSLATION_MISS/TT_DATA_REAL_TRANSLATION_MISS otherwise Signed-off-by: Artyom Tarasenko --- target/sparc/cpu.h | 2 ++

Re: [Qemu-devel] [PATCH 02/40] baum: convert to finalize

2017-01-11 Thread Eric Blake
On 01/11/2017 11:29 AM, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > backends/baum.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake I might have squashed multiple conversions to

[Qemu-devel] [PATCH v2 00/30] target-sparc: add niagara OpenSPARC T1 sun4v emulation

2017-01-11 Thread Artyom Tarasenko
This patch series adds a Niagara OpenSPARC T1 sun4v machine. The most important new feature: it can boot Solaris 10 / sparc64. The machine uses a firmware released by Sun as a part of the OpenSPARC project. The series are available under: https://github.com/artyom-tarasenko/qemu/tree/sun4v-v2

[Qemu-devel] [PULL 32/33] hax: add Darwin support

2017-01-11 Thread Paolo Bonzini
From: Vincent Palatin Re-add the MacOSX/Darwin support: Use the Intel HAX is kernel-based hardware acceleration module (similar to KVM on Linux). Based on the original "target/i386: Add Intel HAX to android emulator" patch from David Chou from

Re: [Qemu-devel] [PATCH 11/40] char-win-stdio: convert to finalize

2017-01-11 Thread Eric Blake
On 01/11/2017 11:29 AM, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > qemu-char.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Patches 3-11: Reviewed-by: Eric Blake -- Eric Blake eblake redhat com

[Qemu-devel] [PATCH] xhci: only free completed transfers

2017-01-11 Thread Gerd Hoffmann
Most callsites check already, one was missed. Cc: 1653...@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9f2c346e5049a361bd55 Reported-by: Fabian Lesniak Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-devel] [PULL 28/33] ramblock-notifier: new

2017-01-11 Thread Paolo Bonzini
This adds a notify interface of ram block additions and removals. Signed-off-by: Paolo Bonzini --- exec.c | 5 include/exec/memory.h | 6 + include/exec/ram_addr.h | 46 ++- include/exec/ramlist.h | 72

Re: [Qemu-devel] [PATCH 01/40] spice-qemu-char: convert to finalize

2017-01-11 Thread Eric Blake
On 01/11/2017 11:29 AM, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > spice-qemu-char.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com

[Qemu-devel] [PULL 27/33] char: fix ctrl-a b not working

2017-01-11 Thread Paolo Bonzini
From: Marc-André Lureau CharDriverState.be should be updated to point to the current associated backend. Fix the regression introduced in the "mux" chardev from commit a4afa548fc6dd9842ed86639b4d37d4d1c4ad480. https://bugs.launchpad.net/bugs/1654137 Signed-off-by:

[Qemu-devel] [PULL 24/33] x86: ioapic: dump version for "info ioapic"

2017-01-11 Thread Paolo Bonzini
From: Peter Xu Signed-off-by: Peter Xu Message-Id: <1483952153-7221-3-git-send-email-pet...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/intc/ioapic_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [Bug 1653384] Re: Assertion failed with USB pass through with XHCI controller

2017-01-11 Thread Gerd Hoffmann
Hi, > #6 0x55aaa9a8 in xhci_kick_epctx (epctx=0x7fff5c0205d0, streamid=0) at hw/usb/hcd-xhci.c:2201 Ok, suspected already it will be there. thanks, Gerd -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PULL 25/33] x86: ioapic: fix fail migration when irqchip=split

2017-01-11 Thread Paolo Bonzini
From: Peter Xu Split irqchip works based on the fact that we kept the first 24 gsi routing entries inside KVM for userspace ioapic's use. When system boot, we'll reserve these MSI routing entries before hand. However, after migration, we forgot to re-configure it up in the

[Qemu-devel] [PULL 29/33] kvm: move cpu synchronization code

2017-01-11 Thread Paolo Bonzini
From: Vincent Palatin Move the generic cpu_synchronize_ functions to the common hw_accel.h header, in order to prepare for the addition of a second hardware accelerator. Signed-off-by: Stefan Weil Signed-off-by: Vincent Palatin

[Qemu-devel] [PULL 30/33] target/i386: Add Intel HAX files

2017-01-11 Thread Paolo Bonzini
From: Vincent Palatin That's a forward port of the core HAX interface code from the emu-2.2-release branch in the external/qemu-android repository as used by the Android emulator. The original commit was "target/i386: Add Intel HAX to android emulator" saying: """

[Qemu-devel] [PULL 23/33] x86: ioapic: add traces for ioapic

2017-01-11 Thread Paolo Bonzini
From: Peter Xu >From time to time, there are issues with ioapic, either on guest side or on hypervisor side. Good to have some persistent traces for better triaging and debugging. Signed-off-by: Peter Xu Message-Id:

[Qemu-devel] [PULL 18/33] pc: fix crash in rtc_set_memory() if initial cpu is marked as hotplugged

2017-01-11 Thread Paolo Bonzini
From: Igor Mammedov 'hotplugged' propperty is meant to be used on migration side when migrating source with hotplugged devices. However though it not exacly correct usage of 'hotplugged' property it's possible to set generic hotplugged property for CPU using -cpu

[Qemu-devel] [PULL 21/33] qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create()

2017-01-11 Thread Paolo Bonzini
From: Caoxinhua QEMU will crash with the follow backtrace if the new created thread exited before we call qemu_thread_set_name() for it. (gdb) bt #0 0x7f9a68b095d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1

[Qemu-devel] [PULL 33/33] Revert "win32: don't run subprocess tests on Mingw32 platform"

2017-01-11 Thread Paolo Bonzini
From: Marc-André Lureau This reverts commit 7ad9339e372fcd12d584684d7f52ac259604a4f4. The error "Failed to execute helper program (No such file or directory)" is due to broken glib installation, missing windows gspawn helpers. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PULL 22/33] hxtool: emit Texinfo headings as @subsection

2017-01-11 Thread Paolo Bonzini
Remove the colon, and add it in qemu-options-wrapper.h instead. The introduction of @subsection also found a case where the table was not closed and reopened around a heading, so fix it. Reviewed-by: Markus Armbruster Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL 12/33] stubs: move vhost stubs to stubs/vhost.o

2017-01-11 Thread Paolo Bonzini
No need to include them in libqemustub.a, since only system emulators need them. Signed-off-by: Paolo Bonzini --- hw/Makefile.objs| 2 +- hw/virtio/Makefile.objs | 6 +- stubs/vhost.c => hw/virtio/vhost-stub.c | 0

[Qemu-devel] [PULL 20/33] serial: fix memory leak in serial exit

2017-01-11 Thread Paolo Bonzini
From: Li Qiang The serial_exit_core function doesn't free some resources. This can lead memory leak when hotplug and unplug. This patch avoid this. Signed-off-by: Li Qiang Message-Id: <586cb5ab.f31d9d0a.38ac3.a...@mx.google.com> Signed-off-by: Paolo

[Qemu-devel] [PULL 26/33] exec: Add missing rcu_read_unlock

2017-01-11 Thread Paolo Bonzini
From: Roman Kapl rcu_read_unlock was not called if the address_space_access_valid result is negative. This caused (at least) a problem when qemu on PPC/E500+TAP failed to terminate properly and instead got stuck in a deadlock. Signed-off-by: Roman Kapl

[Qemu-devel] [PULL 11/33] stubs: group all monitor_fdset_* functions in a single file

2017-01-11 Thread Paolo Bonzini
It makes little sense to implement only one of them, so avoid proliferation of stubs files. Signed-off-by: Paolo Bonzini --- stubs/Makefile.objs | 5 + stubs/fdset-add-fd.c| 8 stubs/fdset-find-fd.c | 8 stubs/fdset-get-fd.c| 8

[Qemu-devel] [PULL 15/33] stubs: remove stubs/kvm.c

2017-01-11 Thread Paolo Bonzini
This has a single function, just move it to the other target/*/kvm.c files. Signed-off-by: Paolo Bonzini --- stubs/Makefile.objs | 1 - stubs/kvm.c | 8 target/mips/kvm.c | 5 + target/ppc/kvm.c| 5 + target/s390x/kvm.c | 5 + 5 files

[Qemu-devel] [PULL 16/33] acpi: filter based on CONFIG_ACPI_X86 rather than TARGET

2017-01-11 Thread Paolo Bonzini
Copy the mechanism of hw/smbios/smbios-stub.c to implement an ACPI-stub instead, so that -acpitable can be later extended to ARM. Signed-off-by: Paolo Bonzini --- arch_init.c| 13 - hw/Makefile.objs | 2 +- hw/acpi/Makefile.objs |

[Qemu-devel] [PULL 19/33] scsi-block: fix direction of BYTCHK test for VERIFY commands

2017-01-11 Thread Paolo Bonzini
The direction is wrong; scsi_block_is_passthrough returns false for commands that *can* use sglists. Reported-by: Zhang Qian Fixes: 8fdc7839e40f43a426bc7e858cf1dbfe315a3804 Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL 14/33] build: remove --enable-colo/--disable-colo

2017-01-11 Thread Paolo Bonzini
No need to provide this knob, so remove it and stubs/migration-colo.c. Signed-off-by: Paolo Bonzini --- configure | 11 --- migration/Makefile.objs | 3 +-- stubs/Makefile.objs | 1 - stubs/migration-colo.c | 46

[Qemu-devel] [PULL 08/33] stubs: remove unused stub for serial_hd

2017-01-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- stubs/Makefile.objs | 1 - stubs/get-next-serial.c | 4 2 files changed, 5 deletions(-) delete mode 100644 stubs/get-next-serial.c diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index c4df915..5b3e7c6 100644 ---

[Qemu-devel] [PULL 09/33] hw: move reset handlers from vl.c to hw/core

2017-01-11 Thread Paolo Bonzini
They are small, it is not worth stubbing them. Just include them in user-mode emulators and unit tests as well. Signed-off-by: Paolo Bonzini --- hw/core/Makefile.objs | 2 +- hw/core/reset.c | 72 + include/hw/hw.h

[Qemu-devel] [PULL 17/33] target-i386: Correctly apply patch for syscall eflags.TF handling

2017-01-11 Thread Paolo Bonzini
The change to the "syscall" insn got applied to the "iret" instruction instead. Signed-off-by: Paolo Bonzini --- target/i386/translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index

[Qemu-devel] [PULL 07/33] stubs: move acpi stubs to hw/acpi

2017-01-11 Thread Paolo Bonzini
No need to include them in libqemustub.a, since only system emulators need them. Signed-off-by: Paolo Bonzini --- hw/acpi/Makefile.objs | 12 stubs/ipmi.c => hw/acpi/ipmi-stub.c | 0 stubs/Makefile.objs | 1 - 3 files changed, 8

[Qemu-devel] [PULL 10/33] stubs: group stubs for user-mode emulation

2017-01-11 Thread Paolo Bonzini
Some stubs are used for user-mode emulation only; they are not needed by tools. Move them out of stubs/. Signed-off-by: Paolo Bonzini --- MAINTAINERS | 1 + Makefile.target | 4 ++-- stubs/Makefile.objs | 2 -- stubs/cpus.c| 11 ---

[Qemu-devel] [PULL 13/33] event_notifier: cleanups around event_notifier_set_handler

2017-01-11 Thread Paolo Bonzini
Remove the useless is_external argument. Since the iohandler AioContext is never used for block devices, aio_disable_external is never called on it. This lets us remove stubs/iohandler.c. Signed-off-by: Paolo Bonzini --- hw/usb/ccid-card-emulated.c | 2 +-

[Qemu-devel] [PULL 00/33] Misc patches for 2017-01-11

2017-01-11 Thread Paolo Bonzini
The following changes since commit 41a0e54756a9ae6b60be34bb33302a7e085fdb07: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2017-01-10 10:46:21 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 05/33] stubs: merge all monitor stubs in one file, remove monitor_cur_is_qmp stub

2017-01-11 Thread Paolo Bonzini
monitor_cur_is_qmp was previously used by other stubs, but it's not since 397d30e ("qemu-error: remove dependency of stubs on monitor", 2016-11-01). Signed-off-by: Paolo Bonzini --- stubs/Makefile.objs | 4 +--- stubs/mon-is-qmp.c| 10 --

[Qemu-devel] [PULL 06/33] stubs: move smbios stubs to hw/smbios

2017-01-11 Thread Paolo Bonzini
No need to include them in libqemustub.a, since only system emulators need them. Signed-off-by: Paolo Bonzini --- hw/smbios/Makefile.objs | 11 --- stubs/smbios_type_38.c => hw/smbios/smbios_type_38-stub.c | 0 stubs/Makefile.objs

[Qemu-devel] [PULL 02/33] megasas: fix guest-triggered memory leak

2017-01-11 Thread Paolo Bonzini
If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang Signed-off-by:

[Qemu-devel] [PULL 01/33] bugfix: vm halt when in reset looping

2017-01-11 Thread Paolo Bonzini
From: hangaohuai reset mc146818rtc device when RESET event happens. Fix the problem: 1. Guest boot the second cpu, set CMOS_RESET_CODE 0x0a to protect selfboot; 2. VM being reset by others, hmp_system_reset; 3. seabios resume check the CMOS_RESET_CODE, if 0x0a, jump

[Qemu-devel] [PULL 04/33] smbios: filter based on CONFIG_SMBIOS rather than TARGET

2017-01-11 Thread Paolo Bonzini
From: Leif Lindholm -smbios command line options were accepted but silently ignored on TARGET_ARM, due to a test for TARGET_I386 in arch_init.c. Copy the mechanism of hw/pci/pci-stub.c to implement an smbios-stub instead, enabled for all targets without CONFIG_SMBIOS.

[Qemu-devel] [PULL 03/33] qom: Make all interface types abstract

2017-01-11 Thread Paolo Bonzini
From: Eduardo Habkost "qom-list-types abstract=false" currently returns all interface types, as if they were not abstract. Fix this by making sure all interface types are abstract. All interface types have instance_size == 0, so we can use it to set abstract=true on

Re: [Qemu-devel] [PATCH] libqtest: handle zero length memwrite/memread

2017-01-11 Thread John Snow
On 01/11/2017 03:49 AM, Greg Kurz wrote: > Some recently added tests pass a zero length to qtest_memwrite(). > Unfortunately, the qtest protocol doesn't implement an on-the-wire > syntax for zero-length writes and the current code happily sends > garbage to QEMU. This causes intermittent

Re: [Qemu-devel] [PATCH v3 03/25] block: Add BDS.backing_overridden

2017-01-11 Thread Eric Blake
On 11/29/2016 07:18 PM, Max Reitz wrote: > If the backing file is overridden, this most probably does change the > guest-visible data of a BDS. Therefore, we will need to consider this in > bdrv_refresh_filename(). > > Adding a new field to the BDS is not nice, but it is very simple and > exactly

Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe DUBOIS
Le 11/01/2017 à 19:08, mar.krzeminski a écrit : W dniu 11.01.2017 o 17:12, Jean-Christophe DUBOIS pisze: Le 10/01/2017 à 00:02, Peter Maydell a écrit : On 9 January 2017 at 22:27, Jean-Christophe DUBOIS wrote: I might be wrong but I think they are coming out of reset

Re: [Qemu-devel] [PATCH v2 11/11] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-11 Thread mar.krzeminski
W dniu 09.01.2017 o 17:24, Cédric Le Goater pisze: When doing fast read, a certain amount of dummy bytes should be sent before the read. This number is configurable in the controler CE0 Control Register and needs to be modeled using fake transfers the flash module. Signed-off-by: Cédric Le

Re: [Qemu-devel] [PATCH v3 03/25] block: Add BDS.backing_overridden

2017-01-11 Thread Max Reitz
On 11.01.2017 20:00, Eric Blake wrote: > On 11/29/2016 07:18 PM, Max Reitz wrote: >> If the backing file is overridden, this most probably does change the >> guest-visible data of a BDS. Therefore, we will need to consider this in >> bdrv_refresh_filename(). >> >> Adding a new field to the BDS is

Re: [Qemu-devel] [PATCH v2 11/11] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-11 Thread Cédric Le Goater
On 01/11/2017 07:20 PM, mar.krzeminski wrote: > W dniu 09.01.2017 o 17:24, Cédric Le Goater pisze: >> When doing fast read, a certain amount of dummy bytes should be sent >> before the read. This number is configurable in the controler CE0 >> Control Register and needs to be modeled using fake

[Qemu-devel] [PATCH v4 04/25] block: Respect backing bs in bdrv_refresh_filename

2017-01-11 Thread Max Reitz
Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and @backing (that being

[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread Jose R. Ziviani
** Changed in: qemu Assignee: (unassigned) => Jose R. Ziviani (jrziviani) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange expression ?

[Qemu-devel] [Bug 1256432] Re: qemu mingw 32bit windows crash

2017-01-11 Thread Thomas Huth
Which QEMU version did you use? Can you still reproduce this with the latest release? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1256432

Re: [Qemu-devel] [PATCH v2 01/11] aspeed/smc: remove call to reset in realize function

2017-01-11 Thread mar.krzeminski
W dniu 09.01.2017 o 17:24, Cédric Le Goater pisze: This is useless as reset will be called later on. Signed-off-by: Cédric Le Goater Acked-by: Marcin Krzemiński --- hw/ssi/aspeed_smc.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[Qemu-devel] [PATCH] ppc: Fix a warning in bcdcfz code and improve BCD_DIG_BYTE macro

2017-01-11 Thread Jose Ricardo Ziviani
This commit fixes a warning in the code "(i * 2) ? .. : ..", which should be better as "(i) ? .. : ..", and improves the BCD_DIG_BYTE macro by placing parentheses around its argument to avoid possible expansion issues like: BCD_DIG_BYTE(i + j). Signed-off-by: Jose Ricardo Ziviani

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Daniel P. Berrange
On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote: > > > On 11/01/2017 18:16, Daniel P. Berrange wrote: > > I've been trying to get such relative includes to work most of today > > and not having much luck. The problem is that while it works in 95% > > of the time, there are some

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 18:40, Daniel P. Berrange wrote: > On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote: >> >> >> On 11/01/2017 18:16, Daniel P. Berrange wrote: >>> I've been trying to get such relative includes to work most of today >>> and not having much luck. The problem is that while

[Qemu-devel] [PATCH v5 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-11 Thread Laszlo Ersek
The generic edk2 SMM infrastructure prefers EFI_SMM_CONTROL2_PROTOCOL.Trigger() to inject an SMI on each processor. If Trigger() only brings the current processor into SMM, then edk2 handles it in the following ways: (1) If Trigger() is executed by the BSP (which is guaranteed before

Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread joserz
On Wed, Jan 11, 2017 at 05:12:38PM -, Eric Blake wrote: > On 01/11/2017 10:41 AM, dcb wrote: > > Public bug reported: > > > > target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, > > suggest ‘&&’ instead [-Wint-in-bool-context] > > > > Source code is > > > >zone_digit =

[Qemu-devel] [PATCH v4 02/25] block: Use children list in bdrv_refresh_filename

2017-01-11 Thread Max Reitz
bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify and quorum. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia

[Qemu-devel] [PATCH v5 wave 1 1/4] fw-cfg: support writeable blobs

2017-01-11 Thread Laszlo Ersek
From: "Michael S. Tsirkin" Useful to send guest data back to QEMU. Changes from Laszlo Ersek : - rebase the patch from Michael Tsirkin's original postings at [1] and [2] to the following patches: - loader: Allow a custom AddressSpace when loading ROMs -

[Qemu-devel] [PATCH v4 01/25] block/mirror: Small absolute-paths simplification

2017-01-11 Thread Max Reitz
When invoking drive-mirror in absolute-paths mode, the target's backing BDS is assigned to it in mirror_complete(). The current logic only does so if the target does not have that backing BDS already; but it actually cannot have a backing BDS at all (the BDS is opened with O_NO_BACKING in

[Qemu-devel] [PATCH v5 wave 1 4/4] fw-cfg: bump "file_slots" to 0x20 for 2.9+ machine types

2017-01-11 Thread Laszlo Ersek
More precisely, the "file_slots" count is bumped for all machine types that: (a) use fw_cfg, and (b) are not versioned (hence migration is not expected to work for them across QEMU releases anyway), or have version 2.9. This affects machine types implemented in the following source files: -

Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.

2017-01-11 Thread mar.krzeminski
W dniu 11.01.2017 o 17:12, Jean-Christophe DUBOIS pisze: Le 10/01/2017 à 00:02, Peter Maydell a écrit : On 9 January 2017 at 22:27, Jean-Christophe DUBOIS wrote: I might be wrong but I think they are coming out of reset with their CS line set to low (so they are selected

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 18:16, Daniel P. Berrange wrote: > I've been trying to get such relative includes to work most of today > and not having much luck. The problem is that while it works in 95% > of the time, there are some source files and header files which need > to include trace.h files not in

[Qemu-devel] [PATCH v5 wave 2 0/3] q35: add negotiable broadcast SMI

2017-01-11 Thread Laszlo Ersek
This is the second (ICH9-LPC) half of the v5 iteration of the series posted here: . In this version, the ICH9-LPC patches have been separated into a standalone "wave", for helping review / maintenance. More importantly, I've

[Qemu-devel] [PATCH v5 wave 1 3/4] pc: Add 2.9 machine-types

2017-01-11 Thread Laszlo Ersek
From: Eduardo Habkost Cc: "Michael S. Tsirkin" Cc: Laszlo Ersek Cc: Igor Mammedov Signed-off-by: Eduardo Habkost Reviewed-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PATCH v4 00/25] block: Fix some filename generation issues

2017-01-11 Thread Max Reitz
[If you have read the cover letter in v2 or v3, there is nothing new here; feel free to skip to the bottom to read the changes from v3.] There are some issues regarding filename generation right now: - You always get a JSON filename if you set even a single qcow2-specific runtime options (as

[Qemu-devel] [PATCH v4 03/25] block: Add BDS.backing_overridden

2017-01-11 Thread Max Reitz
If the backing file is overridden, this most probably does change the guest-visible data of a BDS. Therefore, we will need to consider this in bdrv_refresh_filename(). Adding a new field to the BDS is not nice, but it is very simple and exactly keeps track of whether the backing file has been

[Qemu-devel] [PATCH v5 wave 1 0/4] fw-cfg: support writeable blobs and more files

2017-01-11 Thread Laszlo Ersek
This is the first (fw_cfg) half of the v5 iteration of the series posted here: . In this version, the fw_cfg patches have been separated into a standalone "wave", for helping review / maintenance, and also for enabling

[Qemu-devel] [PATCH 39/40] char: move parallel chardev in its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-parallel.h | 9 ++ chardev/char-parallel.c | 293 chardev/char.c | 288 +-- chardev/Makefile.objs | 1 + 4

[Qemu-devel] [PATCH 40/40] char: headers clean-up

2017-01-11 Thread Marc-André Lureau
Those could probably be squashed with earlier patches, however I couldn't easily identify them, test them or check if there are still necessary on various platforms. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 5 - chardev/char.c |

[Qemu-devel] [PATCH 33/40] char: move file chardev in its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-file.c | 116 ++ chardev/char.c| 106 - chardev/Makefile.objs | 1 + 3 files changed, 117 insertions(+), 106

[Qemu-devel] [PATCH 38/40] char: move serial chardev to itw own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-serial.h | 12 ++ chardev/char-serial.c | 295 ++ chardev/char.c| 278 +-- chardev/Makefile.objs | 1 + 4 files

[Qemu-devel] [PATCH 28/40] char: move fd chardev in its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-fd.h | 21 chardev/char-fd.c | 147 ++ chardev/char.c| 147 +- chardev/Makefile.objs | 1 + 4

[Qemu-devel] [PATCH 37/40] char: move pty chardev in its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-pty.c| 277 ++ chardev/char.c| 258 -- chardev/Makefile.objs | 1 + 3 files changed, 278 insertions(+), 258

[Qemu-devel] [PATCH 30/40] char: move win-stdio into its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-win-stdio.h | 6 ++ chardev/char-win-stdio.c | 243 +++ chardev/char.c | 231 +--- chardev/Makefile.objs| 1 + 4

[Qemu-devel] [PATCH v5 wave 2 3/3] hw/isa/lpc_ich9: negotiate SMI broadcast on pc-q35-2.9+ machine types

2017-01-11 Thread Laszlo Ersek
Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Gerd Hoffmann Cc: Igor Mammedov Cc: Paolo Bonzini Signed-off-by: Laszlo Ersek --- Notes: v5: - replace the v4 patch

[Qemu-devel] [PATCH 21/40] char: make null_chr_write() the default method

2017-01-11 Thread Marc-André Lureau
All chardev must implement chr_write(), but parallel and null chardev both use null_chr_write(). Move it to the base class, so we don't need to export the function when splitting the chardev in respective files. Signed-off-by: Marc-André Lureau --- chardev/char.c |

[Qemu-devel] [PATCH 31/40] char: move socket chardev to its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 1 + chardev/char-socket.c | 993 ++ chardev/char.c| 978 + chardev/Makefile.objs | 1 + 4 files

[Qemu-devel] [PATCH v5 wave 2 1/3] hw/isa/lpc_ich9: add SMI feature negotiation via fw_cfg

2017-01-11 Thread Laszlo Ersek
Introduce the following fw_cfg files: - "etc/smi/supported-features": a little endian uint64_t feature bitmap, presenting the features known by the host to the guest. Read-only for the guest. The content of this file will be determined via bit-granularity ICH9-LPC device properties, to

[Qemu-devel] [PATCH 23/40] char: move mux to its own file

2017-01-11 Thread Marc-André Lureau
A mechanical move, except that qemu_chr_write_all() needs to be declared in char.h header to be used from chardev unit files. Signed-off-by: Marc-André Lureau --- chardev/char-mux.h| 40 ++ include/sysemu/char.h | 3 +- chardev/char-mux.c| 335

<    1   2   3   4   5   >