# Re: linux-next: manual merge of the kvm-ppc tree with the powerpc-merge tree

- List: linuxppc-dev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linuxppc-dev/2012/10/3938189/t

## Re: linux-next: manual merge of the kvm-ppc tree with the powerpc-merge tree

- From: Scott Wood \<hidden\>
- Date: 2012-10-11 15:50:17 
- Message: https://ratatoskr.run/linuxppc-dev/2012/10/3938189.md

```text
On 10/11/2012 08:04:58 AM, Alexander Graf wrote:
>=20
> On 11.10.2012, at 05:32, Tabi Timur-B04825 wrote:
>=20
> > On Wed, Oct 10, 2012 at 9:47 PM, Stephen Rothwell =20
> [ref] wrote:
> >
> >> Commit 549d62d889b4 ("KVM: PPC: use definitions in epapr header
> >> for hcalls") from the kvm-ppc tree added an include of =20
> asm/epapr_hcall.h
> >> to the user visible part of asm/kvm_para.h so asm/epapr_hcall.h =20
> became a
> >> user visible header file.
> >
> > Any real user-space code that tries to call any of the functions in
> > epapr_hcall.h will cause an exception.

Actually it'll cause a linker error, as of the "Don't use hardcoded =20
opcode for ePAPR hcall invocation" patch.

> > Claiming that kernel header files that KVM needs are suddenly
> > user-space header files doesn't make much sense to me, but I guess
> > it's not my decision.
>=20
> This is about kvm_host.h, which is the part that is exported to user =20
> space. It usually contains constants and structs that are required =20
> for the API.

s/kvm_host/kvm_para/

I'm not sure anything in kvm_para.h or epapr_hcalls.h would be of use =20
to userspace, but it would be of use to the guest OS, so it's still not =20
kernel-internal.

The variable externs should be #ifdef __KERNEL__ as David points out.  =20
The asm stuff could still be useful in a guest OS if the guest provides =20
epapr_hypercall_start.

-Scott=
```

## Re: linux-next: manual merge of the kvm-ppc tree with the powerpc-merge tree

- From: Alexander Graf \<hidden\>
- Date: 2012-10-11 15:57:00 
- Message: https://ratatoskr.run/linuxppc-dev/2012/10/3938192.md

```text

On 11.10.2012, at 17:50, Scott Wood wrote:

> On 10/11/2012 08:04:58 AM, Alexander Graf wrote:
>> On 11.10.2012, at 05:32, Tabi Timur-B04825 wrote:
>> > On Wed, Oct 10, 2012 at 9:47 PM, Stephen Rothwell =
[ref] wrote:
>> >
>> >> Commit 549d62d889b4 ("KVM: PPC: use definitions in epapr header
>> >> for hcalls") from the kvm-ppc tree added an include of =
asm/epapr_hcall.h
>> >> to the user visible part of asm/kvm_para.h so asm/epapr_hcall.h =
became a
>> >> user visible header file.
>> >
>> > Any real user-space code that tries to call any of the functions in
>> > epapr_hcall.h will cause an exception.
>=20
> Actually it'll cause a linker error, as of the "Don't use hardcoded =
opcode for ePAPR hcall invocation" patch.
>=20
>> > Claiming that kernel header files that KVM needs are suddenly
>> > user-space header files doesn't make much sense to me, but I guess
>> > it's not my decision.
>> This is about kvm_host.h, which is the part that is exported to user =
space. It usually contains constants and structs that are required for =
the API.
>=20
> s/kvm_host/kvm_para/
>=20
> I'm not sure anything in kvm_para.h or epapr_hcalls.h would be of use =
to userspace, but it would be of use to the guest OS, so it's still not =
kernel-internal.
>=20
> The variable externs should be #ifdef __KERNEL__ as David points out.  =
The asm stuff could still be useful in a guest OS if the guest provides =
epapr_hypercall_start.

I don't think we should worry about guest kernel code potentially having =
use for this. Let's make the user space headers be great for user space =
usage, not for guest code usage :).

Alex=
```
