[Qemu-devel] [PULL 4/6] target/ppc: Add stub implementation of the PSSCR

2017-08-09 Thread David Gibson
The PSSCR register added in POWER9 controls certain power saving mode behaviours. Mostly, it's not relevant to TCG, however because qemu doesn't know about it yet, it doesn't synchronize the state with KVM, and thus it doesn't get migrated. To fix that, this adds a minimal stub implementation of

[Qemu-devel] [PULL 3/6] target/ppc: Implement TIDR

2017-08-09 Thread David Gibson
This adds a trivial implementation of the TIDR register added in POWER9. This isn't particularly important to qemu directly - it's used by accelerator modules that we don't emulate. However, since qemu isn't aware of it, its state is not synchronized with KVM and therefore not migrated, which can

[Qemu-devel] [PULL 2/6] ppc: fix double-free in cpu_post_load()

2017-08-09 Thread David Gibson
From: Greg Kurz When running nested with KVM PR, ppc_set_compat() fails and QEMU crashes because of "double free or corruption (!prev)". The crash happens because error_report_err() has already called error_free(). Signed-off-by: Greg Kurz Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-

[Qemu-devel] [PULL 0/6] ppc patch queue 2017-08-09

2017-08-09 Thread David Gibson
The following changes since commit 54affb3a3623b1d36c95e34faa722a5831323a74: Update version for v2.10.0-rc2 release (2017-08-08 19:07:46 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170809 for you to fetch changes up to

[Qemu-devel] [PULL 1/6] booke206: fix MAS update on tlb miss

2017-08-09 Thread David Gibson
From: KONRAD Frederic When a tlb instruction miss happen, rw is set to 0 at the bottom of cpu_ppc_handle_mmu_fault which cause the MAS update function to miss the SAS and TS bit in MAS6, MAS1 in booke206_update_mas_tlb_miss. Just calling booke206_update_mas_tlb_miss with rw = 2 solve the issue.

[Qemu-devel] [PULL 5/6] spapr_drc: abort if object_property_add_child() fails

2017-08-09 Thread David Gibson
From: Greg Kurz object_property_add_child() can only fail in two cases: - the child already has a parent, which shouldn't happen since the DRC was allocated a few lines above - the parent already has a child with the same name, which would mean the caller tries to create a DRC that already ex

[Qemu-devel] [PULL 6/6] spapr: Fix bug in h_signal_sys_reset()

2017-08-09 Thread David Gibson
From: Sam Bobroff The unicast case in h_signal_sys_reset() seems to be broken: rather than selecting the target CPU, it looks like it will pick either the first CPU or fail to find one at all. Fix it by using the search function rather than open coding the search. This was found by inspection;

Re: [Qemu-devel] [PATCH v4 04/22] tests: Add assertion for no qmp("")

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > Now that the previous patches have fixed all callers to avoid an > empty message, we can tweak qmp_fd_sendv() to assert that we > don't introduce new callers, and reindent accordingly. The > additional assertions will also help verify that later refactoring > is not breaking

[Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend on CONFIG_VIRTFS and on the presence of an appropriate virtio transport device. Let's introduce CONFIG_VIRTIO_CCW to cover s390x and check for CONFIG_VIRTFS && (CONFIG_VIRTIO_PCI || CONFIG_VIRTIO_CCW). Signed-off-by: Cornelia H

Re: [Qemu-devel] [PATCH v3 1/1] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-09 Thread David Gibson
On Wed, Aug 09, 2017 at 03:38:56PM +1000, Sam Bobroff wrote: > The concept of a VCPU ID that differs from the CPU's index > (cpu->cpu_index) exists only within SPAPR machines so, move the > functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c > and rename them appropriately. > > S

Re: [Qemu-devel] [PATCH for-2.11 0/4] ppc64: add e6500

2017-08-09 Thread David Gibson
On Mon, Aug 07, 2017 at 05:50:44PM +0200, KONRAD Frederic wrote: > Hi, > > Those are some patches to add basic e6500 support for the moment e5500 with a > correct MMU configuration and supported instructions. > Some (maybe a lot of) things are missing (ie: the thread support) but it is > enough to

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Paolo Bonzini
On 09/08/2017 03:06, Laszlo Ersek wrote: >> 20.14% qemu-system-x86_64 [.] render_memory_region >> 17.14% qemu-system-x86_64 [.] subpage_register >> 10.31% qemu-system-x86_64 [.] int128_add >>7.86% qemu-system-x86_64 [

Re: [Qemu-devel] [for-2.10 PATCH] 9pfs: local: fix fchmodat_nofollow() limitations

2017-08-09 Thread Greg Kurz
On Tue, 8 Aug 2017 14:14:18 -0500 Eric Blake wrote: > On 08/08/2017 12:28 PM, Greg Kurz wrote: > > This function has to ensure it doesn't follow a symlink that could be used > > to escape the virtfs directory. This could be easily achieved if fchmodat() > > on linux honored the AT_SYMLINK_NOFOLLO

Re: [Qemu-devel] [PATCH v5 10/17] migration: Create ram_multifd_page

2017-08-09 Thread Peter Xu
On Tue, Aug 08, 2017 at 06:04:54PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, Jul 19, 2017 at 08:02:39PM +0100, Dr. David Alan Gilbert wrote: > >> * Juan Quintela (quint...@redhat.com) wrote: > > >> > struct MultiFDSendParams { > >> > +/* not changed */ > >> > uint8_t id;

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-08-09 Thread Peter Xu
On Tue, Aug 08, 2017 at 06:06:04PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: > > > > [...] > > > >> static int multifd_send_page(uint8_t *address) > >> { > >> -int i; > >> +int i, j; > >> MultiFDSendParams *p = N

Re: [Qemu-devel] [PATCH v4 05/22] qobject: Simplify qobject_from_jsonv()

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > qobject_from_jsonv() was unusual in that it took a va_list*, instead > of the more typical va_list; this was so that callers could pass > NULL to avoid % interpolation. While this works under the hood, it > is awkward for callers, so move the magic into qjson.c rather than >

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-08-09 Thread Juan Quintela
Peter Xu wrote: > On Tue, Aug 08, 2017 at 06:06:04PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: >> > >> > [...] >> > >> >> static int multifd_send_page(uint8_t *address) >> >> { >> >> -int i; >> >> +int i, j; >> >>

Re: [Qemu-devel] [PATCH v5 09/17] migration: Start of multiple fd work

2017-08-09 Thread Peter Xu
On Tue, Aug 08, 2017 at 11:19:35AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Mon, Jul 17, 2017 at 03:42:30PM +0200, Juan Quintela wrote: > > > > [...] > > > >> int multifd_load_setup(void) > >> { > >> int thread_count; > >> -uint8_t i; > >> > >> if (!migrate_use_multif

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-08-09 Thread Peter Xu
On Wed, Aug 09, 2017 at 10:05:19AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Tue, Aug 08, 2017 at 06:06:04PM +0200, Juan Quintela wrote: > >> Peter Xu wrote: > >> > On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: > >> > > >> > [...] > >> > > >> >> static int multifd_sen

Re: [Qemu-devel] [PATCH v2 0/5] tests/pxe-test: add testcase using vhost-user-bridge

2017-08-09 Thread Jens Freimann
On Wed, Aug 09, 2017 at 04:17:05AM +0300, Michael S. Tsirkin wrote: On Tue, Aug 08, 2017 at 04:59:02PM -0700, no-re...@patchew.org wrote: Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduc

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 10:23:04 +0200 Thomas Huth wrote: > On 09.08.2017 09:17, Cornelia Huck wrote: > > Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend > > on CONFIG_VIRTFS and on the presence of an appropriate virtio transport > > device. > > > > Let's introduce CONFIG_VIRTIO

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Thomas Huth
On 09.08.2017 09:17, Cornelia Huck wrote: > Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend > on CONFIG_VIRTFS and on the presence of an appropriate virtio transport > device. > > Let's introduce CONFIG_VIRTIO_CCW to cover s390x and check for > CONFIG_VIRTFS && (CONFIG_VIRTIO

Re: [Qemu-devel] [PATCH for 2.11 v2 1/2] watchdog: wdt_aspeed: Add support for the reset width register

2017-08-09 Thread Cédric Le Goater
On 08/09/2017 08:28 AM, Andrew Jeffery wrote: > The reset width register controls how the pulse on the SoC's WDTRST{1,2} > pins behaves. A pulse is emitted if the external reset bit is set in > WDT_CTRL. On the AST2500 WDT_RESET_WIDTH can consume magic bit patterns > to configure push-pull/open-dra

Re: [Qemu-devel] [PATCH for 2.11 v2 2/2] ARM: aspeed_soc: Propagate silicon-rev to watchdog

2017-08-09 Thread Cédric Le Goater
On 08/09/2017 08:28 AM, Andrew Jeffery wrote: > This is required to configure differences in behaviour between the > AST2400 and AST2500 watchdog IPs. > > Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater > --- > hw/arm/aspeed_soc.c | 2 ++ > 1 file changed, 2 insertions(+) > > dif

Re: [Qemu-devel] [PATCH 1/2] tests/boot-sector: Do not overwrite the x86 buffer on other architectures

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 06:59:37 +0200 Thomas Huth wrote: > Re-using the boot_sector code buffer from x86 for other architectures > is not very nice, especially if we add more architectures later. It's > also ugly that the test uses a huge pre-initialized array - the size > of the executable is very

Re: [Qemu-devel] [PATCH v4 06/22] qobject: Perform %% interpolation in qobject_from_jsonf()

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > We want -Wformat to catch blatant programming errors in format > strings that we pass to qobject_from_jsonf(). But if someone > were to pass a JSON string "'%s'" as the format string, gcc would > insist that it be paired with a char* argument, even though our > lexer does no

Re: [Qemu-devel] [PATCH v4 07/22] numa-test: Use hmp()

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > Don't open-code something that has a convenient helper available. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Thomas Huth
On 09.08.2017 10:27, Cornelia Huck wrote: > On Wed, 9 Aug 2017 10:23:04 +0200 > Thomas Huth wrote: > >> On 09.08.2017 09:17, Cornelia Huck wrote: >>> Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend >>> on CONFIG_VIRTFS and on the presence of an appropriate virtio transport >

Re: [Qemu-devel] [PATCH 2/2] tests/pxe: Check virtio-net-ccw on s390x

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 06:59:38 +0200 Thomas Huth wrote: > Now that we've got a firmware that can do TFTP booting on s390x (i.e. > the pc-bios/s390-netboot.img), we can enable the PXE tester for this > architecture, too. > > Signed-off-by: Thomas Huth > --- > tests/Makefile.include | 1 + > test

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 11:07:38 +0200 Thomas Huth wrote: > On 09.08.2017 10:27, Cornelia Huck wrote: > > On Wed, 9 Aug 2017 10:23:04 +0200 > > Thomas Huth wrote: > > > >> On 09.08.2017 09:17, Cornelia Huck wrote: > >>> Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend > >>>

Re: [Qemu-devel] [PATCH for-2.11 v2 4/5] qmp-shell: Accept QMP command as argument

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 05:39:34PM -0300, Eduardo Habkost wrote: > This is useful for testing QMP commands in scripts. > > Example usage, combined with 'jq' for filtering the results: > > $ ./scripts/qmp/qmp-shell /tmp/qmp qom-list path=/ | jq -r .return[].name > machine > type > chardevs

Re: [Qemu-devel] [PATCH for-2.11 v2 1/5] qmp-shell: Use optparse module

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 05:39:31PM -0300, Eduardo Habkost wrote: > It makes command-line parsing and generation of help text much > simpler. > > The optparse module is deprecated since Python 2.7, but argparse > is not available in Python 2.6 (the minimum Python version > required for building QEM

Re: [Qemu-devel] [PATCH 1/2] tests/boot-sector: Do not overwrite the x86 buffer on other architectures

2017-08-09 Thread Thomas Huth
On 09.08.2017 11:05, Cornelia Huck wrote: > On Wed, 9 Aug 2017 06:59:37 +0200 > Thomas Huth wrote: > >> Re-using the boot_sector code buffer from x86 for other architectures >> is not very nice, especially if we add more architectures later. It's >> also ugly that the test uses a huge pre-initia

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Daniel P. Berrange
On Wed, Aug 09, 2017 at 11:07:38AM +0200, Thomas Huth wrote: > On 09.08.2017 10:27, Cornelia Huck wrote: > > On Wed, 9 Aug 2017 10:23:04 +0200 > > Thomas Huth wrote: > > > >> On 09.08.2017 09:17, Cornelia Huck wrote: > >>> Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend > >>

Re: [Qemu-devel] [PATCH 1/2] tests/boot-sector: Do not overwrite the x86 buffer on other architectures

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 11:18:33 +0200 Thomas Huth wrote: > On 09.08.2017 11:05, Cornelia Huck wrote: > > On Wed, 9 Aug 2017 06:59:37 +0200 > > Thomas Huth wrote: > >> @@ -80,16 +81,26 @@ int boot_sector_init(char *fname) > >> return 1; > >> } > >> > >> -/* For Open Firmware bas

Re: [Qemu-devel] [Qemu-block] [PATCH 1/4] IDE: Do not flush empty CDROM drives

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 01:57:08PM -0400, John Snow wrote: > The block backend changed in a way that flushing empty CDROM drives > is now an error. Amend IDE to avoid doing so until the root problem > can be addressed for 2.11. > > Reported-by: Kieron Shorrock > Signed-off-by: John Snow > --- >

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] IDE: test flush on empty CDROM

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 01:57:09PM -0400, John Snow wrote: > From: Kevin Wolf > > Signed-off-by: Kevin Wolf > Signed-off-by: John Snow > --- > tests/ide-test.c | 19 +++ > 1 file changed, 19 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH v3 5/7] block: add throttle block filter driver

2017-08-09 Thread Manos Pitsidianakis
On Tue, Aug 08, 2017 at 05:04:48PM +0200, Alberto Garcia wrote: On Tue 08 Aug 2017 04:56:20 PM CEST, Manos Pitsidianakis wrote: So basically if we have anonymous groups, we accept limits in the driver options but only without a group-name. In the commit message you do however have limits and a

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 10:24:13 +0100 "Daniel P. Berrange" wrote: > On Wed, Aug 09, 2017 at 11:07:38AM +0200, Thomas Huth wrote: > > On 09.08.2017 10:27, Cornelia Huck wrote: > > > On Wed, 9 Aug 2017 10:23:04 +0200 > > > Thomas Huth wrote: > > > > > >> On 09.08.2017 09:17, Cornelia Huck wrote:

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Peter Maydell
On 9 August 2017 at 10:07, Thomas Huth wrote: > While virtio-pci and virtio-ccw seem to require separate dedicated > devices (e.g. virtio-9p-pci and virtio-9p-ccw) for everything, You don't *have* to use the dedicated virtio-foo-pci device; if you like you can manually plug together the virtio-pc

Re: [Qemu-devel] [PATCH for-2.10] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types

2017-08-09 Thread Stefan Hajnoczi
On Mon, Aug 07, 2017 at 07:15:29PM +0300, Alberto Garcia wrote: > Both the throttling limits set with the throttling.iops-* and > throttling.bps-* options and their QMP equivalents defined in the > BlockIOThrottle struct are integer values. > > Those limits are also reported in the BlockDeviceInfo

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Peter Maydell
On 9 August 2017 at 10:07, Thomas Huth wrote: > While virtio-pci and virtio-ccw seem to require separate dedicated > devices (e.g. virtio-9p-pci and virtio-9p-ccw) for everything, > virtio-mmio seems to work different. As far as I can see, there are no > dedicated virtio-xxx-mmio devices in the co

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Greg Kurz
On Wed, 9 Aug 2017 10:27:37 +0200 Cornelia Huck wrote: > On Wed, 9 Aug 2017 10:23:04 +0200 > Thomas Huth wrote: > > > On 09.08.2017 09:17, Cornelia Huck wrote: > > > Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend > > > on CONFIG_VIRTFS and on the presence of an appropri

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 10:47:18 +0100 Peter Maydell wrote: > On 9 August 2017 at 10:07, Thomas Huth wrote: > > While virtio-pci and virtio-ccw seem to require separate dedicated > > devices (e.g. virtio-9p-pci and virtio-9p-ccw) for everything, > > virtio-mmio seems to work different. As far as I ca

[Qemu-devel] [PATCH v2 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-08-09 Thread Changpeng Liu
Althrough virtio scsi specification was designed as a replacement for virtio_blk, there are still many users using virtio_blk. Qemu 2.9 introduced a new device vhost user scsi which can process I/O in user space for virtio_scsi, this commit introduces a new vhost user block host device, which can

[Qemu-devel] [PATCH v2 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-08-09 Thread Changpeng Liu
This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start Qemu with command line like this: qemu-system-x86_64 \ -chardev socket,id=char0,path=

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

2017-08-09 Thread Changpeng Liu
Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration for vhost user devices, also vhost user devices can benifit from the messages to get/set virtio config space from/to the I/O target besides Qemu. For the purpose to support virtio config space change, VHOS

[Qemu-devel] [PATCH v2 3/4] contrib/libvhost-user: enable virtio config space messages

2017-08-09 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG/VHOST_USER_SET_CONFIG_FD messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between Qemu host device and the I/O target, also event notifier is added in ca

[Qemu-devel] [PATCH v2 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-08-09 Thread Changpeng Liu
This commit introcudes a vhost-user-blk backend device, it uses UNIX domain socket to communicate with Qemu. The vhost-user-blk sample application should be used with Qemu vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s /p

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Laszlo Ersek
On 08/09/17 09:26, Paolo Bonzini wrote: > On 09/08/2017 03:06, Laszlo Ersek wrote: >>> 20.14% qemu-system-x86_64 [.] render_memory_region >>> 17.14% qemu-system-x86_64 [.] subpage_register >>> 10.31% qemu-system-x86_64 [.] int128_add >>>

[Qemu-devel] [PATCH v4 0/7] add throttle block driver filter

2017-08-09 Thread Manos Pitsidianakis
This series adds a throttle block driver filter. Currently throttling is done at the BlockBackend level. Using block driver interfaces we can move the throttling to any point in the BDS graph using a throttle node which uses the existing throttling code. This allows for potentially more complex con

[Qemu-devel] [PATCH v4 1/7] block: move ThrottleGroup membership to ThrottleGroupMember

2017-08-09 Thread Manos Pitsidianakis
This commit eliminates the 1:1 relationship between BlockBackend and throttle group state. Users will be able to create multiple throttle nodes, each with its own throttle group state, in the future. The throttle group state cannot be per-BlockBackend anymore, it must be per-throttle node. This i

[Qemu-devel] [PATCH v4 6/7] block: add BlockDevOptionsThrottle to QAPI

2017-08-09 Thread Manos Pitsidianakis
This is needed to configure throttle filter driver nodes with QAPI. Signed-off-by: Manos Pitsidianakis --- qapi/block-core.json | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0bdc69aa5f..12fd749a94 1006

[Qemu-devel] [PATCH v4 7/7] block: add throttle block filter driver interface tests

2017-08-09 Thread Manos Pitsidianakis
Signed-off-by: Manos Pitsidianakis --- tests/qemu-iotests/184 | 310 + tests/qemu-iotests/184.out | 422 + tests/qemu-iotests/group | 1 + 3 files changed, 733 insertions(+) create mode 100755 tests/qemu-iotests/

[Qemu-devel] [PATCH v4 2/7] block: add aio_context field in ThrottleGroupMember

2017-08-09 Thread Manos Pitsidianakis
timer_cb() needs to know about the current Aio context of the throttle request that is woken up. In order to make ThrottleGroupMember backend agnostic, this information is stored in an aio_context field instead of accessing it from BlockBackend. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Haj

[Qemu-devel] [PATCH v4 3/7] block: tidy ThrottleGroupMember initializations

2017-08-09 Thread Manos Pitsidianakis
Move the CoMutex and CoQueue inits inside throttle_group_register_tgm() which is called whenever a ThrottleGroupMember is initialized. There's no need for them to be separate. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis --- block/block-backend.c

[Qemu-devel] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-09 Thread Manos Pitsidianakis
block/throttle.c uses existing I/O throttle infrastructure inside a block filter driver. I/O operations are intercepted in the filter's read/write coroutines, and referred to block/throttle-groups.c The driver can be used with the syntax -drive driver=throttle,file.filename=foo.qcow2, \ li

[Qemu-devel] [PATCH v4 4/7] block: convert ThrottleGroup to object with QOM

2017-08-09 Thread Manos Pitsidianakis
ThrottleGroup is converted to an object. This will allow the future throttle block filter drive easy creation and configuration of throttle groups in QMP and cli. A new QAPI struct, ThrottleLimits, is introduced to provide a shared struct for all throttle configuration needs in QMP. ThrottleGroup

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Paolo Bonzini
On 09/08/2017 12:00, Laszlo Ersek wrote: > On 08/09/17 09:26, Paolo Bonzini wrote: >> On 09/08/2017 03:06, Laszlo Ersek wrote: 20.14% qemu-system-x86_64 [.] render_memory_region 17.14% qemu-system-x86_64 [.] subpage_register 10.31% qemu-syst

[Qemu-devel] Making QEMU build with Python 3

2017-08-09 Thread Stefan Hajnoczi
Ross created a bug to track Python 3 support: https://bugs.launchpad.net/qemu/+bug/1708462 Currently most Python code in QEMU is for Python 2.6+ only. There have only been a few patches adding Python 3 support to certain scripts so far. In this email I want to highlight the most important scr

Re: [Qemu-devel] [PATCH v4 10/22] libqtest: Skip round-trip through QObject

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > When we don't have to do any % interpolation in qmp() and friends, > there is no point wasting time allocating a QObject from the format > string only to then format it back into the string we send over > the wire. True, but there's also no point in complicating things for e

Re: [Qemu-devel] [PATCH v4 5/5] docs: update documentation considering PCIE-PCI bridge

2017-08-09 Thread Laszlo Ersek
On 08/08/17 21:21, Aleksandr Bezzubikov wrote: > 2017-08-08 18:11 GMT+03:00 Laszlo Ersek : >> one comment below >> >> On 08/05/17 22:27, Aleksandr Bezzubikov wrote: >> >>> +Capability layout (defined in include/hw/pci/pci_bridge.h): >>> + >>> +uint8_t id; Standard PCI capability header fiel

Re: [Qemu-devel] [PATCH v4 01/10] qemu.py: Pylint/style fixes

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 02:56:47PM +0200, Lukáš Doktor wrote: > Dne 8.8.2017 v 14:38 Stefan Hajnoczi napsal(a): > > On Wed, Jul 26, 2017 at 04:42:17PM +0200, Lukáš Doktor wrote: > >> def command(self, cmd, conv_keys=True, **args): > >> +''' > >> +Invoke a QMP command and on suc

Re: [Qemu-devel] [PATCH for 2.11 v2 1/2] watchdog: wdt_aspeed: Add support for the reset width register

2017-08-09 Thread Andrew Jeffery
On Wed, Aug 9, 2017, at 18:28, Cédric Le Goater wrote: > On 08/09/2017 08:28 AM, Andrew Jeffery wrote: > > The reset width register controls how the pulse on the SoC's WDTRST{1,2} > > pins behaves. A pulse is emitted if the external reset bit is set in > > WDT_CTRL. On the AST2500 WDT_RESET_WIDTH

Re: [Qemu-devel] [PATCH 0/3] build configuration query tool and conditional (qemu-io)test skip

2017-08-09 Thread Stefan Hajnoczi
On Tue, Aug 08, 2017 at 04:52:25PM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Tue, Aug 08, 2017 at 10:06:04AM +0200, Markus Armbruster wrote: > >> Stefan Hajnoczi writes: > >> > >> > On Wed, Jul 26, 2017 at 02:24:02PM -0400, Cleber Rosa wrote: > >> >> > >> >> > >> >> O

Re: [Qemu-devel] [PATCH] target/i386: set rip_offset for further SSE instructions

2017-08-09 Thread Paolo Bonzini
On 09/08/2017 01:51, Joseph Myers wrote: > It turns out that my recent fix to set rip_offset when emulating some > SSE4.1 instructions needs generalizing to cover a wider class of > instructions. Specifically, every instruction in the sse_op_table7 > table, coming from various instruction set exte

Re: [Qemu-devel] [PATCH] target/i386: fix pmovsx/pmovzx in-place operations

2017-08-09 Thread Paolo Bonzini
On 08/08/2017 22:21, Joseph Myers wrote: > The SSE4.1 pmovsx* and pmovzx* instructions take packed 1-byte, 2-byte > or 4-byte inputs and sign-extend or zero-extend them to a wider vector > output. The associated helpers for these instructions do the > extension on each element in turn, starting wi

Re: [Qemu-devel] [RFC PATCH 09/56] balloon: Make balloon size unsigned in QAPI/QMP

2017-08-09 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Sizes should use QAPI type 'size' (uint64_t). balloon parameter > >> @value is 'int' (int64_t). qmp_balloon() implicitly converts to > >> ram_addr_t, i.e.

Re: [Qemu-devel] >256 Virtio-net-pci hotplug Devices

2017-08-09 Thread Marcel Apfelbaum
On 07/08/2017 22:00, Kinsella, Ray wrote: Hi Marcel, Hi Ray, Please have a look on this thread, I think Laszlo and Paolo found the root cause. https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg01368.html It seems hot-plugging the devices would not help. Thanks, MArcel Yup - I am

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Laszlo Ersek
On 08/09/17 12:16, Paolo Bonzini wrote: > On 09/08/2017 12:00, Laszlo Ersek wrote: >> On 08/09/17 09:26, Paolo Bonzini wrote: >>> On 09/08/2017 03:06, Laszlo Ersek wrote: > 20.14% qemu-system-x86_64 [.] render_memory_region > 17.14% qemu-system-x86_64

Re: [Qemu-devel] [RFC 23/29] vub+postcopy: madvises

2017-08-09 Thread Alexey Perevalov
On 08/08/2017 08:06 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: On 06/28/2017 10:00 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Clear the area and turn off THP. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 11:47:05 +0200 Greg Kurz wrote: > On Wed, 9 Aug 2017 10:27:37 +0200 > Cornelia Huck wrote: > > > On Wed, 9 Aug 2017 10:23:04 +0200 > > Thomas Huth wrote: > > > But thinking about this again, I wonder whether it would be enough to > > > simply check for CONFIG_VIRTIO=y here

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Peter Maydell
On 9 August 2017 at 11:56, Laszlo Ersek wrote: > Now that I look at the "info mtree" monitor output of a random VM, I see > the following "address-space"s: > - memory > - I/O > - cpu-memory > - bunch of nameless ones, with top level regions called > "bus master container" > - several named "virt

Re: [Qemu-devel] [PATCH v5 09/17] migration: Start of multiple fd work

2017-08-09 Thread Juan Quintela
Peter Xu wrote: > On Tue, Aug 08, 2017 at 11:19:35AM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Mon, Jul 17, 2017 at 03:42:30PM +0200, Juan Quintela wrote: >> > >> > [...] >> > >> >> int multifd_load_setup(void) >> >> { >> >> int thread_count; >> >> -uint8_t i; >> >> >> >

Re: [Qemu-devel] Qemu and 32 PCIe devices

2017-08-09 Thread Paolo Bonzini
On 09/08/2017 12:56, Laszlo Ersek wrote: > Allow me one last question -- why (and since when) does each device have > its own separate address space? Is that related to the virtual IOMMU? No (though it helps there too). It's because a device that has bus-master DMA disabled in the command registe

Re: [Qemu-devel] [PATCH v4 11/22] test-qga: Simplify command construction

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > When you build qga input manually like this: > > cmd = g_strdup_printf("{'execute': 'guest-file-write'," > " 'arguments': {'handle': %" PRId64 "," > " 'buf-b64': '%s' } }", id, enc); > ret = qmp_fd(fixture->fd, cmd);

Re: [Qemu-devel] [PATCH v2] 9pfs: fix dependencies

2017-08-09 Thread Greg Kurz
On Wed, 9 Aug 2017 13:06:14 +0200 Cornelia Huck wrote: > On Wed, 9 Aug 2017 11:47:05 +0200 > Greg Kurz wrote: > > > On Wed, 9 Aug 2017 10:27:37 +0200 > > Cornelia Huck wrote: > > > > > On Wed, 9 Aug 2017 10:23:04 +0200 > > > Thomas Huth wrote: > > > > > But thinking about this again, I

Re: [Qemu-devel] [PATCH v3 5/7] block: add throttle block filter driver

2017-08-09 Thread Alberto Garcia
On Wed 09 Aug 2017 11:36:12 AM CEST, Manos Pitsidianakis wrote: > On Tue, Aug 08, 2017 at 05:04:48PM +0200, Alberto Garcia wrote: >>On Tue 08 Aug 2017 04:56:20 PM CEST, Manos Pitsidianakis wrote: > So basically if we have anonymous groups, we accept limits in the > driver options but only w

Re: [Qemu-devel] Making QEMU build with Python 3

2017-08-09 Thread Philippe Mathieu-Daudé
Hi Stefan, On 08/09/2017 07:16 AM, Stefan Hajnoczi wrote: [...]> Python scripts needed to build QEMU are the highest priority. They are invoked by ./configure or make. I've identified the following: scripts/signrom.py scripts/qapi*.py scripts/modules/module_block.py scripts/tracetool* [...]

Re: [Qemu-devel] [for-2.10 PATCH] 9pfs: local: fix fchmodat_nofollow() limitations

2017-08-09 Thread Greg Kurz
On Tue, 8 Aug 2017 15:28:35 -0500 Eric Blake wrote: > On 08/08/2017 03:24 PM, Eric Blake wrote: > > On 08/08/2017 03:10 PM, Philippe Mathieu-Daudé wrote: > >>> Technically, POSIX says (and 'man 2 open' agrees, modulo the fact that > >>> Linux still lacks O_SEARCH) that you MUST provide one of t

Re: [Qemu-devel] [PATCH v1 5/6] target/s390x: add basic MSA features

2017-08-09 Thread Cornelia Huck
On Fri, 21 Jul 2017 14:56:08 +0200 David Hildenbrand wrote: Finally got around to that one... > The STFLE bits for the MSA (extension) facilities simply indicate that > the respective instructions can be executed. The QUERY subfunction can then > be used to identify which features exactly are av

Re: [Qemu-devel] Making QEMU build with Python 3

2017-08-09 Thread Daniel P. Berrange
On Wed, Aug 09, 2017 at 11:16:58AM +0100, Stefan Hajnoczi wrote: > Ross created a bug to track Python 3 support: > > https://bugs.launchpad.net/qemu/+bug/1708462 > > Currently most Python code in QEMU is for Python 2.6+ only. There > have only been a few patches adding Python 3 support to cert

Re: [Qemu-devel] [PATCH v1 5/6] target/s390x: add basic MSA features

2017-08-09 Thread Thomas Huth
On 09.08.2017 15:01, Cornelia Huck wrote: > On Fri, 21 Jul 2017 14:56:08 +0200 > David Hildenbrand wrote: > > Finally got around to that one... > >> The STFLE bits for the MSA (extension) facilities simply indicate that >> the respective instructions can be executed. The QUERY subfunction can th

Re: [Qemu-devel] [PATCH v4 05/22] qobject: Simplify qobject_from_jsonv()

2017-08-09 Thread Eric Blake
On 08/09/2017 02:59 AM, Markus Armbruster wrote: > Eric Blake writes: > >> qobject_from_jsonv() was unusual in that it took a va_list*, instead >> of the more typical va_list; this was so that callers could pass >> NULL to avoid % interpolation. While this works under the hood, it >> is awkward

Re: [Qemu-devel] [PATCH v4 12/22] libqtest: Change qmp_fd_send() to drop varargs

2017-08-09 Thread Markus Armbruster
Eric Blake writes: > With the previous commit, no external clients are using qmp_fd() > or qmp_fd_sendv(). Making qmp_fd_sendv() static lets us refactor > the public qmp_fd_send() to be the common point where we send a > fixed string over the wire as well as log that string, while > qmp_fd_sendv

Re: [Qemu-devel] [PATCH v4 06/22] qobject: Perform %% interpolation in qobject_from_jsonf()

2017-08-09 Thread Eric Blake
On 08/09/2017 04:06 AM, Markus Armbruster wrote: > Eric Blake writes: > >> We want -Wformat to catch blatant programming errors in format >> strings that we pass to qobject_from_jsonf(). But if someone >> were to pass a JSON string "'%s'" as the format string, gcc would >> insist that it be pair

Re: [Qemu-devel] [PATCH v1 5/6] target/s390x: add basic MSA features

2017-08-09 Thread David Hildenbrand
>> @@ -792,6 +792,7 @@ static void add_qemu_cpu_model_features(S390FeatBitmap >> fbm) >> S390_FEAT_STFLE, >> S390_FEAT_EXTENDED_IMMEDIATE, >> S390_FEAT_EXTENDED_TRANSLATION_2, >> +S390_FEAT_MSA, >> S390_FEAT_EXTENDED_TRANSLATION_3, >> S390_FEAT

Re: [Qemu-devel] [PATCH v1 5/6] target/s390x: add basic MSA features

2017-08-09 Thread Cornelia Huck
On Wed, 9 Aug 2017 15:25:36 +0200 David Hildenbrand wrote: > > A comment which subfunction this is might be helpful. > > Indeed. > > /* query subfunction */ Looks good! > > > > >> +for (i = 0; i < 16; i++) { > >> +param_addr = wrap_address(env, env->regs[1] + i); >

Re: [Qemu-devel] [PATCH v4 11/22] test-qga: Simplify command construction

2017-08-09 Thread Eric Blake
On 08/09/2017 06:40 AM, Markus Armbruster wrote: > Eric Blake writes: > >> When you build qga input manually like this: >> >> cmd = g_strdup_printf("{'execute': 'guest-file-write'," >> " 'arguments': {'handle': %" PRId64 "," >> " 'buf-b64':

[Qemu-devel] [PATCH RFC 0/6] QEMU: kvm: cleanup kvm_slot handling

2017-08-09 Thread David Hildenbrand
If I am not missing something important here, we can heavily simplify the kvm_slot code. Flatview will make sure that we don't have to deal with overlapping slots. E.g. when a memory section is resized, we are first notified about the removal and then about the new memory section. So basically, we

[Qemu-devel] [PATCH RFC 1/6] kvm: require JOIN_MEMORY_REGIONS_WORKS

2017-08-09 Thread David Hildenbrand
We already require DESTROY_MEMORY_REGION_WORKS, JOIN_MEMORY_REGIONS_WORKS was added just half a year later. In addition, with flatview overlapping memory regions are first removed before adding the changed one. So we can't really detect joining memory regions this way. Let's just get rid of this

[Qemu-devel] [PATCH RFC 2/6] kvm: factor out alignment of memory section

2017-08-09 Thread David Hildenbrand
Factor it out, so we can reuse it later. Signed-off-by: David Hildenbrand --- accel/kvm/kvm-all.c | 59 +++-- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index eae61bb..f6ceeba 100644 --

[Qemu-devel] [PATCH RFC 6/6] kvm: kvm_log_sync() is only called with known memory sections

2017-08-09 Thread David Hildenbrand
Flatview will make sure that we can only end up in this function with memory sections that correspond to exactly one slot. So we don't have to iterate multiple times. There won't be overlapping slots but only matching slots. Properly align the section and look up the corresponding slot. This heavi

[Qemu-devel] [PATCH RFC 4/6] kvm: we never have overlapping slots in kvm_set_phys_mem()

2017-08-09 Thread David Hildenbrand
Due to how flatviews are handled, we will never have overlapping memory sections in kvm. address_space_update_topology_pass() will make sure that we will only get called for a) an existing memory section for which we only update parameters (log_start, log_stop). b) an existing memory section we w

[Qemu-devel] [PATCH RFC 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-08-09 Thread David Hildenbrand
Let's properly align the sections first and bail out if we would ever be called with a memory region we don't know yet. Signed-off-by: David Hildenbrand --- accel/kvm/kvm-all.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm

[Qemu-devel] [PATCH RFC 3/6] kvm: use start + size for memory ranges

2017-08-09 Thread David Hildenbrand
Convert kvm_lookup_matching_slot(). Signed-off-by: David Hildenbrand --- accel/kvm/kvm-all.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f6ceeba..bec157e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -

Re: [Qemu-devel] [PATCH v3 5/7] block: add throttle block filter driver

2017-08-09 Thread Manos Pitsidianakis
On Wed, Aug 09, 2017 at 02:36:20PM +0200, Alberto Garcia wrote: On Wed 09 Aug 2017 11:36:12 AM CEST, Manos Pitsidianakis wrote: On Tue, Aug 08, 2017 at 05:04:48PM +0200, Alberto Garcia wrote: On Tue 08 Aug 2017 04:56:20 PM CEST, Manos Pitsidianakis wrote: So basically if we have anonymous grou

Re: [Qemu-devel] [PATCH v4 12/22] libqtest: Change qmp_fd_send() to drop varargs

2017-08-09 Thread Eric Blake
On 08/09/2017 08:18 AM, Markus Armbruster wrote: > Eric Blake writes: > >> With the previous commit, no external clients are using qmp_fd() >> or qmp_fd_sendv(). Making qmp_fd_sendv() static lets us refactor >> the public qmp_fd_send() to be the common point where we send a >> fixed string over

Re: [Qemu-devel] Making QEMU build with Python 3

2017-08-09 Thread Stefan Hajnoczi
On Wed, Aug 9, 2017 at 2:10 PM, Daniel P. Berrange wrote: > On Wed, Aug 09, 2017 at 11:16:58AM +0100, Stefan Hajnoczi wrote: >> Ross created a bug to track Python 3 support: >> >> https://bugs.launchpad.net/qemu/+bug/1708462 >> >> Currently most Python code in QEMU is for Python 2.6+ only. Ther

Re: [Qemu-devel] [PATCH for 2.10 v3 5/6] docker: don't install device-tree-compiler build-deps in travis.docker

2017-08-09 Thread Philippe Mathieu-Daudé
On 08/07/2017 12:39 PM, Alex Bennée wrote: Installing the device-tree-compiler build-deps is a little extreme. We only actually need the binary so include it with the other packages. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée FWIW: Reviewed-by: Philippe Mathieu-Daudé Te

  1   2   3   >