[Qemu-devel] [PATCH 7/7] 128bits: some HW components use 128bit arithmetic.

2015-11-05 Thread Pierre Morel
Some HW components use 128bit arithmetic. Let's adapt to unsigned 128 bit calculations. Signed-off-by: Pierre Morel --- hw/core/loader.c |2 +- hw/display/exynos4210_fimd.c |4 ++-- hw/display/framebuffer.c |2 +- hw/mem/pc-dimm.c |6 +++--- h

[Qemu-devel] [PATCH 2/7] memory: modify memory size for an unsigned 128bit int

2015-11-05 Thread Pierre Morel
The size of a memory area can never be negative. It follows it must be defined as an unsigned value. Let's modify the memory regions size to unsigned 128 integer and accordingly use the unsigned 128 bit arithmetic. Signed-off-by: Pierre Morel --- include/exec/memory.h |4 +- mem

[Qemu-devel] [PATCH 3/7] 128bit: adapt core files for unsigned 128bits

2015-11-05 Thread Pierre Morel
Adapt the core files for unsigned 128 bit arithmetic. Signed-off-by: Pierre Morel --- exec.c| 32 kvm-all.c | 16 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/exec.c b/exec.c index 0a4a0c5..7828f0b 100644 --- a/exec.c

[Qemu-devel] [PATCH 4/7] 128bit: adapt sparc mmu_helper for UInt128

2015-11-05 Thread Pierre Morel
Adaptation for target-sparc/mmu_helper.c to the 128 bit arithmetic. Signed-off-by: Pierre Morel --- target-sparc/mmu_helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index 2a0c6f0..2c1156e 100644 --- a

[Qemu-devel] [PATCH 6/7] 128bit: adapt Virtio for UInt128 arithmetic

2015-11-05 Thread Pierre Morel
Virtio uses 128 bit arithmetic for memory areas. Let's adapt to UInt128 bit arithmetic. Signed-off-by: Pierre Morel --- hw/virtio/dataplane/vring.c |2 +- hw/virtio/vhost.c |4 ++-- hw/virtio/virtio-balloon.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-)

[Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-05 Thread Pierre Morel
I fear loud protest but really, it is a broken concept that obfuscate the code. Pierre Morel (7): int128: use unsigned 128 bit arithmetic memory: modify memory size for an unsigned 128bit int 128bit: adapt core files for unsigned 128bits 128bit: adapt sparc mmu_helper for UInt128 1

[Qemu-devel] [PATCH 1/7] int128: use unsigned 128 bit arithmetic

2015-11-05 Thread Pierre Morel
Let's change Int128 definition to UInt128, modify the internal element to uint64_t and the arithmetic functions accordingly. Signed-off-by: Pierre Morel --- include/qemu/int128.h | 95 +++-- 1 files changed, 45 insertions(+), 50 deletions(-)

[Qemu-devel] [PATCH 5/7] 128bit: adapt VFIO for UInt128 arithmetic

2015-11-05 Thread Pierre Morel
VFIO is using 128bit arithmetic for memory areas. Let's adapt to unsigned 128bit arithmetic. Signed-off-by: Pierre Morel --- hw/vfio/common.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 85ee9b0..f8

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-06 Thread Pierre Morel
On 11/05/2015 05:32 PM, Paolo Bonzini wrote: On 05/11/2015 17:18, Pierre Morel wrote: The size of a memory area can never be negative. It follows it must be defined as an unsigned value. Let's modify the memory regions size to unsigned 128 integer and modify accordingly the 12

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-10 Thread Pierre Morel
On 11/09/2015 01:20 PM, Paolo Bonzini wrote: On 09/11/2015 13:01, Pierre Morel wrote: This leads to have UINT64_MAX represented with {1, 0} instead of {0, UINT64_MAX} while {1, 0} is 2^64. This again leads to have unnecessary and obfuscating transformations with int128_2_64() to test for

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-10 Thread Pierre Morel
On 11/10/2015 10:08 AM, Pierre Morel wrote: On 11/09/2015 01:20 PM, Paolo Bonzini wrote: On 09/11/2015 13:01, Pierre Morel wrote: This leads to have UINT64_MAX represented with {1, 0} instead of {0, UINT64_MAX} while {1, 0} is 2^64. This again leads to have unnecessary and obfuscating

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-26 Thread Pierre Morel
On 01/22/2016 11:19 PM, Alex Williamson wrote: On Fri, 2016-01-22 at 15:14 -0700, Alex Williamson wrote: On Thu, 2016-01-21 at 14:15 +0100, Pierre Morel wrote: On 01/20/2016 04:46 PM, Alex Williamson wrote: On Wed, 2016-01-20 at 16:14 +0100, Pierre Morel wrote: On 01/12/2016 07:16 PM, Alex

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-27 Thread Pierre Morel
On 01/26/2016 06:00 PM, Alex Williamson wrote: On Tue, 2016-01-26 at 15:51 +0100, Pierre Morel wrote: On 01/22/2016 11:19 PM, Alex Williamson wrote: On Fri, 2016-01-22 at 15:14 -0700, Alex Williamson wrote: On Thu, 2016-01-21 at 14:15 +0100, Pierre Morel wrote: On 01/20/2016 04:46 PM, Alex

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-28 Thread Pierre Morel
On 01/27/2016 06:43 PM, Alex Williamson wrote: On Wed, 2016-01-27 at 10:28 +0100, Pierre Morel wrote: On 01/26/2016 06:00 PM, Alex Williamson wrote: On Tue, 2016-01-26 at 15:51 +0100, Pierre Morel wrote: On 01/22/2016 11:19 PM, Alex Williamson wrote: On Fri, 2016-01-22 at 15:14 -0700

[Qemu-devel] [PATCH] vfio/common: Check iova with limit not with size

2015-12-10 Thread Pierre Morel
. Let's use the address limit of the region instead of the size. Signed-off-by: Pierre Morel --- hw/vfio/common.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 85ee9b0..0da10d6 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/com

Re: [Qemu-devel] [PATCH v2 3/9] s390x: remove s390-virtio devices

2016-01-12 Thread Pierre Morel
On 01/11/2016 07:45 PM, Cornelia Huck wrote: On Mon, 11 Jan 2016 18:12:27 +0100 Thomas Huth wrote: Happy new year! To you as well :) On 07.01.2016 14:36, Cornelia Huck wrote: From: Pierre Morel The s390-virtio machine has been removed; remove the associated devices as well. hw

Re: [Qemu-devel] [PATCH v2] vfio/common: Check iova with limit not with size

2016-01-12 Thread Pierre Morel
On 01/06/2016 08:08 PM, Alex Williamson wrote: On Tue, 2016-01-05 at 17:03 +0100, Pierre Morel wrote: In vfio_listener_region_add(), the code makes sure that the offset in the section is lower than the size of the section. But the calculation uses size of the region instead of the region&#

[Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-12 Thread Pierre Morel
ialized to UINT64_MAX because in this case memory_region_init() transform the size from UINT64_MAX to int128_2_64(). Let's really use the limit by sustracting one to the size and take care to use the limit for functions using limit and size to call functions which need size. Signed-off-b

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-20 Thread Pierre Morel
On 01/12/2016 07:16 PM, Alex Williamson wrote: On Tue, 2016-01-12 at 16:11 +0100, Pierre Morel wrote: In vfio_listener_region_add(), we try to validate that the region is not zero sized and hasn't overflowed the addresses space. But the calculation uses the size of the region inste

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-01-21 Thread Pierre Morel
On 01/20/2016 04:46 PM, Alex Williamson wrote: On Wed, 2016-01-20 at 16:14 +0100, Pierre Morel wrote: On 01/12/2016 07:16 PM, Alex Williamson wrote: On Tue, 2016-01-12 at 16:11 +0100, Pierre Morel wrote: In vfio_listener_region_add(), we try to validate that the region is not zero sized and

[Qemu-devel] [PATCH v2] vfio/common: Check iova with limit not with size

2016-01-05 Thread Pierre Morel
cause in this case memory_region_init() transform the size from UINT64_MAX to int128_2_64(). Let's really use the limit by sustracting one to the size and take care to use the limit for functions using limit and size to call functions which need size. Signed-off-by: Pierre Morel --- hw/vfi

[Qemu-devel] [PATCH v5] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-07 Thread Pierre Morel
Let dataplane allocate different region for the desc/avail/used ring regions. Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail rings accordingly. Signed-off-by: Pierre Morel (changed __virtio16 into uint16_t, map descriptor table and available ring read-only) Signed-off-by

Re: [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-07 Thread Pierre Morel
On 09/07/2015 12:20 PM, Stefan Hajnoczi wrote: On Wed, Sep 02, 2015 at 06:53:44PM +0200, Pierre Morel wrote: +addr = virtio_queue_get_desc_addr(vdev, n); +size = virtio_queue_get_desc_size(vdev, n); +ptr = vring_map(&vring->mr_desc, addr, size, true); +i

[Qemu-devel] [PATCH] virtio: right size for virtio_queue_get_avail_size

2015-09-10 Thread Pierre Morel
missed something. This patch let use a 16bit size as defined in virtio_ring.h Signed-off-by: Pierre Morel --- PING... hw/virtio/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 788b556..5c856eb 100644 --- a/hw/virtio

[Qemu-devel] [PATCH] virtio dataplane: adapt dataplane for virtio Version 1

2015-08-25 Thread Pierre Morel
Let dataplane allocate different region for the desc/avail/used ring regions. Signed-off-by: Pierre Morel --- hw/virtio/dataplane/vring.c | 54 -- include/hw/virtio/dataplane/vring.h |4 ++- 2 files changed, 47 insertions(+), 11 deletions(-) diff

Re: [Qemu-devel] [PATCH] virtio dataplane: adapt dataplane for virtio Version 1

2015-08-26 Thread Pierre Morel
On 08/26/2015 01:29 PM, Greg Kurz wrote: On Tue, 25 Aug 2015 12:33:30 +0200 Pierre Morel wrote: Let dataplane allocate different region for the desc/avail/used ring regions. Signed-off-by: Pierre Morel --- Great ! It works ! Since we end up with 3 blocks of code that are identical save

[Qemu-devel] [PATCH v2] virtio dataplane: adapt dataplane for virtio Version 1

2015-08-26 Thread Pierre Morel
Let dataplane allocate different region for the desc/avail/used ring regions. Signed-off-by: Pierre Morel Acked-by: Greg Kurz Tested-by: Greg Kurz --- hw/virtio/dataplane/vring.c | 48 ++--- include/hw/virtio/dataplane/vring.h | 4 +++- 2 files changed

[Qemu-devel] [PATCH v3 1/2] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-02 Thread Pierre Morel
VIRTIO_RING_F_EVENT_IDX Changes from v1: - use a macro to gain LOCs inside of vring_setup() Signed-off-by: Pierre Morel --- hw/virtio/dataplane/vring.c | 61 - include/hw/virtio/dataplane/vring.h | 4 ++- 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a

[Qemu-devel] [PATCH] virtio: right size for virtio_queue_get_avail_size

2015-09-02 Thread Pierre Morel
missed something. This patch let use a 16bit size as defined in virtio_ring.h Signed-off-by: Pierre Morel --- hw/virtio/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 788b556..5c856eb 100644 --- a/hw/virtio/virtio.c +++ b/hw

Re: [Qemu-devel] [PATCH v3 1/2] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-02 Thread Pierre Morel
On 09/02/2015 05:59 PM, Eric Blake wrote: [meta-comment] On 09/02/2015 09:12 AM, Pierre Morel wrote: Let dataplane allocate different region for the desc/avail/used ring regions. Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail rings accordingly. This part is fine

[Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-02 Thread Pierre Morel
Let dataplane allocate different region for the desc/avail/used ring regions. Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail rings accordingly. Signed-off-by: Pierre Morel --- Changes from V2: - incorporate the code directly in vring_setup(). - added room for the event

Re: [PATCH v11 03/11] s390x/cpu topology: core_id sets s390x CPU topology

2022-11-16 Thread Pierre Morel
On 11/15/22 12:15, Cédric Le Goater wrote: Hello Pierre, On 11/3/22 18:01, Pierre Morel wrote: In the S390x CPU topology the core_id specifies the CPU address and the position of the core withing the topology. Let's build the topology based on the core_id. Signed-off-by: Pierre

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-16 Thread Pierre Morel
On 11/15/22 12:21, Cédric Le Goater wrote: Hello Pierre, On 11/3/22 18:01, Pierre Morel wrote: The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by

Re: [PATCH v11 08/11] s390x/cpu topology: add topology_capable QEMU capability

2022-11-16 Thread Pierre Morel
On 11/15/22 14:27, Cédric Le Goater wrote: On 11/3/22 18:01, Pierre Morel wrote: S390 CPU topology is only allowed for s390-virtio-ccw-7.2 and newer S390 machines. Signed-off-by: Pierre Morel Reviewed-by: Cédric Le Goater Thanks, C. Thanks, Pierre -- Pierre Morel IBM Lab

Re: [PATCH v11 09/11] s390x/cpu topology: add topology machine property

2022-11-16 Thread Pierre Morel
On 11/15/22 14:48, Cédric Le Goater wrote: On 11/3/22 18:01, Pierre Morel wrote: We keep the possibility to switch on/off the topology on newer machines with the property topology=[on|off]. The code has changed. You will need to rebase. May be after the 8.0 machine is introduced, or

Re: [PATCH v9 00/10] s390x: CPU Topology

2022-11-17 Thread Pierre Morel
On 11/16/22 17:51, Christian Borntraeger wrote: Am 02.09.22 um 09:55 schrieb Pierre Morel: Hi, The implementation of the CPU Topology in QEMU has been drastically modified since the last patch series and the number of LOCs has been greatly reduced. Unnecessary objects have been removed

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-17 Thread Pierre Morel
On 11/17/22 09:40, Cédric Le Goater wrote: On 11/3/22 18:01, Pierre Morel wrote: The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel

Re: [PATCH v9 00/10] s390x: CPU Topology

2022-11-17 Thread Pierre Morel
On 11/17/22 10:31, Pierre Morel wrote: On 11/16/22 17:51, Christian Borntraeger wrote: Am 02.09.22 um 09:55 schrieb Pierre Morel: Hi, The implementation of the CPU Topology in QEMU has been drastically modified since the last patch series and the number of LOCs has been greatly reduced

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-22 Thread Pierre Morel
n CPU creation, but each time the core calls rebuild_sched_domains() that is for s390 on: - change in the host topology - changes in CPUSET: for allowed CPU or load balancing Regards, Pierre Thanks, C. -- Pierre Morel IBM Lab Boeblingen

Re: [PATCH v9 00/10] s390x: CPU Topology

2022-11-24 Thread Pierre Morel
Gentle ping. Did I understand the problem or am I wrong? On 11/17/22 17:38, Pierre Morel wrote: On 11/17/22 10:31, Pierre Morel wrote: On 11/16/22 17:51, Christian Borntraeger wrote: Am 02.09.22 um 09:55 schrieb Pierre Morel: Hi, The implementation of the CPU Topology in QEMU has

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-27 Thread Pierre Morel
On 11/22/22 10:05, Pierre Morel wrote: On 11/21/22 15:13, Cédric Le Goater wrote: +static char *s390_top_set_level2(S390Topology *topo, char *p) +{ +    int i, origin; + +    for (i = 0; i < topo->nr_sockets; i++) { +    if (!topo->socket[i].active_count) { +   

Re: [PATCH v9 00/10] s390x: CPU Topology

2022-11-27 Thread Pierre Morel
On 11/24/22 10:25, Pierre Morel wrote: Gentle ping. Did I understand the problem or am I wrong? I guess I was wrong, so I send a new series next week. Regards, Pierre On 11/17/22 17:38, Pierre Morel wrote: On 11/17/22 10:31, Pierre Morel wrote: On 11/16/22 17:51, Christian

[PATCH v12 4/7] s390x/cpu_topology: CPU topology migration

2022-11-29 Thread Pierre Morel
The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the topology changed between source and destination. Signed-off-by: Pierre Morel

[PATCH v12 3/7] s390x/cpu_topology: resetting the Topology-Change-Report

2022-11-29 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Gl

[PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-11-29 Thread Pierre Morel
We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h| 44 +++ include/hw/s390x/s390-virtio-ccw.h | 1 + hw

[PATCH v12 0/7] s390x: CPU Topology

2022-11-29 Thread Pierre Morel
multithreading. Consequently, two vCPU assigned to threads of the same real CPU should preferably be assigned to the same socket of the guest machine. Regards, Pierre Pierre Morel (7): s390x/cpu topology: Creating CPU topology device s390x/cpu topology: reporting the CPU topology to the guest s390x

[PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-29 Thread Pierre Morel
The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- target/s390x/cpu.h | 77 +++ hw/s390x/s390-virtio-ccw.c | 12 +-- target/s390x

[PATCH v12 5/7] s390x/cpu_topology: interception of PTF instruction

2022-11-29 Thread Pierre Morel
intercepted and must be emulated by the userland hypervizor. Signed-off-by: Pierre Morel Reviewed-by: Janis Schoetterl-Glausch --- include/hw/s390x/s390-virtio-ccw.h | 6 hw/s390x/cpu-topology.c| 52 ++ target/s390x/kvm/kvm.c | 11 +++ 3

[PATCH v12 7/7] docs/s390x: document s390x cpu topology

2022-11-29 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/s390x/cpu-topology.rst diff --git a/docs/system/s390x

[PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-11-29 Thread Pierre Morel
QEMU the feature is disabled by default using the CPU flag -disable-topology. Making the S390_FEAT_CONFIGURATION_TOPOLOGY belonging to the default features makes the -ctop CPU flag is no more necessary, turning the topology feature on is done with -disable-topology only. Signed-off-by: Pierre Morel

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-01 Thread Pierre Morel
On 12/1/22 10:08, Thomas Huth wrote: On 29/11/2022 18.42, Pierre Morel wrote: We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre Morel --- ... diff --git a

Re: [PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-12-01 Thread Pierre Morel
On 12/1/22 11:15, Thomas Huth wrote: On 29/11/2022 18.42, Pierre Morel wrote: The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology is available in QEMU and in KVM. The

Re: [PATCH v12 0/7] s390x: CPU Topology

2022-12-01 Thread Pierre Morel
On 12/1/22 09:45, Cédric Le Goater wrote: Hello Pierre On 11/29/22 18:41, Pierre Morel wrote: Hi, The implementation of the CPU Topology in QEMU has been modified since the last patch series. - The two preliminary patches have been accepted and are no longer    part of this series. - The

Re: [PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-12-02 Thread Pierre Morel
On 12/2/22 10:05, Thomas Huth wrote: On 01/12/2022 12.52, Pierre Morel wrote: On 12/1/22 11:15, Thomas Huth wrote: On 29/11/2022 18.42, Pierre Morel wrote: The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology

Re: [PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-12-05 Thread Pierre Morel
On 12/2/22 15:26, Thomas Huth wrote: On 02/12/2022 15.08, Pierre Morel wrote: On 12/2/22 10:05, Thomas Huth wrote: On 01/12/2022 12.52, Pierre Morel wrote: On 12/1/22 11:15, Thomas Huth wrote: On 29/11/2022 18.42, Pierre Morel wrote: The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-06 Thread Pierre Morel
On 12/6/22 10:31, Janis Schoetterl-Glausch wrote: On Tue, 2022-11-29 at 18:42 +0100, Pierre Morel wrote: We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre

Re: [PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-12-06 Thread Pierre Morel
On 12/6/22 10:48, Janis Schoetterl-Glausch wrote: On Tue, 2022-11-29 at 18:42 +0100, Pierre Morel wrote: The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel

Re: [PATCH v12 3/7] s390x/cpu_topology: resetting the Topology-Change-Report

2022-12-06 Thread Pierre Morel
On 12/6/22 10:50, Janis Schoetterl-Glausch wrote: On Tue, 2022-11-29 at 18:42 +0100, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-06 Thread Pierre Morel
On 12/6/22 14:35, Janis Schoetterl-Glausch wrote: On Tue, 2022-12-06 at 11:32 +0100, Pierre Morel wrote: On 12/6/22 10:31, Janis Schoetterl-Glausch wrote: On Tue, 2022-11-29 at 18:42 +0100, Pierre Morel wrote: We will need a Topology device to transfer the topology during migration and to

Re: [PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-12-06 Thread Pierre Morel
On 11/29/22 18:42, Pierre Morel wrote: The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- target/s390x/cpu.h | 77 +++ hw/s390x

Re: [PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-07-19 Thread Pierre Morel
On 7/4/23 15:14, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel

Re: [PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-07-19 Thread Pierre Morel
On 7/12/23 22:00, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and corRelation the QMP results in query-cpus-fast for various CPU

Re: [PATCH v21 15/20] tests/avocado: s390x cpu topology polarisation

2023-07-19 Thread Pierre Morel
On 7/5/23 10:53, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-19 Thread Pierre Morel
On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22 +0200, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test takes care to check the

Re: [PATCH v21 17/20] tests/avocado: s390x cpu topology test dedicated CPU

2023-07-19 Thread Pierre Morel
Same as for the previous test. I rewrite this to check the guest view. On 6/30/23 11:17, Pierre Morel wrote: A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py

Re: [PATCH v21 18/20] tests/avocado: s390x cpu topology test socket full

2023-07-19 Thread Pierre Morel
On 7/5/23 12:26, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file changed, 25 insertions

Re: [PATCH v21 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-07-19 Thread Pierre Morel
On 7/5/23 12:28, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 48 ++   1 file change

Re: [PATCH v21 20/20] tests/avocado: s390x cpu topology bad move

2023-07-19 Thread Pierre Morel
On 7/5/23 12:32, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QEMU refuses to move a CPU to an unexistant location. s/unexistant/nonexistent/ ? Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file

Re: [PATCH v21 00/20] s390x: CPU Topology

2023-07-19 Thread Pierre Morel
On 7/5/23 12:02, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: ... Testing === To use the QEMU patches, you will need Linux V6-rc1 or newer, or use the following Linux mainline patches: f5ecfee94493 2022-07-20 KVM: s390: resetting the Topology-Change-Report 24fe0195bc19

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-19 Thread Pierre Morel
On 7/19/23 16:13, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-19 at 16:08 +0200, Pierre Morel wrote: On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-21 Thread Pierre Morel
number 2. The first idea was to separate the patch to ease the review but the functionality introduced in patch 1 do only make sense with patch 2. So I would be for squashing the first two patches. ? On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: S390 adds two new SMP levels, drawers

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-25 Thread Pierre Morel
On 7/24/23 12:15, Nina Schoetterl-Glausch wrote: On Fri, 2023-07-21 at 13:24 +0200, Pierre Morel wrote: On 7/18/23 18:31, Nina Schoetterl-Glausch wrote: Reviewed-by: Nina Schoetterl-Glausch Some notes below. The s390x/ prefix in the title might suggest that this patch is s390 specific

Re: [PATCH v21 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-07-25 Thread Pierre Morel
On 7/24/23 22:19, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers,   books

Re: [PATCH v21 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-07-26 Thread Pierre Morel
On 7/25/23 17:41, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS

Re: [Qemu-devel] [PATCH RFC v2] s390/css: handle CCW_FLAG_SKIP

2019-05-07 Thread Pierre Morel
9..7cc183ef4366 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -97,6 +97,7 @@ typedef struct CcwDataStream { int (*op_handler)(struct CcwDataStream *cds, void *buff, int len, CcwDataStreamOp op); hwaddr cda; +bool do_skip; } CcwDataStream; /* -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

[Qemu-devel] [PATCH 1/5] vfio: vfio_iommu_type1: linux header place holder

2019-05-10 Thread Pierre Morel
This should be copied from Linux kernel UAPI includes. Signed-off-by: Pierre Morel --- linux-headers/linux/vfio.h | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 12a7b1d..eaecaef 100644 --- a

[Qemu-devel] [PATCH 5/5] s390: vfio_pci: Get zPCI function info from host

2019-05-10 Thread Pierre Morel
the refresh bit. Signed-off-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 80 +++-- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 6df80aa..3b7539c 100644 --- a/hw/s390x/s390-pci

[Qemu-devel] [PATCH 3/5] s390: vfio_pci: Use a PCI Group structure

2019-05-10 Thread Pierre Morel
We use a S390PCIGroup structure to hold the information related to zPCI Function group. This allows us to be ready to support multiple groups and to retrieve the group information from the host. Signed-off-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 42

[Qemu-devel] [PATCH 4/5] s390: vfio_pci: Use a PCI Function structure

2019-05-10 Thread Pierre Morel
We use a ClpRspQueryPci structure to hold the information related to zPCI Function. This allows us to be ready to support different zPCI functions and to retrieve the zPCI function information from the host. Signed-off-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 22

[Qemu-devel] [PATCH 2/5] s390: PCI: Creation a header dedicated to PCI CLP

2019-05-10 Thread Pierre Morel
To have a clean separation between s390-pci-bus.h and s390-pci-inst.h headers we export the PCI CLP instructions in a dedicated header. Signed-off-by: Pierre Morel Reviewed-by: Collin Walling --- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-clp.h | 211

[Qemu-devel] [PATCH 0/5] Retrieving zPCI specific info from QEMU

2019-05-10 Thread Pierre Morel
group flags. Note that we export the CLP specific definitions in a dedicated file for clarity. Pierre Morel (5): vfio: vfio_iommu_type1: linux header place holder s390: PCI: Creation a header dedicated to PCI CLP s390: vfio_pci: Use a PCI Group structure s390: vfio_pci: Use a PCI Functio

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

2020-02-13 Thread Pierre Morel
6, 7 | +--+++ However it may be because I do not use the right tools. Did not find which one I am suppose to use. Currently using: rst2latex vfio-ap.rst > vfio-ap.tex && pdflatex vfio-ap.tex Regards, Pierre -- Pierre Morel IBM Lab Boeblingen

Re: [PATCH v2 2/2] docs: rstfy vfio-ap documentation

2020-02-18 Thread Pierre Morel
On 2020-02-18 13:44, Cornelia Huck wrote: On Thu, 13 Feb 2020 18:54:37 + Peter Maydell wrote: On Thu, 13 Feb 2020 at 18:38, Pierre Morel wrote:> However it may be because I do not use the right tools. Did not find which one I am suppose to use. Currently using: rst2latex vfio-ap.

[PATCH v3 1/1] s390x: css: pong, channel subsystem test device

2020-02-20 Thread Pierre Morel
. Currently only the kvm-unit-test css test uses the PONG device. Signed-off-by: Pierre Morel --- default-configs/s390x-softmmu.mak | 1 + hw/s390x/Kconfig | 3 + hw/s390x/Makefile.objs| 1 + hw/s390x/ccw-pong.c | 140

[PATCH v3 0/1] s390x: css: pong, channel subsystem test device

2020-02-20 Thread Pierre Morel
PONG_READ CCW command. - defines a Control Unit property. Pierre Morel (1): s390x: css: pong, channel subsystem test device default-configs/s390x-softmmu.mak | 1 + hw/s390x/Kconfig | 3 + hw/s390x/Makefile.objs| 1 + hw/s390x/ccw-pong.c | 140

Re: [PATCH 09/15] s390x: protvirt: SCLP interpretation

2019-11-22 Thread Pierre Morel
t will take some time. +} else { +r = sclp_service_call(env, sccb, code); +} + if (r < 0) { kvm_s390_program_interrupt(cpu, -r); } else { -- Pierre Morel IBM Lab Boeblingen

[PATCH v1 0/1] s390x: protvirt: SCLP interpretation

2019-11-28 Thread Pierre Morel
this case is completely new. For B2 instructions we do not have to do anything this just informative. However, one information is of interrest, a notification that SIGP(STOP) is sent to stop the CPUs and terminate QEMU. Pierre Morel (1): s390x: protvirt: SCLP interpretation hw/s390x/sclp.c

[PATCH v1 1/1] s390x: protvirt: SCLP interpretation

2019-11-28 Thread Pierre Morel
* functions the host opens access to the SCCB shadow at address 0. Signed-off-by: Pierre Morel --- hw/s390x/sclp.c | 18 + include/hw/s390x/sclp.h | 2 ++ target/s390x/kvm.c | 56 - 3 files changed, 75 insertions(+), 1 deletion(-) diff

[PATCH v2 0/1] s390x: css: pong, channel subsystem test device

2019-11-28 Thread Pierre Morel
PONG_READ CCW command. - defines a Control Unit property. Pierre Morel (1): s390x: css: pong, channel subsystem test device default-configs/s390x-softmmu.mak | 1 + hw/s390x/Kconfig | 3 + hw/s390x/Makefile.objs| 1 + hw/s390x/ccw-pong.c | 134

[PATCH v2 1/1] s390x: css: pong, channel subsystem test device

2019-11-28 Thread Pierre Morel
. Currently only the kvm-unit-test css test uses the PONG device. Signed-off-by: Pierre Morel --- default-configs/s390x-softmmu.mak | 1 + hw/s390x/Kconfig | 3 + hw/s390x/Makefile.objs| 1 + hw/s390x/ccw-pong.c | 134

Re: [PATCH v1 1/1] s390x: protvirt: SCLP interpretation

2019-11-28 Thread Pierre Morel
On 2019-11-28 13:10, Thomas Huth wrote: On 28/11/2019 11.13, Pierre Morel wrote: The SCLP protection handle some of the exceptions due to mis-constructions of the SCLP Control Block (SCCB) by the guest and provides notifications to the host when something gets wrong. We currently do not handle

Re: [PATCH v1 0/1] s390x: protvirt: SCLP interpretation

2019-11-28 Thread Pierre Morel
On 2019-11-28 13:28, Janosch Frank wrote: On 11/28/19 11:13 AM, Pierre Morel wrote: A new proposition: I think it would be wise to fork directly from handle_instruction instead to accept per default all instructions with with secure instruction interception code. Just in case future firmware

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-16 Thread Pierre Morel
On 1/16/23 14:11, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu

Re: [PATCH v14 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-01-16 Thread Pierre Morel
On 1/10/23 12:37, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific toplogy features like dedication and polarity to give to the guest indications on the host vCPUs scheduling and help

Re: [PATCH v14 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-01-16 Thread Pierre Morel
On 1/13/23 17:58, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific toplogy features like dedication and polarity to give to the guest indications on the host

Re: [PATCH v14 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-01-16 Thread Pierre Morel
On 1/10/23 14:00, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug, we gather the topology information on the core, creates a list of topology entries, each entry

Re: [PATCH v14 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-01-17 Thread Pierre Morel
On 1/16/23 21:34, Nina Schoetterl-Glausch wrote: On Mon, 2023-01-16 at 18:28 +0100, Pierre Morel wrote: On 1/13/23 17:58, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU

Re: [PATCH v14 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-01-17 Thread Pierre Morel
On 1/13/23 19:15, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug, we gather the topology information on the core, creates a list of

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-17 Thread Pierre Morel
On 1/10/23 15:29, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... diff --git a/target/s390x/cpu.h b/target/s390x

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-17 Thread Pierre Morel
On 1/11/23 18:14, Nina Schoetterl-Glausch wrote: On Tue, 2023-01-10 at 15:29 +0100, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre

  1   2   3   4   5   6   7   8   9   10   >