Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Alexander Graf
On 28.06.2010, at 06:39, Matt Evans wrote: > Howdy Alex! > > Alexander Graf wrote: >> We will soon start and replace instructions from the text section with >> other, paravirtualized versions. To ease the readability of those patches >> I split out the generic looping and magic page mapping code

Re: [PATCH v3 2/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-06-27 Thread Michael Neuling
In message <20100628053252.ga12...@dirshya.in.ibm.com> you wrote: > * Michael Neuling [2010-06-28 11:44:31]: > > > Vaidy, > > > > > Create sysfs interface to export data from H_BEST_ENERGY hcall > > > that can be used by administrative tools on supported pseries > > > platforms for energ

Re: [PATCH v3 2/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-06-27 Thread Vaidyanathan Srinivasan
* Michael Neuling [2010-06-28 11:44:31]: > Vaidy, > > > Create sysfs interface to export data from H_BEST_ENERGY hcall > > that can be used by administrative tools on supported pseries > > platforms for energy management optimizations. > > > > /sys/device/system/cpu/pseries_(de)

Re: [PATCH v3 2/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-06-27 Thread Michael Neuling
Vaidy, > Create sysfs interface to export data from H_BEST_ENERGY hcall > that can be used by administrative tools on supported pseries > platforms for energy management optimizations. > > /sys/device/system/cpu/pseries_(de)activate_hint_list and > /sys/device/system

section .data..init_task

2010-06-27 Thread Sean MacLennan
Anybody else seeing these messages? ppc_4xxFP-ld: .tmp_vmlinux1: section .data..init_task lma 0xc0374000 overlaps previous sections ppc_4xxFP-ld: .tmp_vmlinux2: section .data..init_task lma 0xc03a2000 overlaps previous sections ppc_4xxFP-ld: vmlinux: section .data..init_task lma 0xc03a2000 overl

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Matt Evans
Howdy Alex! Alexander Graf wrote: > We will soon start and replace instructions from the text section with > other, paravirtualized versions. To ease the readability of those patches > I split out the generic looping and magic page mapping code out. > > This patch still only contains stubs. But a

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-27 Thread Benjamin Herrenschmidt
On Sun, 2010-06-27 at 10:53 +0300, Avi Kivity wrote: > On 06/27/2010 01:58 AM, Benjamin Herrenschmidt wrote: > > > >> Then mmu intensive loads can expect to be slow. > >> > > Well, depends. ppc64 indeed requires the hash to be managed by the > > hypervisor, so inserting or invalidating transl

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Benjamin Herrenschmidt
On Sun, 2010-06-27 at 11:47 +0200, Alexander Graf wrote: > I did that at first. It breaks. During the patching we may take > interrupts (pahe faults for example) that contain just patched > instructions. And really, hell breaks loose if we don't flush it > immediately :). I was hoping at firs

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Benjamin Herrenschmidt
On Sun, 2010-06-27 at 14:06 +0200, Alexander Graf wrote: > > Right, I was agreeing with you. I meant there was no inc/dec mem > > insns. > > Ah, I see :). I think that's really the only point where I deem the > x86 isa superior :). Heh, well, that's a typical RISC thing tho. I think ARM and

Re: [PATCH 0/2 v3] mpc5200 ac97 gpio reset

2010-06-27 Thread Mark Brown
On 26 Jun 2010, at 00:04, Grant Likely wrote: > On Tue, Jun 22, 2010 at 5:00 PM, Mark Brown >> On Tue, Jun 15, 2010 at 12:05:05PM -0400, Eric Millbrandt wrote: >>> These patches reimplement the reset fuction in the ac97 to use gpio pins >>> instead of using the mpc5200 ac97 reset functionality i

Re: [PATCH 01/26] KVM: PPC: Introduce shared page

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:24 AM, Alexander Graf wrote: For transparent variable sharing between the hypervisor and guest, I introduce a shared page. This shared page will contain all the registers the guest can read and write safely without exiting guest context. This patch only implements the stubs requ

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 13:53 schrieb Avi Kivity : On 06/27/2010 02:49 PM, Alexander Graf wrote: Am 27.06.2010 um 12:59 schrieb Avi Kivity : On 06/27/2010 01:33 PM, Alexander Graf wrote: Or inc/dec... Uh - huh? How would that help? inc shared->critical # disable interrupts There is no op

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Avi Kivity
On 06/27/2010 02:49 PM, Alexander Graf wrote: Am 27.06.2010 um 12:59 schrieb Avi Kivity : On 06/27/2010 01:33 PM, Alexander Graf wrote: Or inc/dec... Uh - huh? How would that help? inc shared->critical # disable interrupts There is no opcode in the ppc isa that acts on momery without

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 12:59 schrieb Avi Kivity : On 06/27/2010 01:33 PM, Alexander Graf wrote: Or inc/dec... Uh - huh? How would that help? inc shared->critical # disable interrupts There is no opcode in the ppc isa that acts on momery without involving a register. An inc would be: ld

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Avi Kivity
On 06/27/2010 01:33 PM, Alexander Graf wrote: Or inc/dec... Uh - huh? How would that help? inc shared->critical # disable interrupts -- error compiling committee.c: too many arguments to function ___ Linuxppc-dev mailing list Linuxppc-dev@lists

Re: [PATCH 02/26] KVM: PPC: Convert MSR to shared page

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 11:50 schrieb Avi Kivity : On 06/27/2010 12:38 PM, Alexander Graf wrote: Am 27.06.2010 um 10:16 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: One of the most obvious registers to share with the guest directly is the MSR. The MSR contains the "interrup

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 12:16 schrieb Avi Kivity : On 06/27/2010 12:47 PM, Alexander Graf wrote: Am 27.06.2010 um 10:28 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We will soon start and replace instructions from the text section with other, paravirtualized versions. To ea

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 12:03 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting out to the hypervisor. To achieve this, we have an additional critical field in the shared

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 11:52 schrieb Avi Kivity : On 06/27/2010 12:40 PM, Alexander Graf wrote: Am 27.06.2010 um 10:21 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Avi Kivity
On 06/27/2010 12:47 PM, Alexander Graf wrote: Am 27.06.2010 um 10:28 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We will soon start and replace instructions from the text section with other, paravirtualized versions. To ease the readability of those patches I split ou

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting out to the hypervisor. To achieve this, we have an additional critical field in the shared page. If that field is equal to the r1 register of

Re: [PATCH 09/26] KVM: PPC: Add PV guest scratch registers

2010-06-27 Thread Avi Kivity
On 06/27/2010 12:41 PM, Alexander Graf wrote: Am 27.06.2010 um 10:22 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: While running in hooked code we need to store register contents out because we must not clobber any registers. So let's add some fields to the shared page

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Avi Kivity
On 06/27/2010 12:40 PM, Alexander Graf wrote: Am 27.06.2010 um 10:21 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting out to the hypervisor. To achieve this, we have

Re: [PATCH 02/26] KVM: PPC: Convert MSR to shared page

2010-06-27 Thread Avi Kivity
On 06/27/2010 12:38 PM, Alexander Graf wrote: Am 27.06.2010 um 10:16 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: One of the most obvious registers to share with the guest directly is the MSR. The MSR contains the "interrupts enabled" flag which the guest has to toggle

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:34 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We just introduced a new PV interface that screams for documentation. So here it is - a shiny new and awesome text file describing the internal works of the PPC KVM paravirtual interface. +Querying

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:28 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We will soon start and replace instructions from the text section with other, paravirtualized versions. To ease the readability of those patches I split out the generic looping and magic page mapping

Re: [PATCH 12/26] KVM: PPC: First magic page steps

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:24 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We will be introducing a method to project the shared page in guest context. As soon as we're talking about this coupling, the shared page is colled magic page. This patch introduces simple defines,

Re: [PATCH 09/26] KVM: PPC: Add PV guest scratch registers

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:22 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: While running in hooked code we need to store register contents out because we must not clobber any registers. So let's add some fields to the shared page we can just happily write to. How are t

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:21 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting out to the hypervisor. To achieve this, we have an additional critical field in the shared

Re: [PATCH 02/26] KVM: PPC: Convert MSR to shared page

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:16 schrieb Avi Kivity : On 06/26/2010 02:24 AM, Alexander Graf wrote: One of the most obvious registers to share with the guest directly is the MSR. The MSR contains the "interrupts enabled" flag which the guest has to toggle in critical sections. So in order to bring

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-27 Thread Alexander Graf
Am 27.06.2010 um 10:14 schrieb Avi Kivity : On 06/26/2010 02:25 AM, Alexander Graf wrote: We just introduced a new PV interface that screams for documentation. So here it is - a shiny new and awesome text file describing the internal works of the PPC KVM paravirtual interface. Good, tha

Re: [PATCH 24/26] KVM: PPC: PV mtmsrd L=0 and mtmsr

2010-06-27 Thread Alexander Graf
Am 26.06.2010 um 19:03 schrieb Segher Boessenkool >: There is also a form of mtmsr where all bits need to be addressed. While the PPC64 Linux kernel behaves resonably well here, the PPC32 one never uses the L=1 form but does mtmsr even for simple things like only changing EE. You make it

Re: [PATCH 11/26] KVM: PPC: Make RMO a define

2010-06-27 Thread Alexander Graf
Am 26.06.2010 um 18:52 schrieb Segher Boessenkool >: On PowerPC it's very normal to not support all of the physical RAM in real mode. Oh? Are you referring to "real mode limit", or 32-bit implementations with more than 32 address lines, or something else? The former. Either way, RM

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:25 AM, Alexander Graf wrote: We just introduced a new PV interface that screams for documentation. So here it is - a shiny new and awesome text file describing the internal works of the PPC KVM paravirtual interface. +Querying for existence +== + +To find ou

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:25 AM, Alexander Graf wrote: We will soon start and replace instructions from the text section with other, paravirtualized versions. To ease the readability of those patches I split out the generic looping and magic page mapping code out. This patch still only contains stubs. Bu

Re: [PATCH 12/26] KVM: PPC: First magic page steps

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:25 AM, Alexander Graf wrote: We will be introducing a method to project the shared page in guest context. As soon as we're talking about this coupling, the shared page is colled magic page. This patch introduces simple defines, so the follow-up patches are easier to read. dif

Re: [PATCH 09/26] KVM: PPC: Add PV guest scratch registers

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:24 AM, Alexander Graf wrote: While running in hooked code we need to store register contents out because we must not clobber any registers. So let's add some fields to the shared page we can just happily write to. How are these protected during interrupts? -- error compi

Re: [PATCH 08/26] KVM: PPC: Add PV guest critical sections

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:24 AM, Alexander Graf wrote: When running in hooked code we need a way to disable interrupts without clobbering any interrupts or exiting out to the hypervisor. To achieve this, we have an additional critical field in the shared page. If that field is equal to the r1 register of

Re: [PATCH 02/26] KVM: PPC: Convert MSR to shared page

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:24 AM, Alexander Graf wrote: One of the most obvious registers to share with the guest directly is the MSR. The MSR contains the "interrupts enabled" flag which the guest has to toggle in critical sections. So in order to bring the overhead of interrupt en- and disabling down, l

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-27 Thread Avi Kivity
On 06/26/2010 02:25 AM, Alexander Graf wrote: We just introduced a new PV interface that screams for documentation. So here it is - a shiny new and awesome text file describing the internal works of the PPC KVM paravirtual interface. Good, that lets people who have no idea what they're talk

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-27 Thread Avi Kivity
On 06/27/2010 01:58 AM, Benjamin Herrenschmidt wrote: Then mmu intensive loads can expect to be slow. Well, depends. ppc64 indeed requires the hash to be managed by the hypervisor, so inserting or invalidating translations will mean a roundtrip to the hypervisor, though there are ways at