64-bit Book3S exception handlers must find the dynamic kernel base
to add to the target address when branching beyond __end_interrupts,
in order to support kernel running at non-0 physical address.
Support this in KVM by branching with CTR, similarly to regular
interrupt handlers. The guest CTR
A subsequent patch to make KVM handlers relocation-safe makes them
unusable from within alt section "else" cases (due to the way fixed
addresses are taken from within fixed section head code).
Stop open-coding the KVM handlers, and add them both as normal. A more
optimal fix may be to allow some
Change the calling convention to put the trap number together with
CR in two halves of r12, which frees up HSTATE_SCRATCH2 in the HV
handler, and r9 free.
The 64-bit PR handler entry translates the calling convention back
to match the previous call convention (i.e., shared with 32-bit), for
Hi,
I didn't get any objections to the approach proposed in my
earlier RFC, so I've gone ahead with R12 = (CR | trap #) approach.
It avoided an extra register save with HV and the PR handler ended
up not being too bad.
This passed KVM boot testing with 64-bit HV and PR, with the (host)
kernel
The Egret system controller was the predecessor to the Cuda and the
differences are minor.
On Cuda, byte acknowledgement requires one transition of the TACK
signal; on Egret two are needed. On Cuda, TIP is active low; on Egret
it is active high. And Cuda raises certain interrupts that Egret
Initialize data_index where appropriate to improve readability and
assist debugging. This change doesn't affect driver behaviour.
I prefer to see
current_req->data[data_index++]
in place of
current_req->data[0]
or
current_req->data[1]
inasmuchas it becomes obvious what the
When reading_reply is set, reply_ptr points into an adb_request struct.
Hence, when reply_ptr instead points into the global cuda_rbuf,
it must be the case that reading_reply is not set.
Unfortunately, this rule can be violated because re-initialization
of reply_ptr and reading_reply presently
When a read transaction completes, one of several things will happen:
either a new transfer is started by the driver, a new transfer request
is raised by the Cuda (i.e. TREQ asserted), or both happen at once.
When both happen at once, there is a race condition between the TREQ test
in the
There is no possibility that current_req can change during execution of
cuda_start(). This can be confirmed by inspection: cuda_lock is always
held whenever cuda_start() is called or current_req is modified.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
The cuda_start() function uses spinlock_irq_save/restore for mutual
exclusion. Let's have cuda_poll() do the same when polling the VIA
interrupt.
The benefit to disabling local irqs when the interrupt is being polled
is that the interrupt handler now has the same timing properties
regardless of
Change the device probe test in the via-cuda.c driver so it will load on
Egret-based machines too. Remove the now redundant via-maciisi.c driver.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
arch/m68k/include/asm/macintosh.h | 2 +-
Introduce some helpers for handling the signalling between VIA and
Cuda. This abstraction will be used to add support for Egret devices,
which utilize slightly different signalling.
Don't invert the sense of the Cuda's active-low signals when storing
them in the 'status' variable. Just assert,
Add missing log message severity, remove old debug messages and
replace printk() loop with print_hex_dump() call.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/macintosh/via-cuda.c | 26 ++
1 file changed, 6
If the Cuda driver does not enter the 'read_done' state for some
reason, it may continue in the 'reading' state until the buffer
overflows. Add a bounds check to prevent this.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
This patch series has some improvements for the the Cuda driver: cleanup,
bug fixes and new functionality.
The broken via-maciisi driver is then replaced by via-cuda. This
eliminates over 600 LoC.
Thanks to Stan Johnson for testing these patches on a Mac LC III and
a PowerMac G3.
Finn Thain
Hi Scott,
Thanks for your reminder!
I rephrased it as below:
-#define cputime64_to_clock_t(ct) cputime_to_clock_t((cputime_t)(ct))
+#define cputime64_to_clock_t(ct) \
+ (u64)(cputime_to_clock_t((cputime_t)(ct)))
and rebuilt the kernel, no warnings found.
New patch is attached,
Hi Hari
Personally I like V1 more, but split the patch 2 is easier for ia64
people to reivew. I did basic x86 testing, it runs ok.
On 11/25/16 at 05:24pm, Hari Bathini wrote:
> Get rid of multiple definitions of append_elf_note() & final_note()
> functions. Reuse these functions compiled under
This moves the prototypes for functions that are only called from
assembler code out of asm/asm-prototypes.h into asm/kvm_ppc.h.
The prototypes were added in commit ebe4535fbe7a ("KVM: PPC:
Book3S HV: sparse: prototypes for functions called from assembler",
2016-10-10), but given that the
On 15/11/16 13:53, Yongji Xie wrote:
> Hi Bjorn,
>
>
> Kindly ping. What do you think of the way to fix the bug that resources's
> size is changed
>
> when using resource_alignment. Thanks.
Could anyone please comment on this? Thanks!
>
>
> On 2016/10/26 14:53, Yongji Xie wrote:
>> This
On Wed, 2016-11-30 at 08:03 -0500, Mimi Zohar wrote:
> On Wed, 2016-11-30 at 15:52 +1100, Michael Ellerman wrote:
> Thaigo tested the patches yesterday. Everything seemed fine. After
> cherry picking the kexec_file_load() patches and rebasing the
> restore_kexec patches on top of it in my
From: Andreas Steffen
For remote attestion it is important for the ima measurement values
to be platform-independent. Therefore integer fields to be hashed
must be converted to canonical format.
Changelog:
- Define canonical format as little endian (Mimi)
The IMA binary_runtime_measurements list is currently in platform native
format.
To allow restoring a measurement list carried across kexec with a
different endianness than the targeted kernel, this patch defines
little-endian as the canonical format. For big endian systems wanting
to
The configured IMA measurement list template format can be replaced at
runtime on the boot command line, including a custom template format.
This patch adds support for restoring a measuremement list containing
multiple builtin/custom template formats.
Changelog v7:
- remove unnecessary
The builtin and single custom templates are currently stored in an
array. In preparation for being able to restore a measurement list
containing multiple builtin/custom templates, this patch stores the
builtin and custom templates as a linked list. This will permit
defining more than one custom
The TPM PCRs are only reset on a hard reboot. In order to validate a
TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list
of the running kernel must be saved and restored on boot.
This patch uses the kexec buffer passing mechanism to pass the
serialized IMA
From: Thiago Jung Bauermann
The IMA kexec buffer allows the currently running kernel to pass
the measurement list via a kexec segment to the kernel that will be
kexec'd.
This is the architecture-specific part of setting up the IMA kexec
buffer for the next kernel.
In preparation for serializing the binary_runtime_measurements, this patch
maintains the amount of memory required.
Changelog v7:
- include the trailing null in the string length (reported by Dmitry Kasatkin)
Changelog v5:
- replace CONFIG_KEXEC_FILE with architecture CONFIG_HAVE_IMA_KEXEC
Measurements carried across kexec need to be added to the IMA
measurement list, but should not prevent measurements of the newly
booted kernel from being added to the measurement list. This patch
adds support for allowing duplicate measurements.
The "boot_aggregate" measurement entry is the
The TPM PCRs are only reset on a hard reboot. In order to validate a
TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list
of the running kernel must be saved and restored on boot. This patch
restores the measurement list.
Changelog v8:
- clearer to use the length of the
From: Thiago Jung Bauermann
The IMA kexec buffer allows the currently running kernel to pass
the measurement list via a kexec segment to the kernel that will be
kexec'd. The second kernel can check whether the previous kernel sent
the buffer and retrieve it.
This is
[Posting with abbreviated Cc list.]
The TPM PCRs are only reset on a hard reboot. In order to validate a
TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list
of the running kernel must be saved and then restored on the subsequent
boot, possibly of a different architecture.
> "Brian" == Brian King writes:
Brian> Looks good. Thanks! Here is an updated version that should apply
Brian> cleanly on top of scsi-next.
Applied to 4.10/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
> "Uma" == Uma Krishnan writes:
Uma> The first four patches in this patch series include fixes for
Uma> command room violation and lun table management.
Applied patches 5 through 14 to 4.10/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
On Thu, 2016-12-01 at 11:23 +1100, Andrew Donnellan wrote:
> In eeh_reset_device(), we take the pci_rescan_remove_lock immediately after
> after we call eeh_reset_pe() to reset the PCI controller. We then call
> eeh_clear_pe_frozen_state(), which can return an error. In this case, we
> bail out of
In eeh_reset_device(), we take the pci_rescan_remove_lock immediately after
after we call eeh_reset_pe() to reset the PCI controller. We then call
eeh_clear_pe_frozen_state(), which can return an error. In this case, we
bail out of eeh_reset_device() without calling pci_unlock_rescan_remove().
On Wed, Nov 30, 2016 at 05:45:18PM -0600, Bjorn Helgaas wrote:
>On Thu, Dec 01, 2016 at 10:02:54AM +1100, Gavin Shan wrote:
>> On Tue, Nov 29, 2016 at 06:06:05PM -0600, Bjorn Helgaas wrote:
>> >On Wed, Nov 30, 2016 at 10:20:28AM +1100, Gavin Shan wrote:
>> >> On Tue, Nov 29, 2016 at 08:48:26AM
On Thu, Dec 01, 2016 at 10:02:54AM +1100, Gavin Shan wrote:
> On Tue, Nov 29, 2016 at 06:06:05PM -0600, Bjorn Helgaas wrote:
> >On Wed, Nov 30, 2016 at 10:20:28AM +1100, Gavin Shan wrote:
> >> On Tue, Nov 29, 2016 at 08:48:26AM -0600, Bjorn Helgaas wrote:
> >> >On Tue, Nov 29, 2016 at 03:55:46PM
On Tue, Nov 29, 2016 at 06:06:05PM -0600, Bjorn Helgaas wrote:
>On Wed, Nov 30, 2016 at 10:20:28AM +1100, Gavin Shan wrote:
>> On Tue, Nov 29, 2016 at 08:48:26AM -0600, Bjorn Helgaas wrote:
>> >On Tue, Nov 29, 2016 at 03:55:46PM +1100, Gavin Shan wrote:
>> >> On Mon, Nov 28, 2016 at 10:15:06PM
From: "Matthew R. Ochs"
Currently, when sending a SCSI command, the pointer is stored in a
reserved field of the AFU command descriptor for retrieval once the
SCSI command has completed. In order to support new descriptor formats
that make use of the reserved field,
From: "Matthew R. Ochs"
As staging for supporting hardware with a different queuing mechanism,
move the send_cmd() and context_reset() routines to function pointers
that are configured when the AFU is initialized. In addition, rename
the existing routines to better
From: "Matthew R. Ochs"
The queuecommand routine is disorganized where it populates the
private command and also contains some logic/statements that are
not needed given that cxlflash devices do not (and likely never
will) support scatter-gather.
Restructure the code
From: "Matthew R. Ochs"
The send_tmf() routine includes some copy/paste cruft that can be
removed as well as the setting of an AFU command-specific while
holding the tmf_slock. While not a bug, it is out of place and
should be shifted down alongside the other command
From: "Matthew R. Ochs"
The original design of the cxlflash driver required AFU commands
to convey state information across multiple threads. The IOASA
"host use" byte was used to track if a command was done, errored,
or timed out. A per-command spin lock was used to
From: "Matthew R. Ochs"
With the removal of the static private command pool, the ability to
'complete' outstanding commands was lost. While not an issue for the
commands originating outside the driver, internal AFU commands are
synchronous and therefore have a timeout
From: "Matthew R. Ochs"
Clean up and remove the remaining private command pool infrastructure
that is no longer required.
Signed-off-by: Matthew R. Ochs
Acked-by: Uma Krishnan
This looks good !
From: "Matthew R. Ochs"
Instead of using a private pool of AFU commands, use cmd_size to prime
the private pool of SCSI commands such that they are allocated with a
size large enough to contain an aligned AFU command. Use scsi_cmd_priv()
to derive
From: "Matthew R. Ochs"
As staging for the removal of the AFU command pool, remove the reliance
upon the pool for the internal AFU sync command. Instead of obtaining an
AFU command from the pool, dynamically allocate memory with the appropriate
alignment requirements.
From: "Matthew R. Ochs"
The cxlflash driver originally required a per-command 4K buffer that
hosted data passed to the AFU. When the routines that initiate AFU
and internal SCSI commands were refactored to use scsi_execute(), the
need for this buffer became obsolete.
Looks good. Thanks! Here is an updated version that should apply
cleanly on top of scsi-next.
8<
From: Benjamin Herrenschmidt
LSIs must be ack'ed with an MMIO otherwise they remain asserted
forever. This is controlled by the "clear_isr" flag.
While we set that flag
On Wed, 2016-11-30 at 00:35:36 UTC, Balbir Singh wrote:
> Aneesh/Ben reported that the change to do_page_fault() needs
> to handle the case where CPU_FTR_COHERENT_ICACHE is missing
> but we have CPU_FTR_NOEXECUTE. In those cases the check
> added for SRR1_ISI_N_OR_G might trigger a false positive.
On Tue, 2016-11-29 at 12:45:47 UTC, Michael Ellerman wrote:
> From: Thiago Jung Bauermann
>
> Allow architectures to specify a different memory walking function for
> kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but
> PowerPC uses the memblock
[Your response didn't make it to the list, I think because it's some
non-plaintext encoding that is rejected by the list (see
http://vger.kernel.org/majordomo-info.html)]
On Wed, Nov 30, 2016 at 11:56 AM, David Laight wrote:
> From: Bjorn Helgaas
>> Sent: 29 November
On Nov 30 2016, David Laight wrote:
> Doesn't pr_cont() have its own major problem - garbled messages if
> there are concurrent writers?
> So it is best avoided if at all possible.
You are free to submit a followup patch the rework the messaging. My
patch is a strict
From: Bjorn Helgaas
> Sent: 29 November 2016 04:15
> If we update a VF BAR while it's enabled, there are two potential problems:
>
> 1) Any driver that's using the VF has a cached BAR value that is stale
> after the update, and
>
> 2) We can't update 64-bit BARs atomically, so the
On 11/29/2016 01:42 AM, Michael Ellerman wrote:
Nicholas Piggin writes:
> On Mon, 28 Nov 2016 22:07:39 +1100
> Michael Ellerman wrote:
>> Nicholas Piggin writes:
>>> diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
> "Uma" == Uma Krishnan writes:
Uma> The first four patches in this patch series include fixes for
Uma> command room violation and lun table management.
Applied patches 1-4 to 4.10/scsi-queue. The remainder of the series
needs review.
Thanks!
--
Martin K.
From: Andreas Schwab
> Sent: 28 November 2016 20:29
> Use pr_cont where appropriate, and switch to pr_foo throughout.
> Additionally, lower messages in adb_probe_task to debug level.
Doesn't pr_cont() have its own major problem - garbled messages if
there are concurrent writers?
So it is best
On Tuesday 29 November 2016 10:15 AM, Michael Ellerman wrote:
Madhavan Srinivasan writes:
diff --git a/arch/powerpc/perf/isa207-common.c
b/arch/powerpc/perf/isa207-common.c
index 2a2040ea5f99..e747bbf06661 100644
--- a/arch/powerpc/perf/isa207-common.c
+++
On Tuesday 29 November 2016 10:06 AM, Michael Ellerman wrote:
Madhavan Srinivasan writes:
Patch to update the PowerISA v3.0 raw event encoding format
information and add support for the same in Power9-pmu.c.
I'm not sure if calling this the "PowerISA v3.0"
On Mon, 2016-11-21 at 12:56 +0800, yanjiang@windriver.com wrote:
> From: Yanjiang Jin
>
> This patch is to avoid the below warning:
>
> kernel/sched/cpuacct.c:298:25: warning:
> format '%lld' expects argument of type 'long long int',
> but argument 4 has type
In Power9, L2/L3 bus events are always available as a
"bank" of 4 events. To obtain the counts for any of the
l2/l3 bus events in a given bank, the user will have to
program PMC4 with corresponding l2/l3 bus event for that
bank. Patch adds a constraint check to enforce it.
Signed-off-by: Madhavan
On Wed, 2016-11-30 at 15:52 +1100, Michael Ellerman wrote:
> Andrew Morton writes:
>
> > On Tue, 29 Nov 2016 23:45:46 +1100 Michael Ellerman
> > wrote:
> >
> >> This is v11 of the kexec_file_load() for powerpc series.
> >>
> >> I've stripped
On Tue, 2016-11-29 at 02:13:46 UTC, Benjamin Herrenschmidt wrote:
> On 64-bit CPUs with no-execute support and non-snooping icache, such as
> 970 or POWER4, we have a software mechanism to ensure coherency of the
> cache (using exec faults when needed).
>
> This was broken due to a logic
On Wed, 2016-11-16 at 18:27:56 UTC, Ben Hutchings wrote:
> OPAL is not callable from 32-bit mode and the assembly code for it
> may not even build (depending on how binutils was configured).
>
> References:
> https://buildd.debian.org/status/fetch.php?pkg=linux=powerpcspe=4.8.7-1=1479203712
>
On 30/11/16 19:35, Aneesh Kumar K.V wrote:
> Balbir Singh writes:
>
>> Some KVM functions for book3s_hv are called in real mode.
>> In real mode the top 4 bits of the address space are ignored,
>> hence an address beginning with 0xc000+offset is the
>> same as
Balbir Singh writes:
> Some KVM functions for book3s_hv are called in real mode.
> In real mode the top 4 bits of the address space are ignored,
> hence an address beginning with 0xc000+offset is the
> same as 0xd000+offset. The issue was observed when
> a kvm
On Wed, 2016-11-30 at 19:21 +1100, Benjamin Herrenschmidt wrote:
>
> There isn't one. The existing "opal-interrupts" from day one was a
> bit
> weird anyway, it's not a proper "interrupts" property to begin with,
> but it's unfixable now. Also I don't think there's a generic way to
> name
On Wed, 2016-11-30 at 19:07 +1100, Michael Ellerman wrote:
> Benjamin Herrenschmidt writes:
>
> > Recent versions of OPAL will be able to provide names for the
> > various
> > OPAL interrupts via a new "opal-interrupt-names" property. So let's
> > use them to make
On Tue, 2016-11-29 at 22:37 +0100, Luis R. Rodriguez wrote:
> On Tue, Nov 29, 2016 at 10:10:56PM +0100, Tom Gundersen wrote:
> >
> > On Tue, Nov 15, 2016 at 10:28 AM, Johannes Berg
> > wrote:
> > >
> > > My argument basically goes like this:
> > >
> > > First, given
Denis Kirjanov writes:
> On 11/29/16, Balbir Singh wrote:
>>
>>
>> The PVR list has been updated and IBM_ARCH_VEC_NRCORES_OFFSET.
>> This provides the cpu versions supported to the hypervisor and in this case
>> tells the hypervisor that the guest
On Wed, 30 Nov 2016 19:00:57 +1100
Michael Ellerman wrote:
> Nicholas Piggin writes:
>
> > Signed-off-by: Nicholas Piggin
>
> What's the actual error? mode/badaddr defined but not used?
>
> I'm just curious why I've never hit it?
Benjamin Herrenschmidt writes:
> Recent versions of OPAL will be able to provide names for the various
> OPAL interrupts via a new "opal-interrupt-names" property. So let's
> use them to make /proc/interrupts more informative.
I guess there's no point asking whether
Nicholas Piggin writes:
> Signed-off-by: Nicholas Piggin
What's the actual error? mode/badaddr defined but not used?
I'm just curious why I've never hit it?
cheers
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index
73 matches
Mail list logo