Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32, or
even earlier.
This patch is to emulate x2apic for guest, then guest can benefit from
some advantages of x2apic,
On Wed, Jun 11, 2014 at 2:27 AM, Zhang Haoyu zhan...@sangfor.com wrote:
Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32, or
even earlier.
This patch is to emulate
On Tue, Jun 10, 2014 at 09:18:34PM +0200, Paolo Bonzini wrote:
Il 10/06/2014 20:56, Paolo Bonzini ha scritto:
Il 10/06/2014 20:08, Peter Maydell ha scritto:
On 10 June 2014 18:04, Christopher Covington c...@codeaurora.org wrote:
On 06/10/2014 10:42 AM, Peter Maydell wrote:
I just noticed that
On Tue, Jun 10, 2014 at 11:23:17AM -0700, Mario Smarduch wrote:
On 06/08/2014 05:05 AM, Christoffer Dall wrote:
On Tue, Jun 03, 2014 at 04:19:27PM -0700, Mario Smarduch wrote:
This patch adds support for handling 2nd stage page faults during
migration,
it disables faulting in huge pages,
On Tue, Jun 10, 2014 at 11:08:24AM -0700, Mario Smarduch wrote:
On 06/10/2014 02:22 AM, Christoffer Dall wrote:
On Mon, Jun 09, 2014 at 06:47:12PM -0700, Mario Smarduch wrote:
On 06/08/2014 05:05 AM, Christoffer Dall wrote:
On Fri, Jun 06, 2014 at 10:33:41AM -0700, Mario Smarduch wrote:
Il 11/06/2014 08:54, Christoffer Dall ha scritto:
The problem is that the most common user problem with ARM VMs are that
they boot the thing, and then get no output. So we wanted some way to
make sure we know that the kernel should be able to print to a console.
UEFI does provide DBG2 output,
On Tue, Jun 10 2014, Joonsoo Kim iamjoonsoo@lge.com wrote:
Without including device.h, build failure occurs.
In dma-contiguous.h, we try to access to dev-cma_area, so we need
device.h. In the past, we included it luckily by swap.h in
drivers/base/dma-contiguous.c. Swap.h includes node.h
Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32, or
even earlier.
This patch is to emulate x2apic for guest, then guest can benefit from
some advantages of x2apic,
On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
If kernels actually do use the UEFI runtime services and have no need
for direct access to an RTC when runing in a UEFI compliant system, then
I agree with not specifying the hardware details.
The RTC is not needed for ordinary
Although not in the ARM VM System Specification, Xen is certainly going
to support a fast boot path without UEFI firmware. I guess KVM will too.
You'll have to rely on hypervisor specific mechanisms to achieve it.
In fact I wouldn't worry about UEFI when you need ACPI, that is not in
this
Agree with what Stefano says, and I strongly recommend you reconsider
your position on FDT vs. ACPI for ARM VMs, but it's completely up to
you of course :)
-Christoffer
On Wed, Jun 11, 2014 at 10:50:04AM +0100, Stefano Stabellini wrote:
Although not in the ARM VM System Specification, Xen is
On Fri, May 30, 2014 at 11:43:52AM -0400, Waiman Long wrote:
---
kernel/locking/qspinlock.c | 18 --
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index fc7fd8c..7f10758 100644
---
On Wednesday 11 June 2014 10:50:04 Stefano Stabellini wrote:
Although not in the ARM VM System Specification, Xen is certainly going
to support a fast boot path without UEFI firmware. I guess KVM will too.
You'll have to rely on hypervisor specific mechanisms to achieve it.
In fact I
From assembly code we might not only have to explicitly BE access 64bit values,
but sometimes also 32bit ones. Add helpers that allow for easy use of lwzx/stwx
in their respective byte-reverse or native form.
Signed-off-by: Alexander Graf ag...@suse.de
CC: Benjamin Herrenschmidt
There are a few shared data structures between the host and the guest. Most
of them get registered through the VPA interface.
These data structures are defined to always be in big endian byte order, so
let's make sure we always access them in big endian.
Signed-off-by: Alexander Graf
On the exit path from the guest we check what type of interrupt we received
if we received one. This means we're doing hardware access to the XICS interrupt
controller.
However, when running on a little endian system, this access is byte reversed.
So let's make sure to swizzle the bytes back
Some data structures are always stored in big endian. Among those are the LPPACA
fields as well as the shadow slb. These structures might be shared with a
hypervisor.
So whenever we access those fields, make sure we do so in big endian byte order.
Signed-off-by: Alexander Graf ag...@suse.de
---
So far we've been able to successfully run HV KVM on big endian hosts, but
once you dive into little endian land things start to fall apart.
This patch set enables HV KVM for little endian hosts. This should be the
final piece left missing to get little endian systems fully en par with big
endian
Now that we've fixed all the issues that HV KVM code had on little endian
hosts, we can enable it in the kernel configuration for users to play with.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git
When running on an LE host all data structures are kept in little endian
byte order. However, the HTAB still needs to be maintained in big endian.
So every time we access any HTAB we need to make sure we do so in the right
byte order. Fix up all accesses to manually byte swap.
Signed-off-by:
On 10 Jun 2014 17:45, Claudio Fontana claudio.font...@huawei.com wrote:
Hello all,
I just wanted to share with you guys how we are using virtualization on ARM64
over here for the OSv project.
I don't know if that's something that could be useful for your specification
effort.
In OSv,
On Wed, Jun 11, 2014 at 10:55 AM, Christoffer Dall
christoffer.d...@linaro.org wrote:
Agree with what Stefano says, and I strongly recommend you reconsider
your position on FDT vs. ACPI for ARM VMs, but it's completely up to
you of course :)
Not entirely. The plan right now is to only support
On Tue, Jun 10, 2014 at 7:56 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 10/06/2014 20:08, Peter Maydell ha scritto:
On 10 June 2014 18:04, Christopher Covington c...@codeaurora.org wrote:
On 06/10/2014 10:42 AM, Peter Maydell wrote:
I just noticed that this doesn't mandate that the
On Wed, Jun 11, 2014 at 12:54:02PM +0200, Peter Zijlstra wrote:
@@ -252,6 +260,18 @@ void queue_spin_lock_slowpath(struct qspinlock *lock,
u32 val)
BUILD_BUG_ON(CONFIG_NR_CPUS = (1U _Q_TAIL_CPU_BITS));
+#ifdef CONFIG_VIRT_UNFAIR_LOCKS
+ /*
+* A simple test and set
On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
On Tue, Jun 10, 2014 at 7:56 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 10/06/2014 20:08, Peter Maydell ha scritto:
On 10 June 2014 18:04, Christopher Covington c...@codeaurora.org wrote:
On 06/10/2014 10:42 AM, Peter Maydell
On Wed, Jun 11, 2014 at 12:58 PM, Arnd Bergmann a...@arndb.de wrote:
On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
On Tue, Jun 10, 2014 at 7:56 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 10/06/2014 20:08, Peter Maydell ha scritto:
On 10 June 2014 18:04, Christopher Covington
On Wed, Jun 11, 2014 at 12:28:40PM +0100, Grant Likely wrote:
On Wed, Jun 11, 2014 at 10:55 AM, Christoffer Dall
christoffer.d...@linaro.org wrote:
Agree with what Stefano says, and I strongly recommend you reconsider
your position on FDT vs. ACPI for ARM VMs, but it's completely up to
you
Hi Linus,
Please pull the following.
Please note this needs to be merged before merging
target-pending PULL which Nicholas will be sending
out shortly.
Thanks!
The following changes since commit 1860e379875dfe7271c649058aeddffe5afd9d0d:
Linux 3.15 (2014-06-08 11:19:54 -0700)
are available in
This is a v5 of a series that introduces arm to kvm-unit-tests. First,
it does some tidying up of the repo. Then, it adds support for device
trees (libfdt), and for virtio-testdev[1]. Next, it adds the basic
infrastructure for booting a test case (guest), and adds a first
test case, a self-test to
- remove a redundant '-display none'
- remove a redundant -g from CFLAGS
- remove a useless -I../include/x86 from CFLAGS
- remove lib autodep files on make clean
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
v4: no change other than
Support format flags for field padding, such as %08x, allowing
register dumps to be easier on the eyes.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
lib/printf.c | 82 +---
1
From: Christoffer Dall christoffer.d...@linaro.org
Add simple busy-wait spinlock implementation for ARM.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm.mak | 3 ++-
lib/arm/asm/spinlock.h | 9 ++---
From: Christoffer Dall christoffer.d...@linaro.org
Add IO accessor functions to the arm library functions to avoid
register-writeback IO accessors that are not yet supported by the
kernel.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
virtio-testdev is a communication channel to qemu through virtio that
can be used by test code to send commands. The only command currently
implemented is EXIT, which allows the test code to exit with a given
status code.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer
Use libgcc's stddef.h and stdint.h, and then remove the redundant
defines from libcflat.h. Also separate out the string function
declarations into a new file string.h. These changes have no affect
on code including libcflat.h, but are needed in order to compile an
unmodified libfdt for
The test framework may have external dependencies. assert() provides
the ability to abort when those dependencies aren't met. However,
assert() should only be used for unlikely conditions. We can provide
more informative messages with printf() for the more likely problems.
Signed-off-by: Andrew
Architecture neutral code may need to call low-level io accessors,
or use spinlocks. Create a generic io.h to ensure those accessors
are defined, and a generic spinlock.h that complains when included,
as we can't write a generic spinlock. These files can be overridden
or extended by architecture
We're going to need PSR bit defines and pt_regs. We'll also need
pt_regs offsets in assembly code. This patch adapts the Linux
kernel's ptrace.h and generated/asm-offsets.h to this framework.
It also adapts cp15.h from the kernel, since we'll need bit defines
from there too.
Signed-off-by: Andrew
This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless testing with smp 1.
Try it out with
yum install gcc-arm-linux-gnu
export QEMU=[qemu with mach-virt and virtio-testdev]
Support the bare minimum of virtio to enable access to the virtio-mmio
config space of a device. Currently this implementation must use a
device tree to find the device.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
v5:
- use same virtio struct names as kernel
- no need to alloc a new
Add some device tree functions, built on libfdt, to the arch-neutral
lib code in order to facilitate the extraction of boot info and device
base addresses. These functions should work on device trees conforming
to section III of the kernel doc
Documentation/devicetree/booting-without-of.txt.
Add string functions needed for libfdt, and add a make target.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
v4: rewrite strchr w/out use of strlen, drop libfdt_env.h modifications
---
Makefile | 21 +++--
Add support for tests to use exception handlers using
install_exception_handler(). This patch also adds phys_start_usr(),
which can be used to start a function in USR mode, using a stack
set up in a new memregion. phys_start_usr() is used by new selftest
tests that check the new vector support.
Remove all references to x86 from the root dir (except from in
configure). Also remove references from the root dir README
by moving that documentation to the x86/README, and touch up
the READMEs at the same time.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall
Add a Makefile target to quickly generate arch-specific cscope
for kvm-unit-tests. Assumes a mostly flat directory structure,
i.e. uses '-maxdepth 1' in the file search.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
Makefile | 11
also add a check for config.mak in Makefile
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
.gitignore | 5 +
Makefile | 9 -
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index
On 11 June 2014 12:33, Grant Likely grant.lik...@linaro.org wrote:
In practical terms, yes the VM needs to provide an RTC interface, but
I don't think it needs to appear in this spec, even if the kernel
accesses it directly. Portable images should use the UEFI service.
I think it might helpful
On Wed, Jun 11, 2014 at 4:49 AM, Zhang Haoyu zhan...@sangfor.com wrote:
Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32, or
even earlier.
This patch is to emulate
Some compilers complain about uninitialized variables in the compute_tlbie_rb
function. When you follow the code path you'll realize that we'll never get
to that point, but the compiler isn't all that smart.
So just default to 4k page sizes for everything, making the compiler happy
and the code
On 6/11/2014 6:26 AM, Peter Zijlstra wrote:
On Fri, May 30, 2014 at 11:43:52AM -0400, Waiman Long wrote:
---
kernel/locking/qspinlock.c | 18 --
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index
Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32, or
even earlier.
This patch is to emulate x2apic for guest, then guest can benefit
from some advantages of x2apic,
On 6/11/2014 6:54 AM, Peter Zijlstra wrote:
On Fri, May 30, 2014 at 11:43:55AM -0400, Waiman Long wrote:
Enabling this configuration feature causes a slight decrease the
performance of an uncontended lock-unlock operation by about 1-2%
mainly due to the use of a static key. However,
On 06/10/2014 11:58 PM, Christoffer Dall wrote:
On Tue, Jun 10, 2014 at 11:23:17AM -0700, Mario Smarduch wrote:
On 06/08/2014 05:05 AM, Christoffer Dall wrote:
On Tue, Jun 03, 2014 at 04:19:27PM -0700, Mario Smarduch wrote:
This patch adds support for handling 2nd stage page faults during
Hi Paolo,
for ARM dirty page logging we have couple functions
that are generic.
- kvm_vm_ioctl_get_dirty_log - is identical to x86 version
- kvm_flush_remote_tlbs - ARM version does hardware broadcast
it's different from the generic one in kvm_main.c
How to proceed to make these generic?
Henning Schild henning.sch...@siemens.com writes:
Hi,
i am working on the jailhouse[1] project and am currently looking at
inter-VM communication. We want to connect guests directly with virtual
consoles based on shared memory. The code complexity in the hypervisor
should be minimal, it
ppc kvm's cma area management needs alignment constraint on
cma region. So support it to prepare generalization of cma area
management functionality.
Additionally, add some comments which tell us why alignment
constraint is needed on cma region.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
To prepare future generalization work on cma area management code,
we need to separate core cma management codes from DMA APIs.
We will extend these core functions to cover requirements of
ppc kvm's cma area management functionality in following patches.
This separation helps us not to touch DMA
Currently, there are two users on CMA functionality, one is the DMA
subsystem and the other is the kvm on powerpc. They have their own code
to manage CMA reserved area even if they looks really similar.
From my guess, it is caused by some needs on bitmap management. Kvm side
wants to maintain
We can remove one call sites for clear_cma_bitmap() if we first
call it before checking error number.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/cma.c b/mm/cma.c
index 1e1b017..01a0713 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -282,11 +282,12 @@ struct page *cma_alloc(struct
Currently, we should take the mutex for manipulating bitmap.
This job may be really simple and short so we don't need to sleep
if contended. So I change it to spinlock.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/cma.c b/mm/cma.c
index 22a5b23..3085e8c 100644
--- a/mm/cma.c
Conventionally, we put output param to the end of param list.
cma_declare_contiguous() doesn't look like that, so change it.
Additionally, move down cma_areas reference code to the position
where it is really needed.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git
Now, we have general CMA reserved area management framework,
so use it for future maintainabilty. There is no functional change.
Acked-by: Michal Nazarewicz min...@mina86.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git
Currently, there are two users on CMA functionality, one is the DMA
subsystem and the other is the kvm on powerpc. They have their own code
to manage CMA reserved area even if they looks really similar.
From my guess, it is caused by some needs on bitmap management. Kvm side
wants to maintain
We should free memory for bitmap when we find zone mis-match,
otherwise this memory will leak.
Additionally, I copy code comment from ppc kvm's cma code to notify
why we need to check zone mis-match.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/drivers/base/dma-contiguous.c
ppc kvm's cma region management requires arbitrary bitmap granularity,
since they want to reserve very large memory and manage this region
with bitmap that one bit for several pages to reduce management overheads.
So support arbitrary bitmap granularity for following generalization.
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others doesn't. This looks
bad to me, so I unify log format to print function name consistently.
Lastly, I add one more debug log on cma_activate_area().
On Wed, Jun 11, 2014 at 8:42 PM, Zhang Haoyu zhan...@sangfor.com wrote:
Hi,
According to this:
https://github.com/torvalds/linux/commit/0d1de2d901f4ba0972a3886496a44fb1d3300dbd
It looks like kvm have been supporting x2apic since kernel 2.6.32,
or
even earlier.
This patch is to emulate
On Tue, Jun 10, 2014 at 07:23:00PM +0200, Alexander Graf wrote:
When we're using PR KVM we must not allow the CPU to take interrupts
in virtual mode, as the SLB does not contain host kernel mappings
when running inside the guest context.
To make sure we get good performance for non-KVM tasks
On Wed, Jun 11, 2014 at 05:16:02PM +0200, Alexander Graf wrote:
Some compilers complain about uninitialized variables in the compute_tlbie_rb
function. When you follow the code path you'll realize that we'll never get
to that point, but the compiler isn't all that smart.
So just default to
Joonsoo Kim iamjoonsoo@lge.com writes:
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others doesn't. This looks
bad to me, so I unify log format to print function name consistently.
Lastly, I
Joonsoo Kim iamjoonsoo@lge.com writes:
We should free memory for bitmap when we find zone mis-match,
otherwise this memory will leak.
Additionally, I copy code comment from ppc kvm's cma code to notify
why we need to check zone mis-match.
Signed-off-by: Joonsoo Kim
Joonsoo Kim iamjoonsoo@lge.com writes:
To prepare future generalization work on cma area management code,
we need to separate core cma management codes from DMA APIs.
We will extend these core functions to cover requirements of
ppc kvm's cma area management functionality in following
Joonsoo Kim iamjoonsoo@lge.com writes:
ppc kvm's cma area management needs alignment constraint on
cma region. So support it to prepare generalization of cma area
management functionality.
Additionally, add some comments which tell us why alignment
constraint is needed on cma region.
Hi Joonsoo,
On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote:
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others doesn't. This looks
bad to me, so I unify log format to print function
On Thu, Jun 12, 2014 at 12:21:39PM +0900, Joonsoo Kim wrote:
We should free memory for bitmap when we find zone mis-match,
otherwise this memory will leak.
Then, -stable stuff?
Additionally, I copy code comment from ppc kvm's cma code to notify
why we need to check zone mis-match.
On 2014-06-12 04:27, Rusty Russell wrote:
Henning Schild henning.sch...@siemens.com writes:
Hi,
i am working on the jailhouse[1] project and am currently looking at
inter-VM communication. We want to connect guests directly with virtual
consoles based on shared memory. The code complexity in
On Thu, Jun 12, 2014 at 12:21:40PM +0900, Joonsoo Kim wrote:
To prepare future generalization work on cma area management code,
we need to separate core cma management codes from DMA APIs.
We will extend these core functions to cover requirements of
ppc kvm's cma area management functionality
On Thu, Jun 12, 2014 at 10:11:19AM +0530, Aneesh Kumar K.V wrote:
Joonsoo Kim iamjoonsoo@lge.com writes:
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others doesn't. This looks
bad to
On Wed, Jun 11, 2014 at 09:37:55PM -0400, Long, Wai Man wrote:
On 6/11/2014 6:54 AM, Peter Zijlstra wrote:
On Fri, May 30, 2014 at 11:43:55AM -0400, Waiman Long wrote:
Enabling this configuration feature causes a slight decrease the
performance of an uncontended lock-unlock operation by
On Thu, Jun 12, 2014 at 02:18:53PM +0900, Minchan Kim wrote:
Hi Joonsoo,
On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote:
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others
On Thu, Jun 12, 2014 at 12:21:41PM +0900, Joonsoo Kim wrote:
ppc kvm's cma area management needs alignment constraint on
cma region. So support it to prepare generalization of cma area
management functionality.
Additionally, add some comments which tell us why alignment
constraint is needed
On Thu, Jun 12, 2014 at 02:25:43PM +0900, Minchan Kim wrote:
On Thu, Jun 12, 2014 at 12:21:39PM +0900, Joonsoo Kim wrote:
We should free memory for bitmap when we find zone mis-match,
otherwise this memory will leak.
Then, -stable stuff?
I don't think so. This is just possible leak
On Tue, Jun 10 2014, Joonsoo Kim iamjoonsoo@lge.com wrote:
Without including device.h, build failure occurs.
In dma-contiguous.h, we try to access to dev-cma_area, so we need
device.h. In the past, we included it luckily by swap.h in
drivers/base/dma-contiguous.c. Swap.h includes node.h
So far we've been able to successfully run HV KVM on big endian hosts, but
once you dive into little endian land things start to fall apart.
This patch set enables HV KVM for little endian hosts. This should be the
final piece left missing to get little endian systems fully en par with big
endian
From assembly code we might not only have to explicitly BE access 64bit values,
but sometimes also 32bit ones. Add helpers that allow for easy use of lwzx/stwx
in their respective byte-reverse or native form.
Signed-off-by: Alexander Graf ag...@suse.de
CC: Benjamin Herrenschmidt
On the exit path from the guest we check what type of interrupt we received
if we received one. This means we're doing hardware access to the XICS interrupt
controller.
However, when running on a little endian system, this access is byte reversed.
So let's make sure to swizzle the bytes back
There are a few shared data structures between the host and the guest. Most
of them get registered through the VPA interface.
These data structures are defined to always be in big endian byte order, so
let's make sure we always access them in big endian.
Signed-off-by: Alexander Graf
Now that we've fixed all the issues that HV KVM code had on little endian
hosts, we can enable it in the kernel configuration for users to play with.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git
Some data structures are always stored in big endian. Among those are the LPPACA
fields as well as the shadow slb. These structures might be shared with a
hypervisor.
So whenever we access those fields, make sure we do so in big endian byte order.
Signed-off-by: Alexander Graf ag...@suse.de
---
When running on an LE host all data structures are kept in little endian
byte order. However, the HTAB still needs to be maintained in big endian.
So every time we access any HTAB we need to make sure we do so in the right
byte order. Fix up all accesses to manually byte swap.
Signed-off-by:
Some compilers complain about uninitialized variables in the compute_tlbie_rb
function. When you follow the code path you'll realize that we'll never get
to that point, but the compiler isn't all that smart.
So just default to 4k page sizes for everything, making the compiler happy
and the code
On Tue, 2014-06-10 at 11:41 +1000, Gavin Shan wrote:
The patch adds new IOCTL commands for sPAPR VFIO container device
to support EEH functionality for PCI devices, which have been passed
through from host to somebody else via VFIO.
Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com
We should free memory for bitmap when we find zone mis-match,
otherwise this memory will leak.
Additionally, I copy code comment from ppc kvm's cma code to notify
why we need to check zone mis-match.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/drivers/base/dma-contiguous.c
Currently, there are two users on CMA functionality, one is the DMA
subsystem and the other is the kvm on powerpc. They have their own code
to manage CMA reserved area even if they looks really similar.
From my guess, it is caused by some needs on bitmap management. Kvm side
wants to maintain
ppc kvm's cma region management requires arbitrary bitmap granularity,
since they want to reserve very large memory and manage this region
with bitmap that one bit for several pages to reduce management overheads.
So support arbitrary bitmap granularity for following generalization.
Currently, we should take the mutex for manipulating bitmap.
This job may be really simple and short so we don't need to sleep
if contended. So I change it to spinlock.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/cma.c b/mm/cma.c
index 22a5b23..3085e8c 100644
--- a/mm/cma.c
ppc kvm's cma area management needs alignment constraint on
cma region. So support it to prepare generalization of cma area
management functionality.
Additionally, add some comments which tell us why alignment
constraint is needed on cma region.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
We can remove one call sites for clear_cma_bitmap() if we first
call it before checking error number.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/cma.c b/mm/cma.c
index 1e1b017..01a0713 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -282,11 +282,12 @@ struct page *cma_alloc(struct
Now, we have general CMA reserved area management framework,
so use it for future maintainabilty. There is no functional change.
Acked-by: Michal Nazarewicz min...@mina86.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git
We don't need explicit 'CMA:' prefix, since we already define prefix
'cma:' in pr_fmt. So remove it.
And, some logs print function name and others doesn't. This looks
bad to me, so I unify log format to print function name consistently.
Lastly, I add one more debug log on cma_activate_area().
1 - 100 of 116 matches
Mail list logo