Re: [Qemu-devel] [Qemu-arm] [RFC v2 0/8] VIRTIO-IOMMU device

2017-07-13 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Friday, July 7, 2017 11:15 PM > > Hi Ashish, > > On 07/07/17 00:33, Tian, Kevin wrote: > >> From: Kalra, Ashish [mailto:ashish.ka...@cavium.com] > >> Sent: Friday, July 7, 2017 7:24 AM > >> > >> I have a generic question

Re: [Qemu-devel] [Qemu-ppc] [PATCHv2 0/8] spapr: DRC cleanups (part VI)

2017-07-13 Thread David Gibson
On Thu, Jul 13, 2017 at 07:13:23AM -0300, Daniel Henrique Barboza wrote: > > > On 07/12/2017 09:57 PM, David Gibson wrote: > > On Wed, Jul 12, 2017 at 10:48:38AM -0300, Daniel Henrique Barboza wrote: > > > The dreaded Libvirt hotplug-migrate-hotunplug scenario is working nicely. > > Good to hear.

Re: [Qemu-devel] [PATCH 0/2] Two small improvements for docker.py

2017-07-13 Thread Fam Zheng
On Wed, 07/12 15:55, Fam Zheng wrote: > The first one is a small simplification, the second one is an error handling > improvement. > > Fam Zheng (2): > docker.py: Drop infile parameter > docker.py: Improve subprocess exit code handling Thanks, queued: https://github.com/famz/qemu/tree/s

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-07-13 Thread Bharat Bhushan
Hi Peter, > -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Friday, July 14, 2017 7:48 AM > To: Eric Auger > Cc: eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.com; m...@redhat.com; qemu-...@nongnu.org; > qemu-devel@nongnu.org; jean-phi

Re: [Qemu-devel] [RFC PATCH 1/1] memory: Support unaligned accesses on aligned-only models

2017-07-13 Thread Andrew Jeffery
Hi Paolo, Thanks for taking a look! On Thu, 2017-07-13 at 14:05 +0200, Paolo Bonzini wrote: > On 30/06/2017 05:00, Andrew Jeffery wrote: > > This RFC patch stems from a discussion on a patch for an ADC model[1] where > > it > > was pointed out that I should be able to use the .impl member of > >

[Qemu-devel] [PULL 15/18] pseries: Implement HPT resizing

2017-07-13 Thread David Gibson
This patch implements hypercalls allowing a PAPR guest to resize its own hash page table. This will eventually allow for more flexible memory hotplug. The implementation is partially asynchronous, handled in a special thread running the hpt_prepare_thread() function. The state of a pending resiz

[Qemu-devel] [PULL 17/18] pseries: Use smaller default hash page tables when guest can resize

2017-07-13 Thread David Gibson
We've now implemented a PAPR extension allowing PAPR guest to resize their hash page table (HPT) during runtime. This patch makes use of that facility to allocate smaller HPTs by default. Specifically when a guest is aware of the HPT resize facility, qemu sizes the HPT to the initial memory size,

[Qemu-devel] [PULL 11/18] spapr: Implement DR-indicator for physical DRCs only

2017-07-13 Thread David Gibson
According to PAPR, the DR-indicator should only be valid for physical DRCs, not logical DRCs. At the moment we implement it for all DRCs, so restrict it to physical ones only. We move the state to the physical DRC subclass, which means adding some QOM boilerplate to handle the newly distinct type

[Qemu-devel] [PULL 09/18] spapr: Consolidate DRC state variables

2017-07-13 Thread David Gibson
Each DRC has three fields describing its state: isolation_state, allocation_state and configured. At first this seems like a reasonable representation, since its based directly on the PAPR defined isolation-state and allocation-state indicators. However: * Only a few combinations of the two fie

[Qemu-devel] [PULL 08/18] spapr: Cleanups relating to DRC awaiting_release field

2017-07-13 Thread David Gibson
'awaiting_release' indicates that the host has requested an unplug of the device attached to the DRC, but the guest has not (yet) put the device into a state where it is safe to complete removal. 1. Rename it to 'unplug_requested' which to me at least is clearer 2. Remove the ->release_pending()

Re: [Qemu-devel] [PATCH] tests: switch pxe and vm gen id tests to use kvm

2017-07-13 Thread Paolo Bonzini
> NACK. > > It's not that simple. If you do it like this, you then suddenly get > these ugly '"kvm" accelerator not found' messages during "make check" > which we really should avoid. You're right, I thought these were shut up before with Laurent's patch. I think we should print a single message

[Qemu-devel] [PULL 14/18] pseries: Stubs for HPT resizing

2017-07-13 Thread David Gibson
This introduces stub implementations of the H_RESIZE_HPT_PREPARE and H_RESIZE_HPT_COMMIT hypercalls which we hope to add in a PAPR extension to allow run time resizing of a guest's hash page table. It also adds a new machine property for controlling whether this new facility is available. For now

[Qemu-devel] [PULL 18/18] pseries: Allow HPT resizing with KVM

2017-07-13 Thread David Gibson
So far, qemu implements the PAPR Hash Page Table (HPT) resizing extension with TCG. The same implementation will work with KVM PR, but we don't currently allow that. For KVM HV we can only implement resizing with the assistance of the host kernel, which needs a new capability and ioctl()s. This

[Qemu-devel] [PULL 05/18] spapr: Simplify unplug path

2017-07-13 Thread David Gibson
spapr_lmb_release() and spapr_core_release() call hotplug_handler_unplug() which after a bunch of indirection calls spapr_memory_unplug() or spapr_core_unplug(). But we already know which is the appropriate thing to call here, so we can just fold it directly into the release function. Once that's

[Qemu-devel] [PULL 13/18] ppc/pnv: Remove unused XICSState reference

2017-07-13 Thread David Gibson
From: Alexey Kardashevskiy e6f7e110ee70 "ppc/xics: remove the XICSState classes" got rid of XICSState, this is just an leftover. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Cédric Le Goater Signed-off-by: David Gibson --- include/hw/ppc/pnv_psi.h | 2 -- 1 file changed, 2 deletions(-)

[Qemu-devel] [PULL 10/18] spapr: Remove sPAPRConfigureConnectorState sub-structure

2017-07-13 Thread David Gibson
Most of the time, the state of a DRC object is contained in the single 'state' variable. However, during the transition from UNISOLATE to CONFIGURED state requires multiple calls to the ibm,configure-connector RTAS call to retrieve the device tree for the attached device. We need some extra state

[Qemu-devel] [PULL 04/18] spapr: Remove 'awaiting_allocation' DRC flag

2017-07-13 Thread David Gibson
The awaiting_allocation flag in the DRC was introduced by aab9913 "spapr_drc: Prevent detach racing against attach for CPU DR", allegedly to prevent a guest crash on racing attach and detach. Except.. information from the BZ actually suggests a qemu crash, not a guest crash. And there shouldn't b

[Qemu-devel] [PULL 16/18] pseries: Enable HPT resizing for 2.10

2017-07-13 Thread David Gibson
We've now implemented a PAPR extensions which allows PAPR guests (i.e. "pseries" machine type) to resize their hash page table during runtime. However, that extension is only enabled if explicitly chosen on the command line. This patch enables it by default for spapr-2.10, but leaves it disabled

[Qemu-devel] [PULL 07/18] spapr: Refactor spapr_drc_detach()

2017-07-13 Thread David Gibson
This function has two unused parameters - remove them. It also sets awaiting_release on all paths, except one. On that path setting it is harmless, since it will be immediately cleared by spapr_drc_release(). So factor it out of the if statements. Signed-off-by: David Gibson Reviewed-by: Greg

[Qemu-devel] [PULL 06/18] spapr: Abort on delete failure in spapr_drc_release()

2017-07-13 Thread David Gibson
We currently ignore errors from the object_property_del() in spapr_drc_release(). But the only way that could fail is if the property doesn't exist, in which case it's a bug that we're in spapr_drc_release() at all. So change from ignoring to abort()ing on errors. Signed-off-by: David Gibson --

[Qemu-devel] [PULL 02/18] spapr: Minor cleanups to events handling

2017-07-13 Thread David Gibson
The rtas_error_log structure is marked packed, which strongly suggests its precise layout is important to match an external interface. Along with that one could expect it to have a fixed endianness to match the same interface. That used to be the case - matching the layout of PAPR RTAS event form

[Qemu-devel] [PULL 01/18] spapr: migrate pending_events of spapr state

2017-07-13 Thread David Gibson
From: Daniel Henrique Barboza In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target so that the hotpl

[Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714

2017-07-13 Thread David Gibson
The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714

[Qemu-devel] [PULL 03/18] spapr: Treat devices added before inbound migration as coldplugged

2017-07-13 Thread David Gibson
From: Laurent Vivier When migrating a guest which has already had devices hotplugged, libvirt typically starts the destination qemu with -incoming defer, adds those hotplugged devices with qmp, then initiates the incoming migration. This causes problems for the management of spapr DRC state. Be

[Qemu-devel] [PULL 12/18] spapr: fix potential memory leak in spapr_core_plug()

2017-07-13 Thread David Gibson
From: Greg Kurz Since commit 5c1da81215c7 ("spapr: Remove unnecessary differences between hotplug and coldplug paths"), the CPU DT for the DRC is always allocated. This causes a memory leak for pseries-2.6 and older machine types, that don't support CPU hotplug and don't allocate DRCs for CPUs.

Re: [Qemu-devel] Poor 8K random IO performance inside the guest

2017-07-13 Thread Fam Zheng
On Fri, 07/14 04:28, Nagarajan, Padhu (HPE Storage) wrote: > During an 8K random-read fio benchmark, we observed poor performance inside > the guest in comparison to the performance seen on the host block device. The > table below shows the IOPS on the host and inside the guest with both > virtiosc

Re: [Qemu-devel] [PATCH] tests: switch pxe and vm gen id tests to use kvm

2017-07-13 Thread Thomas Huth
On 13.07.2017 19:00, Paolo Bonzini wrote: > On 13/07/2017 18:47, Michael S. Tsirkin wrote: >> Speed up tests on host systems with kvm support. >> >> Cc: Paolo Bonzini >> Cc: Thomas Huth >> Cc: Laurent Vivier >> Signed-off-by: Michael S. Tsirkin >> --- >> >> This is on top of my previous patch f

Re: [Qemu-devel] [PATCH v5 1/3] ACPI: Add new ACPI structures and macros

2017-07-13 Thread gengdongjiu
Michael, Thanks for your review. On 2017/7/14 1:01, Michael S. Tsirkin wrote: >> +typedef struct GhesState { >> +uint64_t ghes_addr_le; >> +} GhesState; >> + >> +void ghes_build_acpi(GArray *table_data, GArray *hardware_error, >> +BIOSLinker *linker); >> +void gh

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Thomas Huth
On 14.07.2017 01:04, Michael S. Tsirkin wrote: > On Thu, Jul 13, 2017 at 12:20:10PM -0300, Eduardo Habkost wrote: >> On Thu, Jul 13, 2017 at 04:00:00AM +0300, Michael S. Tsirkin wrote: >>> On Wed, Jul 12, 2017 at 10:22:33AM +0200, Thomas Huth wrote: We don't want to carry along old machine typ

Re: [Qemu-devel] [PULL 24/42] configure: add --disable-tcg configure option

2017-07-13 Thread Philippe Mathieu-Daudé
Hi Paolo, trying "./configure --disable-docs --disable-tcg" I get: CC x86_64-softmmu/exec.o qemu/exec.c: In function ‘breakpoint_invalidate’: qemu/exec.c:797:9: error: implicit declaration of function ‘tb_invalidate_phys_addr’ [-Werror=implicit-function-declaration] tb_invalida

Re: [Qemu-devel] [Qemu-arm] [PATCH 5/7] hw/arm/mps2: Add timers

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/11/2017 08:17 AM, Peter Maydell wrote: Add the CMSDK APB timers to the MPS2 board. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 1b60b12..b1a0df9 100644

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] hw/char/cmsdk-apb-timer: Implement CMSDK APB timer device

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/11/2017 08:17 AM, Peter Maydell wrote: Implement a model of the simple timer device found in the CMSDK. Good candidate to reference in a wiki page HowToCreateNewDeviceInQEMU Signed-off-by: Peter Maydell --- hw/timer/Makefile.objs | 1 + include/hw/timer/cmsdk-apb-time

Re: [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 04:05:58PM -0300, Eduardo Habkost wrote: > On Wed, Jul 12, 2017 at 02:53:40PM +0800, Peter Xu wrote: > [...] > > These properties should only be used for debugging/testing purpose, > > and we should not guarantee any interface compatibility for them (just > > like HMP). > >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Never use 'uname' to identify target OS

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 12:15 PM, Peter Maydell wrote: For a very long time we have used 'uname -s' as our fallback if we don't identify the target OS using a compiler #define. This obviously doesn't work for cross-compilation, and we've had a comment suggesting we fix this in configure for a long time. Si

Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotlb

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 08:49:44PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 04:13:43PM +0800, Peter Xu wrote: > > It is not wise to disgard all the IOTLB cache when cache size reaches > > max, but that's what we do now. A slightly better (but still simple) way > > to do this is, w

Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotlb

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:48:42PM +0800, Jason Wang wrote: > > > On 2017年07月12日 16:13, Peter Xu wrote: > >It is not wise to disgard all the IOTLB cache when cache size reaches > >max, but that's what we do now. A slightly better (but still simple) way > >to do this is, we just throw away the lea

Re: [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 08:02:40PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > We have the MigrationState as QDev now (which seems crazy). Let's > > continue to benefit. > > > > This series is exporting all migration capabilities/params as global > > parameters

Re: [Qemu-devel] [PATCH v3 2/4] intel_iommu: let iotlb size tunable

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 08:47:00PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 04:13:41PM +0800, Peter Xu wrote: > > We were having static IOTLB size as 1024. Let it be a tunable. We can > > also turns IOTLB off if we want, by specify the size as zero. > > > > The tunable is named a

Re: [Qemu-devel] [PATCH v3 1/4] intel_iommu: fix VTD_PAGE_MASK

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:41:32PM +0800, Jason Wang wrote: > > > On 2017年07月12日 16:13, Peter Xu wrote: > >IOMMUTLBEntry.iova is returned incorrectly in one PT path (though mostly > >we cannot really trigger this path, even if we do, we are mostly > >disgarding this value, so it didn't break anyt

[Qemu-devel] Poor 8K random IO performance inside the guest

2017-07-13 Thread Nagarajan, Padhu (HPE Storage)
During an 8K random-read fio benchmark, we observed poor performance inside the guest in comparison to the performance seen on the host block device. The table below shows the IOPS on the host and inside the guest with both virtioscsi (scsimq) and virtioblk (blkmq).

Re: [Qemu-devel] [PATCH v2 12/29] ui: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- ui/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [Qemu-devel] [PATCH v2 28/29] test-iov: replace g_malloc()+memcpy() with g_memdup()

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I found these pattern via grepping the source tree. I don't have a coccinelle script for it! Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- tests/test-iov.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 14/29] virtio-gpu: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu.c | 4 ++-- 1 file changed, 2 insertio

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 21/29] msix: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/msix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 16/29] console: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- include/ui/console.h | 2 +- 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 18/29] piix: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/piix.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v2 17/29] virtio-serial: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau --- hw/char/virtio-serial-bus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 05/29] i8254: use QEMU_ALIGN_DOWN

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:31 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/timer/i8254_common.c | 4 ++-- 1 file changed, 2 insertio

[Qemu-devel] [PATCH v2] spapr: ignore decr interrupts when MSR_EE is disabled

2017-07-13 Thread Nikunj A Dadhania
Rebooting a SMP TCG guest is broken for both single/multi threaded TCG. When reset happens, all the CPUs are in halted state. First CPU is brought out of reset and secondary CPUs would be initialized by the guest kernel using a rtas call start-cpu. However, in case of TCG, decrementer interrupts

Re: [Qemu-devel] [PATCH V7 00/12] Add COLO-proxy virtio-net support

2017-07-13 Thread Jason Wang
On 2017年07月04日 14:53, Zhang Chen wrote: If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to sec

Re: [Qemu-devel] [PATCH v2 3/5] migration/rdma: Allow cancelling while waiting for wrid

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 12:56:47PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When waiting for a WRID, if the other side dies we end up waiting > for ever with no way to cancel the migration. > Cure this by poll()ing the fd first with a timeout and checking >

Re: [Qemu-devel] [PATCH V2 3/4] net/colo-compare.c: Optimize unpredictable tcp options comparison

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: When network is busy, some tcp options(like sack) will unpredictable occur in primary side or secondary side. it will make packet size not same, but the two packet's payload is identical. colo just care about packet payload, so we skip the option field.

Re: [Qemu-devel] [PATCH v2 2/5] migration: Close file on failed migration load

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 12:56:46PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Closing the file before exit on a failure allows > the source to cleanup better, especially with RDMA. > > Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052 > > Signed-o

Re: [Qemu-devel] [PATCH V2 2/4] net/colo-compare.c: Compare the tcp packets that has the same sequence number

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: If primary packet's sequence number not same with secondary packet's sequence number, no need to compare the packet other field. Signed-off-by: Zhang Chen --- net/colo-compare.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/colo-compa

Re: [Qemu-devel] [PATCH V2 1/4] net/colo-compare.c: Add checkpoint min period to optimize performance

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: If colo-compare find out the first different packet that means the following packet almost is different. we needn't do a lot of checkpoint in this time, so we set the no-need-checkpoint peroid, default just set 3 second. Signed-off-by: Zhang Chen ---

Re: [Qemu-devel] CPU hotplug on POWER9 (TCG) fails in ppc_radix64_handle_mmu_fault

2017-07-13 Thread Suraj Jitindar Singh
Hi Cedric, On Wed, 2017-07-12 at 19:19 +0200, Cédric Le Goater wrote: > Hi,  > > Today, if you try to hotplug a CPU on a POWER9 guest (TCG), it fails > with an assert on the LPCR_UPRT bit missing in > ppc_radix64_handle_mmu_fault() > >   (qemu) device_add POWER9_v1.0-spapr-cpu-core,core-id=4,id=

Re: [Qemu-devel] [PATCH 1/3] qdev: provide DEFINE_PROP_INT64()

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:05:32PM +, Marc-André Lureau wrote: [...] > > diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h > > index 0604c33..2939614 100644 > > --- a/include/hw/qdev-properties.h > > +++ b/include/hw/qdev-properties.h > > @@ -13,6 +13,7 @@ extern Proper

Re: [Qemu-devel] [PATCH 3/5] migration/rdma: Allow cancelling while waiting for wrid

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 01:36:07PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jul 04, 2017 at 07:49:13PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > When waiting for a WRID, if the other side dies w

Re: [Qemu-devel] [PATCH 2/5] migration: Close file on failed migration load

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 12:00:22PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jul 04, 2017 at 07:49:12PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Closing the file before exit on a failure allows

Re: [Qemu-devel] [RFC 22/29] vhost+postcopy: Call wakeups

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 05:00:04PM +0200, Andrea Arcangeli wrote: > On Tue, Jul 11, 2017 at 12:22:32PM +0800, Peter Xu wrote: > > On Wed, Jun 28, 2017 at 08:00:40PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Cause the vhost-user client to be w

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-07-13 Thread Peter Xu
On Wed, Jun 07, 2017 at 06:01:25PM +0200, Eric Auger wrote: > This patch adds the actual implementation for the translation routine > and the virtio-iommu commands. > > Signed-off-by: Eric Auger [...] > static int virtio_iommu_attach(VirtIOIOMMU *s, > struct vir

[Qemu-devel] [PATCH v4 15/20] xlnx_zynqmp: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/xlnx-zynqmp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 64f52f8..cd8a4aa 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -140,11 +140,6 @@ static void xlnx_zynqmp

[Qemu-devel] [PATCH v4 18/20] mips_cmgcr: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/misc/mips_cmgcr.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c index a1edb53..211f609 100644 --- a/hw/misc/mips_cmgcr.c +++ b/hw/misc/mips_cmgcr.c @@ -181,18 +181,6 @@ static void

Re: [Qemu-devel] [PATCH v2] docker: Don't enable networking as a side-effect of DEBUG=1

2017-07-13 Thread Fam Zheng
On Thu, 07/13 15:43, Daniel P. Berrange wrote: > When trying to debug problems with tests it is natural to set > DEBUG=1 when starting the docker environment. Unfortunately > this has a side-effect of enabling an eth0 network interface > in the container, which changes the operating environment of

[Qemu-devel] [PATCH v4 20/20] spapr_rng: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/ppc/spapr_rng.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 80515eb..d2acd61 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -96,17 +96,11 @@ static target_ulong h_random(Powe

[Qemu-devel] [PATCH v4 17/20] xilinx_axidma: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/dma/xilinx_axidma.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 6065689..4f68f50 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -564,18 +564,6 @@ st

[Qemu-devel] [PATCH v4 19/20] cpu: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- exec.c| 27 +++ include/qom/cpu.h | 1 + qom/cpu.c | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/exec.c b/exec.c index a083ff8..385c2d0 100644 --- a/exec.c +++ b/exec.c @@ -27,6 +27,7 @@ #include

[Qemu-devel] [PATCH v4 16/20] xilinx_axienet: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/net/xilinx_axienet.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index b670184..05344b4 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@ -991,18 +991,6

[Qemu-devel] [PATCH v4 13/20] armv7m: Convert armv7m.memory to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 8efc4e8..1c837da 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -132,12 +132,6 @@ static void armv7m_instance_init(Object *obj)

[Qemu-devel] [PATCH v4 14/20] gicv3: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/intc/arm_gicv3_its_kvm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 1f8991b..39903d5 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_k

[Qemu-devel] [PATCH v4 09/20] virtio-crypto: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike other object_property_add_link() occurrences in virtio devices, virtio-crypto checks the "in use" state of the linked backend object in addition to qdev_prop_allow_set_link_before_realize. To convert it without needing to specialize DEFINE_PROP_LINK which always uses the qdev callback, move

Re: [Qemu-devel] About the trace framework

2017-07-13 Thread Wang Dong
On 07/11/2017 05:39 PM, Xie Changlong wrote: 在 7/11/2017 9:33 AM, Wang Dong 写道: On 07/10/2017 01:24 PM, Xie Changlong wrote: 在 7/9/2017 5:57 PM, Wang Dong 写道: Hi, I am new to QEMU. But I got some problem so that I want to figure it out. So I try to debug qemu to see what happened. An

[Qemu-devel] [PATCH v4 12/20] armv7m: Convert bitband.source-mamory to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index c8a11f2..8efc4e8 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -97,12 +97,6 @@ static void bitband_init(Object *obj) BitBan

[Qemu-devel] [PATCH v4 05/20] qdev: Add const qualifier to PropertyInfo definitions

2017-07-13 Thread Fam Zheng
The remaining non-const ones are in e1000e which modifies description at runtime. They can be addressed separatedly. Signed-off-by: Fam Zheng --- hw/core/qdev-properties-system.c | 8 +++ hw/core/qdev-properties.c| 44 +- hw/s390x/css.c

[Qemu-devel] [PATCH v4 04/20] qmp: Use ObjectProperty.type if present

2017-07-13 Thread Fam Zheng
The dynamic value is more informative in the case of link property, otherwise it is the same. Signed-off-by: Fam Zheng --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index 133fdfc..9f8a167 100644 --- a/qmp.c +++ b/qmp.c @@ -496,7 +496,8 @@ static De

[Qemu-devel] [PATCH v4 10/20] dimm: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, dimm checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev general check callback, move the extra ch

[Qemu-devel] [PATCH v4 08/20] virtio-rng: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- hw/virtio/virtio-rng.c | 12 +--- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index c5e0606..a492d0f 100644 --- a/hw/s390x/virtio-c

[Qemu-devel] [PATCH v4 03/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
This property can be used to replace the object_property_add_link in device code, to add a link to other objects, which is a common pattern. Signed-off-by: Fam Zheng --- hw/core/qdev-properties.c| 18 ++ include/hw/qdev-core.h | 1 + include/hw/qdev-properties.h | 9 +

[Qemu-devel] [PATCH v4 06/20] virtio-blk: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 6 ++ hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index c0bd247..b750bd8 100644 --- a/hw/block/virtio-blk.c +++

[Qemu-devel] [PATCH v4 11/20] ivshmem: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, ivshmem checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev callback, move the extra check to devi

[Qemu-devel] [PATCH v4 07/20] virtio-scsi: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/scsi/virtio-scsi.c | 13 ++--- hw/virtio/virtio-pci.c | 2 -- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index a0437d1..c5e0606 100644 --- a/hw/s390x/virtio

[Qemu-devel] [PATCH v4 01/20] qom: enforce readonly nature of link's check callback

2017-07-13 Thread Fam Zheng
From: Igor Mammedov link's check callback is supposed to verify/permit setting it, however currently nothing restricts it from misusing it and modifying target object from within. Make sure that readonly semantics are checked by compiler to prevent callback's misuse. Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v4 02/20] qdev: Introduce PropertyInfo.create

2017-07-13 Thread Fam Zheng
This allows property implementation to provide a specialized property creation method. Update conditions guarding property types accordingly. Signed-off-by: Fam Zheng --- hw/core/qdev.c | 31 +++ include/hw/qdev-core.h | 1 + qmp.c | 2 +-

[Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
v4: Add a pointer type param to DEFINE_PROP_LINK, don't change pointer types to "Object *". [Paolo] v3: Include Igor's patch, and fix virtio-crypto too. Always use qdev_prop_allow_set_link_before_realize and OBJ_PROP_LINK_UNREF_ON_RELEASE. Include as many applicable devices as poss

Re: [Qemu-devel] [PATCH v3 06/20] virtio-blk: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
On Thu, 07/13 15:42, Paolo Bonzini wrote: > On 04/07/2017 08:43, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > hw/block/dataplane/virtio-blk.c | 2 +- > > hw/block/virtio-blk.c | 5 + > > hw/s390x/virtio-ccw.c | 2 -- > > hw/virtio/virtio-pci.c | 2 --

Re: [Qemu-devel] [PATCH v2 8/8] virtio-crypto: use virtqueue_error for errors with queue context

2017-07-13 Thread Gonglei (Arei)
> -Original Message- > From: Cornelia Huck [mailto:coh...@redhat.com] > Sent: Thursday, July 13, 2017 11:37 PM > To: Ladi Prosek > Cc: qemu-devel; Fernando Casas Schössow; Michael S. Tsirkin; Jason Wang; > Markus Armbruster; Greg Kurz; Gonglei (Arei); > aneesh.ku...@linux.vnet.ibm.com; Ste

Re: [Qemu-devel] [PATCH] target/i386: Fix ANDN (bmi)

2017-07-13 Thread Richard Henderson
On 07/13/2017 11:51 AM, Ricardo Ribalda Delgado wrote: Operands on ANDN are swapped. Tested with the following function: long test_andn(long v1, long v2){ return (~v1 & v2); } Compiled with: gcc kk.c -mbmi -O3 -Wall 0910 : 910:c4 e2 c0 f2 c6andn %rsi,%rdi,

[Qemu-devel] [PATCH 2/8] target/alpha: Copy tb->flags into DisasContext

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 4a627fc..48be19a 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -49,6 +

[Qemu-devel] [PATCH 5/8] target/alpha: Fix temp leak in gen_mtpr

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index d684a7b..5e37b1a 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -1392,7 +

[Qemu-devel] [PATCH 8/8] target/alpha: Log temp leaks

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index aaaf28f..90e6d52 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -3013,6 +3013,8 @@ void gen_in

[Qemu-devel] [PATCH 1/8] target/alpha: Remove amask from tb->flags

2017-07-13 Thread Richard Henderson
This value is constant for the cpu and does not need to be stored within the TB. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 9 --- target/alpha/translate.c | 70 ++-- 2 files changed, 38 insertions(+), 41 deletions(-) diff --

[Qemu-devel] [PATCH 6/8] target/alpha: Fix temp leak in gen_call_pal

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 5e37b1a..326af7f 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @

[Qemu-devel] [PATCH 3/8] target/alpha: Merge several flag bytes into ENV->FLAGS

2017-07-13 Thread Richard Henderson
The flags are arranged such that we can manipulate them either a whole, or as individual bytes. The computation within cpu_get_tb_cpu_state is now reduced to a single load and mask. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 70 + hw/alph

[Qemu-devel] [PATCH 4/8] target/alpha: Fix temp leak in gen_bcond

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 140d6f3..d684a7b 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -56

[Qemu-devel] [PATCH 7/8] target/alpha: Fix temp leak in gen_fbcond

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 326af7f..aaaf28f 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -613,8 +613,12

[Qemu-devel] [PATCH 0/8] target/alpha cleanups

2017-07-13 Thread Richard Henderson
The new title holder for perf top is helper_lookup_tb_ptr. Those targets that have a complicated cpu_get_tb_cpu_state function are going to regret that. This cleans up the Alpha version of that function such that it is just two loads and one mask. Which is one practically-free mask away from bein

Re: [Qemu-devel] Disparity between host and guest CPU utilization during disk IO benchmark

2017-07-13 Thread Nagarajan, Padhu (HPE Storage)
Thanks Stefan. Couldn't get to this earlier. Did another run and took a diff of /proc/interrupts before and after the run. It shows all the interrupts for 'virtio7-req.0' going to CPU1. I guess that explains the "CPU1/KVM" vcpu utilization on the host. 34:147 666085 0

Re: [Qemu-devel] Nios2 documentation page now up

2017-07-13 Thread Marek Vasut
On 07/13/2017 09:59 PM, Programmingkid wrote: > > On Jul 13, 2017, at 3:01 PM, Marek Vasut wrote: > >> On 07/13/2017 08:23 PM, Programmingkid wrote: >>> >>> On Jul 13, 2017, at 10:48 AM, Marek Vasut wrote: >>> On 07/13/2017 04:28 PM, Programmingkid wrote: > Hi I have recently created a n

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 05:29:01PM +0100, Daniel P. Berrange wrote: > Yep, I'm amenable to that POV too. It is entirely valid to say that if > downstream distros need to care about such ancient back-compat, then they > will just have to do the extra work to use git history to undelete any bits > th

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 12:20:10PM -0300, Eduardo Habkost wrote: > On Thu, Jul 13, 2017 at 04:00:00AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 10:22:33AM +0200, Thomas Huth wrote: > > > We don't want to carry along old machine types forever. If we are able to > > > remove the pc

  1   2   3   4   5   6   >