[Qemu-devel] [PATCH qemu RFC 1/7] vfio/spapr: Fix indirect levels calculation

2018-11-13 Thread Alexey Kardashevskiy
The current code assumes that we can address more bits on a PCI bus for DMA than we really can. Limit to the known tested maximum of 55 bits and assume 64K IOMMU pages. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/spapr.c | 3 ++- hw/vfio/trace-events | 2 +- 2 files changed, 3

[Qemu-devel] [PATCH qemu RFC 7/7] spapr: Add NVLink2 pass through support

2018-11-13 Thread Alexey Kardashevskiy
ver relies on this too). This adds fake NPU nodes to make the guest platform code work, specifically "ibm,npu-link-index". Signed-off-by: Alexey Kardashevskiy --- hw/vfio/pci.h | 2 + include/hw/pci-host/spapr.h | 28 include/hw/ppc/spapr.h | 3

[Qemu-devel] [PATCH qemu RFC 4/7] vfio/nvidia-v100: Disable VBIOS update

2018-11-13 Thread Alexey Kardashevskiy
ecial MMIO registers to disable NVLink till GPU is reset. This blocks GPU VBIOS update to add an extra level of assurance that the firmware does not get reflashed with a malicious firmware which does not implement NVLink disabling mechanism. Signed-off-by: Alexey Kardashevskiy --- NVIDIA firm

[Qemu-devel] [PATCH qemu RFC 6/7] vfio: Make vfio_get_region_info_cap public

2018-11-13 Thread Alexey Kardashevskiy
This makes vfio_get_region_info_cap() to be used in quirks. Signed-off-by: Alexey Kardashevskiy --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/common.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio

[Qemu-devel] [PATCH qemu RFC 0/7] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2018-11-13 Thread Alexey Kardashevskiy
comment. Thanks. Alexey Kardashevskiy (7): vfio/spapr: Fix indirect levels calculation linux-header: Update for new capabilities pci: Move NVIDIA vendor id to the rest of ids vfio/nvidia-v100: Disable VBIOS update spapr-iommu: Always advertise the maximum possible DMA window size

[Qemu-devel] [PATCH qemu RFC 5/7] spapr-iommu: Always advertise the maximum possible DMA window size

2018-11-13 Thread Alexey Kardashevskiy
) supports sparse allocation and also checks for locked_vm limit so it is unable to cause the host any damage. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_rtas_ddw.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc

[Qemu-devel] [PATCH qemu RFC 3/7] pci: Move NVIDIA vendor id to the rest of ids

2018-11-13 Thread Alexey Kardashevskiy
sPAPR code will use it too so move it from VFIO to the common code. Signed-off-by: Alexey Kardashevskiy --- include/hw/pci/pci_ids.h | 2 ++ hw/vfio/pci-quirks.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci_ids.h b/include/hw/pci/pci_ids.h index

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-12 Thread Alexey Kardashevskiy
On 12/11/2018 20:05, Greg Kurz wrote: > On Mon, 12 Nov 2018 15:12:26 +1100 > Alexey Kardashevskiy wrote: > >> On 12/11/2018 05:10, Greg Kurz wrote: >>> Hi Alexey, >>> >>> Just a few remarks. See below. >>> >>> On Thu

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-11 Thread Alexey Kardashevskiy
On 12/11/2018 05:10, Greg Kurz wrote: > Hi Alexey, > > Just a few remarks. See below. > > On Thu, 8 Nov 2018 12:44:06 +1100 > Alexey Kardashevskiy wrote: > >> SLOF receives a device tree and updates it with various properties >> before switching to the gues

[Qemu-devel] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-07 Thread Alexey Kardashevskiy
KVMPPC_H_UPDATE_DT (new private hypercall) handler. This adds an @update_dt_enabled machine property to allow backward migration. SLOF already has a hypercall since https://github.com/aik/SLOF/commit/e6fc84652c9c0073f9183 Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr.h | 7 ++- hw/ppc

[Qemu-devel] [PATCH qemu] hmp: Print if memory section is registered in KVM

2018-11-07 Thread Alexey Kardashevskiy
;KVM" for flatviews. For example: Root memory region: system -0003 (prio 0, ram): ppc_spapr.ram KVM 2020-203f (prio 1, i/o): virtio-pci Signed-off-by: Alexey Kardashevskiy --- include/sysemu/kvm.h | 1 + accel/kvm/kvm-all.c | 7

Re: [Qemu-devel] [PATCH v2 2/2] spapr_pci: rename some structured types

2018-10-14 Thread Alexey Kardashevskiy
On 12/10/2018 20:05, Greg Kurz wrote: > According to CODING_STYLE, structured types names are expected to be > in CamelCase but we have: > > typedef struct spapr_pci_msi { > uint32_t first_irq; > uint32_t num; > } spapr_pci_msi; > > typedef struct spapr_pci_msi_mig { > uint32_t key

Re: [Qemu-devel] [PATCH qemu v2] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-07-23 Thread Alexey Kardashevskiy
On 23/07/2018 13:11, David Gibson wrote: > On Wed, Jun 20, 2018 at 07:10:12PM +1000, Alexey Kardashevskiy wrote: >> At the moment the PPC64/pseries guest only supports 4K/64K/16M IOMMU >> pages and POWER8 CPU supports the exact same set of page size so >> so far things worke

Re: [Qemu-devel] [PATCH qemu v2] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-07-19 Thread Alexey Kardashevskiy
On 20/6/18 7:10 pm, Alexey Kardashevskiy wrote: > At the moment the PPC64/pseries guest only supports 4K/64K/16M IOMMU > pages and POWER8 CPU supports the exact same set of page size so > so far things worked fine. > > However POWER9 supports different set of sizes - 4K/64K/

Re: [Qemu-devel] [Qemu-ppc] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-11 Thread Alexey Kardashevskiy
On Thu, 12 Jul 2018 07:01:34 +0200 Thomas Huth wrote: > On 12.07.2018 03:01, David Gibson wrote: > > On Wed, Jul 11, 2018 at 08:53:05PM +1000, Alexey Kardashevskiy wrote: > >> On Wed, 11 Jul 2018 16:26:19 +1000 > >> David Gibson wrote: > >> > >&

Re: [Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-11 Thread Alexey Kardashevskiy
On Wed, 11 Jul 2018 16:26:19 +1000 David Gibson wrote: > On Tue, Jul 10, 2018 at 05:14:53PM +1000, Alexey Kardashevskiy wrote: > > On Tue, 10 Jul 2018 16:42:48 +1000 > > David Gibson wrote: > > > > > On Tue, Jul 10, 2018 at 12:22:44PM +1000, Alexey Kardashevsk

Re: [Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-10 Thread Alexey Kardashevskiy
On Tue, 10 Jul 2018 16:42:48 +1000 David Gibson wrote: > On Tue, Jul 10, 2018 at 12:22:44PM +1000, Alexey Kardashevskiy wrote: > > On Mon, 2 Jul 2018 16:26:44 +1000 > > Alexey Kardashevskiy wrote: > > > > > The following changes since commit > > > e

Re: [Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-09 Thread Alexey Kardashevskiy
On Mon, 2 Jul 2018 16:26:44 +1000 Alexey Kardashevskiy wrote: > The following changes since commit edb1fb337f65f82fe32b989c4f018efe85c1dddb: > > pseries: Update SLOF firmware image (2018-07-02 16:21:30 +1000) > > are available in the git repository at: > > g...@gi

[Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-02 Thread Alexey Kardashevskiy
The following changes since commit edb1fb337f65f82fe32b989c4f018efe85c1dddb: pseries: Update SLOF firmware image (2018-07-02 16:21:30 +1000) are available in the git repository at: g...@github.com:aik/qemu.git tags/qemu-slof-20180702 for you to fetch changes up to edb1fb337f65f82fe32b989c4f

[Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2018-07-02 Thread Alexey Kardashevskiy
The following changes since commit edb1fb337f65f82fe32b989c4f018efe85c1dddb: pseries: Update SLOF firmware image (2018-07-02 16:21:30 +1000) are available in the git repository at: g...@github.com:aik/qemu.git tags/qemu-slof-20180702 for you to fetch changes up to edb1fb337f65f82fe32b989c4f

[Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image to qemu-slof-20180621

2018-06-21 Thread Alexey Kardashevskiy
The following changes since commit 840d3ddc259b70a7b4e1ba367945cc31a45c93c6: pseries: Update SLOF firmware image to qemu-slof-20180621 (2018-06-21 19:16:26 +1000) are available in the git repository at: g...@github.com:aik/qemu.git tags/qemu-slof-20180621 for you to fetch changes up to 840

[Qemu-devel] [PATCH qemu v2] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-06-20 Thread Alexey Kardashevskiy
using the IOMMU page size selected by the PHB pagesize property as this only changes the underlying hardware TCE table granularity. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * fixed biggest but smaller page size calculation * limit IOMMU pagesize to the system pagesize --- include/hw/vfio

[Qemu-devel] [PATCH qemu] xics-kvm: Fix compile warning

2018-06-19 Thread Alexey Kardashevskiy
; ^~~ Discovered with gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0 from Ubuntu 18.04. Fixes: bf358b541b8 "xics_kvm: use KVM helpers" Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics_kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c ind

Re: [Qemu-devel] [PATCH qemu v4] memory/hmp: Print owners/parents in "info mtree"

2018-06-18 Thread Alexey Kardashevskiy
On Mon, 4 Jun 2018 13:25:11 +1000 Alexey Kardashevskiy wrote: > This adds owners/parents (which are the same, just occasionally > owner==NULL) printing for memory regions; a new '-o' flag > enabled new output. > > Signed-off-by: Alexey Kardashevskiy Pin

[Qemu-devel] [RFC PATCH qemu] qdev: Use "string" for QOM string properties

2018-06-05 Thread Alexey Kardashevskiy
7;string', 'name': 'kernel'}] However for the device properties copied from DEVICE_CLASS(class)->props, "str" is used for a type (vnet0 is "-device virtio-net-pci,id=vnet0"): {"execute": "qom-list", "arguments": {&qu

[Qemu-devel] [PATCH qemu v4] memory/hmp: Print owners/parents in "info mtree"

2018-06-03 Thread Alexey Kardashevskiy
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: Alexey Kardashevskiy --- The only orphan object I know is printed now as: - (prio 0, i/o): mem

Re: [Qemu-devel] [PATCH] qom: support orphan objects in object_get_canonical_path

2018-05-30 Thread Alexey Kardashevskiy
On 31/5/18 2:23 am, Paolo Bonzini wrote: > Mostly a rewrite, in order to keep the loop simple. > > Signed-off-by: Paolo Bonzini > --- > qom/object.c | 29 - > 1 file changed, 16 insertions(+), 13 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index 0fc97

[Qemu-devel] [PATCH qemu v3 0/2] memory/hmp: Print owners/parents in "info mtree"

2018-05-30 Thread Alexey Kardashevskiy
This is a debug extension to "into mtree" to print a memory region owner/parent. This is based on sha1 e609fa7 Peter Maydell "Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2018-05-29-v1.for-upstream' into staging". Please comment. Than

[Qemu-devel] [PATCH qemu v3 1/2] object: Handle objects with no parents

2018-05-30 Thread Alexey Kardashevskiy
and does not add a leading slash to tell the reader that the path is partial as the owner object is detached. Signed-off-by: Alexey Kardashevskiy --- I have not tested the case with obj==NULL and path!=NULL as this is for objects which have parents which are not attached to the root and we do

[Qemu-devel] [PATCH qemu v3 2/2] memory/hmp: Print owners/parents in "info mtree"

2018-05-30 Thread Alexey Kardashevskiy
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * removed QOM's "id" property as there are no objects left which would have

[Qemu-devel] [PATCH qemu v3] qom: Document qom/device-list-properties implementation specific

2018-05-30 Thread Alexey Kardashevskiy
criptions about the limitation. Reviewed-by: Markus Armbruster Acked-by: Paolo Bonzini Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * adjusted commit log with Markus suggestion * added a-by/r-by --- qapi/misc.json | 8 1 file changed, 8 insertions(+) diff --git a/qapi/misc.js

Re: [Qemu-devel] [PATCH qemu v2 1/2] memory/hmp: Print owners/parents in "info mtree"

2018-05-29 Thread Alexey Kardashevskiy
On 3/5/18 3:40 pm, Alexey Kardashevskiy wrote: > On 30/4/18 7:53 pm, Paolo Bonzini wrote: >> On 30/04/2018 08:25, Alexey Kardashevskiy wrote: >>> +DeviceState *dev = (DeviceState *) object_dynamic_cast(obj, >>> TYPE_DEVICE); >>> +const char *id = o

Re: [Qemu-devel] [PATCH qemu v2] slirp/debug: Print IP addresses in human readable form

2018-05-15 Thread Alexey Kardashevskiy
On 16/5/18 12:30 am, Eric Blake wrote: > On 05/14/2018 02:00 AM, Alexey Kardashevskiy wrote: >> On 13/3/18 6:44 pm, Samuel Thibault wrote: >>> Alexey Kardashevskiy, on mar. 13 mars 2018 15:49:44 +1100, wrote: >>>> Signed-off-by: Alexey Kardashevskiy >

[Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific

2018-05-14 Thread Alexey Kardashevskiy
p and this behaviour might confuse the user. For example, PIIX4 does that from piix4_pm_realize(): hw/acpi/piix4.c|477| object_property_add_uint8_ptr(OBJECT(s), ACPI_PM_PROP_ACPI_ENABLE_CMD, This adds a note to the command descriptions about the limitation. Signed-off-by: Alexey Kardashe

Re: [Qemu-devel] [PATCH qemu v2] slirp/debug: Print IP addresses in human readable form

2018-05-14 Thread Alexey Kardashevskiy
On 13/3/18 6:44 pm, Samuel Thibault wrote: > Alexey Kardashevskiy, on mar. 13 mars 2018 15:49:44 +1100, wrote: >> Signed-off-by: Alexey Kardashevskiy > > Applied to my tree, thanks! And what is your tree, is this something to be merged sometime

Re: [Qemu-devel] ping latency issue on passthrough guest

2018-05-13 Thread Alexey Kardashevskiy
On 11/5/18 5:20 pm, Zhu Yijun wrote: > Hi all, > > I booted two sr-iov guests using KVM-VFIO and pinged each other with > no-load one night. I found that most of the latency was little than 0.1ms, > but several icmp_seq greater than 10ms, even up to 1000ms; > [...] > >VF used by these two

Re: [Qemu-devel] [PATCH v5 6/6] MAINTAINERS: add entries for AP

2018-05-08 Thread Alexey Kardashevskiy
On 8/5/18 10:46 pm, Cornelia Huck wrote: > On Tue, 8 May 2018 08:25:03 -0400 > Tony Krowiak wrote: > >> Added entries for the s390 adjunct processor (AP) support. >> >> Signed-off-by: Tony Krowiak >> --- >> MAINTAINERS | 14 ++ >> 1 files changed, 14 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-05-02 Thread Alexey Kardashevskiy
On 2/5/18 7:50 pm, Paolo Bonzini wrote: > On 02/05/2018 11:33, Alexey Kardashevskiy wrote: >>>>>>> +# Note: the handler creates an object, enumerates properties and >>>>>>> destroys >>>>>>> +# the object so it only lists properti

Re: [Qemu-devel] [PATCH qemu v2 1/2] memory/hmp: Print owners/parents in "info mtree"

2018-05-02 Thread Alexey Kardashevskiy
On 30/4/18 7:53 pm, Paolo Bonzini wrote: > On 30/04/2018 08:25, Alexey Kardashevskiy wrote: >> +DeviceState *dev = (DeviceState *) object_dynamic_cast(obj, >> TYPE_DEVICE); >> +const char *id = object_property_print(obj, "id", true, NULL); > > The on

Re: [Qemu-devel] [PATCH qemu] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-05-02 Thread Alexey Kardashevskiy
On 3/5/18 11:03 am, David Gibson wrote: > On Wed, May 02, 2018 at 06:59:53PM +1000, Alexey Kardashevskiy wrote: >> On 2/5/18 4:37 pm, David Gibson wrote: >>> On Wed, May 02, 2018 at 02:45:57PM +1000, Alexey Kardashevskiy wrote: >>>> At the moment the PPC64/pseries

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-05-02 Thread Alexey Kardashevskiy
On 2/5/18 7:11 pm, Paolo Bonzini wrote: > On 02/05/2018 08:34, Markus Armbruster wrote: >> Alexey Kardashevskiy writes: >> >>> On 30/4/18 7:39 pm, Paolo Bonzini wrote: >>>> On 30/04/2018 08:52, Alexey Kardashevskiy wrote: >>>>> diff --git a/

Re: [Qemu-devel] [PATCH qemu] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-05-02 Thread Alexey Kardashevskiy
On 2/5/18 4:37 pm, David Gibson wrote: > On Wed, May 02, 2018 at 02:45:57PM +1000, Alexey Kardashevskiy wrote: >> At the moment the PPC64/pseries guest only supports 4K/64K/16M IOMMU >> pages and POWER8 CPU supports the exact same set of page size so >> so far things worke

[Qemu-devel] [PATCH qemu] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-05-01 Thread Alexey Kardashevskiy
es on platforms other than pseries. Signed-off-by: Alexey Kardashevskiy --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/common.c | 3 +++ hw/vfio/spapr.c | 15 ++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/hw/vfio/vfio-common.h b/in

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-05-01 Thread Alexey Kardashevskiy
On 1/5/18 11:01 pm, Eric Blake wrote: > On 04/30/2018 01:52 AM, Alexey Kardashevskiy wrote: >> Signed-off-by: Alexey Kardashevskiy >> --- > > There is no rationale in the commit body (a good commit message has a > one-line summary of "what", then a paragraph sta

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-05-01 Thread Alexey Kardashevskiy
On 30/4/18 7:39 pm, Paolo Bonzini wrote: > On 30/04/2018 08:52, Alexey Kardashevskiy wrote: >> diff --git a/qapi/misc.json b/qapi/misc.json >> index 5636f4a..399ec74 100644 >> --- a/qapi/misc.json >> +++ b/qapi/misc.json >> @@ -1491,6 +1491,10 @@ >> #

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-04-30 Thread Alexey Kardashevskiy
On 30/4/18 4:56 pm, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. wow, did not know that the format is that strict :) I'll repost if there is no other comments about actual notes. -- Alexey

[Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-04-29 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- qapi/misc.json | 9 + 1 file changed, 9 insertions(+) diff --git a/qapi/misc.json b/qapi/misc.json index 5636f4a..399ec74 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1491,6 +1491,10 @@ # # List properties associated with a device

[Qemu-devel] [PATCH qemu v2 1/2] memory/hmp: Print owners/parents in "info mtree"

2018-04-29 Thread Alexey Kardashevskiy
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * cleanups --- include/exec/memory.h | 2 +- memory.c

[Qemu-devel] [PATCH qemu v2 0/2] memory/hmp: Print owners/parents in "info mtree"

2018-04-29 Thread Alexey Kardashevskiy
This is a debug extension to "into mtree" to print a memory region owner/parent. This is based on sha1 4743c23 Peter Maydell "Update version for v2.12.0 release". Please comment. Thanks. Alexey Kardashevskiy (2): memory/hmp: Print owners/parents in "info mtree&

[Qemu-devel] [PATCH qemu v2 2/2] object: Handle objects with no parents

2018-04-29 Thread Alexey Kardashevskiy
crashing. Signed-off-by: Alexey Kardashevskiy --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 4677951..e0e300b 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1668,7 +1668,7 @@ gchar *object_get_canonical_path(Object *obj

Re: [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"

2018-04-19 Thread Alexey Kardashevskiy
On 19/4/18 8:33 pm, Paolo Bonzini wrote: > On 19/04/2018 04:41, Alexey Kardashevskiy wrote: >> it just seems to >> be a real case and majority of object_get_canonical_path_component() users >> do not test the returned pointer. >> >> === >> d

Re: [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"

2018-04-18 Thread Alexey Kardashevskiy
On 12/4/18 7:15 pm, Paolo Bonzini wrote: > On 29/03/2018 05:21, Alexey Kardashevskiy wrote: >> +DeviceState *dev = (DeviceState *) object_dynamic_cast(obj, >> TYPE_DEVICE); >> +const char *id = object_property_print(obj, "id", true, NULL);

Re: [Qemu-devel] [RFC PATCH v2] spapr: Support ibm, dynamic-memory-v2 property

2018-04-10 Thread Alexey Kardashevskiy
On 10/4/18 1:02 pm, David Gibson wrote: > On Mon, Apr 09, 2018 at 11:55:38AM +0530, Bharata B Rao wrote: >> The new property ibm,dynamic-memory-v2 allows memory to be represented >> in a more compact manner in device tree. > > I still need to look at this in more detail, but to start with: > what'

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

2018-04-05 Thread Alexey Kardashevskiy
On 5/4/18 6:44 pm, KONRAD Frederic wrote: > > > 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 > me

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

2018-04-04 Thread Alexey Kardashevskiy
On 5/4/18 11:22 am, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > Sadly I'm missing something, this does not work. What does not work precisely? memory_region_set_priority() is not called or visit_type_int32() does not return priority, etc? > > memory.c | 18 ++

[Qemu-devel] [PATCH qemu] spapr: Initialize reserved areas list in FDT in H_CAS handler

2018-04-04 Thread Alexey Kardashevskiy
map area. However when DTC's "Improve libfdt's memory safety" changeset hits the QEMU upstream, there will be errors reported and crashes observed. This fixes the problem by adding an empty entry to the reserved map, just like create_device_tree() does already. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 for 2.12] vfio: Use a trace point when a RAM section cannot be DMA mapped

2018-04-04 Thread Alexey Kardashevskiy
term, the plan is to advise the user about >> BAR relocation relevance. >> >> Fixes: 567b5b309abe "vfio/pci: Relax DMA map errors for MMIO regions" >> Signed-off-by: Alexey Kardashevskiy >> Signed-off-by: Eric Auger >> >> --- >> >> v1

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-04-02 Thread Alexey Kardashevskiy
On 29/3/18 9:14 pm, Auger Eric wrote: > Hi Alexey, > On 29/03/18 03:55, Alexey Kardashevskiy wrote: >> On 29/3/18 8:03 am, Auger Eric wrote: >>> Hi Alexey, Alex, >>> On 22/03/18 09:18, Alexey Kardashevskiy wrote: >>>> The 567b5b309abe ("vfio/pci

[Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"

2018-03-28 Thread Alexey Kardashevskiy
This adds owners/parents (which are the same, just occasionally owner==NULL) printing for memory regions; a new '-o' flag enabled new output. Signed-off-by: Alexey Kardashevskiy --- Does this look anything useful? There are cases ("msi", "msix-table", "msix

Re: [Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-28 Thread Alexey Kardashevskiy
On 29/3/18 8:03 am, Auger Eric wrote: > Hi Alexey, Alex, > On 22/03/18 09:18, Alexey Kardashevskiy wrote: >> The 567b5b309abe ("vfio/pci: Relax DMA map errors for MMIO regions") added >> an error message if a passed memory section address or size is not aligned >&

[Qemu-devel] [PATCH qemu] vfio: Print address space address when cannot map MMIO for DMA

2018-03-22 Thread Alexey Kardashevskiy
Fixes: 567b5b309abe "vfio/pci: Relax DMA map errors for MMIO regions" Signed-off-by: Alexey Kardashevskiy --- Message on slightly hacked QEMU (iommu pagesize=8K) looks now like this: qemu-system-x86_64: Region ":00:1a.0 BAR 0 mmaps[0]" 0xfebc size=0x1000 is not alig

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-03-22 Thread Alexey Kardashevskiy
On 22/3/18 2:29 am, Alex Williamson wrote: > On Mon, 19 Mar 2018 21:49:58 +0100 > Auger Eric wrote: > >> Hi Alexey, >> >> On 09/02/18 08:55, Alexey Kardashevskiy wrote: >>> At the moment if vfio_memory_listener is registered in the system memory >>> a

Re: [Qemu-devel] Partial NUMA config

2018-03-20 Thread Alexey Kardashevskiy
On 20/3/18 5:46 pm, Igor Mammedov wrote: > On Mon, 19 Mar 2018 15:28:50 +1100 > Alexey Kardashevskiy wrote: > >> On 13/3/18 1:26 pm, Alexey Kardashevskiy wrote: >>> Hi Igor, >>> >>> ec78f8114bc4c1 "numa: use possible_cpus for not mapped CPUs che

Re: [Qemu-devel] [PATCH v2 0/3] vfio/pci: ioeventfd support

2018-03-19 Thread Alexey Kardashevskiy
nux/vfio.h | 27 + > 4 files changed, 245 insertions(+), 20 deletions(-) > LGTM, I gave it a try to make sure 2/3 does not break and it does not in all combinations of le/be host <=> le/be guest but I did not try the actual feature - cannot make up a test quickly... Reviewed-by: Alexey Kardashevskiy -- Alexey

Re: [Qemu-devel] Partial NUMA config

2018-03-18 Thread Alexey Kardashevskiy
On 13/3/18 1:26 pm, Alexey Kardashevskiy wrote: > Hi Igor, > > ec78f8114bc4c1 "numa: use possible_cpus for not mapped CPUs check" added a > warning about "All CPU(s) up to maxcpus should be described in NUMA config, > ability to start up with partial NUMA map

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-03-13 Thread Alexey Kardashevskiy
On 14/3/18 3:56 am, Alex Williamson wrote: > [Cc +Eric] > > On Tue, 13 Mar 2018 15:53:19 +1100 > Alexey Kardashevskiy wrote: > >> On 7/3/18 1:17 pm, Alexey Kardashevskiy wrote: >>> On 26/02/18 19:36, Alexey Kardashevskiy wrote: >>>> On 19/02/18 13:46,

[Qemu-devel] [PATCH qemu v2] slirp/debug: Print IP addresses in human readable form

2018-03-12 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- checkpatch.pl complains on every single changed line as it keeps using tabs - do I need to post 's/\t//g'? --- Changes: v2: * replaced static cast to (in_addr*) with temporary structs --- slirp/arp_table.c | 4 ++-- slirp/socke

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-03-12 Thread Alexey Kardashevskiy
On 7/3/18 1:17 pm, Alexey Kardashevskiy wrote: > On 26/02/18 19:36, Alexey Kardashevskiy wrote: >> On 19/02/18 13:46, Alexey Kardashevskiy wrote: >>> On 16/02/18 16:28, David Gibson wrote: >>>> On Wed, Feb 14, 2018 at 08:55:41AM -0700, Alex Williamson wrote: >

[Qemu-devel] Partial NUMA config

2018-03-12 Thread Alexey Kardashevskiy
Hi Igor, ec78f8114bc4c1 "numa: use possible_cpus for not mapped CPUs check" added a warning about "All CPU(s) up to maxcpus should be described in NUMA config, ability to start up with partial NUMA mappings is obsoleted and will be removed in future" and this is printed when I add a numa node with

Re: [Qemu-devel] [PATCH qemu] slirp/debug: Print IP addresses in human readable form

2018-03-06 Thread Alexey Kardashevskiy
On 7/3/18 5:24 pm, Thomas Huth wrote: > On 07.03.2018 04:38, Alexey Kardashevskiy wrote: >> On 01/02/18 20:35, Alexey Kardashevskiy wrote: >>> Signed-off-by: Alexey Kardashevskiy >> >> Ping? >> >> >>> --- >>> slirp/arp_table.c |

Re: [Qemu-devel] [PATCH qemu v3] RFC: ppc/spapr: Receive and store device tree blob from SLOF

2018-03-06 Thread Alexey Kardashevskiy
On 15/02/18 16:43, Alexey Kardashevskiy wrote: > On 10/01/18 19:59, David Gibson wrote: >> On Mon, Jan 08, 2018 at 07:35:43PM +1100, Alexey Kardashevskiy wrote: >>> On 03/01/18 11:09, David Gibson wrote: >>>> On Tue, Jan 02, 2018 at 05:13:09PM +1100, Alexey Kardashe

Re: [Qemu-devel] [RFC PATCH qemu] slirp: Update forwarding IP address if guest receiver non-default IP

2018-03-06 Thread Alexey Kardashevskiy
On 08/02/18 15:29, Alexey Kardashevskiy wrote: > On 01/02/18 20:36, Alexey Kardashevskiy wrote: >> If we run QEMU with -netdev user,id=USER0,hostfwd=tcp::-:22, it starts >> a DHCP server and starts allocating client IPs from 10.0.2.15 so >> this is what the guest normally

Re: [Qemu-devel] [PATCH qemu] slirp/debug: Print IP addresses in human readable form

2018-03-06 Thread Alexey Kardashevskiy
On 01/02/18 20:35, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy Ping? > --- > slirp/arp_table.c | 4 ++-- > slirp/socket.c| 8 > slirp/udp.c | 4 ++-- > 3 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/s

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-03-06 Thread Alexey Kardashevskiy
On 26/02/18 19:36, Alexey Kardashevskiy wrote: > On 19/02/18 13:46, Alexey Kardashevskiy wrote: >> On 16/02/18 16:28, David Gibson wrote: >>> On Wed, Feb 14, 2018 at 08:55:41AM -0700, Alex Williamson wrote: >>>> On Wed, 14 Feb 2018 19:09:16 +1100 >>>> Ale

Re: [Qemu-devel] [PATCH 0/7] memory: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
On 05/03/18 19:36, Paolo Bonzini wrote: > I noticed that the introduction of flatview_{read,write} placed > address_space_to_flatview outside the RCU lock. This is wrong and has > to be fixed, because address_space_to_flatview does an atomic_rcu_read. > These patches fix this one function at a tim

Re: [Qemu-devel] [PATCH 7/7] address_space_rw: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
gned-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > exec.c | 28 ++-- > 1 file changed, 10 insertions(+), 18 deletions(-) > > diff --git a/exec.c b/exec.c > index 070eaff3e7..8a99114c69 100644 > --- a/exec.c > +++ b/exec.c &

Re: [Qemu-devel] [PATCH 6/7] address_space_map: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
u.org > Signed-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > exec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/exec.c b/exec.c > index 177583c2ee..070eaff3e7 100644 > --- a/exec.c > +++ b/exec.c > @@ -3464,7 +34

Re: [Qemu-devel] [PATCH 5/7] address_space_access_valid: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
a...@nongnu.org > Signed-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > exec.c | 12 > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/exec.c b/exec.c > index 55b7452bd7..177583c2ee 100644 > --- a/exec.c > +++ b/

Re: [Qemu-devel] [PATCH 4/7] address_space_read: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
s_space_read_full. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > exec.c| 44 > include/exec/memory.h | 25 ++--- > 2 files c

Re: [Qemu-devel] [PATCH 2/7] memory: inline some performance-sensitive accessors

2018-03-05 Thread Alexey Kardashevskiy
ion. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > include/exec/memory-internal.h | 13 + > include/exec/memory.h | 22 +- > memory.c | 30

Re: [Qemu-devel] [PATCH 3/7] address_space_write: address_space_to_flatview needs RCU lock

2018-03-05 Thread Alexey Kardashevskiy
On 05/03/18 19:36, Paolo Bonzini wrote: > address_space_write is calling address_space_to_flatview but it can > be called outside the RCU lock. To fix it, push the rcu_read_lock/unlock > pair up from flatview_write to address_space_write. > > Cc: qemu-sta...@nongnu.org Revi

Re: [Qemu-devel] [PATCH 1/7] openpic_kvm: drop address_space_to_flatview call

2018-03-05 Thread Alexey Kardashevskiy
ld one on later calls and that > would break. > > This confines address_space_to_flatview to exec.c and memory.c. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Paolo Bonzini Reviewed-by: Alexey Kardashevskiy > --- > hw/intc/openpic_kvm.c | 4 > 1 file changed

[Qemu-devel] [PATCH qemu v4 1/2] qmp: Merge ObjectPropertyInfo and DevicePropertyInfo

2018-03-02 Thread Alexey Kardashevskiy
ObjectPropertyInfo is more generic and only missing @description. This adds a description to ObjectPropertyInfo and removes DevicePropertyInfo so the resulting ObjectPropertyInfo can be used elsewhere. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * added (since 2.12) to the new field

[Qemu-devel] [PATCH qemu v4 2/2] qmp: Add qom-list-properties to list QOM object properties

2018-03-02 Thread Alexey Kardashevskiy
ook. This adds a object_class_property_iter_init() helper to allow class properties enumeration uses it in the new QMP command to allow properties listing for abstract classes. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * Used ObjectPropertyInfo instead of QOMPropertyInfo v2: * adde

[Qemu-devel] [PATCH qemu v4 0/2] qmp: Add qom-list-properties to list QOM object properties

2018-03-02 Thread Alexey Kardashevskiy
This adds a new QMP command to list any class/object properties, not just devices. I do not know how/if we need to address the concern about abstract/nonabstract classes though. Changes: v4: * cleanup in 1/2 Please comment. Thanks. Alexey Kardashevskiy (2): qmp: Merge ObjectPropertyInfo

Re: [Qemu-devel] [PATCH qemu v3 1/2] qmp: Merge ObjectPropertyInfo and DevicePropertyInfo

2018-03-02 Thread Alexey Kardashevskiy
On 03/03/18 00:37, Eric Blake wrote: > On 03/01/2018 07:09 AM, Alexey Kardashevskiy wrote: >> ObjectPropertyInfo is more generic and only missing @description. >> This adds a description to ObjectPropertyInfo and removes >> DevicePropertyInfo so the resulting ObjectPro

[Qemu-devel] [PATCH qemu v3 0/2] qmp: Add qom-list-properties to list QOM object properties

2018-03-01 Thread Alexey Kardashevskiy
This adds a new QMP command to list any class/object properties, not just devices. Now comes in 2 patches. Please comment. Thanks. Alexey Kardashevskiy (2): qmp: Merge ObjectPropertyInfo and DevicePropertyInfo qmp: Add qom-list-properties to list QOM object properties qapi-schema.json

[Qemu-devel] [PATCH qemu v3 1/2] qmp: Merge ObjectPropertyInfo and DevicePropertyInfo

2018-03-01 Thread Alexey Kardashevskiy
ObjectPropertyInfo is more generic and only missing @description. This adds a description to ObjectPropertyInfo and removes DevicePropertyInfo so the resulting ObjectPropertyInfo can be used elsewhere. Signed-off-by: Alexey Kardashevskiy --- qapi-schema.json | 23 +-- qdev

[Qemu-devel] [PATCH qemu v3 2/2] qmp: Add qom-list-properties to list QOM object properties

2018-03-01 Thread Alexey Kardashevskiy
ook. This adds a object_class_property_iter_init() helper to allow class properties enumeration uses it in the new QMP command to allow properties listing for abstract classes. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * Used ObjectPropertyInfo instead of QOMPropertyInfo v2: * adde

Re: [Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties

2018-03-01 Thread Alexey Kardashevskiy
On 01/03/18 14:59, David Gibson wrote: > On Mon, Feb 26, 2018 at 07:22:59PM +1100, Alexey Kardashevskiy wrote: >> There is already 'device-list-properties' which does most of the job, >> however it does not handle everything returned by qom-list-types such >> as ma

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-26 Thread Alexey Kardashevskiy
On 19/02/18 13:46, Alexey Kardashevskiy wrote: > On 16/02/18 16:28, David Gibson wrote: >> On Wed, Feb 14, 2018 at 08:55:41AM -0700, Alex Williamson wrote: >>> On Wed, 14 Feb 2018 19:09:16 +1100 >>> Alexey Kardashevskiy wrote: >>> >>>> On 14/02/18

[Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties

2018-02-26 Thread Alexey Kardashevskiy
ook. This adds a object_class_property_iter_init() helper to allow class properties enumeration uses it in the new QMP command to allow properties listing for abstract classes. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * added abstract classes support, now things like "pci-device&quo

Re: [Qemu-devel] [PATCH qemu repost] qmp: Add qom-list-properties to list QOM object properties

2018-02-25 Thread Alexey Kardashevskiy
On 23/02/18 22:33, Paolo Bonzini wrote: > On 22/02/2018 06:00, Alexey Kardashevskiy wrote: >> There is already 'device-list-properties' which does most of the job, >> however it does not handle everything returned by qom-list-types such >> as machines as they inheri

[Qemu-devel] [PATCH qemu repost] qmp: Add qom-list-properties to list QOM object properties

2018-02-21 Thread Alexey Kardashevskiy
a specific class and its instance. It is pretty much a simplified copy of the device-list-properties handler. Since it creates an object instance, device properties should appear in the output as they are copied to QOM properties at the instance_init hook. Signed-off-by: Alexey Kardashevskiy ---

Re: [Qemu-devel] [RFC PATCH qemu] qmp: Add qom-list-properties to list QOM object properties

2018-02-20 Thread Alexey Kardashevskiy
On 19/01/18 16:09, Alexey Kardashevskiy wrote: > There is already 'device-list-properties' which does most of the job, > however it does not handle everything returned by qom-list-types such > as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. > >

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-18 Thread Alexey Kardashevskiy
On 16/02/18 16:28, David Gibson wrote: > On Wed, Feb 14, 2018 at 08:55:41AM -0700, Alex Williamson wrote: >> On Wed, 14 Feb 2018 19:09:16 +1100 >> Alexey Kardashevskiy wrote: >> >>> On 14/02/18 12:33, David Gibson wrote: >>>> On Tue, Feb 13, 2018 at 07

Re: [Qemu-devel] [PATCH qemu v3] RFC: ppc/spapr: Receive and store device tree blob from SLOF

2018-02-14 Thread Alexey Kardashevskiy
On 10/01/18 19:59, David Gibson wrote: > On Mon, Jan 08, 2018 at 07:35:43PM +1100, Alexey Kardashevskiy wrote: >> On 03/01/18 11:09, David Gibson wrote: >>> On Tue, Jan 02, 2018 at 05:13:09PM +1100, Alexey Kardashevskiy wrote: >>>> On 11/12/17 17:20, Alexey Kardashe

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-14 Thread Alexey Kardashevskiy
On 14/02/18 12:33, David Gibson wrote: > On Tue, Feb 13, 2018 at 07:20:56PM +1100, Alexey Kardashevskiy wrote: >> On 13/02/18 16:41, David Gibson wrote: >>> On Tue, Feb 13, 2018 at 04:36:30PM +1100, David Gibson wrote: >>>> On Tue, Feb 13, 2018 at 12:15:52PM +11

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-13 Thread Alexey Kardashevskiy
On 13/02/18 16:41, David Gibson wrote: > On Tue, Feb 13, 2018 at 04:36:30PM +1100, David Gibson wrote: >> On Tue, Feb 13, 2018 at 12:15:52PM +1100, Alexey Kardashevskiy wrote: >>> On 13/02/18 03:06, Alex Williamson wrote: >>>> On Mon, 12 Feb 2018 18:05:54 +1100 &g

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-12 Thread Alexey Kardashevskiy
On 13/02/18 03:06, Alex Williamson wrote: > On Mon, 12 Feb 2018 18:05:54 +1100 > Alexey Kardashevskiy wrote: > >> On 12/02/18 16:19, David Gibson wrote: >>> On Fri, Feb 09, 2018 at 06:55:01PM +1100, Alexey Kardashevskiy wrote: >>>> At the moment if vfio_

<    1   2   3   4   5   6   7   8   9   10   >