Re: [Qemu-devel] [PATCH RFC] s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

2018-04-05 Thread David Hildenbrand
On 05.04.2018 09:53, Christian Borntraeger wrote: > > > On 03/26/2018 11:20 AM, David Hildenbrand wrote: >> Manually having to use cpu_synchronize_state() is error prone. I don't >> think that the performance impact is that huge if we simply synchronize >> the state on every kvm_arch_handle_exit(

Re: [Qemu-devel] [PATCH RFC] s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

2018-04-05 Thread Cornelia Huck
On Thu, 5 Apr 2018 09:53:45 +0200 Christian Borntraeger wrote: > On 03/26/2018 11:20 AM, David Hildenbrand wrote: > FWIW, I think your patch even fixes a bug: > > --- snip > static int handle_diag(S390CPU *cpu, struct kvm_run *run, uint32_t ipb) > { > int r = 0; > uint16_t func_cod

[Qemu-devel] [Bug 1761401] [NEW] ARM/Neon: vcvt rounding error

2018-04-05 Thread Christophe Lyon
Public bug reported: Hello, While using QEMU commit 47d3b60858d90ac8a0cc3a72af7f95c96781125a (March 28, 2018), I've noticed failures in one of the GCC ARM/Neon tests. The test passes on hardware, and with QEMU-2.11.0, so it looks like a recent regression. The test builds a vector of 4 float32 wi

Re: [Qemu-devel] [PATCH RFC] s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

2018-04-05 Thread Thomas Huth
On 05.04.2018 09:53, Christian Borntraeger wrote: > > > On 03/26/2018 11:20 AM, David Hildenbrand wrote: >> Manually having to use cpu_synchronize_state() is error prone. I don't >> think that the performance impact is that huge if we simply synchronize >> the state on every kvm_arch_handle_exit(

Re: [Qemu-devel] [RFC PATCH v2 4/4] memory: Add memory_region_set_priority()

2018-04-05 Thread KONRAD Frederic
On 04/05/2018 03:22 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- Sadly I'm missing something, this does not work. Hmmm is that supposed to work dynamically? If so I think you might need to call memory_region_update_container_subregions(..) because it will actu

[Qemu-devel] [Bug 1740219] Re: static linux-user ARM emulation has several-second startup time

2018-04-05 Thread ChristianEhrhardt
For Ubuntu: PPA: https://launchpad.net/~ci-train-ppa- service/+archive/ubuntu/3225 Regression test against ppa looked good tonight. There are new changes which I need to add for two more bugs. But testing from the ppa is ok right now already. @Luke: Please test against this PPA, as I want to ens

Re: [Qemu-devel] [PATCH v2] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 03:41, Max Filippov a écrit : > preadv/pwritev accept low and high parts of file offset in two separate > parameters. When host bitness doesn't match guest bitness these parts > must be appropriately recombined. > Introduce target_low_high_to_host_low_high that does this recombinati

[Qemu-devel] [PATCH for-2.13 v5 04/11] hmp: disable monitor in preconfig state

2018-04-05 Thread Igor Mammedov
Ban it for now, if someone would need it to work early, one would have to implement checks if HMP command is valid at preconfig state. Signed-off-by: Igor Mammedov --- v5: * add 'use QMP instead" to error message, suggesting user the right interface to use v4: * v3 was only printing error

[Qemu-devel] [PATCH for-2.13 v5 01/11] numa: postpone options post-processing till machine_run_board_init()

2018-04-05 Thread Igor Mammedov
in preparation for numa options to being handled via QMP before machine_run_board_init(), move final numa configuration checks and processing to machine_run_board_init() so it could take into account both CLI (via parse_numa_opts()) and QMP input Signed-off-by: Igor Mammedov Reviewed-by: Eduardo

[Qemu-devel] [PATCH for-2.13 v5 05/11] qapi: introduce new cmd option "allowed-in-preconfig"

2018-04-05 Thread Igor Mammedov
New option will be used to allow commands, which are prepared/need to run, during preconfig state. Other commands that should be able to run in preconfig state, should be ameded to not expect machine in initialized state or deal with it. For compatibility reasons, commands that don't use new flag

[Qemu-devel] [PATCH for-2.13 v5 00/11] enable numa configuration before machine_init() from QMP

2018-04-05 Thread Igor Mammedov
v4->v5: * rebase on top of OOB changes that's now in master * s/qobject_to_qdict(/qobject_to(QDict,/ * s/-preconfig/--preconfig/ * s/2.12/2.13/ * s/parse_NumaOptions/set_numa_options/ * drop if (err) guard around error_propagate() * move QCO_ALLOWED_IN_PRECONFIG and do_qmp_dispatch()

[Qemu-devel] [PATCH for-2.13 v5 08/11] tests: extend qmp test with preconfig checks

2018-04-05 Thread Igor Mammedov
Add permission checks for commands at 'preconfig' stage. Signed-off-by: Igor Mammedov --- v5: * s/-preconfig/--preconfig/ v4: * s/is_err()/qmp_rsp_is_err()/ * return true even if 'error' doesn't contain 'desc' (Eric Blake ) --- tests/qmp-test.c | 44

[Qemu-devel] [PATCH for-2.13 v5 07/11] tests: add allowed-in-preconfig-test for qapi-schema

2018-04-05 Thread Igor Mammedov
make sure the QAPISchema can parse allowed-in-preconfig correctly Signed-off-by: Igor Mammedov --- tests/Makefile.include | 1 + tests/qapi-schema/allowed-in-preconfig-test.err | 1 + tests/qapi-schema/allowed-in-preconfig-test.exit | 1 + tests/qapi-schema/allowed-in-

[Qemu-devel] [PATCH for-2.13 v5 06/11] tests: let qapi-schema tests detect allowed-in-preconfig

2018-04-05 Thread Igor Mammedov
use new allowed-in-preconfig parameter in tests. Signed-off-by: Igor Mammedov --- tests/qapi-schema/doc-good.out | 4 ++-- tests/qapi-schema/ident-with-escape.out | 2 +- tests/qapi-schema/indented-expr.out | 4 ++-- tests/qapi-schema/qapi-schema-test.out | 20 ++

[Qemu-devel] [PATCH for-2.13 v5 02/11] numa: split out NumaOptions parsing into set_numa_options()

2018-04-05 Thread Igor Mammedov
it will allow to reuse set_numa_options() for parsing configuration commands received via QMP interface Signed-off-by: Igor Mammedov --- v5: - (Eduardo Habkost ) * drop if (err) guard around error_propagate() * s/parse_NumaOptions/set_numa_options/ --- include/sysemu/numa.h | 1 + num

[Qemu-devel] [PATCH for-2.13 v5 09/11] qmp: permit query-hotpluggable-cpus in preconfig state

2018-04-05 Thread Igor Mammedov
it will allow mgmt to query possible CPUs, which depends on used machine(version)/-smp options, without restarting QEMU and use results to configure numa mapping or adding CPUs with device_add* later. Signed-off-by: Igor Mammedov PS: *) device_add is not allowed to run at preconfig in this serie

[Qemu-devel] [PATCH for-2.13 v5 03/11] cli: add --preconfig option

2018-04-05 Thread Igor Mammedov
This option allows pausing QEMU in the new RUN_STATE_PRECONFIG state, allowing the configuration of QEMU from QMP before the machine jumps into board initialization code of machine_run_board_init() The intent is to allow management to query machine state and additionally configure it using previou

[Qemu-devel] [PATCH for-2.13 v5 10/11] qmp: add set-numa-node command

2018-04-05 Thread Igor Mammedov
Command is allowed to run only in preconfig stage and will allow to configure numa mapping for CPUs depending on possible CPUs layout (query-hotpluggable-cpus) for given machine instance. Signed-off-by: Igor Mammedov --- numa.c | 5 + qapi/misc.json | 14 ++ 2 files chan

[Qemu-devel] [PATCH for-2.13 v5 11/11] tests: functional tests for QMP command set-numa-node

2018-04-05 Thread Igor Mammedov
* start QEMU with 2 unmapped cpus, * while in preconfig state * add 2 numa nodes * assign cpus to them * exit preconfig and in running state check that cpus are mapped correctly. Signed-off-by: Igor Mammedov --- v5: * s/qobject_to_qdict(/qobject_to(QDict,/ * s/-preconfig/--preco

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 02:22, Philippe Mathieu-Daudé wrote: > If an user creates a RAM region smaller than TARGET_PAGE_SIZE, > this region will be handled as a subpage. > While the subpage behavior can be noticed by an experienced QEMU > developper, it might takes hours to a novice to figure it out. >

[Qemu-devel] [PATCH] hw/sparc64/sun4u: Fix introspection by converting prom instance_init to realize

2018-04-05 Thread Thomas Huth
The instance_init function of devices should always succeed to be able to introspect the device. However, the instance_init function of the "openprom" device can currently fail, for example like this: $ echo "{'execute':'qmp_capabilities'}"\ "{'execute':'device-list-properties',"\ "

Re: [Qemu-devel] [PATCH 2/5] tests: more thorough test of ds1338

2018-04-05 Thread Thomas Huth
On 24.03.2018 20:39, Michael Davidsaver wrote: >> On 02/20/2018 09:44 AM, Michael Davidsaver wrote: >>> On 02/18/2018 11:39 PM, Thomas Huth wrote: > ... >>> That magic (together with patch 1/5) is IMHO a little bit ugly. I've hit >>> the same problem with the m48t59 test recently, and I solved it b

Re: [Qemu-devel] [PATCH] hw/arm: Allow manually specified /psci node

2018-04-05 Thread Peter Maydell
On 2 April 2018 at 21:56, Andrey Smirnov wrote: > Change the code to avoid exiting QEMU if user provided DTB contains > manually specified /psci node and skip any /psci related fixups > instead. > > Fixes: 4cbca7d9b4 ("hw/arm: Move virt's PSCI DT fixup code to > arm/boot.c") > > Cc: Peter Maydell

[Qemu-devel] [PATCH] hw/sparc/sun4m: Fix problems with device introspection

2018-04-05 Thread Thomas Huth
Several devices of the sun4m machines are using &error_fatal in their instance_init function and thus can cause QEMU to abort unexpectedly: $ echo "{'execute':'qmp_capabilities'}"\ "{'execute':'device-list-properties',"\ " 'arguments':{'typename':'openprom'}}" \ | sparc-softmm

[Qemu-devel] [RFC 0/2] kvm "fake DAX" device flushing

2018-04-05 Thread Pankaj Gupta
We are sharing RFC version of 'fake DAX' flushing interface for feedback. This is still work in progress and not yet ready for merging. Prototype implements two major parts: - Qemu virtio-pmem device It exposes a persistent memory range to KVM guest which at host side is file backed memory an

[Qemu-devel] [RFC 1/2] kvm: add virtio pmem driver

2018-04-05 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on 'nvdimm_bus'. It also creates a 'nd_region' object with the persistent memory range information so that existing 'nvdimm/pmem' driver can allo

[Qemu-devel] [RFC 2/2] pmem: device flush over VIRTIO

2018-04-05 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO when 'ND_REGION_VIRTIO' flag is set on nd_negion. This flag is set by 'virtio-pmem' driver for virtio flush operation. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/region_devs.c | 7 +++ 1 file changed, 7

[Qemu-devel] [RFC] qemu: Add virtio pmem device

2018-04-05 Thread Pankaj Gupta
This patch adds virtio-pmem Qemu device. This device configures memory address range information with file backend type. It acts like persistent memory device for KVM guest. It presents the memory address range to virtio-pmem driver over virtio channel and does the block flush whenever there

Re: [Qemu-devel] [PATCH v2] hw/arm/integratorcp: Don't do things that could be fatal in the instance_init

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 06:34, Thomas Huth wrote: > An instance_init function must not fail - and might be called multiple times, > e.g. during device introspection with the 'device-list-properties' QMP > command. Since the integratorcm device ignores this rule, QEMU currently > aborts in this case (th

Re: [Qemu-devel] [RFC] qemu: Add virtio pmem device

2018-04-05 Thread David Hildenbrand
On 05.04.2018 12:48, Pankaj Gupta wrote: > This patch adds virtio-pmem Qemu device. > > This device configures memory address range information with file > backend type. It acts like persistent memory device for KVM guest. > It presents the memory address range to virtio-pmem driver over > vi

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] scsi: add block job opblockers for scsi-block

2018-04-05 Thread Paolo Bonzini
On 12/03/2018 12:58, Kevin Wolf wrote: >> - users of dirty bitmaps would call use perm/shared_perm as in your >> message above >> >> - dirty bitmaps creation calls bdrv_get_cumulative_perm (which should >> now become public) and checks that it doesn't have BLK_PERM_BYPASS in >> shared_perm > > My

Re: [Qemu-devel] [PATCH for-2.13 09/13] target/ppc: Move 1T segment and AMR options to PPCHash64Options

2018-04-05 Thread Greg Kurz
On Thu, 5 Apr 2018 12:14:33 +1000 David Gibson wrote: > Currently env->mmu_model is a bit of an unholy mess of an enum of distinct > MMU types, with various flag bits as well. This makes which bits of the > field should be compared pretty confusing. > > Make a start on cleaning that up by movi

Re: [Qemu-devel] [RFC] qemu: Add virtio pmem device

2018-04-05 Thread Pankaj Gupta
Hi David, > > This patch adds virtio-pmem Qemu device. > > > > This device configures memory address range information with file > > backend type. It acts like persistent memory device for KVM guest. > > It presents the memory address range to virtio-pmem driver over > > virtio channel and

Re: [Qemu-devel] [RFC] qemu: Add virtio pmem device

2018-04-05 Thread David Hildenbrand
>> >> So right now you're just using some memdev for testing. > > yes. > >> >> I assume that the memory region we will provide to the guest will be a >> simple memory mapped raw file. Dirty tracking (using the kvm slot) will >> be used to detect which blocks actually changed and have to be flush

Re: [Qemu-devel] [PATCH v6 1/1] s390x/sclp: extend SCLP event masks to 64 bits

2018-04-05 Thread Cornelia Huck
On Thu, 8 Mar 2018 12:04:29 +0100 Claudio Imbrenda wrote: > Extend the SCLP event masks to 64 bits. > > Notice that using any of the new bits results in a state that cannot be > migrated to an older version. > > Signed-off-by: Claudio Imbrenda > --- > hw/s390x/event-facility.c | 50

Re: [Qemu-devel] [PATCH v2] target-arm: Check undefined opcodes for SWP in A32 decoder

2018-04-05 Thread Peter Maydell
On 23 March 2018 at 21:43, Onur Sahin wrote: > Thanks for the feedback Peter. Removing the redundant check on bit > 23 and adding checks for the "should be" bits as well (bits [11:8]). > > The following patch should make sure we are not treating > architecturally Undefined instructions as a SWP, b

Re: [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler context

2018-04-05 Thread Stefan Hajnoczi
On Wed, Apr 04, 2018 at 10:07:34AM -0500, Eric Blake wrote: > On 04/04/2018 09:22 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 03, 2018 at 01:01:15PM +0800, Peter Xu wrote: > >> Eric Auger reported the problem days ago that OOB broke ARM when running > >> with libvirt: > >> > >> http://lists.gnu.org/

Re: [Qemu-devel] [Qemu-arm] [PATCH for-2.12 0/2] bcm2835_sdhost: fix interrupt handling

2018-04-05 Thread Peter Maydell
On 4 April 2018 at 15:25, Gerd Hoffmann wrote: > On Wed, Apr 04, 2018 at 11:18:23AM +0100, Peter Maydell wrote: >> Ping for code review, please? It would be nice if our 'raspi3' >> model for 2.12 was one we could say actually booted a known >> Linux image... > > The Fedora 27 image kernel (aarch64

Re: [Qemu-devel] [PATCH] sys_membarrier: fix up include directives

2018-04-05 Thread Paolo Bonzini
On 29/03/2018 17:10, Bruce Rogers wrote: > Our rule right now is to use <> for external headers only. > util/sys_membarrier.c violates that. Fix it up. > > Signed-off-by: Bruce Rogers > --- > util/sys_membarrier.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/ut

Re: [Qemu-devel] [PATCH RFC v3 for-2.12?] scripts/checkpatch.pl: Bug fix

2018-04-05 Thread Paolo Bonzini
On 04/04/2018 20:28, Eric Blake wrote: > Perl is not my strongest point, so take my review with a grain of salt. > However, since I already have a couple of other random patches that may > still be appropriate for -rc3, I can pick this up in a pull request if I > get at least one more review (and i

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] scsi: add block job opblockers for scsi-block

2018-04-05 Thread Kevin Wolf
Am 05.04.2018 um 13:59 hat Paolo Bonzini geschrieben: > On 12/03/2018 12:58, Kevin Wolf wrote: > >> - users of dirty bitmaps would call use perm/shared_perm as in your > >> message above > >> > >> - dirty bitmaps creation calls bdrv_get_cumulative_perm (which should > >> now become public) and chec

Re: [Qemu-devel] [PATCH v2] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
On Wed, Apr 4, 2018 at 8:43 PM, Richard Henderson wrote: > On 04/05/2018 11:41 AM, Max Filippov wrote: >> +static void target_low_high_to_host_low_high(abi_ulong tlow, >> + abi_ulong thigh, >> + unsigned long *

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread Philippe Mathieu-Daudé
On 04/05/2018 06:27 AM, Peter Maydell wrote: > On 5 April 2018 at 02:22, Philippe Mathieu-Daudé wrote: >> If an user creates a RAM region smaller than TARGET_PAGE_SIZE, >> this region will be handled as a subpage. >> While the subpage behavior can be noticed by an experienced QEMU >> developper, i

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 0/8] qemu-img convert with copy offloading

2018-04-05 Thread Stefan Hajnoczi
On Wed, Apr 04, 2018 at 09:49:23PM +0800, Fam Zheng wrote: > On Wed, 04/04 14:23, Stefan Hajnoczi wrote: > > On Thu, Mar 29, 2018 at 07:09:06PM +0800, Fam Zheng wrote: > > > [Posting a preview RFC for the general idea discussion and internal API > > > review. > > > Libiscsi support is being worked

Re: [Qemu-devel] [PATCH for-2.12] hw/arm/allwinner-a10: Do not use nd_table in instance_init function

2018-04-05 Thread Peter Maydell
On 4 April 2018 at 18:20, Thomas Huth wrote: > The instance_init function of a device can be called at any time, even > if the device is not going to be used (i.e. not going to be realized). > So a instance_init function must not do things that could cause QEMU > to exit, like calling qemu_check_n

Re: [Qemu-devel] [PATCH for-2.12] hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 07:09, Thomas Huth wrote: > QEMU currently exits unexpectedly when trying to introspect the fsl-imx6 > and fsl-imx7 devices on systems with many SMP CPUs: > > $ echo "{'execute':'qmp_capabilities'}"\ >"{'execute':'device-list-properties',"\ >" 'arguments':{'typen

Re: [Qemu-devel] [PATCH v2] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
On Thu, Apr 5, 2018 at 2:03 AM, Laurent Vivier wrote: > Did you try to use the regpairs_aligned() and target_offset64() > functions as it is done for pread64(), pwrite64(), fadvise64(),... ? My understanding is that if the syscalls had single parameter that took two registers then it'd be a place

Re: [Qemu-devel] [PATCH for-2.13 13/13] target/ppc: Fold slb_nr into PPCHash64Options

2018-04-05 Thread Greg Kurz
On Thu, 5 Apr 2018 12:14:37 +1000 David Gibson wrote: > The env->slb_nr field gives the size of the SLB (Segment Lookaside Buffer). > This is another static-after-initialization parameter of the specific > version of the 64-bit hash MMU in the CPU. So, this patch folds the field > into PPCHash6

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 13:53, Philippe Mathieu-Daudé wrote: > On 04/05/2018 06:27 AM, Peter Maydell wrote: >> On 5 April 2018 at 02:22, Philippe Mathieu-Daudé wrote: >>> If an user creates a RAM region smaller than TARGET_PAGE_SIZE, >>> this region will be handled as a subpage. >>> While the subpage

[Qemu-devel] [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option

2018-04-05 Thread John Thomson
libusb-1.0.22 marked libusb_set_debug deprecated it is replaced with libusb_set_option(libusb_context, LIBUSB_OPTION_LOG_LEVEL, libusb_log_level); details here: https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168 Warning here: CC hw/usb/host-libusb.o /builds/

Re: [Qemu-devel] [PATCH for-2.13 13/13] target/ppc: Fold slb_nr into PPCHash64Options

2018-04-05 Thread Cornelia Huck
On Thu, 5 Apr 2018 15:12:55 +0200 Greg Kurz wrote: > On Thu, 5 Apr 2018 12:14:37 +1000 > David Gibson wrote: > > @@ -4000,7 +4000,12 @@ DEFINE_SPAPR_MACHINE(2_13, "2.13", true); > > * pseries-2.12 > > */ > > #define SPAPR_COMPAT_2_12 \ > > -

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread Philippe Mathieu-Daudé
On 04/05/2018 10:20 AM, Peter Maydell wrote: > On 5 April 2018 at 13:53, Philippe Mathieu-Daudé wrote: >> On 04/05/2018 06:27 AM, Peter Maydell wrote: >>> On 5 April 2018 at 02:22, Philippe Mathieu-Daudé wrote: If an user creates a RAM region smaller than TARGET_PAGE_SIZE, this region w

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread KONRAD Frederic
On 04/05/2018 03:31 PM, Philippe Mathieu-Daudé wrote: On 04/05/2018 10:20 AM, Peter Maydell wrote: On 5 April 2018 at 13:53, Philippe Mathieu-Daudé wrote: On 04/05/2018 06:27 AM, Peter Maydell wrote: On 5 April 2018 at 02:22, Philippe Mathieu-Daudé wrote: If an user creates a RAM region s

Re: [Qemu-devel] [PATCH RFC] s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

2018-04-05 Thread Christian Borntraeger
On 03/26/2018 11:20 AM, David Hildenbrand wrote: > Manually having to use cpu_synchronize_state() is error prone. I don't > think that the performance impact is that huge if we simply synchronize > the state on every kvm_arch_handle_exit() call. This makes the code > easier to maintain. > > We n

Re: [Qemu-devel] [qemu-s390x] [PATCH RFC] s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

2018-04-05 Thread Christian Borntraeger
On 04/05/2018 10:19 AM, Thomas Huth wrote: > On 05.04.2018 09:53, Christian Borntraeger wrote: >> So currently we only handle the case with base reg == 0 correctly. >> So >> diag x,y,0x500(0) >> works >> >> >> but things like >> lghi 1,0x500 >> diag x,y,0(1) >> >> not unless I miss something. >

Re: [Qemu-devel] [PATCH v2 1/4] memory: Avoid to create tiny RAM regions, handled as subpages

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 14:34, KONRAD Frederic wrote: > On 04/05/2018 03:31 PM, Philippe Mathieu-Daudé wrote: >> Luckily in my case I can workaround with a 4K SRAM, but it took me hours >> to track this down until Paolo helped me. > I seems to remember having the same pain with the mmio execution > st

[Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
preadv/pwritev accept low and high parts of file offset in two separate parameters. When host bitness doesn't match guest bitness these parts must be appropriately recombined. Introduce target_to_host_low_high that does this recombination and use it in preadv/pwritev syscalls. This fixes glibc tes

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-05 Thread Halil Pasic
On 04/04/2018 10:12 PM, Tony Krowiak wrote: > On 04/04/2018 09:43 AM, Pierre Morel wrote: >> On 04/04/2018 15:33, Tony Krowiak wrote: >>> On 04/04/2018 07:09 AM, Pierre Morel wrote: On 02/04/2018 18:36, Tony Krowiak wrote: > On 03/26/2018 05:03 AM, Pierre Morel wrote: >> On 26/03/201

Re: [Qemu-devel] [Qemu-ppc] [PATCHv2 for-2.13 1/2] Make qemu_mempath_getpagesize() accept NULL

2018-04-05 Thread Greg Kurz
On Thu, 5 Apr 2018 12:20:01 +1000 David Gibson wrote: > qemu_mempath_getpagesize() gets the effective (host side) page size for > a block of memory backed by an mmap()ed file on the host. It requires > the mem_path parameter to be non-NULL. > > This ends up meaning all the callers need a diffe

Re: [Qemu-devel] [Qemu-ppc] [PATCHv2 for-2.13 2/2] Add host_memory_backend_pagesize() helper

2018-04-05 Thread Greg Kurz
On Thu, 5 Apr 2018 12:20:02 +1000 David Gibson wrote: > There are a couple places (one generic, one target specific) where we need > to get the host page size associated with a particular memory backend. I > have some upcoming code which will add another place which wants this. So, > for conve

Re: [Qemu-devel] -icount changes physical address assignments in QEMU 2.10/2.11

2018-04-05 Thread Peter Maydell
On 22 March 2018 at 05:31, wrote: > Your patch (applied to 2.11 source release) changed the behavior > somewhat, but did not fix the problem. Attached is a binary that when > run should show a CGA fontset and color bars. > > This command should "work": > > qemu-system-aarch64 -M virt,virtualizat

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-04-05 Thread Peter Maydell
On 29 March 2018 at 11:54, Peter Maydell wrote: > On 23 March 2018 at 12:08, Peter Maydell wrote: >> On 21 March 2018 at 08:00, Shannon Zhao wrote: >>> On 2018/3/20 19:54, Peter Maydell wrote: Can you still successfully migrate a VM from a QEMU version without this bugfix to one with t

Re: [Qemu-devel] [PATCH for-2.13 0/2] net: Get rid of 'vlan' terminology and use 'hub' instead

2018-04-05 Thread Stefan Hajnoczi
On Wed, Apr 04, 2018 at 05:55:57PM +0200, Thomas Huth wrote: > On 04.04.2018 17:49, Paolo Bonzini wrote: > > On 04/04/2018 17:33, Thomas Huth wrote: > >> The 'vlan' term caused a lot of confusion in the past, so let's try > >> to switch to the better word "hub" everywhere where it is appropriate. >

[Qemu-devel] [PATCH for 2.13 1/2] Revert "spapr: Don't allow memory hotplug to memory less nodes"

2018-04-05 Thread Serhii Popovych
This reverts commit b556854bd8524c26b8be98ab1bfdf0826831e793. Leave change @node type from uint32_t to to int from reverted commit because node < 0 is always false. Signed-off-by: Serhii Popovych --- hw/ppc/spapr.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/hw/pp

[Qemu-devel] [PATCH for 2.13 2/2] spapr: Add ibm, max-associativity-domains property

2018-04-05 Thread Serhii Popovych
Now recent kernels (i.e. since linux-stable commit a346137e9142 ("powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes") support this property to mark initially memory-less NUMA nodes as "possible" to allow further memory hot-add to them. Advertise this property for pSeries m

[Qemu-devel] [PATCH for 2.13 0/2] target/ppc: Support adding memory to initially memory-less NUMA nodes

2018-04-05 Thread Serhii Popovych
Now PowerPC Linux kernel supports hot-add to NUMA nodes not populated initially with memory we can enable such support in qemu. This requires two changes: o Add device tree property "ibm,max-associativity-domains" to let guest kernel chance to find max possible NUMA node o Revert commit

[Qemu-devel] [PATCH 0/3] s390: Fix virtio-scsi IPL quirks

2018-04-05 Thread Viktor Mihajlovski
IPL from virtio-scsi currently uses a non-standard parameter type definition to pass boot parameters from QEMU to the BIOS. There are two potential issues with this approach: o If the guest operating systems requests a re-ipl of type CCW where the boot device is a virtio-scsi HBA, this goes unno

[Qemu-devel] [PATCH 2/3] s390: Ensure IPL from SCSI works as expected

2018-04-05 Thread Viktor Mihajlovski
Operating systems may request an IPL from a virtio-scsi device by specifying an IPL parameter type of CCW. In this case QEMU won't set up the IPLB correctly. The BIOS will still detect it's a SCSI device to boot from, but it will now have to search for the first LUN and attempt to boot from there.

[Qemu-devel] [PATCH 3/3] s390: Do not pass inofficial IPL type to the guest

2018-04-05 Thread Viktor Mihajlovski
IPL over a virtio-scsi device requires special handling not available in the real architecture. For this purpose the IPL type 0xFF has been chosen as means of communication between QEMU and the pc-bios. However, a guest OS could be confused by seeing an unknown IPL type. This change sets the IPL p

[Qemu-devel] [PATCH 1/3] s390: Refactor IPL parameter block generation

2018-04-05 Thread Viktor Mihajlovski
Splitting out the the CCW device extraction allows reuse. Signed-off-by: Viktor Mihajlovski --- hw/s390x/ipl.c | 81 -- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index fdeaec3..58e33c5 1

Re: [Qemu-devel] [PATCH 3/3] s390: Do not pass inofficial IPL type to the guest

2018-04-05 Thread David Hildenbrand
On 05.04.2018 17:07, Viktor Mihajlovski wrote: > IPL over a virtio-scsi device requires special handling not > available in the real architecture. For this purpose the IPL > type 0xFF has been chosen as means of communication between > QEMU and the pc-bios. However, a guest OS could be confused > b

Re: [Qemu-devel] [PATCH 3/3] s390: Do not pass inofficial IPL type to the guest

2018-04-05 Thread Viktor VM Mihajlovski
On 05.04.2018 17:11, David Hildenbrand wrote: > On 05.04.2018 17:07, Viktor Mihajlovski wrote: >> IPL over a virtio-scsi device requires special handling not >> available in the real architecture. For this purpose the IPL >> type 0xFF has been chosen as means of communication between >> QEMU and th

Re: [Qemu-devel] [PATCH for-2.12] memfd: fix vhost-user-test on non-memfd capable host

2018-04-05 Thread Paolo Bonzini
On 28/03/2018 14:18, Marc-André Lureau wrote: > On RHEL7, memfd is not supported, and vhost-user-test fails: > TEST: tests/vhost-user-test... (pid=10248) > /x86_64/vhost-user/migrate: > qemu-system-x86_64: -object memory-backend-memfd,id=mem,size=2M,: failed to > create memfd > FAIL > > There

Re: [Qemu-devel] [PATCH] WHPX fixes an issue with CPUID 1 not returning CPUID_EXT_HYPERVISOR

2018-04-05 Thread Paolo Bonzini
On 28/03/2018 22:48, Justin Terry (VM) wrote: > 1. (As the code is doing now). At partition creation time you can > register for specific CPUID exits and then respond to the CPUID with > your custom answer or with the Hypervisor defaults that were forwarded > to you. Unfortunately, QEMU has no way

Re: [Qemu-devel] [PATCH for-2.12 v3 0/2] i386/hyperv: fully control Hyper-V features in CPUID

2018-04-05 Thread Paolo Bonzini
On 30/03/2018 19:02, Roman Kagan wrote: > In order to guarantee compatibility on migration, QEMU should have > complete control over the features it announces to the guest via CPUID. > > However, a number of Hyper-V-related features happen to depend on the > support in the underlying KVM, with no

Re: [Qemu-devel] [PATCH] configure: Add missing configure options to help text

2018-04-05 Thread Paolo Bonzini
On 27/03/2018 17:09, Thomas Huth wrote: > We forgot to mention --with-git, --libexecdir and --with-pkgversion > so far. > > Signed-off-by: Thomas Huth > --- > configure | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/configure b/configure > index 4d0e92c..a473609 100755 > --- a/conf

Re: [Qemu-devel] [PATCH v2] scsi-disk: Don't enlarge min_io_size to max_io_size

2018-04-05 Thread Paolo Bonzini
On 27/03/2018 18:41, Fam Zheng wrote: > Some backends report big max_io_sectors. Making min_io_size the same > value in this case will make it impossible for guest to align memory, > therefore the disk may not be usable at all. > > Do not enlarge them when they are zero. > > Reported-by: David Gi

Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 15:47, Max Filippov a écrit : > preadv/pwritev accept low and high parts of file offset in two separate > parameters. When host bitness doesn't match guest bitness these parts > must be appropriately recombined. > Introduce target_to_host_low_high that does this recombination and us

Re: [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI

2018-04-05 Thread Paolo Bonzini
On 27/03/2018 23:14, Daniel Henrique Barboza wrote: > /* We get here only for BYTCHK == 0x01 and only for scsi-block. > * As far as DMA is concerned, we can treat it the same as a write; > * scsi_block_do_sgio will send VERIFY commands. > + * > + * For s

[Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Peter Maydell
Does anybody understand how icount TCG is supposed to arrange to respect timer deadlines? https://bugs.launchpad.net/qemu/+bug/1754038 has a test case which shows that we don't get this right. At the moment what happens is: * when we're about to call tcg_cpu_exec(), we call prepare_icount_for

Re: [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI

2018-04-05 Thread Daniel Henrique Barboza
On 04/05/2018 12:56 PM, Paolo Bonzini wrote: On 27/03/2018 23:14, Daniel Henrique Barboza wrote: /* We get here only for BYTCHK == 0x01 and only for scsi-block. * As far as DMA is concerned, we can treat it the same as a write; * scsi_block_do_sgio will send VER

Re: [Qemu-devel] [PATCH] hw/sparc64/sun4u: Fix introspection by converting prom instance_init to realize

2018-04-05 Thread Philippe Mathieu-Daudé
On 04/05/2018 06:32 AM, Thomas Huth wrote: > The instance_init function of devices should always succeed to be able > to introspect the device. However, the instance_init function of the > "openprom" device can currently fail, for example like this: > > $ echo "{'execute':'qmp_capabilities'}"\ >

[Qemu-devel] [PATCH v4 0/2] hw/scsi: support SCSI-2 passthrough without PI

2018-04-05 Thread Paolo Bonzini
This is my version of Daniel's patch. In order to keep the RD/WRPROTECT check for emulated SCSI disks, I've added a new property to scsi-disk/hd/cd devices as well. The property, similar to the earlier versions posted by Daniel, is available to the user, but for scsi-disk/hd/cd it affects the INQ

[Qemu-devel] [PATCH 2/2] hw/scsi: support SCSI-2 passthrough without PI

2018-04-05 Thread Paolo Bonzini
From: Daniel Henrique Barboza QEMU SCSI code makes assumptions about how the PROTECT and BYTCHK works in the protocol, denying support for PI (Protection Information) in case the guest OS requests it. However, in SCSI versions 2 and older, there is no PI concept in the protocol. This means that

[Qemu-devel] [PATCH 1/2] scsi-disk: allow customizing the SCSI version

2018-04-05 Thread Paolo Bonzini
We would like to have different behavior for passthrough devices depending on the SCSI version they expose. To prepare for that, allow the user of emulated devices to specify the desired SCSI level, and adjust the emulation according to the property value. The next patch will set the level for scs

Re: [Qemu-devel] [PATCH] hw/sparc64/sun4u: Fix introspection by converting prom instance_init to realize

2018-04-05 Thread Philippe Mathieu-Daudé
On 04/05/2018 01:22 PM, Philippe Mathieu-Daudé wrote: > On 04/05/2018 06:32 AM, Thomas Huth wrote: >> The instance_init function of devices should always succeed to be able >> to introspect the device. However, the instance_init function of the >> "openprom" device can currently fail, for example l

Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
On Thu, Apr 5, 2018 at 8:52 AM, Laurent Vivier wrote: > Why don't you try to de-construct then re-construct the offset? It would require 128-bit arithmetic on 64-bit host. > Kernel commit > 601cc11d054a "Make non-compat preadv/pwritev use native register size" > is interesting. > > static inli

[Qemu-devel] [Bug 1761535] [NEW] qemu-aarch64-static docker arm64v8/openjdk coredump

2018-04-05 Thread Richard Henwood
Public bug reported: I am using qemu-aarch64-static to run the arm64v8/openjdk official image on my x86 machine. Using QEMU master, I immediately hit a bug which hangs the container. With Ubuntu default version qemu-aarch64 version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.24) and qemu-aarch64 version 2.

Re: [Qemu-devel] [PATCH 1/3] s390: Refactor IPL parameter block generation

2018-04-05 Thread Farhan Ali
On 04/05/2018 11:07 AM, Viktor Mihajlovski wrote: Splitting out the the CCW device extraction allows reuse. Signed-off-by: Viktor Mihajlovski --- hw/s390x/ipl.c | 81 -- 1 file changed, 51 insertions(+), 30 deletions(-) Reviewed-by:

Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 18:27, Max Filippov a écrit : > On Thu, Apr 5, 2018 at 8:52 AM, Laurent Vivier wrote: >> Why don't you try to de-construct then re-construct the offset? > > It would require 128-bit arithmetic on 64-bit host. > >> Kernel commit >> 601cc11d054a "Make non-compat preadv/pwritev us

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-05 Thread Tony Krowiak
On 04/03/2018 05:36 AM, Cornelia Huck wrote: On Mon, 2 Apr 2018 12:36:27 -0400 Tony Krowiak wrote: On 03/26/2018 05:03 AM, Pierre Morel wrote: On 26/03/2018 10:32, David Hildenbrand wrote: On 16.03.2018 00:24, Tony Krowiak wrote: +/* + * The Query Configuration Information (QCI) fun

Re: [Qemu-devel] -icount changes physical address assignments in QEMU 2.10/2.11

2018-04-05 Thread alarson
"Peter Maydell" wrote on 04/05/2018 09:05:53 AM: > From: "Peter Maydell" > To: alar...@ddci.com > Cc: "QEMU Developers" > Date: 04/05/2018 09:06 AM > Subject: Re: [Qemu-devel] -icount changes physical address assignments in QEMU 2.10/2.11 > > On 22 March 2018 at 05:31, wrote: > > Your patc

Re: [Qemu-devel] [PATCH 2/3] s390: Ensure IPL from SCSI works as expected

2018-04-05 Thread Farhan Ali
On 04/05/2018 11:07 AM, Viktor Mihajlovski wrote: Operating systems may request an IPL from a virtio-scsi device by specifying an IPL parameter type of CCW. In this case QEMU won't set up the IPLB correctly. The BIOS will still detect it's a SCSI device to boot from, but it will now have to sea

Re: [Qemu-devel] [PATCHv5] dma/i82374: avoid double creation of i82374 device

2018-04-05 Thread Paolo Bonzini
On 26/03/2018 17:05, Eduardo Otubo wrote: > QEMU fails when used with the following command line: > > ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p,accel=tcg -device i82374 > qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion > `!bus->dma[0] && !bus->dma[1]' failed. >

Re: [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI

2018-04-05 Thread Paolo Bonzini
On 05/04/2018 18:09, Daniel Henrique Barboza wrote: >>> >> This also has to check for "s->qdev.scsi_version != -1" so that the >> behavior of emulated SCSI isn't changed (they claim SPC-3).  I made this >> change and queued the patch. > > Good catch. Since there were some more changes for emulate

[Qemu-devel] [RFC][BROKEN] rbd: Allow configuration of authentication scheme

2018-04-05 Thread Kevin Wolf
The legacy command line syntax supports a "password-secret" option that allows to pass an authentication key to Ceph. This was not supported in QMP so far. This patch introduces authentication options in the QAPI schema, makes them do the corresponding rados_conf_set() calls and adds compatibility

Re: [Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Paolo Bonzini
On 05/04/2018 18:01, Peter Maydell wrote: > * however, if the guest reprograms the clock during the tcg_cpu_exec() >run, we don't do anything to cause us to stop earlier Anything that does this from the vCPU thread should be between gen_icount_start and gen_icount_end. (In fact, it's the ent

Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_insert fails

2018-04-05 Thread Emilio G. Cota
On Wed, Mar 28, 2018 at 17:33:09 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > -bool qht_insert(struct qht *ht, void *p, uint32_t hash); > > +void *qht_insert(struct qht *ht, void *p, uint32_t hash); > > Hmm this seems needlessly counter intuitive. I realise the potential > efficiency in

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-05 Thread Halil Pasic
On 04/05/2018 06:38 PM, Tony Krowiak wrote: >> Hard to really give good advice without access to the documentation, but: >> - If we tell the guest that the feature is available, but it does not >>    get any cards to use, returning an empty matrix makes the most sense >>    to me. >> - I would no

Re: [Qemu-devel] [PATCH 04/16] tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx

2018-04-05 Thread Emilio G. Cota
On Thu, Mar 29, 2018 at 11:06:07 +0100, Alex Bennée wrote: > Emilio G. Cota writes: (snip) > > diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c > > index 3a51d49..20ad3fc 100644 > > --- a/accel/tcg/translate-all.c > > +++ b/accel/tcg/translate-all.c > > @@ -1072,7 +1072,8 @@ void

  1   2   >