Re: [Qemu-devel] [PATCH 0/2] vnc: remove deprecated TLS related features

2018-08-20 Thread Gerd Hoffmann
Hi, > doc: switch to modern syntax for VNC TLS setup > vnc: remove support for deprecated tls, x509, x509verify options Added to ui queue. thanks, Gerd

Re: [Qemu-devel] [RFC/RFT PATCH 0/2] spice-display locking fixes (cursors)?

2018-08-20 Thread Gerd Hoffmann
On Fri, Jul 20, 2018 at 08:31:07AM +0200, Paolo Bonzini wrote: > The first issue was found by Coverity and should be trivial. The second > however made me wonder how to test the code and whether it has ever > worked, because in theory it should be an instant deadlock whenever >

Re: [Qemu-devel] [PATCH] sdl2: redraw correctly when scanout_mode enabled.

2018-08-20 Thread Gerd Hoffmann
On Thu, Jul 26, 2018 at 03:59:00PM -0700, Tao Wu wrote: > When scanout_mode enabled, surface is out of sync with actual screen. > In such case, we just call sdl2_gl_scanout_flush to do redraw. This > fixes bug reported in >

Re: [Qemu-devel] [PATCH] editorconfig: set emacs mode

2018-08-20 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Aug 20, 2018 at 9:55 PM Eric Blake wrote: >> >> On 08/20/2018 01:00 PM, Peter Maydell wrote: >> > On 20 August 2018 at 18:43, Marc-André Lureau >> > wrote: >> >> Some time ago, I proposed to use an (eval) in .dir-locals.el to set >> >> the mode for

Re: [Qemu-devel] [PATCH] ui: use enum to string helpers

2018-08-20 Thread Gerd Hoffmann
On Wed, Aug 01, 2018 at 11:25:08AM +0200, Marc-André Lureau wrote: > Minor code simplification. Added to ui queue. thanks, Gerd

Re: [Qemu-devel] Bugs when cross-compiling qemu for Windows with mingw 8.1, executable doesn't run

2018-08-20 Thread Stefan Weil
Am 20.08.2018 um 22:39 schrieb Howard Spoelstra: > Confirmed, adding --disable-stack-protector to configure results in a > working binary. > > Great, thanks, > Howard There is already a bug report for gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832 It looks like not only Windows but

Re: [Qemu-devel] [PATCH for-3.1] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag

2018-08-20 Thread Gerd Hoffmann
On Wed, Aug 08, 2018 at 11:46:42AM +0200, Thomas Huth wrote: > SDL_INIT_NOPARACHUTE is not used in SDL2 anymore, and the define is just > a dummy (see https://wiki.libsdl.org/MigrationGuide#Some_general_truths > for example). So we can remove it and get rid of the "flags" variable > nowadays.

Re: [Qemu-devel] [PATCH] vnc: fix memleak of the "vnc-worker-output" name

2018-08-20 Thread Gerd Hoffmann
On Wed, Aug 08, 2018 at 12:18:30AM +0200, Peter Wu wrote: > Fixes repeated memory leaks of 18 bytes when using VNC: > > Direct leak of 831024 byte(s) in 46168 object(s) allocated from: > ... > #4 0x7f6d2f919bdd in g_strdup_vprintf glib/gstrfuncs.c:514 > #5

Re: [Qemu-devel] [PATCH v2 41/60] json: Nicer recovery from invalid leading zero

2018-08-20 Thread Markus Armbruster
Eric Blake writes: > On 08/20/2018 06:39 AM, Markus Armbruster wrote: > >> In review of v1, we discussed whether to try matching non-integer >> numbers with redundant leading zero. Doing that tightly in the lexer >> requires duplicating six states. A simpler alternative is to have the >> lexer

Re: [Qemu-devel] [PATCH] monitor: avoid potential dead-lock when cleaning up

2018-08-20 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Aug 20, 2018 at 8:57 AM Markus Armbruster wrote: >> >> Marc-André Lureau writes: >> >> > Hi >> > On Wed, Aug 1, 2018 at 5:09 PM Markus Armbruster wrote: >> >> >> >> Marc-André Lureau writes: >> >> >> >> > Hi >> >> > >> >> > On Wed, Aug 1, 2018 at

[Qemu-devel] [PULL 15/26] spapr: introduce a fixed IRQ number space

2018-08-20 Thread David Gibson
From: Cédric Le Goater This proposal introduces a new IRQ number space layout using static numbers for all devices, depending on a device index, and a bitmap allocator for the MSI IRQ numbers which are negotiated by the guest at runtime. As the VIO device model does not have a device index but

[Qemu-devel] [PULL 16/26] hw/ppc/prep: Remove ifdeffed-out stub of XCSR code

2018-08-20 Thread David Gibson
From: Peter Maydell The prep machine has some code which is stubs of accessors for XCSR registers. This has been disabled via #if 0 since commit b6b8bd1819ff in 2004, and doesn't have any actual interesting content. It also uses the deprecated old_mmio accessor functions. Remove it entirely.

[Qemu-devel] [PULL 19/26] spapr: introduce a IRQ controller backend to the machine

2018-08-20 Thread David Gibson
From: Cédric Le Goater This proposal moves all the related IRQ routines of the sPAPR machine behind a sPAPR IRQ backend interface 'spapr_irq' to prepare for future changes. First of which will be to increase the size of the IRQ number space, then, will follow a new backend for the POWER9 XIVE

[Qemu-devel] [PULL 17/26] hw/ppc/ppc_boards: Don't use old_mmio for ref405ep_fpga

2018-08-20 Thread David Gibson
From: Peter Maydell Switch the ref405ep_fpga device away from using the old_mmio MemoryRegion accessors. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- hw/ppc/ppc405_boards.c | 60 +++--- 1 file changed,

[Qemu-devel] [PULL 21/26] qemu-doc: mark ppc/prep machine as deprecated

2018-08-20 Thread David Gibson
From: Hervé Poussineau 40p machine type should be used instead. Signed-off-by: Hervé Poussineau Acked-by: Mark Cave-Ayland Signed-off-by: David Gibson --- qemu-deprecated.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index

[Qemu-devel] [PULL 22/26] 40p: don't use legacy fw_cfg_init_mem() function

2018-08-20 Thread David Gibson
From: Mark Cave-Ayland Instead initialise the device via qdev to allow us to set device properties directly as required. Signed-off-by: Mark Cave-Ayland Acked-by: Hervé Poussineau Signed-off-by: David Gibson --- hw/ppc/prep.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[Qemu-devel] [PULL 20/26] hw/ppc: deprecate the machine type 'prep', replaced by '40p'

2018-08-20 Thread David Gibson
From: Hervé Poussineau - prep machine is a fictional machine, so has no specifications. Which devices can be changed/added/removed without impact? Are interrupts correctly mapped? - prep firmware (OHW) has support only for IDE drives (no SCSI). Booting from IDE has been broken

[Qemu-devel] [PULL 23/26] mac_oldworld: don't use legacy fw_cfg_init_mem() function

2018-08-20 Thread David Gibson
From: Mark Cave-Ayland Instead initialise the device via qdev to allow us to set device properties directly as required. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/ppc/mac_oldworld.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 18/26] hw/ppc/ppc405_uc: Convert away from old_mmio

2018-08-20 Thread David Gibson
From: Peter Maydell Convert the devices in ppc405_uc away from using the old_mmio MemoryRegion accessors: * opba's 32-bit and 16-bit accessors were just calling the 8-bit accessors and assembling a big-endian order number, which we can do by setting the .impl.max_access_size to 1 and

[Qemu-devel] [PULL 26/26] ppc: add DBCR based debugging

2018-08-20 Thread David Gibson
From: Roman Kapl Add support for DBCR (debug control register) based debugging as used on BookE ppc. So far supports only branch and single-step events, but these are the important ones. GDB in Linux guest can now do single-stepping. Signed-off-by: Roman Kapl Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 09/26] target/ppc: Use non-arithmetic conversions for fp load/store

2018-08-20 Thread David Gibson
From: Richard Henderson Memory operations have no side effects on fp state. The use of a "real" conversions between float64 and float32 would raise exceptions for SNaN and out-of-range inputs. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/fpu_helper.c

[Qemu-devel] [PULL 25/26] spapr_pci: factorize the use of SPAPR_MACHINE_GET_CLASS()

2018-08-20 Thread David Gibson
From: Cédric Le Goater It should save us some CPU cycles as these routines perform a lot of checks. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/ppc/spapr_pci.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_pci.c

[Qemu-devel] [PULL 05/26] target/ppc: Tidy helper_fmul

2018-08-20 Thread David Gibson
From: Richard Henderson Tidy the invalid exception checking so that we rely on softfloat for initial argument validation, and select the kind of invalid operand exception only when we know we must. Pass and return float64 values directly rather than bounce through the CPU_DoubleU union.

[Qemu-devel] [PULL 14/26] spapr: Add a pseries-3.1 machine type

2018-08-20 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e5d825374e..a732f59205 100644 ---

[Qemu-devel] [PULL 06/26] target/ppc: Tidy helper_fadd, helper_fsub

2018-08-20 Thread David Gibson
From: Richard Henderson Tidy the invalid exception checking so that we rely on softfloat for initial argument validation, and select the kind of invalid operand exception only when we know we must. Pass and return float64 values directly rather than bounce through the CPU_DoubleU union. Note

[Qemu-devel] [PULL 24/26] mac_newworld: don't use legacy fw_cfg_init_mem() function

2018-08-20 Thread David Gibson
From: Mark Cave-Ayland Instead initialise the device via qdev to allow us to set device properties directly as required. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/ppc/mac_newworld.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 13/26] target/ppc: simplify bcdadd/sub functions

2018-08-20 Thread David Gibson
From: Yasmin Beatriz After solving a corner case in bcdsub, this patch simplifies the logic of both bcdadd/sub instructions by removing some unnecessary local flags. This commit also rearranges some if-else conditions in bcdadd to make it easier to read. Signed-off-by: Yasmin Beatriz

[Qemu-devel] [PULL 00/26] ppc-for-3.1 queue 20180821

2018-08-20 Thread David Gibson
The following changes since commit d0092d90eb546a8bbe9e9120426c189474123797: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180820' into staging (2018-08-20 17:41:18 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-3.1-20180821

[Qemu-devel] [PULL 08/26] target/ppc: Honor fpscr_ze semantics and tidy fre, fresqrt

2018-08-20 Thread David Gibson
From: Richard Henderson Divide by zero, exception taken, leaves the destination register unmodified. Therefore we must raise the exception before returning from the respective helpers. >From helper_fre, divide by zero exception not taken, return the documented +/- 0.5. At the same time, tidy

[Qemu-devel] [PULL 12/26] xics: don't include "target/ppc/cpu-qom.h" in "hw/ppc/xics.h"

2018-08-20 Thread David Gibson
From: Greg Kurz The last user of the PowerPCCPU typedef in "hw/ppc/xics.h" vanished with commit b1fd36c363d73969841468146ebfb9fd84a5ee52. It isn't necessary to include "target/ppc/cpu-qom.h" there anymore. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- include/hw/ppc/xics.h | 1 -

[Qemu-devel] [PULL 10/26] target/ppc: bcdsub fix sign when result is zero

2018-08-20 Thread David Gibson
From: Yasmin Beatriz When the result of bcdsub is equal to zero, the result sign may be set to negative in some cases, and this does not follow the Power ISA specifications as to decimal integer arithmetic instructions. Signed-off-by: Yasmin Beatriz Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 11/26] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-08-20 Thread David Gibson
From: Alexey Kardashevskiy At the moment the PPC64/pseries guest only supports 4K/64K/16M IOMMU pages and POWER8 CPU supports the exact same set of page size so so far things worked fine. However POWER9 supports different set of sizes - 4K/64K/2M/1G and the last two - 2M and 1G - are not even

[Qemu-devel] [PULL 04/26] target/ppc: Honor fpscr_ze semantics and tidy fdiv

2018-08-20 Thread David Gibson
From: Richard Henderson Divide by zero, exception taken, leaves the destination register unmodified. Therefore we must raise the exception before returning from helper_fdiv. Move the check from do_float_check_status into helper_fdiv. At the same time, tidy the invalid exception checking so

[Qemu-devel] [PULL 03/26] target/ppc: Enable fp exceptions for user-only

2018-08-20 Thread David Gibson
From: Richard Henderson While just setting the MSR bits is sufficient, we can tidy the helper code by extracting the MSR test to a helper and then forcing it true for user-only. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/fpu_helper.c | 15

[Qemu-devel] [PULL 01/26] spapr_cpu_core: vmstate_[un]register per-CPU data from (un)realizefn

2018-08-20 Thread David Gibson
From: Bharata B Rao VMStateDescription vmstate_spapr_cpu_state was added by commit b94020268e0b6 (spapr_cpu_core: migrate per-CPU data) to migrate per-CPU data with the required vmstate registration and unregistration calls. However the unregistration is being done only from vcpu creation error

[Qemu-devel] [PULL 07/26] target/ppc: Tidy helper_fsqrt

2018-08-20 Thread David Gibson
From: Richard Henderson Tidy the invalid exception checking so that we rely on softfloat for initial argument validation, and select the kind of invalid operand exception only when we know we must. Pass and return float64 values directly rather than bounce through the CPU_DoubleU union.

[Qemu-devel] [Bug 1470720] Re: high IRQ-TLB generates network interruptions

2018-08-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1470720 Title: high

[Qemu-devel] [Bug 1471583] Re: QCA988X Wifi Card Not PCI Passing Through

2018-08-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1471583 Title: QCA988X

[Qemu-devel] [Bug 1314293] Re: screendump with qxl + spice shows stale data

2018-08-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1314293 Title: screendump

[Qemu-devel] [Bug 1472083] Re: Qemu 2.1.2 hang when stop command

2018-08-20 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1472083 Title: Qemu 2.1.2

Re: [Qemu-devel] [PATCH V11 17/20] filter-rewriter: handle checkpoint and failover event

2018-08-20 Thread Jason Wang
On 2018年08月12日 04:59, Zhang Chen wrote: After one round of checkpoint, the states between PVM and SVM become consistent, so it is unnecessary to adjust the sequence of net packets for old connections, besides, while failover happens, filter-rewriter will into failover mode that needn't handle

Re: [Qemu-devel] [PATCH V11 15/20] net/net.c: Add net client type check function for COLO

2018-08-20 Thread Jason Wang
On 2018年08月12日 04:59, Zhang Chen wrote: From: Zhang Chen We add is_colo_support_client_type() to check the net client type for COLO-compare. Currently we just support TAP. Suggested by Jason. Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen --- This needs more works: - Forbid vhost

Re: [Qemu-devel] [PATCH V11 16/20] filter: Add handle_event method for NetFilterClass

2018-08-20 Thread Jason Wang
On 2018年08月12日 04:59, Zhang Chen wrote: Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c| 28

[Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-20 Thread Jing Liu
Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn. Signed-off-by: Jing Liu --- hw/pci-bridge/pci_bridge_dev.c | 24 1 file changed, 24

[Qemu-devel] [PATCH v3 0/2] hw/pci: PCI resource reserve capability

2018-08-20 Thread Jing Liu
This patch serial is about PCI resource reserve capability. First patch refactors the resource reserve fields in GenPCIERoorPort structure out to another new structure, called "PCIResReserve". Modify the parameter list of pci_bridge_qemu_reserve_cap_init(). Second patch enables the resource

[Qemu-devel] [PATCH v3 1/2] hw/pci: factor PCI reserve resources to a separate structure

2018-08-20 Thread Jing Liu
Factor "bus_reserve", "io_reserve", "mem_reserve", "pref32_reserve" and "pref64_reserve" fields of the "GenPCIERootPort" structure out to "PCIResReserve" structure, so that other PCI bridges can reuse it to add resource reserve capability. Signed-off-by: Jing Liu ---

Re: [Qemu-devel] [PATCH V11 00/20] COLO: integrate colo frame with block replication and COLO proxy

2018-08-20 Thread Zhang Chen
Hi Jason and Markus, Ping... Do you have time to review this series? Thanks Zhang Chen On Sun, Aug 12, 2018 at 4:59 AM Zhang Chen wrote: > Hi~ All~ > > COLO Frame, block replication and COLO proxy(colo-compare,filter-mirror, > filter-redirector,filter-rewriter) have been exist in qemu > for

[Qemu-devel] [PATCH 6/7] target/s390x: fix PACK reading 1 byte less and writing 1 byte more

2018-08-20 Thread Pavel Zbitskiy
PACK fails on the test from the Principles of Operation: F1F2F3F4 becomes 234C instead of 0001234C due to an off-by-one error. Furthermore, it overwrites one extra byte to the left of F1. If len_dest is 0, then we only want to flip the 1st byte and never loop over the rest. Therefore, the

[Qemu-devel] [PATCH 4/7] target/s390x: fix IPM polluting irrelevant bits

2018-08-20 Thread Pavel Zbitskiy
Suppose psw.mask=0x8000, cc=2, r1=0 and we do "ipm 1". This command must touch only bits 32-39, so the expected output is r1=0x2000. However, currently qemu yields r1=0x20008000, because irrelevant parts of PSW leak into r1 during program mask transfer. Signed-off-by: Pavel

[Qemu-devel] [PATCH 7/7] target/s390x: implement CVB, CVBY and CVBG

2018-08-20 Thread Pavel Zbitskiy
Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. Signed-off-by: Pavel Zbitskiy --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 4 +++

[Qemu-devel] [PATCH 3/7] target/s390x: fix CSST decoding and runtime alignment check

2018-08-20 Thread Pavel Zbitskiy
CSST is defined as: C(0xc802, CSST,SSF, CASS, la1, a2, 0, 0, csst, 0) It means that the first parameter is handled by in1_la1(). in1_la1() fills addr1 field, and not in1. Furthermore, when extract32() is used for the alignment check, the third parameter should specify the number of

[Qemu-devel] [PATCH 2/7] target/s390x: add BAL and BALR instructions

2018-08-20 Thread Pavel Zbitskiy
These instructions are provided for compatibility purposes and are used only by old software, in the new code BAS and BASR are preferred. The difference between the old and new instruction exists only in the 24-bit mode. In addition, fix BAS polluting high 32 bits of the first operand in 24- and

[Qemu-devel] [PATCH 0/7] Some improvements in z/Arch instructions support

2018-08-20 Thread Pavel Zbitskiy
Found while attempting to run an old tool in qemu. * BAL and BALR:Added. * CSST:Qemu crashed after an accidental jump to garbage. * IPM: A tool produced an incorrect output. * EX TRT/TRTR: A tool ran quite slow. * PACK:A tool produced an incorrect

[Qemu-devel] [PATCH 5/7] target/s390x: add EX support for TRT and TRTR

2018-08-20 Thread Pavel Zbitskiy
Improves "b213c9f5: target/s390x: Implement TRTR" by introducing the intermediate functions, which are compatible with dx_helper type. Signed-off-by: Pavel Zbitskiy --- target/s390x/mem_helper.c | 16 +++ tests/tcg/s390x/Makefile.target | 2 ++ tests/tcg/s390x/exrl-trt.c |

[Qemu-devel] [PATCH 1/7] tests/tcg: add a simple s390x test

2018-08-20 Thread Pavel Zbitskiy
Copied from alpha. Signed-off-by: Pavel Zbitskiy --- MAINTAINERS | 1 + tests/tcg/s390x/Makefile.target | 3 +++ tests/tcg/s390x/hello-s390x.c | 7 +++ 3 files changed, 11 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.target create mode 100644

Re: [Qemu-devel] [PATCH v2 2/3] hw/pci: add teardown function for PCI resource reserve capability

2018-08-20 Thread Liu, Jing2
Hi Marcel, On 8/20/2018 9:38 PM, Marcel Apfelbaum wrote: Hi Jing, On 08/20/2018 05:58 AM, Liu, Jing2 wrote: Hi Marcel, On 8/18/2018 12:10 AM, Marcel Apfelbaum wrote: Hi Jing, On 08/16/2018 12:28 PM, Jing Liu wrote: Clean up the PCI config space of resource reserve capability.

Re: [Qemu-devel] [PATCH v3 0/3] file-posix: Simplifications on image locking

2018-08-20 Thread Fam Zheng
On Fri, 08/17 17:35, no-re...@patchew.org wrote: > ERROR:/tmp/qemu-test/src/tests/test-image-locking.c:69:check_locked_bytes: > assertion failed (perm_expected == !!qemu_lock_fd_test(fd, 100 + i, 1, > true)): (1 == 0) This image doesn't have OFD locking support in its glibc. Will add a check in

[Qemu-devel] [PATCH v4 0/3] file-posix: Simplifications on image locking

2018-08-20 Thread Fam Zheng
v4: Fix test on systems without OFD. [Patchew] The first patch reduces chances of QEMU crash in unusual (but not unlikely) cases especially when used by Libvirt (see commit message). The second patch halves fd for images. The third adds some more test for patch one (would have caught the

[Qemu-devel] [PATCH v4 1/3] file-posix: Skip effectiveless OFD lock operations

2018-08-20 Thread Fam Zheng
If we know we've already locked the bytes, don't do it again; similarly don't unlock a byte if we haven't locked it. This doesn't change the behavior, but fixes a corner case explained below. Libvirt had an error handling bug that an image can get its (ownership, file mode, SELinux) permissions

[Qemu-devel] [PATCH v4 2/3] file-posix: Drop s->lock_fd

2018-08-20 Thread Fam Zheng
The lock_fd field is not strictly necessary because transferring locked bytes from old fd to the new one shouldn't fail anyway. This spares the user one fd per image. Signed-off-by: Fam Zheng --- block/file-posix.c | 37 + 1 file changed, 13 insertions(+), 24

Re: [Qemu-devel] [PATCH 0/4] docker: Sort packages

2018-08-20 Thread Fam Zheng
On Fri, 08/17 22:53, Philippe Mathieu-Daudé wrote: > Trivial cleanup patches. > > Per the Docker recommendation, "this helps to avoid duplication of > packages and make the list much easier to update. This also makes PRs > a lot easier to read and review." > > Regards, > > Phil. > > Philippe

Re: [Qemu-devel] [PATCH] docker: Clean dangling tarball files

2018-08-20 Thread Fam Zheng
On Sat, 08/18 00:03, Philippe Mathieu-Daudé wrote: > When a container fails, it leaves a dangling tarball which name is > based on a timestamp. Further uses of make won't clean those files, > neither calling the 'docker-clean' target. > > Use the .DELETE_ON_ERROR built-in target to let make

[Qemu-devel] [PATCH v4 3/3] tests: Add unit tests for image locking

2018-08-20 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-image-locking.c | 154 + 2 files changed, 156 insertions(+) create mode 100644 tests/test-image-locking.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

Re: [Qemu-devel] [PULL 0/7] Linux user for 3.1 patches

2018-08-20 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180820202604.14218-1-laur...@vivier.eu Subject: [Qemu-devel] [PULL 0/7] Linux user for 3.1 patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log

Re: [Qemu-devel] [PATCH 2/7] jobs: canonize Error object

2018-08-20 Thread John Snow
On 08/17/2018 03:04 PM, John Snow wrote: > +error_setg_errno(>err, -job->ret, "job failed"); Kevin specifically asked for me to change this, and I lost it in the shuffle. I'll send a v3 now, since there are enough nits to warrant it, and I think I want to adjust a few things to set

Re: [Qemu-devel] [PATCH v3 4/6] hw/riscv/virt: Connect a VGA PCIe device

2018-08-20 Thread Alistair Francis
On Thu, Aug 16, 2018 at 11:36 PM, Gerd Hoffmann wrote: > Hi, > >> +pci_bus = PCI_HOST_BRIDGE(dev)->bus; >> + >> +pci_vga_init(pci_bus); > > I'd suggest to use "-device bochs-display" instead, unless you need all > the legacy vga cruft (text mode, ...). The bochs-drm kms driver can >

Re: [Qemu-devel] [PATCH v2 2/2] block: iotest to catch abort on forced blockjob cancel

2018-08-20 Thread John Snow
On 08/16/2018 02:46 PM, Jeff Cody wrote: > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/229 | 95 ++ > tests/qemu-iotests/229.out | 23 + > tests/qemu-iotests/group | 1 + > 3 files changed, 119 insertions(+) > create mode 100755

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-20 Thread Eric Blake
On 08/17/2018 02:04 PM, John Snow wrote: All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything beyond exactly this. Consolidate this

Re: [Qemu-devel] Simulating a composite machine

2018-08-20 Thread Martin Schroeder via Qemu-devel
Is it that I need to add emulation for CP10 and CP11? On Mon, Aug 20, 2018 at 8:29 PM Martin Schroeder wrote: > > Sent it off as reply instead of reply all.. my bad. > > I was also surprised that it was mid into an instruction. The code > works fine on STM32 but if FPU is not enabled on the STM32

[Qemu-devel] [PATCH v2] ipmi: Use proper struct reference for BT vmstate

2018-08-20 Thread minyard
From: Corey Minyard The vmstate for isa_ipmi_bt was referencing into the bt structure, instead create a bt structure separate and use that. The version 1 of the BT transfer was fairly broken, if a migration occured during an IPMI operation, it is likely the migration would be corrupted because

Re: [Qemu-devel] [PATCH] editorconfig: set emacs mode

2018-08-20 Thread Marc-André Lureau
Hi On Mon, Aug 20, 2018 at 9:55 PM Eric Blake wrote: > > On 08/20/2018 01:00 PM, Peter Maydell wrote: > > On 20 August 2018 at 18:43, Marc-André Lureau > > wrote: > >> Some time ago, I proposed to use an (eval) in .dir-locals.el to set > >> the mode for all json files and Makefile.

[Qemu-devel] [PATCH v2 07/10] Don't delay host status register busy bit when interrupts are enabled

2018-08-20 Thread minyard
From: Corey Minyard Change 880b1ffe6ec2f0ae "smbus: do not immediately complete commands" changed pm_smbus to delay setting the host busy bit until the status register was read, to work around a bug in AMIBIOS. Unfortunately, when interrupts are enabled, the status register will never get read

[Qemu-devel] [PULL 4/7] linux-user: fix recvmsg()/recvfrom() with netlink and MSG_TRUNC

2018-08-20 Thread Laurent Vivier
If recvmsg()/recvfrom() are used with the MSG_TRUNC flag, they return the real length even if it was longer than the passed buffer. So when we translate the buffer we must check we don't go beyond the end of the buffer. Bug: https://github.com/vivier/qemu-m68k/issues/33 Reported-by: John Paul

[Qemu-devel] [PULL 5/7] linux-user: introduce QEMU_RTA_* to use with rtattr_type_t

2018-08-20 Thread Laurent Vivier
Following commit will introduce RTA_PREF that appears only with kernel v4.1. To avoid to manage a specific case for it, this patch introduces the full list of rtattr_type_t prefixed with QEMU_ (as we did for IFLA values) Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id:

Re: [Qemu-devel] [PATCH 3/5] target/s390x: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128

2018-08-20 Thread Richard Henderson
On 08/17/2018 10:03 AM, Emilio G. Cota wrote: >> -if (((4 << fc) | (1 << sc)) & mask) { >> +if ((HAVE_CMPXCHG128 ? 0 : fsize > max) || >> +(HAVE_ATOMIC128 ? 0 : ssize > max)) { > I don't know what fsize/ssize are, so this is hard to review > for me--just opened the PoO

[Qemu-devel] [PULL 3/7] sh4: fix use_icount with linux-user

2018-08-20 Thread Laurent Vivier
This fixes java in a linux-user chroot: $ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped) In gen_conditional_jump() in the GUSA_EXCLUSIVE part, we must

[Qemu-devel] [PATCH v2 05/10] i2c:pm_smbus: Fix state transfer

2018-08-20 Thread minyard
From: Corey Minyard Transfer the state information for the SMBus registers and internal data so it will work on a VM transfer. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Dr. David Alan Gilbert --- hw/acpi/piix4.c | 3 ++- hw/i2c/pm_smbus.c

[Qemu-devel] [PULL 0/7] Linux user for 3.1 patches

2018-08-20 Thread Laurent Vivier
The following changes since commit 0abaa41d936becd914a16ee1fe2a981d96d19428: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-08-17 09:46:00 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git

[Qemu-devel] [PATCH v2 03/10] i2c:pm_smbus: Make the I2C block read command read-only

2018-08-20 Thread minyard
From: Corey Minyard It did have write capability, but the manual says the behavior with write enabled is undefined. So just set an error in this case. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 9 - 1 file changed, 4 insertions(+),

Re: [Qemu-devel] Bugs when cross-compiling qemu for Windows with mingw 8.1, executable doesn't run

2018-08-20 Thread Howard Spoelstra
On Mon, Aug 20, 2018 at 9:47 PM, Stefan Weil wrote: > Am 20.08.2018 um 21:41 schrieb Stefan Weil: >> That's a problem triggered by gcc 8 for Mingw-w64 with compiler options >> -fstack-protector-all and -fstack-protector-strong. With any of those >> options this simple test program also fails with

[Qemu-devel] [PULL 7/7] linux-user: add QEMU_IFLA_INFO_KIND nested type for tun

2018-08-20 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180820171557.7734-5-laur...@vivier.eu> --- linux-user/syscall.c | 48 1 file changed, 48 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

[Qemu-devel] [PATCH v2 06/10] i2c:pm_smbus: Add interrupt handling

2018-08-20 Thread minyard
From: Corey Minyard Add the necessary code so that interrupts actually work from the pm_smbus device. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 14 +- hw/i2c/smbus_ich9.c | 19 ++-

[Qemu-devel] [PULL 2/7] linux-user: fix 32bit g2h()/h2g()

2018-08-20 Thread Laurent Vivier
sparc32plus has 64bit long type but only 32bit virtual address space. For instance, "apt-get upgrade" failed because of a mmap()/msync() sequence. mmap() returned 0xff252000 but msync() used g2h(0xff252000) to find the host address. The "(target_ulong)" in g2h() doesn't fix the address

[Qemu-devel] [PATCH v2 02/10] i2c:pm_smbus: Fix the semantics of block I2C transfers

2018-08-20 Thread minyard
From: Corey Minyard The I2C block transfer commands was not implemented correctly, it read a length byte and such like it was an smbus transfer. So fix the smbus_read_block() and smbus_write_block() functions so they can properly handle I2C transfers, and normal SMBus transfers (for upcoming

[Qemu-devel] [PULL 1/7] qemu-binfmt-conf.sh: add x86_64 target

2018-08-20 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20180801102944.23457-1-laur...@vivier.eu> --- scripts/qemu-binfmt-conf.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh

[Qemu-devel] [PULL 6/7] linux-user: update netlink route types

2018-08-20 Thread Laurent Vivier
Add RTA_PREF and RTA_CACHEINFO. Fix following errors when we start gedit: Unknown host RTA type: 12 Unknown host RTA type: 20 Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20180820171557.7734-4-laur...@vivier.eu> --- linux-user/syscall.c | 19 +++

[Qemu-devel] [PATCH v2 0/8] Make the pm_smbus code more correct

2018-08-20 Thread minyard
These changes make the pm_smbus device work more like the real thing, adding block transfers, I2C block transfers, and interrupts. It also adds vmstate transfer for the smbus device in patch 5. That patch could probably be left out if that is not desirable. Patch 7 works around a change made to

[Qemu-devel] [PULL 4/7] hostmem-file: add the 'pmem' option

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it needs to know whether the backend storage is a real persistent memory, in order to decide whether special operations should be performed to ensure the data persistence. This boolean option 'pmem' allows users to

[Qemu-devel] [PATCH v2 08/10] i2c:pm_smbus: Add the ability to force block transfer enable

2018-08-20 Thread minyard
From: Corey Minyard The PIIX4 hardware has block transfer buffer always enabled in the hardware, but the i801 does not. Add a parameter to pm_smbus_init to force on the block transfer so the PIIX4 handler can enable this by default, as it was disabled by default before. Signed-off-by: Corey

[Qemu-devel] [PATCH v2 10/10] i2c: Add vmstate handling to the smbus eeprom

2018-08-20 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard Cc: Paolo Bonzini Cc: "Michael S . Tsirkin" Cc: Dr. David Alan Gilbert --- hw/i2c/smbus_eeprom.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index

[Qemu-devel] [PULL 7/7] migration/ram: ensure write persistence on loading all data to PMEM.

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He Because we need to make sure the pmem kind memory data is synced after migration, we choose to call pmem_persist() when the migration finish. This will make sure the data of pmem is safe and will not lose if power is off. Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v2 09/10] i2c: Add an SMBus vmstate structure

2018-08-20 Thread minyard
From: Corey Minyard Signed-off-by: Corey Minyard Cc: Paolo Bonzini Cc: "Michael S . Tsirkin" Cc: Dr. David Alan Gilbert --- hw/i2c/smbus.c | 14 ++ include/hw/i2c/smbus.h | 18 +++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PULL 2/7] memory, exec: switch file ram allocation functions to 'flags' parameters

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He As more flag parameters besides the existing 'share' are going to be added to following functions memory_region_init_ram_from_file qemu_ram_alloc_from_fd qemu_ram_alloc_from_file let's switch them to use the 'flags' parameters so as to ease future flag additions. The existing

[Qemu-devel] [PATCH v2 01/10] i2c:pm_smbus: Clean up some style issues

2018-08-20 Thread minyard
From: Corey Minyard Fix some spacing issues, remove extraneous comments, add some defines instead of hard-coding numbers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c | 58 --- 1 file changed,

[Qemu-devel] [PULL 6/7] migration/ram: Add check and info message to nvdimm post copy.

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He The nvdimm kind memory does not support post copy now. We disable post copy if we have nvdimm memory and print some log hint to user. Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[Qemu-devel] [PULL 1/7] memory, exec: Expose all memory block related flags.

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He We need to use these flags in other files rather than just in exec.c, For example, RAM_SHARED should be used when create a ram block from file. We expose them the exec/memory.h Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov Reviewed-by:

[Qemu-devel] [PATCH v2 04/10] i2c:pm_smbus: Add block transfer capability

2018-08-20 Thread minyard
From: Corey Minyard There was no block transfer code in pm_smbus.c, and it is needed for some devices. So add it. This adds both byte-by-byte block transfers and buffered block transfers. Signed-off-by: Corey Minyard Cc: Michael S. Tsirkin Cc: Paolo Bonzini --- hw/i2c/pm_smbus.c |

[Qemu-devel] [PULL 0/7] pc: fixes

2018-08-20 Thread Michael S. Tsirkin
The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

[Qemu-devel] [PULL 5/7] mem/nvdimm: ensure write persistence to PMEM in label emulation

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He Guest writes to vNVDIMM labels are intercepted and performed on the backend by QEMU. When the backend is a real persistent memort, QEMU needs to take proper operations to ensure its write persistence on the persistent memory. Otherwise, a host power failure may result in the loss

[Qemu-devel] [PULL 3/7] configure: add libpmem support

2018-08-20 Thread Michael S. Tsirkin
From: Junyan He Add a pair of configure options --{enable,disable}-libpmem to control whether QEMU is compiled with PMDK libpmem [1]. QEMU may write to the host persistent memory (e.g. in vNVDIMM label emulation and live migration), so it must take the proper operations to ensure the

  1   2   3   4   >