The following series implements KVM support for ARM processors,
specifically on the Cortex A-15 platform.
Work is done in collaboration between Columbia University, Virtual Open
Systems and ARM/Linaro.
The patch series applies to Linux 3.7-rc2 with kvm/next merged:
KVM uses the stage-2 page tables and the Hyp page table format,
so we define the fields and page protection flags needed by KVM.
The nomenclature is this:
- page_hyp:PL2 code/data mappings
- page_hyp_device: PL2 device mappings (vgic access)
- page_s2: Stage-2 code/data page
Add a method (hyp_idmap_setup) to populate a hyp pgd with an
identity mapping of the code contained in the .hyp.idmap.text
section.
Offer a method to drop the this identity mapping through
hyp_idmap_teardown.
Make all the above depend on CONFIG_ARM_VIRT_EXT and CONFIG_ARM_LPAE.
Cc: Will Deacon
Decoding the implementor and part number of the CPU id in the CPU ID
register is needed by KVM, so we factor it out to share the code.
Reviewed-by: Marcelo Tosatti mtosa...@redhat.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/include/asm/cputype.h | 26
Targets KVM support for Cortex A-15 processors.
Contains all the framework components, make files, header files, some
tracing functionality, and basic user space API.
Only supported core is Cortex-A15 for now.
Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h.
Sets up KVM code to handle all exceptions taken to Hyp mode.
When the kernel is booted in Hyp mode, calling hvc #0xff with r0 pointing to
the new vectors, the HVBAR is changed to the the vector pointers. This allows
subsystems (like KVM here) to execute code in Hyp-mode with the MMU disabled.
This commit introduces the framework for guest memory management
through the use of 2nd stage translation. Each VM has a pointer
to a level-1 table (the pgd field in struct kvm_arch) which is
used for the 2nd stage translations. Entries are added when handling
guest faults (later patch) and the
From: Christoffer Dall cd...@cs.columbia.edu
All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE. This
works semantically well for the GIC as we in fact raise/lower a line on
a machine component (the gic). The IOCTL uses the follwing struct.
struct kvm_irq_level {
union {
Provides complete world-switch implementation to switch to other guests
running in non-secure modes. Includes Hyp exception handlers that
capture necessary exception information and stores the information on
the VCPU and KVM structures.
The following Hyp-ABI is also documented in the code:
Adds a new important function in the main KVM/ARM code called
handle_exit() which is called from kvm_arch_vcpu_ioctl_run() on returns
from guest execution. This function examines the Hyp-Syndrome-Register
(HSR), which contains information telling KVM what caused the exit from
the guest.
Some of
The following three ioctls are implemented:
- KVM_GET_REG_LIST
- KVM_GET_ONE_REG
- KVM_SET_ONE_REG
Now we have a table for all the cp15 registers, we can drive a generic
API.
The register IDs carry the following encoding:
ARM registers are mapped using the lower 32 bits. The upper 16 of
The Cache Size Selection Register (CSSELR) selects the current Cache
Size ID Register (CCSIDR). You write which cache you are interested
in to CSSELR, and read the information out of CCSIDR.
Which cache numbers are valid is known by reading the Cache Level ID
Register (CLIDR).
To export this
From: Rusty Russell rusty.russ...@linaro.org
We use space #18 for floating point regs.
Reviewed-by: Marcelo Tosatti mtosa...@redhat.com
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
Documentation/virtual/kvm/api.txt |6 +
When the guest accesses I/O memory this will create data abort
exceptions and they are handled by decoding the HSR information
(physical address, read/write, length, register) and forwarding reads
and writes to QEMU which performs the device emulation.
Certain classes of load/store operations do
The following series implements support for the virtual generic
interrupt controller architecture for KVM/ARM.
Changes since v2:
- Get rid of hardcoded guest cpu and distributor physical addresses
and instead provide the address through the KVM_SET_DEVICE_ADDRESS
ioctl.
- Fix level/edge
On ARM (and possibly other architectures) some bits are specific to the
model being emulated for the guest and user space needs a way to tell
the kernel about those bits. An example is mmio device base addresses,
where KVM must know the base address for a given device to properly
emulate mmio
From: Marc Zyngier marc.zyng...@arm.com
When an interrupt occurs for the guest, it is sometimes necessary
to find out which vcpu was running at that point.
Keep track of which vcpu is being tun in kvm_arch_vcpu_ioctl_run(),
and allow the data to be retrived using either:
-
From: Marc Zyngier marc.zyng...@arm.com
Wire the basic framework code for VGIC support. Nothing to enable
yet.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/include/asm/kvm_host.h |7
From: Marc Zyngier marc.zyng...@arm.com
Wire the initial in-kernel MMIO support code for the VGIC, used
for the distributor emulation.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/include/asm/kvm_vgic.h |6 +-
User space defines the model to emulate to a guest and should therefore
decide which addresses are used for both the virtual CPU interface
directly mapped in the guest physical address space and for the emulated
distributor interface, which is mapped in software by the in-kernel VGIC
support.
From: Marc Zyngier marc.zyng...@arm.com
Add the GIC distributor emulation code. A number of the GIC features
are simply ignored as they are not required to boot a Linux guest.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
From: Marc Zyngier marc.zyng...@arm.com
Add VGIC virtual CPU interface code, picking pending interrupts
from the distributor and stashing them in the VGIC control interface
list registers.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com
An interrupt may have been disabled after being made pending on the
CPU interface (the classic case is a timer running while we're
rebooting the guest - the interrupt would kick as soon as the CPU
interface gets enabled, with deadly consequences).
The
From: Marc Zyngier marc.zyng...@arm.com
Plug the interrupt injection code. Interrupts can now be generated
from user space.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/include/asm/kvm_vgic.h |8 +++
From: Marc Zyngier marc.zyng...@arm.com
Enable the VGIC control interface to be save-restored on world switch.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/include/asm/kvm_arm.h | 12 +++
From: Marc Zyngier marc.zyng...@arm.com
Add the init code for the hypervisor, the virtual machine, and
the virtual CPUs.
An interrupt handler is also wired to allow the VGIC maintenance
interrupts, used to deal with level triggered interrupts and LR
underflows.
Signed-off-by: Marc Zyngier
From: Marc Zyngier marc.zyng...@arm.com
If we have level interrupts already programmed to fire on a vcpu,
there is no reason to kick it after injecting a new interrupt,
as we're guaranteed that we'll exit when the level interrupt will
be EOId (VGIC_LR_EOI is set).
The exit will force a reload of
From: Marc Zyngier marc.zyng...@arm.com
It is now possible to select the VGIC configuration option.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/kvm/Kconfig |7 +++
1 file changed, 7 insertions(+)
diff --git
The following series implements support for the architected generic
timers for KVM/ARM.
This is an unmodified repost of the previously submitted series.
This patch series can also be pulled from:
git://github.com/virtualopensystems/linux-kvm-arm.git
branch:
From: Marc Zyngier marc.zyng...@arm.com
If we're booted in HYP mode, it is possible that we'll run some
kind of virtualized environment. In this case, it is a better to
switch to the physical timers, and leave the virtual timers to
guests.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
---
From: Marc Zyngier marc.zyng...@arm.com
Add some very minimal architected timer related infrastructure.
For the moment, we just provide empty structures, and enable/disable
access to the physical timer across world switch.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by:
From: Marc Zyngier marc.zyng...@arm.com
Do the necessary save/restore dance for the timers in the world
switch code. In the process, allow the guest to read the physical
counter, which is useful for its own clock_event_device.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by:
From: Marc Zyngier marc.zyng...@arm.com
It is now possible to select CONFIG_KVM_ARM_TIMER to enable the
KVM architected timer support.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com
---
arch/arm/kvm/Kconfig |7 +++
From: Marc Zyngier marc.zyng...@arm.com
We can inject a timer interrupt into the guest as a result of
three possible events:
- The virtual timer interrupt has fired while we were still
executing the guest
- The timer interrupt hasn't fired, but it expired while we
were doing the world switch
Hello Doug,
On Saturday 20 October 2012 00:46:43 Doug Goldstein wrote:
I'm using libvirt 0.10.2 and I had qemu-kvm 1.1.1 running all my VMs.
...
I had upgraded to qemu-kvm 1.1.2
...
qemu: warning: error while loading state for instance 0x0 of device 'ram'
load of migration failed
That error
Hi,
On Thu, Oct 18, 2012 at 02:33:02PM +0200, Avi Kivity wrote:
On 10/18/2012 11:27 AM, Vasilis Liaskovitis wrote:
On Wed, Oct 17, 2012 at 12:03:51PM +0200, Avi Kivity wrote:
On 10/17/2012 11:19 AM, Vasilis Liaskovitis wrote:
I don't think so, but probably there's a limit of DIMMs that
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote:
After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling),
the pieces of io data can be collected and write them to the guest memory
or MMIO together.
Unfortunately, kvm splits the mmio access into 8 bytes and store
On 10/19/2012 07:48 PM, Blue Swirl wrote:
DIMMs would be allowed to be hotplugged in the generic mem-controller
scheme only
(unless it makes sense to allow hotplug in the remaining pmc DRBs and
start using the generic scheme once we run out of emulated DRBs)
440fx seems a lost cause, so
On 10/22/2012 05:16 PM, Gleb Natapov wrote:
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote:
After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling),
the pieces of io data can be collected and write them to the guest memory
or MMIO together.
Unfortunately, kvm
On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote:
On 10/22/2012 05:16 PM, Gleb Natapov wrote:
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote:
After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling),
the pieces of io data can be collected and
On 10/22/2012 09:04 AM, Philipp Hahn wrote:
Hello Doug,
On Saturday 20 October 2012 00:46:43 Doug Goldstein wrote:
I'm using libvirt 0.10.2 and I had qemu-kvm 1.1.1 running all my VMs.
...
I had upgraded to qemu-kvm 1.1.2
...
qemu: warning: error while loading state for instance 0x0 of
On 2012-10-22 13:23, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote:
On 10/22/2012 05:16 PM, Gleb Natapov wrote:
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote:
After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling),
the
On Mon, Oct 22, 2012 at 01:35:56PM +0200, Jan Kiszka wrote:
On 2012-10-22 13:23, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote:
On 10/22/2012 05:16 PM, Gleb Natapov wrote:
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote:
After commit
On 2012-10-22 13:43, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 01:35:56PM +0200, Jan Kiszka wrote:
On 2012-10-22 13:23, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote:
On 10/22/2012 05:16 PM, Gleb Natapov wrote:
On Fri, Oct 19, 2012 at 03:37:32PM +0800,
Recent kernels have moved to keeping the userspace headers
in uapi/ subdirectories. This breaks the detection of whether an
architecture has KVM support in the kernel because kvm.h has
moved in the kernel source tree. Update the check to support
both the old and new locations.
Signed-off-by:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break new userspace, not old. By global you mean
shared between devices (or memory regions)?
Yes. We only have a single ring per VM, so we cannot flush
On 10/19/2012 06:11 PM, Sasha Levin wrote:
KVM_PV_REASON_PAGE_NOT_PRESENT kicks cpu out of idleness, but we haven't
marked that spot as an exit from idleness.
Not doing so can cause RCU warnings such as:
[ 732.788386] ===
[ 732.789803] [ INFO: suspicious RCU
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break new userspace, not old. By global you mean
shared between devices (or memory regions)?
Yes. We only have a
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break new userspace, not old. By global you mean
On 2012-10-22 14:53, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break new
On 10/22/2012 02:53 PM, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break
On 10/22/2012 02:45 PM, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer()
is gone. So this will break new userspace, not old. By global you mean
shared between devices
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the userspace change is needed the idea is dead, but if we could
implement it I do not see how it can hurt the latency if it would be the
only mechanism to use coalesced mmio buffer. Checking that the ring buffer
is empty is cheap and if it is
On Mon, Oct 22, 2012 at 02:55:14PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:53, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for
On Mon, Oct 22, 2012 at 02:55:24PM +0200, Avi Kivity wrote:
On 10/22/2012 02:53 PM, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:18, Avi Kivity wrote:
On 10/22/2012 01:45 PM, Jan Kiszka wrote:
Indeed. git pull, recheck and call for
On 10/22/2012 03:01 PM, Gleb Natapov wrote:
It's time where the guest cannot take interrupts, and time in a high
priority guest thread that is spent processing low guest priority requests.
Proposed fix has exactly same issue. Until all data is transfered to
userspace no interrupt will be
On 2012-10-22 14:58, Avi Kivity wrote:
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the userspace change is needed the idea is dead, but if we could
implement it I do not see how it can hurt the latency if it would be the
only mechanism to use coalesced mmio buffer. Checking that the ring
On Mon, Oct 22, 2012 at 03:02:22PM +0200, Avi Kivity wrote:
On 10/22/2012 03:01 PM, Gleb Natapov wrote:
It's time where the guest cannot take interrupts, and time in a high
priority guest thread that is spent processing low guest priority requests.
Proposed fix has exactly same issue.
On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:58, Avi Kivity wrote:
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the userspace change is needed the idea is dead, but if we could
implement it I do not see how it can hurt the latency if it would be the
only
On 2012-10-22 15:08, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:58, Avi Kivity wrote:
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the userspace change is needed the idea is dead, but if we could
implement it I do not see how it can
Forwarding this to the KVM general list. I doubt you folks can help me with
libvirt, but I was wondering if theres some way to verify if the cache=none
parameter is being respected for my KVM guests disk image, or if there are
any other configuration/debug steps appropriate for KVM + virtio +
Hi
Please send in any agenda topics you are interested in.
Later, Juan.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/19/2012 09:37 AM, Xiao Guangrong wrote:
After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling),
the pieces of io data can be collected and write them to the guest memory
or MMIO together.
Unfortunately, kvm splits the mmio access into 8 bytes and store them to
On Mon, Oct 22, 2012 at 03:25:49PM +0200, Jan Kiszka wrote:
On 2012-10-22 15:08, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:58, Avi Kivity wrote:
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the userspace change is needed the idea
On 10/20/2012 12:39 AM, Stefan Fritsch wrote:
On Thursday 18 October 2012, Avi Kivity wrote:
On 10/18/2012 11:35 AM, Gleb Natapov wrote:
You misunderstood the description. V_INTR_MASKING=1 means that
CR8 writes are not propagated to real HW APIC.
But KVM does not trap access to CR8
On 2012-10-22 16:00, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 03:25:49PM +0200, Jan Kiszka wrote:
On 2012-10-22 15:08, Gleb Natapov wrote:
On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote:
On 2012-10-22 14:58, Avi Kivity wrote:
On 10/22/2012 02:55 PM, Jan Kiszka wrote:
Since the
On 10/16/2012 10:23 PM, Michael Wolf wrote:
In the case of where you have a system that is running in a
capped or overcommitted environment the user may see steal time
being reported in accounting tools such as top or vmstat. This can
cause confusion for the end user.
How do s390 and Power
On 10/22/2012 04:00 PM, Gleb Natapov wrote:
Yes, with frame buffer is seems to be the case. One can imagine ROMD
device that is MMIO on write but still can be accessed for read from
kernel, but it cannot be coalesced even if coalesced buffer is flushed
on every exit.
You cannot enable
On Mon, Oct 22, 2012 at 04:09:06AM +0100, Rusty Russell wrote:
Christoffer Dall c.d...@virtualopensystems.com writes:
On Fri, Oct 19, 2012 at 2:19 AM, Rusty Russell ru...@rustcorp.com.au
wrote:
Wait, what? kvm/arm isn't in kvm-next?
Christoffer, is there anything I can help with?
On Mon, Oct 22, 2012 at 1:45 PM, Will Deacon will.dea...@arm.com wrote:
On Mon, Oct 22, 2012 at 04:09:06AM +0100, Rusty Russell wrote:
Christoffer Dall c.d...@virtualopensystems.com writes:
On Fri, Oct 19, 2012 at 2:19 AM, Rusty Russell ru...@rustcorp.com.au
wrote:
Wait, what? kvm/arm
Hi Christian,
During our normal Factory kernel builds, s390x seems to choke:
/home/abuild/rpmbuild/BUILD/kernel-default-3.7.rc2/linux-3.7-rc2/arch/s390/include/asm/kvm_para.h:147:99:
error: redefinition of 'kvm_arch_para_features'
(resending as plain-text)
To Michael Roth and KVM devs,
It is finally nice to be able to have a guest agent for Windows. I
really appreciate your collective efforts.
Is it possible to have fs-freeze-thaw support in it too?
Trying to use Libvirt's snapshot feature with --quiesce switch which
Michael S. Tsirkin m...@redhat.com writes:
On Thu, Oct 18, 2012 at 02:50:56PM +1030, Rusty Russell wrote:
Asias He as...@redhat.com writes:
+#define BLK_HDR 0
What's this for, exactly? Please add a comment.
The block headr is in the first and separate buffer.
Please don't assume
73 matches
Mail list logo