From: Alexander Graf <agraf@suse.de>
To: David Gibson <david@gibson.dropbear.id.au>,
Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Paul Mackerras <paulus@samba.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH qemu] spapr/target-ppc/kvm: Only add hcall-instructions if KVM supports it
Date: Tue, 15 Mar 2016 11:30:20 +0100 [thread overview]
Message-ID: <56E7E43C.6030906@suse.de> (raw)
In-Reply-To: <20160315095952.GF9032@voom>
On 15.03.16 10:59, David Gibson wrote:
> On Tue, Mar 15, 2016 at 04:51:20PM +1100, Alexey Kardashevskiy wrote:
>> ePAPR defines "hcall-instructions" device-tree property which contains
>> code to call hypercalls in ePAPR paravirtualized guests. However this
>> property is also present for pseries guests where it does not make sense,
>> even though it contains dummy code which simply fails.
>>
>> Instead of maintaining the property (which used to be BE only; then was
>> fixed to be endian-agnostic) and confusing the guest (which might think
>> there is ePAPR host while there is none), this simply does not
>> the property to the device tree if the host kernel does not implement it.
>>
>> In order to tell the machine code if the host kernel supports
>> KVM_CAP_PPC_GET_PVINFO, this changes kvmppc_get_hypercall() to return 1
>> if the host kernel does not implement it (which is HV KVM case).
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> So the idea of only adding the property when the host kernel supplies
> a suitable value seems good, but I'm a bit nervous about applying
> this, because I'm not sure what case the original fallback hypercall
> code was supposed to handle.
>
> agraf, if you could enlighten us with some history that could be good.
The fallback code simply does "return -1" regardless of guest
endianness, so it makes every kvm hypercall fail.
I guess not supplying the sequence at all if the host kernel doesn't
implement kvm hypercalls (and thus doesn't expose the trampoline), yeah.
I wonder why I didn't do that back then, hrm ..
Alex
next prev parent reply other threads:[~2016-03-15 10:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 5:51 [Qemu-devel] [PATCH qemu] spapr/target-ppc/kvm: Only add hcall-instructions if KVM supports it Alexey Kardashevskiy
2016-03-15 8:18 ` Thomas Huth
2016-03-15 9:42 ` Alexey Kardashevskiy
2016-03-15 10:41 ` David Gibson
2016-03-15 11:32 ` Thomas Huth
2016-03-16 2:43 ` Alexey Kardashevskiy
2016-03-16 6:04 ` Thomas Huth
2016-03-17 2:04 ` Alexey Kardashevskiy
2016-03-15 9:59 ` David Gibson
2016-03-15 10:30 ` Alexander Graf [this message]
2016-03-15 10:31 ` Alexey Kardashevskiy
2016-03-15 10:19 ` Alexander Graf
2016-03-15 10:30 ` Alexey Kardashevskiy
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=56E7E43C.6030906@suse.de \
--to=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.