linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Andrew Jones" <drjones@redhat.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-s390@vger.kernel.org
Subject: Re:  [PATCH v1 0/9] KVM selftests for s390x
Date: Fri, 24 May 2019 14:29:43 +0200	[thread overview]
Message-ID: <411d4ad9-b43e-d3ae-1b66-65888c894caa@de.ibm.com> (raw)
In-Reply-To: <e6f953be-00af-756e-4c0a-649294efbd91@de.ibm.com>



On 24.05.19 14:17, Christian Borntraeger wrote:
> 
> 
> On 24.05.19 13:11, Christian Borntraeger wrote:
>> I do get
>>
>> [10400.440298] kvm-s390: failed to commit memory region
>> [10400.508723] kvm-s390: failed to commit memory region
>>
>> when running the tests. Will have a look.
> 
> It comes from kvm_vm_free. This calls KVM_SET_USER_MEMORY_REGION with size 0,
> which the s390 code does not like.
> 

The doc says about  KVM_SET_USER_MEMORY_REGION:

This ioctl allows the user to create or modify a guest physical memory
slot.  When changing an existing slot, it may be moved in the guest
physical memory space, or its flags may be modified.  --> It may not be
resized. <----

$ strace -f -e trace=ioctl tools/testing/selftests/kvm/s390x/sync_regs_test 
ioctl(3, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_REGS) = 1
ioctl(4, KVM_CHECK_EXTENSION, KVM_CAP_IMMEDIATE_EXIT) = 1
ioctl(3, KVM_CREATE_VM, 0)              = 4
ioctl(4, KVM_SET_USER_MEMORY_REGION, {slot=0, flags=0, guest_phys_addr=0, memory_size=2097152, userspace_addr=0x3ffac500000}) = 0
ioctl(4, KVM_CREATE_VCPU, 5)            = 7
ioctl(8, KVM_GET_VCPU_MMAP_SIZE, 0)     = 4096
ioctl(8, KVM_GET_VCPU_MMAP_SIZE, 0)     = 4096
ioctl(7, KVM_GET_SREGS, 0x3ffef0fdb90)  = 0
ioctl(7, KVM_SET_SREGS, 0x3ffef0fdb90)  = 0
ioctl(7, KVM_GET_REGS, 0x3ffef0fdcf8)   = 0
ioctl(7, KVM_SET_REGS, 0x3ffef0fdcf8)   = 0
ioctl(7, KVM_GET_SREGS, 0x3ffef0fdd78)  = 0
ioctl(7, KVM_SET_SREGS, 0x3ffef0fdd78)  = 0
ioctl(7, KVM_RUN, 0)                    = 0
ioctl(7, KVM_GET_REGS, 0x3ffef0fdf90)   = 0
ioctl(7, KVM_GET_SREGS, 0x3ffef0fe010)  = 0
ioctl(7, KVM_RUN, 0)                    = 0
ioctl(7, KVM_GET_REGS, 0x3ffef0fdf90)   = 0
ioctl(7, KVM_GET_SREGS, 0x3ffef0fe010)  = 0
ioctl(7, KVM_RUN, 0)                    = 0
ioctl(4, KVM_SET_USER_MEMORY_REGION, {slot=0, flags=0, guest_phys_addr=0, memory_size=0, userspace_addr=0x3ffac500000}) = 0
+++ exited with 0 +++

So the testcase is wrong? (I think the s390 code is also not fully correct will double check)


  reply	other threads:[~2019-05-24 12:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 16:43 [PATCH v1 0/9] KVM selftests for s390x Thomas Huth
2019-05-23 16:43 ` [PATCH 1/9] KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard Thomas Huth
2019-05-23 16:43 ` [PATCH 2/9] KVM: selftests: Guard struct kvm_vcpu_events with __KVM_HAVE_VCPU_EVENTS Thomas Huth
2019-05-23 17:57   ` Andrew Jones
2019-05-23 16:43 ` [PATCH 3/9] kvm: selftests: aarch64: fix default vm mode Thomas Huth
2019-05-24  8:37   ` Christian Borntraeger
2019-05-23 16:43 ` [PATCH 4/9] KVM: selftests: Introduce a VM_MODE_DEFAULT macro for the default bits Thomas Huth
2019-05-23 17:20   ` Andrew Jones
2019-05-23 16:43 ` [PATCH 5/9] KVM: selftests: Align memory region addresses to 1M on s390x Thomas Huth
2019-05-23 17:40   ` Andrew Jones
2019-05-24  8:29     ` Christian Borntraeger
2019-05-24 18:17       ` Thomas Huth
2019-05-23 16:43 ` [PATCH 6/9] KVM: selftests: Add processor code for s390x Thomas Huth
2019-05-23 16:43 ` [PATCH 7/9] KVM: selftests: Add the sync_regs test " Thomas Huth
2019-05-23 16:43 ` [PATCH 8/9] KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID Thomas Huth
2019-05-23 17:56   ` Andrew Jones
2019-05-24  9:13   ` Cornelia Huck
2019-05-24  9:16   ` David Hildenbrand
2019-05-28 11:00   ` Christian Borntraeger
2019-05-28 12:53     ` Cornelia Huck
2019-05-28 13:48       ` Christian Borntraeger
2019-05-23 16:43 ` [PATCH 9/9] KVM: selftests: Move kvm_create_max_vcpus test to generic code Thomas Huth
2019-05-23 17:56   ` Andrew Jones
2019-05-24  9:16   ` David Hildenbrand
2019-05-24 11:11 ` [PATCH v1 0/9] KVM selftests for s390x Christian Borntraeger
2019-05-24 12:17   ` Christian Borntraeger
2019-05-24 12:29     ` Christian Borntraeger [this message]
2019-05-24 12:36       ` David Hildenbrand
2019-05-24 12:56         ` Christian Borntraeger
2019-05-24 18:33 ` Christian Borntraeger
2019-06-04 17:19 ` Paolo Bonzini
2019-06-04 17:37   ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=411d4ad9-b43e-d3ae-1b66-65888c894caa@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=drjones@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=shuah@kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).