Re: [Qemu-devel] qemu-system-ppc hangs

2017-11-20 Thread Mark Cave-Ayland
On 21/11/17 00:00, Richard Purdie wrote: > Hi, > > I work on the Yocto Project and we use qemu to test boot our Linux > images and run tests against them. We've been noticing some instability > for ppc where the images sometimes hang, usually around udevd bring up > time so just after booting

Re: [Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments

2017-11-20 Thread Laurent Vivier
Le 21/11/2017 à 07:41, Yoni Bettan a écrit : > * it was added on 2008 902b3d5c392bb6f48ef340ad8ecc3311705d2800 > when introduced cache-utils.[ch] > * since then cache-utils.[ch] were removed but **envp was left > behind > > Signed-off-by: Yoni Bettan

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Implement bug in spapr-vty device to be compatible with PowerVM

2017-11-20 Thread Thomas Huth
On 20.11.2017 08:14, David Gibson wrote: > The spapr-vty device implements the PAPR defined virtual console, > which is also implemented by IBM's proprietary PowerVM hypervisor. > > PowerVM's implementation has a bug where it inserts an extra \0 after > every \r going to the guest. Because of

Re: [Qemu-devel] Questions about usability mess that caused by differentiating address based on devices types

2017-11-20 Thread Dong Jia Shi
* Cornelia Huck [2017-11-14 11:50:14 +0100]: Hallo Conny, After spending some time, just some updates for this one. > On Tue, 14 Nov 2017 16:25:47 +0800 > Dong Jia Shi wrote: > > > Dear Conny, > > > > Good day! > > > > Just now, our Libvirt

Re: [Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments

2017-11-20 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments Type: series Message-id: 20171121064106.13721-1-ybet...@redhat.com === TEST SCRIPT BEGIN ===

[Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments

2017-11-20 Thread Yoni Bettan
* it was added on 2008 902b3d5c392bb6f48ef340ad8ecc3311705d2800 when introduced cache-utils.[ch] * since then cache-utils.[ch] were removed but **envp was left behind Signed-off-by: Yoni Bettan --- linux-user/main.c | 2 +- vl.c

Re: [Qemu-devel] [PATCH for-2.11] Makefile: use $(MAKE) variable

2017-11-20 Thread Fam Zheng
On Tue, 11/21 00:21, Philippe Mathieu-Daudé wrote: > @@ -904,7 +904,7 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): > check-%.json: $(SRC_PATH)/%.json > echo $$? >$*.test.exit, \ > "TEST","$*.out") > @diff -q $(SRC_PATH)/$*.out $*.test.out > - @#

Re: [Qemu-devel] [PATCH] rcu: reduce half heap memory size by malloc_trim()

2017-11-20 Thread Zhong Yang
On Mon, Nov 20, 2017 at 02:14:50PM +, Daniel P. Berrange wrote: > On Mon, Nov 20, 2017 at 04:54:42PM +0800, Zhong Yang wrote: > > On Fri, Nov 17, 2017 at 02:06:20PM +, Daniel P. Berrange wrote: > > > On Fri, Nov 17, 2017 at 01:54:09PM +, Stefan Hajnoczi wrote: > > > > On Fri, Nov 17,

Re: [Qemu-devel] [PATCH] 9pfs: don't ignore O_DIRECT flag in the 9pfs server

2017-11-20 Thread jiangyiwen
On 2017/11/20 18:13, Greg Kurz wrote: > On Mon, 20 Nov 2017 13:48:59 +0800 > jiangyiwen wrote: > >> Now v9fs in linux has already supported O_DIRECT(v9fs_direct_IO), >> when guest user open file with O_DIRECT flag and return success, >> so user hopes data doesn't pass

[Qemu-devel] [PATCH for-2.11] Makefile: add more targets to the UNCHECKED_GOALS rule

2017-11-20 Thread Philippe Mathieu-Daudé
These targets don't need a full build of git submodules. (See b8e535ae8af and eaa2ddbb767). Signed-off-by: Philippe Mathieu-Daudé --- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index adda3fb63e..5e8d79618c 100644 ---

[Qemu-devel] [PATCH for-2.11] Makefile: use $(MAKE) variable

2017-11-20 Thread Philippe Mathieu-Daudé
For some systems (i.e. FreeBSD) the default 'make' is not compatible with the GNU extensions used by QEMU makefiles. Calling the GNU make (gmake) works, however the help displayed refers to the host 'make' and copy/paste leads to lot of unobvious errors: $ gmake check-help [...] make

Re: [Qemu-devel] [PATCH] rcu: reduce half heap memory size by malloc_trim()

2017-11-20 Thread Zhong Yang
On Mon, Nov 20, 2017 at 02:03:44PM +, Stefan Hajnoczi wrote: > On Mon, Nov 20, 2017 at 04:41:41PM +0800, Zhong Yang wrote: > > On Fri, Nov 17, 2017 at 01:54:09PM +, Stefan Hajnoczi wrote: > > > On Fri, Nov 17, 2017 at 02:23:34PM +0800, Yang Zhong wrote: > > > > @@ -272,6 +273,9 @@ static

Re: [Qemu-devel] [PATCH v5 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-11-20 Thread Michael S. Tsirkin
On Tue, Nov 21, 2017 at 01:16:12AM +0100, Paolo Bonzini wrote: > On 20/11/2017 21:44, Michael S. Tsirkin wrote: > > Live migrations is supposed to be migrating guest writeable state too. > > If you mean migrating RO fields like size, then > > I don't think it's a good idea to reuse SET_CONFIG for

Re: [Qemu-devel] [PATCH] rcu: reduce half heap memory size by malloc_trim()

2017-11-20 Thread Zhong Yang
On Mon, Nov 20, 2017 at 10:28:28PM +0800, Fam Zheng wrote: > On Fri, 11/17 14:23, Yang Zhong wrote: > > diff --git a/util/rcu.c b/util/rcu.c > > index ca5a63e..8d491a6 100644 > > --- a/util/rcu.c > > +++ b/util/rcu.c > > @@ -26,6 +26,7 @@ > > * IBM's contributions to this file may be relicensed

[Qemu-devel] [PATCH v2 for-2.11 3/4] qemu-iotests: add option in common.qemu for mismatch only

2017-11-20 Thread Jeff Cody
Add option to echo response to QMP / HMP command only on mismatch. Useful for ignore all normal responses, but catching things like segfaults. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v2 for-2.11 0/4] Fix segfault in blockjob race condition

2017-11-20 Thread Jeff Cody
Changes from v1 -> v2: Patch 1: Updated docs in blockjob_int.h (Thanks Stefan) Patch 2/3: Squashed, and used const char * to hold the __func__ name of the original scheduler (Thanks Paolo) Patch 4: Unchanged. Patch 5: Dropped qcow format for the test, it was so slow the test times

[Qemu-devel] [PATCH v2 for-2.11 1/4] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-20 Thread Jeff Cody
When block_job_sleep_ns() is called, the co-routine is scheduled for future execution. If we allow the job to be re-entered prior to the scheduled time, we present a race condition in which a coroutine can be entered recursively, or even entered after the coroutine is deleted. The job->busy flag

[Qemu-devel] [PATCH v2 for-2.11 4/4] qemu-iotest: add test for blockjob coroutine race condition

2017-11-20 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/200 | 99 ++ tests/qemu-iotests/200.out | 14 +++ tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/200 create mode

[Qemu-devel] [PATCH v2 for-2.11 2/4] coroutine: abort if we try to schedule or enter a pending coroutine

2017-11-20 Thread Jeff Cody
The previous patch fixed a race condition, in which there were coroutines being executing doubly, or after coroutine deletion. We can detect common scenarios when this happens, and print an error message and abort before we corrupt memory / data, or segfault. This patch will abort if an attempt

Re: [Qemu-devel] [PULL 00/15] late linux-user fixes for 2.11

2017-11-20 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/15] late linux-user fixes for 2.11 Type: series Message-id: cover.1511212753.git.riku.voi...@linaro.org === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH for-2.11 0/3] block: Error out on load_vm with active dirty bitmaps

2017-11-20 Thread John Snow
On 11/20/2017 09:50 AM, Kevin Wolf wrote: > Following the discussing at > https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg03572.html > this implements the error return for loading a snapshot while dirty > bitmaps are active. > > Kevin Wolf (3): > block: Add errp to

Re: [Qemu-devel] [PATCH for-2.12 REPOST] spapr_cpu_core: instantiate CPUs separately

2017-11-20 Thread David Gibson
On Mon, Nov 20, 2017 at 03:56:48PM +0100, Igor Mammedov wrote: > On Mon, 20 Nov 2017 10:19:54 +0100 > Greg Kurz wrote: > > > The current code assumes that only the CPU core object holds a > > reference on each individual CPU object, and happily frees their > > allocated memory

Re: [Qemu-devel] [PATCH for-2.11] hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256

2017-11-20 Thread David Gibson
On Mon, Nov 20, 2017 at 08:44:38AM +0100, Thomas Huth wrote: > LUNs >= 256 have to be encoded with the so-called "flat space > addressing method" for virtio-scsi, where an additional bit has to > be set. SLOF already took care of this with the following commit: > >

Re: [Qemu-devel] [PATCH] spapr: Implement bug in spapr-vty device to be compatible with PowerVM

2017-11-20 Thread David Gibson
On Sun, Nov 19, 2017 at 11:18:55PM -0800, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-devel] [PATCH] spapr: Implement bug in spapr-vty device to be > compatible with PowerVM > Type:

Re: [Qemu-devel] [PATCH v5 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 21:44, Michael S. Tsirkin wrote: > Live migrations is supposed to be migrating guest writeable state too. > If you mean migrating RO fields like size, then > I don't think it's a good idea to reuse SET_CONFIG for that. > SET_CONFIG should obey exactly the virtio semantics. > > And I

[Qemu-devel] qemu-system-ppc hangs

2017-11-20 Thread Richard Purdie
Hi, I work on the Yocto Project and we use qemu to test boot our Linux images and run tests against them. We've been noticing some instability for ppc where the images sometimes hang, usually around udevd bring up time so just after booting into userspace. To cut a long story short, I've tracked

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Tue, Nov 21, 2017 at 12:13:46AM +0100, Paolo Bonzini wrote: > On 21/11/2017 00:08, Jeff Cody wrote: > > @@ -34,6 +36,7 @@ void coroutine_fn co_aio_sleep_ns(AioContext *ctx, > > QEMUClockType type, > > CoSleepCB sleep_cb = { > > .co = qemu_coroutine_self(), > > }; > > +if

[Qemu-devel] [Bug 1717708] Re: QEMU aarch64 can't run Windows ARM64 iso's

2017-11-20 Thread Andrew Baumann
@Laszlo, I got the binaries from someone else, but they from a parallel build system... nothing particularly special: some preprocessor rules to build against the newer WDK, and also it was just those three drivers (netkvm, vioinput, viostor). I imagine you can get the same result by tweaking the

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Paolo Bonzini
On 21/11/2017 00:08, Jeff Cody wrote: > @@ -34,6 +36,7 @@ void coroutine_fn co_aio_sleep_ns(AioContext *ctx, > QEMUClockType type, > CoSleepCB sleep_cb = { > .co = qemu_coroutine_self(), > }; > +if (sleep_cb.co->sleeping == 1 || sleep_cb.co->scheduled == 1) { > +

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:47:09PM +0100, Paolo Bonzini wrote: > On 20/11/2017 23:35, Jeff Cody wrote: > >> Is this a different "state" (in Stefan's parlance) than scheduled? In > >> practice both means that someone may call qemu_(aio_)coroutine_enter > >> concurrently, so you'd better not do it

Re: [Qemu-devel] [SPARC] Qemu failed to display MMU mapping for non memory area.

2017-11-20 Thread Mark Cave-Ayland
On 19/11/17 14:12, Jean-Christophe DUBOIS wrote: > Hello, > > I am using Qemu to emulate a Leon3 based board. > > In the software I am running on Qemu, I configured the virtual memory > through MMU programming. > > In particular, I mapped the built-in UART to a 4K page. > > To check that my

Re: [Qemu-devel] [PATCH 10/15] apb: remove pci_apb_init() and instantiate APB device using qdev

2017-11-20 Thread Mark Cave-Ayland
On 20/11/17 17:51, Philippe Mathieu-Daudé wrote: > Hi Mark, > > On 11/17/2017 10:42 AM, Mark Cave-Ayland wrote: >> By making the special_base and mem_base values qdev properties, we can move >> the remaining parts of pci_apb_init() into the pbm init() and realize() >> functions. >> >> This

Re: [Qemu-devel] [PATCH 12/15] ebus: wire up OBIO interrupts to APB pbm via qdev GPIOs

2017-11-20 Thread Mark Cave-Ayland
On 20/11/17 01:02, Philippe Mathieu-Daudé wrote: > Hi Mark, > > On 11/17/2017 10:42 AM, Mark Cave-Ayland wrote: >> This enables us to remove the static array mapping in the ISA IRQ >> handler (and the embedded reference to the APB device) by formalising >> the interrupt wiring via the qdev GPIO

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 23:35, Jeff Cody wrote: >> Is this a different "state" (in Stefan's parlance) than scheduled? In >> practice both means that someone may call qemu_(aio_)coroutine_enter >> concurrently, so you'd better not do it yourself. >> > It is slightly different; it is from sleeping with a

Re: [Qemu-devel] [PATCH 05/15] sun4u: move initialisation of all ISABus devices into ebus_realize()

2017-11-20 Thread Mark Cave-Ayland
On 20/11/17 00:47, Philippe Mathieu-Daudé wrote: > On 11/17/2017 10:42 AM, Mark Cave-Ayland wrote: >> This belongs in the PCI-ISA bridge rather than at the machine level. > > nice, this helps me in another series (clean out i386/pc, refactor > superio devices). Awesome! >> Signed-off-by: Mark

Re: [Qemu-devel] [PATCH 14/15] sparc64: introduce trace-events for hw/sparc64

2017-11-20 Thread Mark Cave-Ayland
On 19/11/17 15:14, Philippe Mathieu-Daudé wrote: > Hi Mark, > > On 11/17/2017 10:42 AM, Mark Cave-Ayland wrote: >> This is in preparation for switching code in hw/sparc64 from DPRINTF over to >> trace events. > > This could be squashed with next commit, > > Either way: > Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Jeff Cody
On Mon, Nov 20, 2017 at 11:30:39PM +0100, Paolo Bonzini wrote: > On 20/11/2017 03:46, Jeff Cody wrote: > > Once a coroutine is "sleeping", the timer callback will either enter the > > coroutine, or schedule it for the next AioContext if using iothreads. > > > > It is illegal to enter that

Re: [Qemu-devel] [PATCH 3/5] coroutines: abort if we try to enter a still-sleeping coroutine

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 03:46, Jeff Cody wrote: > Once a coroutine is "sleeping", the timer callback will either enter the > coroutine, or schedule it for the next AioContext if using iothreads. > > It is illegal to enter that coroutine while waiting for this timer > event and subsequent callback. This

Re: [Qemu-devel] [Qemu-block] [PATCH 1/5] blockjob: do not allow coroutine double entry or entry-after-completion

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 12:16, Stefan Hajnoczi wrote: > This raises questions about the ability to cancel sleep: > > 1. Does something depend on cancelling sleep? block_job_cancel does, but in practice the sleep time is so small (smaller than SLICE_TIME, which is 100 ms) that we probably don't care. I

Re: [Qemu-devel] 答复: Re: 答复: Re: 答复: Re: [PATCH v2] qga: replace GetIfEntry

2017-11-20 Thread Michael Roth
Quoting lu.zhip...@zte.com.cn (2017-11-14 19:41:58) > i used xp version: > > xp professional 2002 service pack 3 > > build environment: > > root@localhost qemu-2.5.0]# cat /etc/redhat-release > > CentOS Linux release 7.0.1406 (Core) I haven't yet figured out why exactly, but with a

Re: [Qemu-devel] [Qemu-stable] [PATCH for-2.11] scripts/make-release: ship u-boot source as a tarball

2017-11-20 Thread Michael Roth
Quoting Michael Roth (2017-11-07 14:52:01) > The u-boot sources we ship currently cause problems with unpacking on > a case-insensitive filesystem due to path conflicts. This has been > fixed in upstream u-boot via commit 610eec7f, but since it is not > yet included in an official release we

[Qemu-devel] [PULL for-2.11 1/1] qga: replace GetIfEntry with GetIfEntry2 for interface stats

2017-11-20 Thread Michael Roth
From: ZhiPeng Lu The data obtained by GetIfEntry is 32 bits, and it may overflow. Thus using GetIfEntry2 instead of GetIfEntry. Signed-off-by: ZhiPeng Lu *avoid CamelCase variable names *update field names for MIB_IFROW -> MIB_IF_ROW2 *dynamically

[Qemu-devel] [PULL for-2.11 0/1] qemu-ga patch queue for 2.11

2017-11-20 Thread Michael Roth
The following changes since commit b2996bb405e2806725a341c72d80be9e77ed8b82: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171120' into staging (2017-11-20 18:00:16 +) are available in the git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2017-11-20

Re: [Qemu-devel] [PATCH v7 3/5] fw_cfg: do DMA read operation

2017-11-20 Thread Michael S. Tsirkin
On Mon, Nov 20, 2017 at 10:55:17AM +0100, Marc-André Lureau wrote: > Modify fw_cfg_read_blob() to use DMA if the device supports it. > Return errors, because the operation may fail. > > The DMA operation is expected to run synchronously with today qemu, > but the specification states that it may

Re: [Qemu-devel] [Libguestfs] [qemu-img] support for XVA

2017-11-20 Thread Gandalf Corvotempesta
I did something different, that will build a raw image directly from a xenserver export, on the fly. Compared the resulting file (via MD5) with xenmygrate.py and there is a match. Currently, this is the faster way to convert a XenServer image to a raw file. Don't need to wait for export, tar

Re: [Qemu-devel] [PATCH v2 for-2.11 2/2] accel/tcg: Handle atomic accesses to notdirty memory correctly

2017-11-20 Thread Richard Henderson
On 11/20/2017 07:08 PM, Peter Maydell wrote: > To do a write to memory that is marked as notdirty, we need > to invalidate any TBs we have cached for that memory, and > update the cpu physical memory dirty flags for VGA and migration. > The slowpath code in notdirty_mem_write() does all this

[Qemu-devel] [PULL 11/15] linux-user/s390x: Mask si_addr for SIGSEGV

2017-11-20 Thread riku . voipio
From: Peter Maydell For s390x, the address passed to a signal handler in the siginfo_t si_addr field is masked (in the kernel this is done in do_sigbus() and do_sigsegv() in arch/s390/mm/fault.c). Implement this architecture-specific oddity in linux-user. This is one

[Qemu-devel] [PULL 13/15] linux-user/sparc: Put address for data faults where linux-user expects it

2017-11-20 Thread riku . voipio
From: Peter Maydell In the user-mode-only version of sparc_cpu_handle_mmu_fault(), we must save the fault address for a data fault into the CPU state's mmu registers, because the code in linux-user/main.c expects to find it there in order to populate the si_addr field

[Qemu-devel] [PULL 10/15] linux-user: return EINVAL from prctl(PR_*_SECCOMP)

2017-11-20 Thread riku . voipio
From: James Cowgill If an application tries to install a seccomp filter using prctl(PR_SET_SECCOMP), the filter is likely for the target instead of the host architecture. This will probably cause qemu to be immediately killed when it executes another syscall. Prevent

[Qemu-devel] [PULL 04/15] linux-user/hppa: Fix typo for TARGET_NR_epoll_wait

2017-11-20 Thread riku . voipio
From: Helge Deller Reviewed-by: Laurent Vivier Signed-off-by: Helge Deller Message-Id: <20170311100543.ga29...@ls3530.fritz.box> Signed-off-by: Richard Henderson Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 14/15] linux-user: Handle rt_sigaction correctly for SPARC

2017-11-20 Thread riku . voipio
From: Peter Maydell SPARC is like Alpha in its handling of the rt_sigaction syscall: it takes an extra parameter 'restorer' which needs to be copied into the sa_restorer field of the sigaction struct. The order of the arguments differs slightly between SPARC and Alpha

[Qemu-devel] [PULL 03/15] linux-user/hppa: Fix cpu_clone_regs

2017-11-20 Thread riku . voipio
From: Richard Henderson By failing to return from the syscall in the child, the child issues another clone syscall and hilarity ensues. Signed-off-by: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/hppa/target_cpu.h | 4

[Qemu-devel] [PULL 15/15] linux-user: Fix calculation of auxv length

2017-11-20 Thread riku . voipio
From: Peter Maydell In commit 7c4ee5bcc82e643 we changed the order in which we construct the AUXV, but forgot to adjust the calculation of the length. The result is that we set info->auxv_len to a bogus and negative value, and then later on the code in open_self_auxv()

[Qemu-devel] [PULL 06/15] linux-user/hppa: Fix TARGET_F_RDLCK, TARGET_F_WRLCK, TARGET_F_UNLCK

2017-11-20 Thread riku . voipio
From: Helge Deller Signed-off-by: Helge Deller Signed-off-by: Richard Henderson Message-ID: <20170311175019.ga7...@ls3530.fritz.box> Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 3 +++ 1 file changed, 3

[Qemu-devel] [PULL 08/15] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64

2017-11-20 Thread riku . voipio
From: James Clarke Fixes: https://bugs.launchpad.net/qemu/+bug/1716767 Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-By: John Paul Adrian Glaubitz

[Qemu-devel] [PULL 12/15] linux-user/ppc: Report correct fault address for data faults

2017-11-20 Thread riku . voipio
From: Peter Maydell For faults on loads and stores, ppc_cpu_handle_mmu_fault() in target/ppc/user_only_helper.c stores the offending address in env->spr[SPR_DAR]. Report this correctly to the guest in si_addr, rather than incorrectly using the address of the instruction

[Qemu-devel] [PULL 05/15] linux-user/hppa: Fix TARGET_MAP_TYPE

2017-11-20 Thread riku . voipio
From: Helge Deller TARGET_MAP_TYPE needs to be 0x03 instead of 0x0f on the hppa architecture, otherwise it conflicts with MAP_FIXED which is 0x04. Signed-off-by: Helge Deller Signed-off-by: Richard Henderson Message-ID:

[Qemu-devel] [PULL 02/15] linux-user/hppa: Fix TARGET_SA_* defines

2017-11-20 Thread riku . voipio
From: Helge Deller Reviewed-by: Laurent Vivier Signed-off-by: Helge Deller Signed-off-by: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 8 1 file changed, 8

[Qemu-devel] [PULL 01/15] linux-user: Restrict usage of sa_restorer

2017-11-20 Thread riku . voipio
From: Richard Henderson Reading and writing to an sa_restorer member that isn't supposed to exist corrupts user memory. Introduce TARGET_ARCH_HAS_SA_RESTORER, similar to the kernel's __ARCH_HAS_SA_RESTORER. Reported-by: Helge Deller Signed-off-by: Richard

[Qemu-devel] [PULL 07/15] linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB

2017-11-20 Thread riku . voipio
From: Helge Deller Add the missing defines and for TARGET_MAP_STACK and TARGET_MAP_HUGETLB for alpha, mips, ppc, x86, hppa. Fix the mmap_flags translation table to translate MAP_HUGETLB between host and target architecture, and to drop MAP_STACK. Signed-off-by: Helge Deller

[Qemu-devel] [PULL 00/15] late linux-user fixes for 2.11

2017-11-20 Thread riku . voipio
s/pull-linux-user-20171120 for you to fetch changes up to f516511ea84d8bb3395d6ea95a7c7b80dc2a05e9: linux-user: Fix calculation of auxv length (2017-11-20 16:15:41 +0200) late linux-user fixes for Qem

[Qemu-devel] [PULL 09/15] linux-user: fix 'finshed' typo in comment

2017-11-20 Thread riku . voipio
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 13:50, Peter Maydell wrote: > More generally, this commit seems to assume that QEMU always > does: > * set exception_index to something > * handle that > * clear exception_index to -1 > > but it's not clear to me that it's actually always the case > that it gets cleared back to

Re: [Qemu-devel] [PATCH for-2.11] iotests: Fix 176 on 32-bit host

2017-11-20 Thread Max Reitz
On 2017-11-17 20:04, Eric Blake wrote: > The contents of a qcow2 bitmap are rounded up to a size that > matches the number of bits available for the granularity, but > that granularity differs for 32-bit hosts (our default 64k > cluster allows for 2M bitmap coverage per 'long') and 64-bit > hosts

Re: [Qemu-devel] [PATCH v2 for-2.11 0/2] Fix TCG atomic writes to nondirty pages

2017-11-20 Thread Paolo Bonzini
On 20/11/2017 19:08, Peter Maydell wrote: > To do a write to memory that is marked as notdirty, we need > to invalidate any TBs we have cached for that memory, and > update the cpu physical memory dirty flags for VGA and migration. > The slowpath code in notdirty_mem_write() does all this

Re: [Qemu-devel] [PATCH] block: Close a BlockDriverState completely even when bs->drv is NULL

2017-11-20 Thread Max Reitz
On 2017-11-06 15:53, Alberto Garcia wrote: > bdrv_close() skips much of its logic when bs->drv is NULL. This is > fine when we're closing a BlockDriverState that has just been created > (because e.g the initialization process failed), but it's not enough > in other cases. > > For example, when a

Re: [Qemu-devel] [PATCH v5 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-11-20 Thread Michael S. Tsirkin
On Mon, Nov 20, 2017 at 04:26:31PM +, Stefan Hajnoczi wrote: > On Fri, Nov 17, 2017 at 04:44:37AM +0800, Changpeng Liu wrote: > > Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be > > used for live migration of vhost user devices, also vhost user devices > > can benefit

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.11] iotests: Fix 176 on 32-bit host

2017-11-20 Thread Eric Blake
On 11/17/2017 04:59 PM, John Snow wrote: >>> So for this test, the easiest solution is to filter out the >>> actual hash value. Broken in commit 4096974e. >> >> Of course, if Kevin sends a v2 pull, it's probably better to just squash >> this in to my original testsuite change (since a v2 would

Re: [Qemu-devel] [PATCH v2] tests/bios-tables-test: Fix endianess problems when passing data to iasl

2017-11-20 Thread Michael S. Tsirkin
On Mon, Nov 20, 2017 at 05:55:22PM +0100, Igor Mammedov wrote: > On Thu, 16 Nov 2017 13:17:02 +0100 > Thomas Huth wrote: > > > The bios-tables-test was writing out files that we pass to iasl in > > with the wrong endianness in the header when running on a big endian > > host.

Re: [Qemu-devel] [PATCH for-2.11] iotests: Fix 176 on 32-bit host

2017-11-20 Thread Max Reitz
On 2017-11-17 20:04, Eric Blake wrote: > The contents of a qcow2 bitmap are rounded up to a size that > matches the number of bits available for the granularity, but > that granularity differs for 32-bit hosts (our default 64k > cluster allows for 2M bitmap coverage per 'long') and 64-bit > hosts

[Qemu-devel] [PATCH v7 for-2.12 20/25] block: Generically refresh runtime options

2017-11-20 Thread Max Reitz
Instead of having every block driver which implements bdrv_refresh_filename() copy all of the significant runtime options over to bs->full_open_options, implement this process generically in bdrv_refresh_filename(). This patch only adds this new generic implementation, it does not remove the old

[Qemu-devel] [PATCH v7 for-2.12 19/25] block: Add BlockDriver.bdrv_gather_child_options

2017-11-20 Thread Max Reitz
Some follow-up patches will rework the way bs->full_open_options is refreshed in bdrv_refresh_filename(). The new implementation will remove the need for the block drivers' bdrv_refresh_filename() implementations to set bs->full_open_options; instead, it will be generic and use static information

[Qemu-devel] [PATCH v7 for-2.12 22/25] block: Do not copy exact_filename from format file

2017-11-20 Thread Max Reitz
If the a format BDS's file BDS is in turn a format BDS, we cannot simply use the same filename, because when opening a BDS tree based on a filename alone, qemu will create only one format node on top of one protocol node (disregarding a potential backing file). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v7 for-2.12 21/25] block: Purify .bdrv_refresh_filename()

2017-11-20 Thread Max Reitz
Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all

[Qemu-devel] [PATCH v7 for-2.12 12/25] blkverify: Make bdrv_dirname() return NULL

2017-11-20 Thread Max Reitz
blkverify's BDSs have a file BDS, but we do not want this to be preferred over the raw node. There is no way to decide between the two (and not really a reason to, either), so just return NULL in blkverify's implementation of bdrv_dirname(). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v7 for-2.12 15/25] block/nfs: Implement bdrv_dirname()

2017-11-20 Thread Max Reitz
While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia

[Qemu-devel] [PATCH v7 for-2.12 25/25] block/null: Generate filename even with latency-ns

2017-11-20 Thread Max Reitz
While we cannot represent the latency-ns option in a filename, it is not a significant option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz --- block/null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v7 for-2.12 18/25] block: Add sgfnt_runtime_opts to BlockDriver

2017-11-20 Thread Max Reitz
This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into BDS.full_open_options

[Qemu-devel] [PATCH v7 for-2.12 09/25] block: Add bdrv_make_absolute_filename()

2017-11-20 Thread Max Reitz
This is a general function for making a filename that is relative to a certain BDS absolute. It calls bdrv_get_full_backing_filename_from_filename() for now, but that will be changed in a follow-up patch. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia

[Qemu-devel] [PATCH v7 for-2.12 14/25] block/nbd: Make bdrv_dirname() return NULL

2017-11-20 Thread Max Reitz
The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will). Signed-off-by: Max

[Qemu-devel] [PATCH v7 for-2.12 24/25] block/curl: Implement bdrv_refresh_filename()

2017-11-20 Thread Max Reitz
Signed-off-by: Max Reitz --- block/curl.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/curl.c b/block/curl.c index 11318a9a29..fe57223fda 100644 --- a/block/curl.c +++ b/block/curl.c @@ -957,6 +957,20 @@ static int64_t

[Qemu-devel] [PATCH v7 for-2.12 10/25] block: Fix bdrv_find_backing_image()

2017-11-20 Thread Max Reitz
bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or bdrv_make_absolute_filename() instead of trying to do what those functions do by itself. path_combine_deprecated() can now be dropped, so let's do that. Signed-off-by: Max Reitz --- block.c | 30

[Qemu-devel] [PATCH v7 for-2.12 13/25] quorum: Make bdrv_dirname() return NULL

2017-11-20 Thread Max Reitz
While the common implementation for bdrv_dirname() should return NULL for quorum BDSs already (because they do not have a file node and their exact_filename field should be empty), there is no reason not to make that explicit. Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v7 for-2.12 05/25] block: Respect backing bs in bdrv_refresh_filename

2017-11-20 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] [PATCH v7 for-2.12 08/25] block: bdrv_get_full_backing_filename's ret. val.

2017-11-20 Thread Max Reitz
Make bdrv_get_full_backing_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- include/block/block.h | 3 +-- block.c | 47

[Qemu-devel] [PATCH v7 for-2.12 23/25] block: Fix FIXME from "Add BDS.backing_overridden"

2017-11-20 Thread Max Reitz
Said commit introduced a FIXME stating that bdrv_open_backing_file() should set bs->backing_overridden to true not only if the file.filename option was set, but if the "options" QDict contained any option that is significant for any node in the BDS tree emerging from the backing BDS. This behavior

[Qemu-devel] [PATCH v7 for-2.12 11/25] block: Add bdrv_dirname()

2017-11-20 Thread Max Reitz
This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by format drivers,

[Qemu-devel] [PATCH v7 for-2.12 04/25] iotests: Drop explicit base blockdev in 191

2017-11-20 Thread Max Reitz
Overriding the backing image should result in a json:{} pseudo-filename. Then, you can no longer use the commit block job with filename parameters. Therefore, do not explicitly add the base and override the middle image in iotest 191, since we do not need to anyway. This will allow us to

[Qemu-devel] [PATCH v7 for-2.12 17/25] iotests: Add quorum case to test 110

2017-11-20 Thread Max Reitz
Test 110 tests relative backing filenames for complex BDS trees. Now that the originally supposedly failing test passes, let us add a new failing test: Quorum can never work automatically (without detecting whether all child nodes have the same base directory, but that would be rather

[Qemu-devel] [PATCH v7 for-2.12 03/25] block: Add BDS.backing_overridden

2017-11-20 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 v7 for-2.12 07/25] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2017-11-20 Thread Max Reitz
Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- include/block/block.h | 7 +++ block.c | 51

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

2017-11-20 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, quorum, commit, and mirror. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c

[Qemu-devel] [PATCH v7 for-2.12 16/25] block: Use bdrv_dirname() for relative filenames

2017-11-20 Thread Max Reitz
bdrv_get_full_backing_filename_from_filename() breaks down when it comes to JSON filenames. Using bdrv_dirname() as the basis is better because since we have BDS, we can descend through the BDS tree to the protocol layer, which gives us a greater probability of finding a non-JSON name; also,

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

2017-11-20 Thread Max Reitz
When invoking drive-mirror in absolute-paths mode, the target's backing BDS is assigned to it in mirror_exit(). 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 v7 for-2.12 06/25] block: Make path_combine() return the path

2017-11-20 Thread Max Reitz
Besides being safe for arbitrary path lengths, after some follow-up patches all callers will want a freshly allocated buffer anyway. In the meantime, path_combine_deprecated() is added which has the same interface as path_combine() had before this patch. All callers to that function will be

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

2017-11-20 Thread Max Reitz
I'm sparing myself writing this cover letter again, and I'll just give you a link to the previous version: http://lists.nongnu.org/archive/html/qemu-block/2017-09/msg01030.html The only difference is that I dropped patch 16 which added a QAPI @base-directory option for any node that could be

Re: [Qemu-devel] [PATCH v2] tests/bios-tables-test: Fix endianess problems when passing data to iasl

2017-11-20 Thread Thomas Huth
On 20.11.2017 17:55, Igor Mammedov wrote: > On Thu, 16 Nov 2017 13:17:02 +0100 > Thomas Huth wrote: > >> The bios-tables-test was writing out files that we pass to iasl in >> with the wrong endianness in the header when running on a big endian >> host. So instead of storing

[Qemu-devel] [Bug 1673976] Re: linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

2017-11-20 Thread Peter Maydell
OK, this can't be as simple as "posix_spawn() fails", because I've just tried the test program from the posix_spawn manpage (http://man7.org/linux/man-pages/man3/posix_spawn.3.html) and that works fine for x86-64 guest, aarch64 guest and armhf guest. In the x86 and armhf cases the libc I have

[Qemu-devel] kvm: Failed to flush the L2 table cache: Input/output error

2017-11-20 Thread Stefan Priebe - Profihost AG
Hello, while using qemu 2.9.1 and doing a backup of a disk: I have sometimes the following output: Formatting '/mnt/qemu-249-2017_11_19-04_00_05.qcow2', fmt=qcow2 size=236223201280 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 followed by: kvm: Failed to flush the L2

Re: [Qemu-devel] [PULL 0/2] ppc-for-2.11 queue 20171120

2017-11-20 Thread Peter Maydell
> > are available in the Git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.11-20171120 > > for you to fetch changes up to 82512483940c756e2db1bd67ea91b02bc29c5e01: > > spapr: reset DRC

  1   2   3   >