[Qemu-devel] [PATCH v4 2/4] qemu-thread: introduce qemu-thread-common.h

2018-04-22 Thread Peter Xu
Introduce some hooks for the shared part of qemu thread between POSIX and Windows implementations. Note that in qemu_mutex_unlock_impl() we moved the call before unlock operation which should make more sense. And we don't need qemu_mutex_post_unlock() hook. Currently the hooks only calls the

[Qemu-devel] [PATCH v4 3/4] QemuMutex: support --enable-debug-mutex

2018-04-22 Thread Peter Xu
We have had some tracing tools for mutex but it's not easy to use them for e.g. dead locks. Let's provide "--enable-debug-mutex" parameter when configure to allow QemuMutex to store the last owner that took specific lock. It will be easy to use this tool to debug deadlocks since we can directly

[Qemu-devel] [PATCH v4 1/4] tests/atomic_add-bench: add -m option to use mutexes

2018-04-22 Thread Peter Xu
From: "Emilio G. Cota" This allows us to use atomic-add-bench as a microbenchmark for evaluating qemu_mutex_lock's performance. Signed-off-by: Emilio G. Cota [cherry picked from https://github.com/cota/qemu/commit/f04f34df] Signed-off-by: Peter Xu

[Qemu-devel] [PATCH v4 4/4] configure: enable debug-mutex if debug enabled

2018-04-22 Thread Peter Xu
Signed-off-by: Peter Xu --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index a80af735b2..87453edd88 100755 --- a/configure +++ b/configure @@ -1005,6 +1005,7 @@ for opt do --enable-debug) # Enable debugging options that aren't

[Qemu-devel] [PATCH v4 0/4] qemu-thread: support --enable-debug-mutex

2018-04-22 Thread Peter Xu
v4: - cherrypick Emilio's patch to add "-m" parameter to atomic_add-bench tool. - use inline functions [Emilio] Micro benchmark result on "taskset -c 0 atomic_add-bench -m": |+-+| || with --enable-debug | without --enable-debug |

Re: [Qemu-devel] [PATCH v3 1/3] qemu-thread: introduce qemu-thread-common.[ch]

2018-04-22 Thread Peter Xu
On Fri, Apr 20, 2018 at 01:07:34PM -0400, Emilio G. Cota wrote: > On Fri, Apr 20, 2018 at 12:42:10 +0800, Peter Xu wrote: > > Put all the shared qemu-thread implementations into these files. The > > header should be internal to qemu-thread but not for qemu-thread users. > > > > Introduce some

[Qemu-devel] [PATCH] hw/arm/virt: Add linux,pci-domain property

2018-04-22 Thread Jan Kiszka
From: Jan Kiszka This allows to pin the host controller in the Linux PCI domain space. Linux requires that property to be available consistently or not at all, in which case the domain number becomes unstable on additions/removals. Adding it here won't make a difference

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-22 Thread Pankaj Gupta
> > > > Hello, > > > > This is good re-factoring and needed for 'virtio-pmem' as well to > > reserve memory region in system address space. > > > > I have tested this code with virtio-pmem and its working fine. Thank you > > for the work. > > > > I just have a small suggestion : when

[Qemu-devel] [Bug 1254443] Re: Periodic mode of LAPIC doesn't fire interrupts when using kvm

2018-04-22 Thread Nils Asmussen
I don't have the latest version yet, but I just tested it with 2.3.0 and it works. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1254443 Title: Periodic mode of LAPIC doesn't fire interrupts when

Re: [Qemu-devel] [PATCH v3 2/3] machine: make MemoryHotplugState accessible via the machine

2018-04-22 Thread David Gibson
On Fri, Apr 20, 2018 at 02:34:55PM +0200, David Hildenbrand wrote: > Let's allow to query the MemoryHotplugState from the machine. > > This allows us to generically detect if a certain machine has support > for memory devices, and to generically manage it (find free address > range, plug/unplug a

Re: [Qemu-devel] [PATCH v3 01/35] ppc/xive: introduce a XIVE interrupt source model

2018-04-22 Thread David Gibson
On Fri, Apr 20, 2018 at 10:27:21AM +0200, Cédric Le Goater wrote: > On 04/20/2018 09:10 AM, David Gibson wrote: > > On Thu, Apr 19, 2018 at 02:42:57PM +0200, Cédric Le Goater wrote: > >> Each XIVE interrupt source is associated with a two bit state machine > >> called an Event State Buffer (ESB) :

Re: [Qemu-devel] unknown keycodes

2018-04-22 Thread Thomas Huth
On 21.04.2018 11:27, Mike R wrote: > (qemu) unknown keycodes `empty+aliases(qwerty)’, please report to > qemu-devel@nongnu.org > > reported. Well, please also report: - Which version of QEMU are you using? - Which keyboard layout do you have on your physical keyboard? - Which key did you

Re: [Qemu-devel] [RFC 01/24] qemu.py: Introduce _create_console() method

2018-04-22 Thread Thomas Huth
On 20.04.2018 21:56, Eduardo Habkost wrote: > On Fri, Apr 20, 2018 at 03:19:28PM -0300, Eduardo Habkost wrote: >> From: Amador Pahim >> >> This patch adds the QEMUMachine._create_console() method, which >> returns a list with the chardev console device arguments to be >> used

Re: [Qemu-devel] [Bug 1520730] Re: 32-bit editors vim/rhide broken keyboard handling in freedos 1.1 and ms-dos 6.22

2018-04-22 Thread Thomas Huth
On 20.04.2018 19:33, Jason Wagner wrote: > I'm seeing this issue in version 2.12.0-rc4. I wasn't seeing this as > much in earlier 2.11, but its a major pain in the current version. Any chance you could bi-sect this issue to find out which commit exactly is causing the problem? Thomas

Re: [Qemu-devel] [PATCH] loader: Fix misaligned member access

2018-04-22 Thread David Gibson
On Sun, Apr 22, 2018 at 11:41:20AM +0100, Peter Maydell wrote: > On 21 April 2018 at 22:16, Philippe Mathieu-Daudé wrote: > > This fixes the following ASan warning: > > > > $ mips64el-softmmu/qemu-system-mips64el -M boston -kernel vmlinux.gz.itb > > -nographic > >

Re: [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps

2018-04-22 Thread Simon Marchi
On 2018-04-09 10:08 PM, Stefan Hajnoczi wrote: > I wonder what the point of select-frame is then... > > I have CCed the GDB mailing list. Maybe someone can help us. Context: > > QEMU implements coroutines using jmpbuf. We'd like to print coroutine > call stacks in GDB and have a script that

Re: [Qemu-devel] [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-22 Thread David Gibson
On Fri, Apr 20, 2018 at 10:34:57AM +0100, Daniel P. Berrangé wrote: > On Fri, Apr 20, 2018 at 10:11:08AM +0200, Laszlo Ersek wrote: > > On 04/19/18 11:12, Daniel P. Berrangé wrote: > > > On Thu, Apr 19, 2018 at 10:39:32AM +0200, Laszlo Ersek wrote: > > >> On 04/19/18 09:56, Daniel P. Berrangé

Re: [Qemu-devel] MTTCG External Halt

2018-04-22 Thread Philippe Mathieu-Daudé
> On Fri, Feb 2, 2018 at 1:49 PM, Alistair Francis > wrote: >> On Fri, Feb 2, 2018 at 12:37 PM, Alex Bennée wrote: >>> >>> Alistair Francis writes: >>> On Thu, Feb 1, 2018 at 9:13 AM, Alistair Francis

Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

2018-04-22 Thread Richard Henderson
On 04/19/2018 03:58 AM, Alex Bennée wrote: > What would be really > helpful is if the respective maintainers could encode their EXACT > STEPS for building their cross compilers into some docker recipes. I've just re-built my alphaev67 cross-environment and recorded everything. Since the script

Re: [Qemu-devel] [PATCH 10/18] target/mips: convert to TranslatorOps

2018-04-22 Thread Richard Henderson
On 04/20/2018 08:55 AM, Emilio G. Cota wrote: > - Added an assert in translate_insn, before exiting due to an exception, > to make sure that is_jmp is set to DISAS_EXCP (the exception generation > function always sets it.) Comment is out of date -- s/EXCP/NORETURN/. r~

Re: [Qemu-devel] [PATCH 07/18] target/mips: convert to DisasJumpType

2018-04-22 Thread Richard Henderson
On 04/20/2018 08:55 AM, Emilio G. Cota wrote: > +#define DISAS_STOP DISAS_TARGET_0 > +#define DISAS_EXCP DISAS_TARGET_1 > +#define DISAS_EXIT DISAS_TARGET_2 DISAS_EXCP should be unused and therefore not exist. > @@ -8301,7 +8298,7 @@ static void gen_cp0 (CPUMIPSState *env,

Re: [Qemu-devel] [PATCH 06/18] target/mips: use lookup_and_goto_ptr on BS_STOP

2018-04-22 Thread Richard Henderson
On 04/20/2018 08:55 AM, Emilio G. Cota wrote: > The TB after BS_STOP is not fixed (e.g. helper_mtc0_hwrena > changes hflags, which ends up changing the TB flags via > cpu_get_tb_cpu_state). This requires a full lookup (i.e. > with flags) via lookup_and_goto_ptr instead of gen_goto_tb, > since the

Re: [Qemu-devel] [PATCH] elf-loader: Avoid calling qsort(NULL, 0, ...) call

2018-04-22 Thread Richard Henderson
On 04/21/2018 01:21 PM, Philippe Mathieu-Daudé wrote: > This fixes the following ASan warning: > > $ qemu-system-xtensa -M kc705 -m 128M -semihosting -nographic -monitor null > -kernel Image.elf > include/hw/elf_ops.h:179:5: runtime error: null pointer passed as argument > 1, which is

Re: [Qemu-devel] [PATCH v4 0/5] s390x: vfio-ap: guest dedicated crypto adapters

2018-04-22 Thread Tony Krowiak
On 04/19/2018 07:51 AM, Cornelia Huck wrote: On Sun, 15 Apr 2018 15:07:19 -0400 Tony Krowiak wrote: default-configs/s390x-softmmu.mak |1 + docs/vfio-ap.txt | 649 + hw/s390x/Makefile.objs|

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/22/2018 12:01 PM, Halil Pasic wrote: On 04/22/2018 05:43 PM, Tony Krowiak wrote: +FEAT_INIT_MISC("ap", "AP facilities installed"), Why plural ('facilities')? Would not s/facilities/instructions be more end-user friendly? It's a matter of opinion. I prefer facilities because AP

Re: [Qemu-devel] [PATCH v4 4/5] s390x/vfio: ap: Introduce VFIO AP device

2018-04-22 Thread Tony Krowiak
On 04/19/2018 08:03 AM, Cornelia Huck wrote: On Sun, 15 Apr 2018 15:07:23 -0400 Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Halil Pasic
On 04/22/2018 05:43 PM, Tony Krowiak wrote: +FEAT_INIT_MISC("ap", "AP facilities installed"), Why plural ('facilities')? Would not s/facilities/instructions be more end-user friendly? It's a matter of opinion. I prefer facilities because AP is comprised of not  only instructions, but 

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Halil Pasic
On 04/22/2018 05:52 PM, Tony Krowiak wrote: +    FEAT_INIT("apqci", S390_FEAT_TYPE_STFL, 12, "Query AP Configuration  facility"), Why did you change this form qci to apqci. Too may people found the qci good? I changed it by request and I thought it made sense to do so. Maybe we should 

Re: [Qemu-devel] [PATCH v4 4/5] s390x/vfio: ap: Introduce VFIO AP device

2018-04-22 Thread Tony Krowiak
On 04/18/2018 05:11 AM, Pierre Morel wrote: On 15/04/2018 21:07, Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/18/2018 07:03 AM, David Hildenbrand wrote: On 18.04.2018 12:55, Halil Pasic wrote: On 04/15/2018 09:07 PM, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. [..] diff --git a/target/s390x/cpu_features.c

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/18/2018 06:55 AM, Halil Pasic wrote: On 04/15/2018 09:07 PM, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. [..] diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/18/2018 06:55 AM, Halil Pasic wrote: On 04/15/2018 09:07 PM, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. [..] diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/18/2018 04:59 AM, David Hildenbrand wrote: On 18.04.2018 09:40, Cornelia Huck wrote: On Tue, 17 Apr 2018 20:21:31 +0200 Christian Borntraeger wrote: On 04/16/2018 05:44 PM, David Hildenbrand wrote: diff --git a/target/s390x/gen-features.c

Re: [Qemu-devel] [PATCH v4 3/5] s390x/cpumodel: Set up CPU model for AP device support

2018-04-22 Thread Tony Krowiak
On 04/18/2018 03:40 AM, Cornelia Huck wrote: On Tue, 17 Apr 2018 20:21:31 +0200 Christian Borntraeger wrote: On 04/16/2018 05:44 PM, David Hildenbrand wrote: diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 0cdbc15..0d5b0f7 100644

Re: [Qemu-devel] [PATCH v4 2/5] s390x/ap: base Adjunct Processor (AP) object

2018-04-22 Thread Tony Krowiak
On 04/18/2018 05:16 AM, Pierre Morel wrote: On 15/04/2018 21:07, Tony Krowiak wrote: This patch introduces the base object for an AP device. Signed-off-by: Tony Krowiak --- hw/s390x/Makefile.objs |1 + hw/s390x/ap-device.c | 39

Re: [Qemu-devel] [PATCH v3 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-22 Thread David Gibson
On Sun, Apr 22, 2018 at 10:21:34AM +0200, David Hildenbrand wrote: > On 22.04.2018 06:26, David Gibson wrote: > > On Fri, Apr 20, 2018 at 02:34:54PM +0200, David Hildenbrand wrote: > >> On the qmp level, we already have the concept of memory devices: > >> "query-memory-devices" > >> Right now,

Re: [Qemu-devel] [PATCH] loader: Fix misaligned member access

2018-04-22 Thread Peter Maydell
On 21 April 2018 at 22:16, Philippe Mathieu-Daudé wrote: > This fixes the following ASan warning: > > $ mips64el-softmmu/qemu-system-mips64el -M boston -kernel vmlinux.gz.itb > -nographic > hw/core/loader-fit.c:108:17: runtime error: load of misaligned address >

Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command

2018-04-22 Thread Simon Ruderich
On Tue, Apr 17, 2018 at 04:18:43PM -0500, Eric Blake wrote: > Focusing on just the interface: > >> +++ b/qapi/misc.json >> @@ -1185,6 +1185,26 @@ >> { 'command': 'pmemsave', >>'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } >> >> +## >> +# @pmemload: >> +# >> +# Load a portion of

Re: [Qemu-devel] [PATCH v2 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave

2018-04-22 Thread Simon Ruderich
On Tue, Apr 17, 2018 at 03:56:58PM -0500, Eric Blake wrote: > On 04/12/2018 07:50 AM, Simon Ruderich wrote: >> Signed-off-by: Simon Ruderich >> --- >> cpus.c | 6 -- >> 1 file changed, 4 insertions(+), 2 deletions(-) > > Reviewed-by: Eric Blake > >

Re: [Qemu-devel] [PATCH v3 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-22 Thread David Hildenbrand
>> +typedef struct MemoryDeviceClass { >> +InterfaceClass parent_class; >> + >> +uint64_t (*get_addr)(MemoryDeviceState *md); >> +uint64_t (*get_plugged_size)(MemoryDeviceState *md, Error **errp); >> +uint64_t (*get_region_size)(MemoryDeviceState *md, Error **errp); > > Just not

Re: [Qemu-devel] [PATCH v3 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-22 Thread David Hildenbrand
On 22.04.2018 06:26, David Gibson wrote: > On Fri, Apr 20, 2018 at 02:34:54PM +0200, David Hildenbrand wrote: >> On the qmp level, we already have the concept of memory devices: >> "query-memory-devices" >> Right now, we only support NVDIMM and PCDIMM. >> >> We want to map other devices later

Re: [Qemu-devel] [PATCH v3 0/3] pc-dimm: factor out MemoryDevice

2018-04-22 Thread David Hildenbrand
On 22.04.2018 06:58, Pankaj Gupta wrote: > > Hello, > > This is good re-factoring and needed for 'virtio-pmem' as well to > reserve memory region in system address space. > > I have tested this code with virtio-pmem and its working fine. Thank you > for the work. > > I just have a small