<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kvm/emulate.c, branch linux-5.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-06-05T15:30:28Z</updated>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266</title>
<updated>2019-06-05T15:30:28Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-29T14:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d94d71cb45fda694a7189839f1c6aacb4f615f95'/>
<id>urn:sha1:d94d71cb45fda694a7189839f1c6aacb4f615f95</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation 51 franklin street fifth floor boston ma 02110
  1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 67 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141333.953658117@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Use exported tb_to_ns() function in decrementer emulation</title>
<updated>2018-10-26T10:58:58Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2018-10-20T09:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c43befca86ae35cc82bd889484bd179bff27b6c6'/>
<id>urn:sha1:c43befca86ae35cc82bd889484bd179bff27b6c6</id>
<content type='text'>
This changes the KVM code that emulates the decrementer function to do
the conversion of decrementer values to time intervals in nanoseconds
by calling the tb_to_ns() function exported by the powerpc timer code,
in preference to open-coded arithmetic using values from the
decrementer_clockevent struct.  Similarly, the HV-KVM code that did
the same conversion using arithmetic on tb_ticks_per_sec also now
uses tb_to_ns().

Signed-off-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Remove POWER4 support</title>
<updated>2018-03-31T13:47:50Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-02-20T19:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=471d7ff8b51b63521c8ea35c51966ab4caa434ee'/>
<id>urn:sha1:471d7ff8b51b63521c8ea35c51966ab4caa434ee</id>
<content type='text'>
POWER4 has been broken since at least the change 49d09bf2a6
("powerpc/64s: Optimise MSR handling in exception handling"), which
requires mtmsrd L=1 support. This was introduced in ISA v2.01, and
POWER4 supports ISA v2.00.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9</title>
<updated>2017-06-19T04:02:04Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2017-05-22T06:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bc3fe818c9e823248f6ec299b1c518aa2df347c'/>
<id>urn:sha1:1bc3fe818c9e823248f6ec299b1c518aa2df347c</id>
<content type='text'>
This allows userspace (e.g. QEMU) to enable large decrementer mode for
the guest when running on a POWER9 host, by setting the LPCR_LD bit in
the guest LPCR value.  With this, the guest exit code saves 64 bits of
the guest DEC value on exit.  Other places that use the guest DEC
value check the LPCR_LD bit in the guest LPCR value, and if it is set,
omit the 32-bit sign extension that would otherwise be done.

This doesn't change the DEC emulation used by PR KVM because PR KVM
is not supported on POWER9 yet.

This is partly based on an earlier patch by Oliver O'Halloran.

Signed-off-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs</title>
<updated>2017-04-20T01:39:32Z</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2017-04-05T13:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=feafd13c96d6e2998d3da81bb55db379fcf02499'/>
<id>urn:sha1:feafd13c96d6e2998d3da81bb55db379fcf02499</id>
<content type='text'>
According to the PowerISA 2.07, mtspr and mfspr should not always
generate an illegal instruction exception when being used with an
undefined SPR, but rather treat the instruction as a NOP or inject a
privilege exception in some cases, too - depending on the SPR number.
Also turn the printk here into a ratelimited print statement, so that
the guest can not flood the dmesg log of the host by issueing lots of
illegal mtspr/mfspr instruction here.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S PR: Fix illegal opcode emulation</title>
<updated>2016-06-20T04:11:25Z</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2016-05-18T19:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=708e75a3ee750dce1072134e630d66c4e6eaf63c'/>
<id>urn:sha1:708e75a3ee750dce1072134e630d66c4e6eaf63c</id>
<content type='text'>
If kvmppc_handle_exit_pr() calls kvmppc_emulate_instruction() to emulate
one instruction (in the BOOK3S_INTERRUPT_H_EMUL_ASSIST case), it calls
kvmppc_core_queue_program() afterwards if kvmppc_emulate_instruction()
returned EMULATE_FAIL, so the guest gets an program interrupt for the
illegal opcode.
However, the kvmppc_emulate_instruction() also tried to inject a
program exception for this already, so the program interrupt gets
injected twice and the return address in srr0 gets destroyed.
All other callers of kvmppc_emulate_instruction() are also injecting
a program interrupt, and since the callers have the right knowledge
about the srr1 flags that should be used, it is the function
kvmppc_emulate_instruction() that should _not_ inject program
interrupts, so remove the kvmppc_core_queue_program() here.

This fixes the issue discovered by Laurent Vivier with kvm-unit-tests
where the logs are filled with these messages when the test tries
to execute an illegal instruction:

     Couldn't emulate instruction 0x00000000 (op 0 xop 0)
     kvmppc_handle_exit_pr: emulation at 700 failed (00000000)

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Alexander Graf &lt;agraf@suse.de&gt;
Tested-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Pass enum to kvmppc_get_last_inst</title>
<updated>2014-09-22T08:11:36Z</updated>
<author>
<name>Alexander Graf</name>
</author>
<published>2014-09-10T12:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d0eff6385640a9e6eed0b0c09113794b2bb74e9'/>
<id>urn:sha1:8d0eff6385640a9e6eed0b0c09113794b2bb74e9</id>
<content type='text'>
The kvmppc_get_last_inst function recently received a facelift that allowed
us to pass an enum of the type of instruction we want to read into it rather
than an unreadable boolean.

Unfortunately, not all callers ended up passing the enum. This wasn't really
an issue as "true" and "false" happen to match the two enum values we have,
but it's still hard to read.

Update all callers of kvmppc_get_last_inst() to follow the new calling
convention.

Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
<entry>
<title>powerpc/kvm: support to handle sw breakpoint</title>
<updated>2014-09-22T08:11:35Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2014-09-09T17:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a59c1d9e609c4bbad9ec3b238221ecf3b9ca091b'/>
<id>urn:sha1:a59c1d9e609c4bbad9ec3b238221ecf3b9ca091b</id>
<content type='text'>
This patch adds kernel side support for software breakpoint.
Design is that, by using an illegal instruction, we trap to hypervisor
via Emulation Assistance interrupt, where we check for the illegal instruction
and accordingly we return to Host or Guest. Patch also adds support for
software breakpoint in PR KVM.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Separate loadstore emulation from priv emulation</title>
<updated>2014-07-28T16:30:10Z</updated>
<author>
<name>Alexander Graf</name>
</author>
<published>2014-06-18T12:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d69614a295aef72f8fb22da8e3ccf1a8f19a7ffc'/>
<id>urn:sha1:d69614a295aef72f8fb22da8e3ccf1a8f19a7ffc</id>
<content type='text'>
Today the instruction emulator can get called via 2 separate code paths. It
can either be called by MMIO emulation detection code or by privileged
instruction traps.

This is bad, as both code paths prepare the environment differently. For MMIO
emulation we already know the virtual address we faulted on, so instructions
there don't have to actually fetch that information.

Split out the two separate use cases into separate files.

Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: PPC: Allow kvmppc_get_last_inst() to fail</title>
<updated>2014-07-28T13:23:14Z</updated>
<author>
<name>Mihai Caraman</name>
</author>
<published>2014-07-23T16:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51f047261e717b74b226f837a16455994b61ae30'/>
<id>urn:sha1:51f047261e717b74b226f837a16455994b61ae30</id>
<content type='text'>
On book3e, guest last instruction is read on the exit path using load
external pid (lwepx) dedicated instruction. This load operation may fail
due to TLB eviction and execute-but-not-read entries.

This patch lay down the path for an alternative solution to read the guest
last instruction, by allowing kvmppc_get_lat_inst() function to fail.
Architecture specific implmentations of kvmppc_load_last_inst() may read
last guest instruction and instruct the emulation layer to re-execute the
guest in case of failure.

Make kvmppc_get_last_inst() definition common between architectures.

Signed-off-by: Mihai Caraman &lt;mihai.caraman@freescale.com&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
</feed>
