Kernel KVM-PPC virtualization development
 help / color / mirror / Atom feed
* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
       [not found] <1459423707-8956-1-git-send-email-bsingharora@gmail.com>
@ 2016-03-31 13:38 ` Laurent Vivier
  2016-04-01  0:12   ` Balbir Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Vivier @ 2016-03-31 13:38 UTC (permalink / raw)
  To: Balbir Singh; +Cc: will.deacon, kvm, mpe, mikey, kvm-ppc

Hi,


could you add "kvmtool" in the subject, next time, please? :)
And it could be a good idea to send to kvm-ppc ML too.

On 31/03/2016 13:28, Balbir Singh wrote:
> Changelog v2: Add support for running a task on all cpus by
>               Michael Ellerman. Large improvements to patch 2/4
> 
> This patchset adds support for ppc64le. As a part of the support 1/4 converts
> key data structures in the fdt to big endian. 2/4 introduces h_set_mode call
> to support little endian interrupt processing. This requires support to execute
> and queue commands to a particular vcpu and hence a generic infrastructure
> is added in patch 2/4. Patch 3/4 fixes a race condition found during exit.
> Patch 4/4 adds support for fixing spapr_pci to support little endian guests
> so that virtio-pci can be detected and virtio can work
> 
> This patchset was tested on x64 (on my laptop) and on a ppc64le system.
> 
> Balbir Singh (5):
>   Add basic little endian support.
>   Add basic infrastructure to run tasks on vCPUs
>   Implement H_SET_MODE for ppc64le
>   Fix a race during exit processing
>   Implement spapr pci for little endian systems.

I was trying to use kvmtool on ppc64, some days ago, and I was not able
to run anything (yes, I'm stupid), So could you also update the README
with some ppc64/ppc64le stuff explaining how to use kvmtool on POWER?

Or give me a link to the information, and I'll do.

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
  2016-03-31 13:38 ` [PATCH 0/5] Add support for ppc64le in kvmtool Laurent Vivier
@ 2016-04-01  0:12   ` Balbir Singh
  2016-04-04  8:34     ` Balbir Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Balbir Singh @ 2016-04-01  0:12 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: will.deacon, kvm, mpe, mikey, kvm-ppc



On 01/04/16 00:38, Laurent Vivier wrote:
> Hi,
>
>
> could you add "kvmtool" in the subject, next time, please? :)
> And it could be a good idea to send to kvm-ppc ML too.
You mean like in [kvmtool]? The cover letter does have kvmtool, I think
adding [kvmtool] tag helps. I'll keep it in mind
> On 31/03/2016 13:28, Balbir Singh wrote:
>> Changelog v2: Add support for running a task on all cpus by
>>               Michael Ellerman. Large improvements to patch 2/4
>>
>> This patchset adds support for ppc64le. As a part of the support 1/4 converts
>> key data structures in the fdt to big endian. 2/4 introduces h_set_mode call
>> to support little endian interrupt processing. This requires support to execute
>> and queue commands to a particular vcpu and hence a generic infrastructure
>> is added in patch 2/4. Patch 3/4 fixes a race condition found during exit.
>> Patch 4/4 adds support for fixing spapr_pci to support little endian guests
>> so that virtio-pci can be detected and virtio can work
>>
>> This patchset was tested on x64 (on my laptop) and on a ppc64le system.
>>
>> Balbir Singh (5):
>>   Add basic little endian support.
>>   Add basic infrastructure to run tasks on vCPUs
>>   Implement H_SET_MODE for ppc64le
>>   Fix a race during exit processing
>>   Implement spapr pci for little endian systems.
> I was trying to use kvmtool on ppc64, some days ago, and I was not able
> to run anything (yes, I'm stupid), So could you also update the README
> with some ppc64/ppc64le stuff explaining how to use kvmtool on POWER?
No.. I don't think anyone is stupid, may be it just doesn't work. For ppc64le
here are the steps. I'll write a README after this series is committed

1. Make sure you have this patchset
2. Compile a ppc64le_defconfig kernel
3. Strip the elf header from vmlinux (yes, we don't yet have an elf parser - TODO)
4. lkvm run -c <cpus> -m <mem{constrained to 4G}> -k <kernel from step 3> -i <initrd> -d <diskimage> -p <args> --console hv

There are two limitations that need to be fixed
1. memory is limited to 4G because of the way RTAS is currently setup in kvmtool, I have a brute force
   fix for it, I'll post it after this series is merged
2. HPT size is limited to 16MB, will post a patch after this series is merged

TODOs
1. Implement an elf parser so that we don't have to do step 3


> Or give me a link to the information, and I'll do.
I hope this helps, I can do some documentation once we get the limitations and TODOs
resolved
> Thanks,
> Laurent
Thanks for looking into this
Balbir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
  2016-04-01  0:12   ` Balbir Singh
@ 2016-04-04  8:34     ` Balbir Singh
  2016-04-04  8:41       ` Laurent Vivier
  0 siblings, 1 reply; 6+ messages in thread
From: Balbir Singh @ 2016-04-04  8:34 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Will Deacon, kvm, Michael Ellerman, Michael Neuling, kvm-ppc

On Fri, Apr 1, 2016 at 11:12 AM, Balbir Singh <bsingharora@gmail.com> wrote:
>
>
> On 01/04/16 00:38, Laurent Vivier wrote:
>> Hi,
>>
>>
>> could you add "kvmtool" in the subject, next time, please? :)
>> And it could be a good idea to send to kvm-ppc ML too.
> You mean like in [kvmtool]? The cover letter does have kvmtool, I think
> adding [kvmtool] tag helps. I'll keep it in mind
>> On 31/03/2016 13:28, Balbir Singh wrote:
>>> Changelog v2: Add support for running a task on all cpus by
>>>               Michael Ellerman. Large improvements to patch 2/4
>>>
>>> This patchset adds support for ppc64le. As a part of the support 1/4 converts
>>> key data structures in the fdt to big endian. 2/4 introduces h_set_mode call
>>> to support little endian interrupt processing. This requires support to execute
>>> and queue commands to a particular vcpu and hence a generic infrastructure
>>> is added in patch 2/4. Patch 3/4 fixes a race condition found during exit.
>>> Patch 4/4 adds support for fixing spapr_pci to support little endian guests
>>> so that virtio-pci can be detected and virtio can work
>>>
>>> This patchset was tested on x64 (on my laptop) and on a ppc64le system.
>>>
>>> Balbir Singh (5):
>>>   Add basic little endian support.
>>>   Add basic infrastructure to run tasks on vCPUs
>>>   Implement H_SET_MODE for ppc64le
>>>   Fix a race during exit processing
>>>   Implement spapr pci for little endian systems.
>> I was trying to use kvmtool on ppc64, some days ago, and I was not able
>> to run anything (yes, I'm stupid), So could you also update the README
>> with some ppc64/ppc64le stuff explaining how to use kvmtool on POWER?
> No.. I don't think anyone is stupid, may be it just doesn't work. For ppc64le
> here are the steps. I'll write a README after this series is committed
>
> 1. Make sure you have this patchset
> 2. Compile a ppc64le_defconfig kernel
> 3. Strip the elf header from vmlinux (yes, we don't yet have an elf parser - TODO)
> 4. lkvm run -c <cpus> -m <mem{constrained to 4G}> -k <kernel from step 3> -i <initrd> -d <diskimage> -p <args> --console hv
>
> There are two limitations that need to be fixed
> 1. memory is limited to 4G because of the way RTAS is currently setup in kvmtool, I have a brute force
>    fix for it, I'll post it after this series is merged
> 2. HPT size is limited to 16MB, will post a patch after this series is merged
>
> TODOs
> 1. Implement an elf parser so that we don't have to do step 3
>
>
>> Or give me a link to the information, and I'll do.
> I hope this helps, I can do some documentation once we get the limitations and TODOs
> resolved
>> Thanks,
>> Laurent
> Thanks for looking into this
> Balbir

Hi,

Did the instructions help? Any luck with running kvmtool?

Balbir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
  2016-04-04  8:34     ` Balbir Singh
@ 2016-04-04  8:41       ` Laurent Vivier
  2016-04-04 10:24         ` Balbir Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Vivier @ 2016-04-04  8:41 UTC (permalink / raw)
  To: Balbir Singh; +Cc: Will Deacon, kvm, Michael Ellerman, Michael Neuling, kvm-ppc



On 04/04/2016 10:34, Balbir Singh wrote:
> On Fri, Apr 1, 2016 at 11:12 AM, Balbir Singh <bsingharora@gmail.com> wrote:
>>
>>
>> On 01/04/16 00:38, Laurent Vivier wrote:
>>> Hi,
>>>
>>>
>>> could you add "kvmtool" in the subject, next time, please? :)
>>> And it could be a good idea to send to kvm-ppc ML too.
>> You mean like in [kvmtool]? The cover letter does have kvmtool, I think
>> adding [kvmtool] tag helps. I'll keep it in mind
>>> On 31/03/2016 13:28, Balbir Singh wrote:
>>>> Changelog v2: Add support for running a task on all cpus by
>>>>               Michael Ellerman. Large improvements to patch 2/4
>>>>
>>>> This patchset adds support for ppc64le. As a part of the support 1/4 converts
>>>> key data structures in the fdt to big endian. 2/4 introduces h_set_mode call
>>>> to support little endian interrupt processing. This requires support to execute
>>>> and queue commands to a particular vcpu and hence a generic infrastructure
>>>> is added in patch 2/4. Patch 3/4 fixes a race condition found during exit.
>>>> Patch 4/4 adds support for fixing spapr_pci to support little endian guests
>>>> so that virtio-pci can be detected and virtio can work
>>>>
>>>> This patchset was tested on x64 (on my laptop) and on a ppc64le system.
>>>>
>>>> Balbir Singh (5):
>>>>   Add basic little endian support.
>>>>   Add basic infrastructure to run tasks on vCPUs
>>>>   Implement H_SET_MODE for ppc64le
>>>>   Fix a race during exit processing
>>>>   Implement spapr pci for little endian systems.
>>> I was trying to use kvmtool on ppc64, some days ago, and I was not able
>>> to run anything (yes, I'm stupid), So could you also update the README
>>> with some ppc64/ppc64le stuff explaining how to use kvmtool on POWER?
>> No.. I don't think anyone is stupid, may be it just doesn't work. For ppc64le
>> here are the steps. I'll write a README after this series is committed
>>
>> 1. Make sure you have this patchset
>> 2. Compile a ppc64le_defconfig kernel
>> 3. Strip the elf header from vmlinux (yes, we don't yet have an elf parser - TODO)
>> 4. lkvm run -c <cpus> -m <mem{constrained to 4G}> -k <kernel from step 3> -i <initrd> -d <diskimage> -p <args> --console hv
>>
>> There are two limitations that need to be fixed
>> 1. memory is limited to 4G because of the way RTAS is currently setup in kvmtool, I have a brute force
>>    fix for it, I'll post it after this series is merged
>> 2. HPT size is limited to 16MB, will post a patch after this series is merged

Do you know David Gibson is working on a patch series for QEMU/KVM to
change the size of the HPT while the guest is running?

http://patchwork.ozlabs.org/patch/599965/

>>
>> TODOs
>> 1. Implement an elf parser so that we don't have to do step 3
>>
>>
>>> Or give me a link to the information, and I'll do.
>> I hope this helps, I can do some documentation once we get the limitations and TODOs
>> resolved
>>> Thanks,
>>> Laurent
>> Thanks for looking into this
>> Balbir
> 
> Hi,

Hi,

> Did the instructions help? Any luck with running kvmtool?
> 

This is helpful but I didn't have the time to try again.

Just one more question: how do you strip the ELF header (step 3)?

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
  2016-04-04  8:41       ` Laurent Vivier
@ 2016-04-04 10:24         ` Balbir Singh
  2016-04-04 12:21           ` Laurent Vivier
  0 siblings, 1 reply; 6+ messages in thread
From: Balbir Singh @ 2016-04-04 10:24 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Will Deacon, kvm, Michael Ellerman, Michael Neuling, kvm-ppc

>>
>
> This is helpful but I didn't have the time to try again.
>
> Just one more question: how do you strip the ELF header (step 3)?

I use

objcopy -O binary vmlinux vmlinux.bin

Balbir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/5] Add support for ppc64le in kvmtool
  2016-04-04 10:24         ` Balbir Singh
@ 2016-04-04 12:21           ` Laurent Vivier
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2016-04-04 12:21 UTC (permalink / raw)
  To: Balbir Singh; +Cc: Will Deacon, kvm, Michael Ellerman, Michael Neuling, kvm-ppc



On 04/04/2016 12:24, Balbir Singh wrote:
>>>
>>
>> This is helpful but I didn't have the time to try again.
>>
>> Just one more question: how do you strip the ELF header (step 3)?
> 
> I use
> 
> objcopy -O binary vmlinux vmlinux.bin

Many thanks!

It was the missing part :)

I'm able to boot a big-endian kernel now, I'll test your patches as soon
as I have access to a little-endian capable host.

Laurent

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-04 12:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1459423707-8956-1-git-send-email-bsingharora@gmail.com>
2016-03-31 13:38 ` [PATCH 0/5] Add support for ppc64le in kvmtool Laurent Vivier
2016-04-01  0:12   ` Balbir Singh
2016-04-04  8:34     ` Balbir Singh
2016-04-04  8:41       ` Laurent Vivier
2016-04-04 10:24         ` Balbir Singh
2016-04-04 12:21           ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox