<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/asm-offsets.c, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-09-06T23:48:59Z</updated>
<entry>
<title>Merge branch 'merge' into next</title>
<updated>2012-09-06T23:48:59Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2012-09-06T23:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fff34b3412b9401a76ba9d021db1bd91cb0e02b6'/>
<id>urn:sha1:fff34b3412b9401a76ba9d021db1bd91cb0e02b6</id>
<content type='text'>
Brings in various bug fixes from 3.6-rcX
</content>
</entry>
<entry>
<title>powerpc: Restore VDSO information on critical exception om BookE</title>
<updated>2012-09-06T23:48:49Z</updated>
<author>
<name>Mihai Caraman</name>
</author>
<published>2012-09-06T02:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0127262c01f0beb485f917c720d1d95d165dfdbf'/>
<id>urn:sha1:0127262c01f0beb485f917c720d1d95d165dfdbf</id>
<content type='text'>
Critical exception on 64-bit booke uses user-visible SPRG3 as scratch.
Restore VDSO information in SPRG3 on exception prolog.

Use a common sprg3 field in PACA for all powerpc64 architectures.

Signed-off-by: Mihai Caraman &lt;mihai.caraman@freescale.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Restore correct DSCR in context switch</title>
<updated>2012-09-05T06:05:22Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-09-03T16:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=714332858bfd40dcf8f741498336d93875c23aa7'/>
<id>urn:sha1:714332858bfd40dcf8f741498336d93875c23aa7</id>
<content type='text'>
During a context switch we always restore the per thread DSCR value.
If we aren't doing explicit DSCR management
(ie thread.dscr_inherit == 0) and the default DSCR changed while
the process has been sleeping we end up with the wrong value.

Check thread.dscr_inherit and select the default DSCR or per thread
DSCR as required.

This was found with the following test case, when running with
more threads than CPUs (ie forcing context switching):

http://ozlabs.org/~anton/junkcode/dscr_default_test.c

With the four patches applied I can run a combination of all
test cases successfully at the same time:

http://ozlabs.org/~anton/junkcode/dscr_default_test.c
http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c
http://ozlabs.org/~anton/junkcode/dscr_inherit_test.c

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Cc: &lt;stable@kernel.org&gt; # 3.0+
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Add VDSO version of getcpu</title>
<updated>2012-07-11T04:18:40Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-07-04T20:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18ad51dd342a7eb09dbcd059d0b451b616d4dafc'/>
<id>urn:sha1:18ad51dd342a7eb09dbcd059d0b451b616d4dafc</id>
<content type='text'>
We have a request for a fast method of getting CPU and NUMA node IDs
from userspace. This patch implements a getcpu VDSO function,
similar to x86.

Ben suggested we use SPRG3 which is userspace readable. SPRG3 can be
modified by a KVM guest, so we save the SPRG3 value in the paca and
restore it when transitioning from the guest to the host.

I have a glibc patch that implements sched_getcpu on top of this.
Testing on a POWER7:

baseline: 538 cycles
vdso:      30 cycles

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm</title>
<updated>2012-05-24T23:17:30Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-05-24T23:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07acfc2a9349a8ce45b236c2624dad452001966b'/>
<id>urn:sha1:07acfc2a9349a8ce45b236c2624dad452001966b</id>
<content type='text'>
Pull KVM changes from Avi Kivity:
 "Changes include additional instruction emulation, page-crossing MMIO,
  faster dirty logging, preventing the watchdog from killing a stopped
  guest, module autoload, a new MSI ABI, and some minor optimizations
  and fixes.  Outside x86 we have a small s390 and a very large ppc
  update.

  Regarding the new (for kvm) rebaseless workflow, some of the patches
  that were merged before we switch trees had to be rebased, while
  others are true pulls.  In either case the signoffs should be correct
  now."

Fix up trivial conflicts in Documentation/feature-removal-schedule.txt
arch/powerpc/kvm/book3s_segment.S and arch/x86/include/asm/kvm_para.h.

I suspect the kvm_para.h resolution ends up doing the "do I have cpuid"
check effectively twice (it was done differently in two different
commits), but better safe than sorry ;)

* 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (125 commits)
  KVM: make asm-generic/kvm_para.h have an ifdef __KERNEL__ block
  KVM: s390: onereg for timer related registers
  KVM: s390: epoch difference and TOD programmable field
  KVM: s390: KVM_GET/SET_ONEREG for s390
  KVM: s390: add capability indicating COW support
  KVM: Fix mmu_reload() clash with nested vmx event injection
  KVM: MMU: Don't use RCU for lockless shadow walking
  KVM: VMX: Optimize %ds, %es reload
  KVM: VMX: Fix %ds/%es clobber
  KVM: x86 emulator: convert bsf/bsr instructions to emulate_2op_SrcV_nobyte()
  KVM: VMX: unlike vmcs on fail path
  KVM: PPC: Emulator: clean up SPR reads and writes
  KVM: PPC: Emulator: clean up instruction parsing
  kvm/powerpc: Add new ioctl to retreive server MMU infos
  kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM
  KVM: PPC: bookehv: Fix r8/r13 storing in level exception handler
  KVM: PPC: Book3S: Enable IRQs during exit handling
  KVM: PPC: Fix PR KVM on POWER7 bare metal
  KVM: PPC: Fix stbux emulation
  KVM: PPC: bookehv: Use lwz/stw instead of PPC_LL/PPC_STL for 32-bit fields
  ...
</content>
</entry>
<entry>
<title>powerpc: Remove iseries specific fields in lppaca</title>
<updated>2012-04-30T05:37:16Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-04-10T16:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=448054a6508d74767ba4c76654b42182e4f750b6'/>
<id>urn:sha1:448054a6508d74767ba4c76654b42182e4f750b6</id>
<content type='text'>
Remove all the iseries specific fields in the lppaca.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Book 3S: Fix compilation for !HV configs</title>
<updated>2012-04-08T11:01:34Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2012-03-05T21:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7657f4089b097846cc37bfa2b74fc0bd2bd60e30'/>
<id>urn:sha1:7657f4089b097846cc37bfa2b74fc0bd2bd60e30</id>
<content type='text'>
Commits 2f5cdd5487 ("KVM: PPC: Book3S HV: Make secondary threads more
robust against stray IPIs") and 1c2066b0f7 ("KVM: PPC: Book3S HV: Make
virtual processor area registration more robust") added fields to
struct kvm_vcpu_arch inside #ifdef CONFIG_KVM_BOOK3S_64_HV regions,
and added lines to arch/powerpc/kernel/asm-offsets.c to generate
assembler constants for their offsets.  Unfortunately this led to
compile errors on Book 3S machines for configs that had KVM enabled
but not CONFIG_KVM_BOOK3S_64_HV.  This fixes the problem by moving
the offending lines inside #ifdef CONFIG_KVM_BOOK3S_64_HV regions.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;

</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Make virtual processor area registration more robust</title>
<updated>2012-04-08T11:01:27Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2012-02-19T17:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e25aa5f64b18a97f35266e51c71ff4dc644db0c'/>
<id>urn:sha1:2e25aa5f64b18a97f35266e51c71ff4dc644db0c</id>
<content type='text'>
The PAPR API allows three sorts of per-virtual-processor areas to be
registered (VPA, SLB shadow buffer, and dispatch trace log), and
furthermore, these can be registered and unregistered for another
virtual CPU.  Currently we just update the vcpu fields pointing to
these areas at the time of registration or unregistration.  If this
is done on another vcpu, there is the possibility that the target vcpu
is using those fields at the time and could end up using a bogus
pointer and corrupting memory.

This fixes the race by making the target cpu itself do the update, so
we can be sure that the update happens at a time when the fields
aren't being used.  Each area now has a struct kvmppc_vpa which is
used to manage these updates.  There is also a spinlock which protects
access to all of the kvmppc_vpa structs, other than to the pinned_addr
fields.  (We could have just taken the spinlock when using the vpa,
slb_shadow or dtl fields, but that would mean taking the spinlock on
every guest entry and exit.)

This also changes 'struct dtl' (which was undefined) to 'struct dtl_entry',
which is what the rest of the kernel uses.

Thanks to Michael Ellerman &lt;michael@ellerman.id.au&gt; for pointing out
the need to initialize vcpu-&gt;arch.vpa_update_lock.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;

</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Make secondary threads more robust against stray IPIs</title>
<updated>2012-04-08T11:01:20Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2012-02-03T00:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0888f70151c7f53de2b45ee20ff1905837943e8'/>
<id>urn:sha1:f0888f70151c7f53de2b45ee20ff1905837943e8</id>
<content type='text'>
Currently on POWER7, if we are running the guest on a core and we don't
need all the hardware threads, we do nothing to ensure that the unused
threads aren't executing in the kernel (other than checking that they
are offline).  We just assume they're napping and we don't do anything
to stop them trying to enter the kernel while the guest is running.
This means that a stray IPI can wake up the hardware thread and it will
then try to enter the kernel, but since the core is in guest context,
it will execute code from the guest in hypervisor mode once it turns the
MMU on, which tends to lead to crashes or hangs in the host.

This fixes the problem by adding two new one-byte flags in the
kvmppc_host_state structure in the PACA which are used to interlock
between the primary thread and the unused secondary threads when entering
the guest.  With these flags, the primary thread can ensure that the
unused secondaries are not already in kernel mode (i.e. handling a stray
IPI) and then indicate that they should not try to enter the kernel
if they do get woken for any reason.  Instead they will go into KVM code,
find that there is no vcpu to run, acknowledge and clear the IPI and go
back to nap mode.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: booke: category E.HV (GS-mode) support</title>
<updated>2012-04-08T09:51:19Z</updated>
<author>
<name>Scott Wood</name>
</author>
<published>2011-12-20T15:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d30f6e480055e5be12e7a03fd11ea912a451daa5'/>
<id>urn:sha1:d30f6e480055e5be12e7a03fd11ea912a451daa5</id>
<content type='text'>
Chips such as e500mc that implement category E.HV in Power ISA 2.06
provide hardware virtualization features, including a new MSR mode for
guest state.  The guest OS can perform many operations without trapping
into the hypervisor, including transitions to and from guest userspace.

Since we can use SRR1[GS] to reliably tell whether an exception came from
guest state, instead of messing around with IVPR, we use DO_KVM similarly
to book3s.

Current issues include:
 - Machine checks from guest state are not routed to the host handler.
 - The guest can cause a host oops by executing an emulated instruction
   in a page that lacks read permission.  Existing e500/4xx support has
   the same problem.

Includes work by Ashish Kalra &lt;Ashish.Kalra@freescale.com&gt;,
Varun Sethi &lt;Varun.Sethi@freescale.com&gt;, and
Liu Yu &lt;yu.liu@freescale.com&gt;.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
[agraf: remove pt_regs usage]
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;

</content>
</entry>
</feed>
