From: Andre Przywara <andre.przywara@arm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Will Deacon <Will.Deacon@arm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"svaidy@linux.vnet.ibm.com" <svaidy@linux.vnet.ibm.com>,
"matt@ozlabs.org" <matt@ozlabs.org>
Subject: Re: [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need
Date: Tue, 23 Jun 2015 10:31:43 +0000 [thread overview]
Message-ID: <5589358F.1080606@arm.com> (raw)
In-Reply-To: <1435053939.20070.2.camel@ellerman.id.au>
Hi,
On 23/06/15 11:05, Michael Ellerman wrote:
> On Tue, 2015-06-23 at 11:33 +0200, Paolo Bonzini wrote:
>> On 19/06/2015 09:21, Michael Ellerman wrote:
>>> diff --git a/powerpc/spapr.h b/powerpc/spapr.h
>>> index 0537f881c0e4..7a377d093ef4 100644
>>> --- a/powerpc/spapr.h
>>> +++ b/powerpc/spapr.h
>>> @@ -16,17 +16,32 @@
>>>
>>> #include <inttypes.h>
>>>
>>> -/* We need some of the H_ hcall defs, but they're __KERNEL__ only. */
>>> -#define __KERNEL__
>>> -#include <asm/hvcall.h>
>>> -#undef __KERNEL__
>>> -
>>
>> This thing is exactly why I think kvmtool's life in the kernel tree was
>> harmful.
>
> Harmful is a bit of an overstatement. Though I agree that was a bit of a hack.
>
>> Why wasn't instead H_* just moved to a uapi/ header?!?!? Can you do
>> that now?
>
> Because it's not part of the kernel API, never was, still isn't.
Technically it may not - if I get this correctly it is more a platform
API defined by the architecture, like ACPI or PSCI on ARM.
But if I get this correctly Linux re-uses those definitions in the KVM
API, by piggy-backing on the existing hypercalls. Please correct me if I
am wrong here, I am looking at arch/powerpc/kvm/book3s_hv.c, where it
seems to trap those hypercalls.
So I think that - though not originally invented or defined by Linux -
it should export those definitions that KVM (re-)uses.
QEMU also has a header file duplicating those definitions, so I support
the idea of an uapi header.
> It *is* part of the hypervisor API, but it's not Linux's job to export that and
> deal with the fallout if it was ever changed.
Regardless of what happens if that phyp API changes, KVM would still
need to support those hypercalls, so I think it should export them as well.
Cheers,
Andre.
next prev parent reply other threads:[~2015-06-23 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 7:21 [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need Michael Ellerman
2015-06-19 7:21 ` [PATCH 2/2] powerpc: Enable 32-bit build Michael Ellerman
2015-06-19 7:40 ` [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need Michael Ellerman
2015-06-19 10:35 ` Will Deacon
2015-06-23 9:33 ` Paolo Bonzini
2015-06-23 10:05 ` Michael Ellerman
2015-06-23 10:31 ` Andre Przywara [this message]
2015-06-23 10:33 ` Paolo Bonzini
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=5589358F.1080606@arm.com \
--to=andre.przywara@arm.com \
--cc=Will.Deacon@arm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=matt@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=pbonzini@redhat.com \
--cc=svaidy@linux.vnet.ibm.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