qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Fontana <claudio.fontana@huawei.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] QEMU + KVM PSCI and VCPU creation / destruction
Date: Mon, 29 Jun 2015 19:51:15 +0200	[thread overview]
Message-ID: <55918593.6090703@huawei.com> (raw)

Hello,

while heavily testing PSCI on QEMU+KVM during OSv enablement, I encountered, among others, the following issue:

I am running a test in which I boot an OS at EL1 under KVM, then boot a secondary VCPU,
then immediately call PSCI for a SYSTEM_RESET (reboot).

This loops over infinitely, or, as a matter of fact, until I run out of memory in the Foundation Model.

Now, before submitting another support request for the Model, I checked the code for the handling of PSCI, and it turns out that KVM handles the HVC and then sets an exit reason for QEMU to check,
which again sets the system_reset_requested to true, which causes a qemu_system_reset.

Now in there I see the call to qemu_devices_reset() and cpu_synchronize_all_post_reset(),
but are actually the VCPU destroyed? Is the VM destroyed? Or are new resources allocated at the next boot whenever PSCI asks for another VCPU to be booted via KVM_CREATE_VCPU etc?

If the resources associated to the VCPU (and VM?) are not freed, isn't this always going to cause leak in the host?

After around 3 hours of continuous PSCI secondary boot followed by SYSTEM_RESET I run out of memory on the host.

Thanks,

Claudio

             reply	other threads:[~2015-06-29 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 17:51 Claudio Fontana [this message]
2015-06-29 18:04 ` [Qemu-devel] QEMU + KVM PSCI and VCPU creation / destruction Peter Maydell
2015-06-30 12:10 ` Andrew Jones

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=55918593.6090703@huawei.com \
    --to=claudio.fontana@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).