We put this off, as it wasn't necessary without smp. Now it
is. Only need to do this for arm64, as we've already done it
already for arm.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm64.mak | 1 +
lib/arm64/asm/spinlock.h | 8 ++--
lib/arm64/spinlock.c | 43
Add a common entry point, present/online cpu masks, and
smp_boot_secondary() to support booting secondary cpus.
Adds a bit more PSCI API that we need too. We also
adjust THREAD_START_SP for arm to make some room for
exception stacks.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
We shouldn't assume we can set tcr_el1.ips to 42 bits. Set
it based on what we read from id_aa64mmfr0_el1. Didn't see
a problem, but might as well be correct.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/cstart64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/selftest.c| 60 +++
arm/unittests.cfg | 11 --
2 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/arm/selftest.c b/arm/selftest.c
index d77495747b08a..fc9ec609d875e
While current_mode() == USR_MODE works on armv7 from PL0 to check
if we're in user mode, current_mode() would require reading a
privileged register on armv8. To work around this, on arm64 we
introduced a 'user_mode' variable. This variable needs to be per
thread now. Rather than starting to
We introduced a variable called mmu_on to the mmu implementation
because unit tests may want to run with the mmu off, yet still
call into common code that could lead to {Load,Store}-Exclusive
instructions - which is illegal. So, the mmu_on variable was added
and made query-able (through
For smp we need a way to maintain thread local state. The bottom
of the thread stack is a good place, and is where Linux puts it.
So we just steal the concept of the thread_info structure that
lives at the bottom of the stack in Linux, and introduce it to
kvm-unit-tests/arm[64]. For starters we
Each mode has its own stack, but we only use it as a base pointer
to a private memory region. That region, which has a size of
sizeof(struct pt_regs), is used to store some registers during the
switch to svc mode - which will use the normal svc stack. The switch
to svc mode is done because we
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/uapi-psci.h | 73 +++
lib/arm64/asm/uapi-psci.h | 1 +
2 files changed, 74 insertions(+)
create mode 100644 lib/arm/asm/uapi-psci.h
create mode 100644 lib/arm64/asm/uapi-psci.h
diff
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm-common.mak | 1 +
lib/arm/asm/psci.h | 13 +
lib/arm/psci.c | 30 ++
lib/arm64/asm/psci.h | 13 +
4 files changed, 57 insertions(+)
create
Use a lock to avoid exposing the counters, and any other
global data, to potential races.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/report.c | 16
1 file changed, 16 insertions(+)
diff --git a/lib/report.c b/lib/report.c
index dc30250c676d3..35e664108a921 100644
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/barrier.h | 5 +
lib/arm64/asm/barrier.h | 5 +
2 files changed, 10 insertions(+)
diff --git a/lib/arm/asm/barrier.h b/lib/arm/asm/barrier.h
index acaeab5123431..394a4a2da26f1 100644
--- a/lib/arm/asm/barrier.h
+++
Add 'const' to a few global arrays that are constant. Also,
no need for default_vector_handler to be static. unittests
may want to reset vector handlers to it.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/processor.c | 2 +-
lib/arm64/asm/processor.h | 2 ++
get_sp() only worked by accident, because gcc inlined calls
to it. It should have always been explicitly inlined. It was
also only added for debugging, and not in any use now.
Furthermore, while we will have need for a get_sp, we'll
add it back with a new name, current_stack_pointer, in order
to
Add exception handlers to thread info. And, since we allow threads
running in user mode to install exception handlers too (a convenience
for unit test developers), check for handlers on the user mode stack
thread info too. But, unit test developers will likely also expect the
installation of
Sprinkle in some more isbs after context-changing operations,
as the ARM ARM states we should. I haven't seen any problems
without them, but we should do it right. Also, *actually* set
the MAIR in asm_mmu_enable. We were reading, not writing...
Luckily this was just spotted while adding the isbs,
On smp, cpumasks become quite useful. Add a simple implementation,
along with implementations of bitops it needs.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm-common.mak | 1 +
lib/arm/asm/bitops.h | 53 +++
lib/arm/asm/cpumask.h| 118
This series extends the kvm-unit-tests/arm[64] framework to support smp.
A break down of the patches is as follows
01-02: prepare general framework for smp use
03-06: arm/arm64 fixups not 100% related to this series,
but need to post some time...
07-09: add thread_info (for per-thread
Move the spin_lock/unlock declarations to lib/x86/asm/spinlock.h,
allowing lib code, e.g. lib/report.c, to use spinlocks.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/x86/asm/spinlock.h | 11 +++
lib/x86/smp.h | 7 +--
2 files changed, 12 insertions(+), 6
-Original Message-
From: H. Peter Anvin [mailto:h...@zytor.com]
Sent: Saturday, January 31, 2015 2:19 AM
To: Wu, Feng; t...@linutronix.de; mi...@redhat.com; x...@kernel.org;
g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org;
j...@8bytes.org; alex.william...@redhat.com;
On POWER, storage caching is usually configured via the MMU - attributes
such as cache-inhibited are stored in the TLB and the hashed page table.
This makes correctly performing cache inhibited IO accesses awkward when
the MMU is turned off (real mode). Some CPU models provide special
registers
On POWER, storage caching is usually configured via the MMU - attributes
such as cache-inhibited are stored in the TLB and the hashed page table.
This makes correctly performing cache inhibited IO accesses awkward when
the MMU is turned off (real mode). Some CPU models provide special
registers
On Mon, Feb 02, 2015 at 04:06:24AM +, Nicholas A. Bellinger wrote:
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next
current
iovec pointer
On Mon, Feb 02, 2015 at 04:44:12AM +, Al Viro wrote:
On Mon, Feb 02, 2015 at 04:06:24AM +, Nicholas A. Bellinger wrote:
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following
drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not
declared. Should it be static?
Signed-off-by: Fengguang Wu fengguang...@intel.com
---
scsi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index
On 2015-01-08 11:32, Paolo Bonzini wrote:
These are needed for KVM changes in 3.18.
Recent kernels added a separate feature word for XSAVE features, and KVM's
CPUID code is relying on the new definition. Except for cpu_has_xsaves,
it's never accessing the feature itself: wrap cpu_has_xsaves
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a vhost_skip_iovec_bytes() helper for skipping ahead
a number of bytes into the passed *iov_in + off_in, saving the current
**iov_out + off_out so it may be used by the caller.
This is useful for virtio-scsi READs when needing to skip
From: Nicholas Bellinger n...@linux-iscsi.org
There is a large amount of code that still references the original
'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'.
Go ahead and do a global rename to make the usage consistent.
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini
From: Nicholas Bellinger n...@linux-iscsi.org
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini pbonz...@redhat.com
Signed-off-by: Nicholas Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick()
callback in vhost_scsi_handle_vqal().
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs, assuming the
From: Nicholas Bellinger n...@linux-iscsi.org
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() - PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin m...@redhat.com
From: Nicholas Bellinger n...@linux-iscsi.org
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and -tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use
From: Nicholas Bellinger n...@linux-iscsi.org
Hi MST, Paolo, Co,
This -v2 series adds vhost/scsi ANY_LAYOUT + VERSION_1 host feature bit
support.
It adds a new vhost_virtqueue -handle_kick() callback to determine the
start of protection and data payloads iovecs past starting virtio-scsi
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next current
iovec pointer via **iov_out.
This is useful for vhost ANY_LAYOUT support when guests are
From: Nicholas Bellinger n...@linux-iscsi.org
With the recent removal of MSG_*_TAG defines in commit 68d81f40,
vhost-scsi is now using TCM_*_TAG and doesn't depend upon host
side scsi_tcq.h definitions anymore.
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Paolo Bonzini pbonz...@redhat.com
From: Nicholas Bellinger n...@linux-iscsi.org
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iovec + offset. Also includes helpers
for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known
number of iovecs.
Required by ANY_LAYOUT
From: Nicholas Bellinger n...@linux-iscsi.org
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd-tvc_resp_iod instead of the
first single iovec base
From: Nicholas Bellinger n...@linux-iscsi.org
With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(),
there is no longer a reason to keep around the legacy code with
!ANY_LAYOUT assumptions.
Go ahead and drop the pre virtio 1.0 logic in vhost_scsi_handle_vq()
and associated helpers.
tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git
for-next
head: 2936f1d4f3e8247bd519feba7892371d5e4c6603
commit: 105acf608f25d5e0d9fef669299a5438b7b114ee [16/21] vhost/scsi: Add
ANY_LAYOUT vhost_skip_iovec_bytes helper
reproduce:
# apt-get install sparse
git
On Mon, 02/02 14:25, kbuild test robot wrote:
drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not
declared. Should it be static?
Signed-off-by: Fengguang Wu fengguang...@intel.com
---
scsi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
40 matches
Mail list logo