On Fri, Jun 25, 2010 at 4:09 AM, Rusty Russell ru...@rustcorp.com.au wrote:
On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote:
On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws
wrote:
Shouldn't it be possible to just drop the lock before invoking
virtqueue_kick()
Thanks, Mark.
-Original Message-
From: Markus Armbruster [mailto:arm...@redhat.com]
Sent: 2010年6月25日 12:58
To: Hao, Xudong
Cc: qemu-de...@nongnu.org; aligu...@us.ibm.com; kvm@vger.kernel.org
Subject: Re: qemu fail to parse command line with -pcidevice 00:19.0
Hao, Xudong
(2010/06/24 15:08), Markus Armbruster wrote:
Note to qemu-devel: this issue is qemu-kvm only.
Hao, Xudong xudong@intel.com writes:
When assign one PCI device, qemu fail to parse the command line:
qemu-system_x86 -smp 2 -m 1024 -hda /path/to/img -pcidevice host=00:19.0
Error:
On Thu, Jun 24, 2010 at 02:01:52PM -0500, Javier Guerra Giraldez wrote:
On Thu, Jun 24, 2010 at 1:32 PM, Freddie Cash fjwc...@gmail.com wrote:
??* virt-manager which requires X and seems to be more desktop-oriented;
don't know about the others, but virt-manager runs only on the admin
Some guest device driver may leverage the Non-Snoop I/O, and explicitly
WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or
CLFLUSH, we need to maintain data consistency either by:
1: flushing cache (wbinvd) when the guest is scheduled out if there is no
wbinvd exit, or
2:
Hidetoshi Seto seto.hideto...@jp.fujitsu.com writes:
(2010/06/24 15:08), Markus Armbruster wrote:
Note to qemu-devel: this issue is qemu-kvm only.
Hao, Xudong xudong@intel.com writes:
When assign one PCI device, qemu fail to parse the command line:
qemu-system_x86 -smp 2 -m 1024 -hda
Sheng Yang wrote:
Some guest device driver may leverage the Non-Snoop I/O, and explicitly
WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or
CLFLUSH, we need to maintain data consistency either by:
1: flushing cache (wbinvd) when the guest is scheduled out if there is
On 06/25/10 09:05, Christoph Hellwig wrote:
On Thu, Jun 24, 2010 at 02:01:52PM -0500, Javier Guerra Giraldez wrote:
On Thu, Jun 24, 2010 at 1:32 PM, Freddie Cashfjwc...@gmail.com wrote:
??* virt-manager which requires X and seems to be more desktop-oriented;
don't know about the others, but
On Fri, Jun 25, 2010 at 11:07:26AM +0200, Gerd Hoffmann wrote:
On 06/25/10 09:05, Christoph Hellwig wrote:
Second I
still haven't figure out how to install and manage a system using the
serial console with KVM, which certainly contributes to the complete
lack of usability above.
Serial
Hi,
We want to move to a multi-tiered, SAN-based virtualisation setup, but
can't find a VM management tool that handles both KVM and Xen (we have
some old Opteron hardware that doesn't support SVM), and does not
require Linux from end-to-end. For example, we want to run FreeBSD +
ZFS on our
On Fri, Jun 25, 2010 at 03:05:42AM -0400, Christoph Hellwig wrote:
On Thu, Jun 24, 2010 at 02:01:52PM -0500, Javier Guerra Giraldez wrote:
On Thu, Jun 24, 2010 at 1:32 PM, Freddie Cash fjwc...@gmail.com wrote:
??* virt-manager which requires X and seems to be more desktop-oriented;
On 06/25/2010 02:33 AM, Lucas Meneghel Rodrigues wrote:
For unittesting, for example, is interesting that we
run the VM with the bare mininum number of parameters.
This fix allows that.
Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com
---
client/tests/kvm/kvm_vm.py |5 +++--
1
On Thu, Jun 24, 2010 at 03:45:51PM -0700, Sridhar Samudrala wrote:
On Thu, 2010-06-24 at 11:11 +0300, Michael S. Tsirkin wrote:
On Sun, May 30, 2010 at 10:25:01PM +0200, Tejun Heo wrote:
Apply the cpumask and cgroup of the initializing task to the created
vhost poller.
Based on
On Friday 25 June 2010 16:54:19 Jan Kiszka wrote:
Sheng Yang wrote:
Some guest device driver may leverage the Non-Snoop I/O, and explicitly
WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD
or CLFLUSH, we need to maintain data consistency either by:
1: flushing
On Thu, Jun 24, 2010 at 05:43:15PM -0600, Cam Macdonell wrote:
Hi Michael,
I'm trying to write a uio driver for my shared memory device for KVM
and I'm running into a situation where several interrupts in quick
succession are not all triggering the callback function in my kernel
UIO driver,
On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote:
On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote:
On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws
wrote:
Shouldn't it be possible to just drop the lock before invoking
virtqueue_kick() and
Jes Sorensen wrote:
On 06/24/10 13:34, Andre Przywara wrote:
Avi Kivity wrote:
On 06/24/2010 01:58 PM, Andre Przywara wrote:
Non-anonymous memory doesn't work well with ksm and transparent
hugepages. Is it possible to use anonymous memory rather than file
backed?
I'd prefer non-file backed,
On Fri, Jun 25, 2010 at 09:03:46AM +0800, Dong, Eddie wrote:
Herbert Xu wrote:
On Wed, Jun 23, 2010 at 06:05:41PM +0800, Dong, Eddie wrote:
I mean once the frontend side driver post the buffers to the backend
driver, the backend driver will immediately use that buffers to
compose skb
While we sync the unsync sp, we may mapping the spte writable, it's
dangerous, if one unsync sp's mapping gfn is another unsync page's gfn.
For example:
have two unsync pages SP1, SP2 and:
SP1.pte[0] = P
SP2.gfn's pfn = P
[SP1.pte[0] = SP2.gfn's pfn]
First, we unsync SP2, it will write protect
In no-direct mapping, we mark sp is 'direct' when we mapping the
guest's larger page, but its access is encoded form upper page-struct
entire not include the last mapping, it will cause access conflict.
For example, have this mapping:
[W]
/ PDE1 - |---|
P[W] | | LPA
After remove a rmap, we should flush all vcpu's tlb
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 0412ba4..f151540 100644
---
This function not only return the gfn's hva but also the page number
after @gfn in the slot
It's used in the later patch
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
include/linux/kvm_host.h |1 +
virt/kvm/kvm_main.c | 13 -
2 files changed, 13
Consider using small page to fit guest's large page mapping:
If the mapping is writable but the dirty flag is not set, we will find
the read-only direct sp and setup the mapping, then if the write #PF
occur, we will mark this mapping writable in the read-only direct sp,
now, other real read-only
Introduce gfn_to_pfn_atomic(), it's the fast path and can used in atomic
context, the later patch will use it
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/mm/gup.c|2 ++
include/linux/kvm_host.h |1 +
virt/kvm/kvm_main.c | 32
Introduce mmu_topup_memory_cache_atomic(), it support topup memory
cache in atomic context
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c | 29 +
1 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu.c
Support prefetch ptes when intercept guest #PF, avoid to #PF by later
access
If we meet any failure in the prefetch path, we will exit it and
not try other ptes to avoid become heavy path
Note: this speculative will mark page become dirty but it not really
accessed, the same issue is in other
Trace pte prefetch, it can help us to improve the prefetch's performance
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c | 42 +-
arch/x86/kvm/mmutrace.h| 33 +
No pending KVM patches for upcoming 2.6.35, so let's give it a try in
form of a release candidate.
Major KVM changes since kvm-kmod-2.6.34:
- lots of x86 emulator fixes and improvements
- timekeeping (kvm-clock) improvements
- SVM: nesting correctness and performance improvements
- tons of
Some guest device driver may leverage the Non-Snoop I/O, and explicitly
WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or
CLFLUSH, we need to maintain data consistency either by:
1: flushing cache (wbinvd) when the guest is scheduled out if there is no
wbinvd exit, or
2:
Bugs item #2001121, was opened at 2008-06-23 21:09
Message generated for change (Comment added) made by jessorensen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=2001121group_id=180599
Please note that this message will contain a full copy of the comment
Sheng Yang wrote:
Some guest device driver may leverage the Non-Snoop I/O, and explicitly
WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or
CLFLUSH, we need to maintain data consistency either by:
1: flushing cache (wbinvd) when the guest is scheduled out if there is
Bugs item #1949429, was opened at 2008-04-23 09:40
Message generated for change (Comment added) made by jessorensen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=1949429group_id=180599
Please note that this message will contain a full copy of the comment
Bugs item #2034672, was opened at 2008-08-01 08:22
Message generated for change (Comment added) made by jessorensen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=2034672group_id=180599
Please note that this message will contain a full copy of the comment
Bugs item #1817779, was opened at 2007-10-22 13:02
Message generated for change (Settings changed) made by jessorensen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=1817779group_id=180599
Please note that this message will contain a full copy of the
On Fri, Jun 25, 2010 at 01:43:17PM +0300, Michael S. Tsirkin wrote:
On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote:
On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote:
On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws
wrote:
Shouldn't it be
On Fri, Jun 25, 2010 at 04:31:44PM +0100, Stefan Hajnoczi wrote:
On Fri, Jun 25, 2010 at 01:43:17PM +0300, Michael S. Tsirkin wrote:
On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote:
On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote:
On Wed, Jun 23, 2010 at 11:12 PM,
On Fri, Jun 25, 2010 at 06:32:20PM +0300, Michael S. Tsirkin wrote:
On Fri, Jun 25, 2010 at 04:31:44PM +0100, Stefan Hajnoczi wrote:
On Fri, Jun 25, 2010 at 01:43:17PM +0300, Michael S. Tsirkin wrote:
On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote:
On Thu, 24 Jun 2010
Bugs item #2063072, was opened at 2008-08-20 23:29
Message generated for change (Comment added) made by jessorensen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=2063072group_id=180599
Please note that this message will contain a full copy of the comment
Bugs item #1949429, was opened at 2008-04-23 10:40
Message generated for change (Comment added) made by technologov
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=1949429group_id=180599
Please note that this message will contain a full copy of the comment
Hi,
I have only one ethernet port in a remote server. (eth0)
I have a public address with x.x.x.164 netmask 255.255.255.240 gw x.x.x.161
and want to use in my guest OS the next available ip address (x.x.x.165 netmask
255.255.255.240 gw x.x.x.161)
Is this posible with brctl to achieve this?
I
Bugs item #1900228, was opened at 2008-02-23 10:26
Message generated for change (Comment added) made by glommer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=893831aid=1900228group_id=180599
Please note that this message will contain a full copy of the comment
On 23.06.2010, at 08:01, Takuya Yoshikawa wrote:
kvm_get_dirty_log() is a helper function for kvm_vm_ioctl_get_dirty_log()
which
is currently used by ia64 and ppc and the following is what it is doing:
- sanity checks
- bitmap scan to check if the slot is dirty
- copy_to_user()
Hi,
I have only one ethernet port in a remote server. (eth0)
I have a public address with x.x.x.164 netmask 255.255.255.240 gw x.x.x.161
and want to use in my guest OS the next available ip address (x.x.x.165
netmask 255.255.255.240 gw x.x.x.161)
Is this posible with brctl to achieve this?
I
Due to previous changes, the Book3S_32 guest MMU code didn't compile properly
when enabling debugging.
This patch repairs the broken code paths, making it possible to define DEBUG_MMU
and friends again.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/book3s_32_mmu.c |4 ++--
Book3s suffered from my really bad shadow MMU implementation so far. So
I finally got around to implement a combined hash and list mechanism that
allows for much faster lookup of mapped pages.
To show that it really is faster, I tried to run simple process spawning
code inside the guest with and
We just introduced generic functions to handle shadow pages on PPC.
This patch makes the respective backends make use of them, getting
rid of a lot of duplicate code along the way.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_book3s.h |7 ++
Currently the shadow paging code keeps an array of entries it knows about.
Whenever the guest invalidates an entry, we loop through that entry,
trying to invalidate matching parts.
While this is a really simple implementation, it is probably the most
ineffective one possible. So instead, let's
On 26.06.2010, at 01:16, Alexander Graf wrote:
Currently the shadow paging code keeps an array of entries it knows about.
Whenever the guest invalidates an entry, we loop through that entry,
trying to invalidate matching parts.
While this is a really simple implementation, it is probably
For transparent variable sharing between the hypervisor and guest, I introduce
a shared page. This shared page will contain all the registers the guest can
read and write safely without exiting guest context.
This patch only implements the stubs required for the basic structure of the
shared
While running in hooked code we need to store register contents out because
we must not clobber any registers.
So let's add some fields to the shared page we can just happily write to.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_para.h |3 +++
1 files
When the guest turns on interrupts again, it needs to know if we have an
interrupt pending for it. Because if so, it should rather get out of guest
context and get the interrupt.
So we introduce a new field in the shared page that we use to tell the guest
that there's a pending interrupt lying
When running in hooked code we need a way to disable interrupts without
clobbering any interrupts or exiting out to the hypervisor.
To achieve this, we have an additional critical field in the shared page. If
that field is equal to the r1 register of the guest, it tells the hypervisor
that we're
When in kernel mode there are 4 additional registers available that are
simple data storage. Instead of exiting to the hypervisor to read and
write those, we can just share them with the guest using the page.
This patch converts all users of the current field to the shared page.
Signed-off-by:
We just introduced a new PV interface that screams for documentation. So here
it is - a shiny new and awesome text file describing the internal works of
the PPC KVM paravirtual interface.
Signed-off-by: Alexander Graf ag...@suse.de
---
Documentation/kvm/ppc-pv.txt | 164
We will soon require more sophisticated methods to replace single instructions
with multiple instructions. We do that by branching to a memory region where we
write replacement code for the instruction to.
This region needs to be within 32 MB of the patched instruction though, because
that's the
Now that we have the shared page in place and the MMU code knows about
the magic page, we can expose that capability to the guest!
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_para.h |2 ++
arch/powerpc/kvm/powerpc.c | 11 +++
2 files
As we now have Book3s support for the magic page, we also need BookE to
join in on the party.
This patch implements generic magic page logic for BookE and specific
TLB logic for e500. I didn't have any 440 around, so I didn't dare to
blindly try and write up broken code.
Signed-off-by: Alexander
On BookE the preferred way to write the EE bit is the wrteei instruction. It
already encodes the EE bit in the instruction.
So in order to get BookE some speedups as well, let's also PV'nize thati
instruction.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/kvm.c | 50
On PowerPC it's very normal to not support all of the physical RAM in real mode.
To check if we're matching on the shared page or not, we need to know the limits
so we can restrain ourselves to that range.
So let's make it a define instead of open-coding it. And while at it, let's also
increase
With our current MMU scheme we don't need to know about the tlbsync instruction.
So we can just nop it out.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/kvm.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/kvm.c
There is also a form of mtmsr where all bits need to be addressed. While the
PPC64 Linux kernel behaves resonably well here, the PPC32 one never uses the
L=1 form but does mtmsr even for simple things like only changing EE.
So we need to hook into that one as well and check for a mask of bits
We will soon start and replace instructions from the text section with
other, paravirtualized versions. To ease the readability of those patches
I split out the generic looping and magic page mapping code out.
This patch still only contains stubs. But at least it loops through the
text section
We will be introducing a method to project the shared page in guest context.
As soon as we're talking about this coupling, the shared page is colled magic
page.
This patch introduces simple defines, so the follow-up patches are easier to
read.
Signed-off-by: Alexander Graf ag...@suse.de
---
The PowerPC ISA has a special instruction for mtmsr that only changes the EE
and RI bits, namely the L=1 form.
Since that one is reasonably often occuring and simple to implement, let's
go with this first. Writing EE=0 is always just a store. Doing EE=1 also
requires us to check for pending
We have all the hypervisor pieces in place now, but the guest parts are still
missing.
This patch implements basic awareness of KVM when running Linux as guest. It
doesn't do anything with it yet though.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/Makefile |2 ++
Some instructions can simply be replaced by load and store instructions to
or from the magic page.
This patch replaces often called instructions that fall into the above category.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/kvm.c | 111
When we hook an instruction we need to make sure we don't clobber any of
the registers at that point. So we write them out to scratch space in the
magic page. To make sure we don't fall into a race with another piece of
hooked code, we need to disable interrupts.
To make the later patches and
We need to override EA as well as PA lookups for the magic page. When the guest
tells us to project it, the magic page overrides any guest mappings.
In order to reflect that, we need to hook into all the MMU layers of KVM to
force map the magic page if necessary.
Signed-off-by: Alexander Graf
To communicate with KVM directly we need to plumb some sort of interface
between the guest and KVM. Usually those interfaces use hypercalls.
This hypercall implementation is described in the last patch of the series
in a special documentation file. Please read that for further information.
This
The DSISR register contains information about a data page fault. It is fully
read/write from inside the guest context and we don't need to worry about
interacting based on writes of this register.
This patch converts all users of the current field to the shared page.
Signed-off-by: Alexander
On PPC we run PR=0 (kernel mode) code in PR=1 (user mode) and don't use the
hypervisor extensions.
While that is all great to show that virtualization is possible, there are
quite some cases where the emulation overhead of privileged instructions is
killing performance.
This patchset tackles
The SRR0 and SRR1 registers contain cached values of the PC and MSR
respectively. They get written to by the hypervisor when an interrupt
occurs or directly by the kernel. They are also used to tell the rfi(d)
instruction where to jump to.
Because it only gets touched on defined events that, it's
One of the most obvious registers to share with the guest directly is the
MSR. The MSR contains the interrupts enabled flag which the guest has to
toggle in critical sections.
So in order to bring the overhead of interrupt en- and disabling down, let's
put msr into the shared page. Keep in mind
The DAR register contains the address a data page fault occured at. This
register behaves pretty much like a simple data storage register that gets
written to on data faults. There is no hypervisor interaction required on
read or write.
This patch converts all users of the current field to the
On Fri, 25 Jun 2010 21:25:57 +0200
Alexander Graf ag...@suse.de wrote:
This patch plus 4/4 broke dirty bitmap updating on PPC. I didn't get around
to track down why, but I figured you should now. Is there any way to get you
a PPC development box? A simple G4 or G5 should be 200$ on ebay by
This patch plus 4/4 broke dirty bitmap updating on PPC. I didn't get around
to track down why, but I figured you should now. Is there any way to get you
a PPC development box? A simple G4 or G5 should be 200$ on ebay by now :).
A simple G4 or G5, thanks for the info, I'll buy one.
I hope
Hello,
I am trying to understand the virtio mechanism in linux. I read that
the kick function will notify the host side about the newly published
buffers. I am looking especially at virtio_net.Once a packet is ready
for transmission the kick function is called. From here i where does
it go? Which
On 06/25/2010 12:42 AM, Alexander Graf wrote:
On 24.06.2010, at 21:44, Denis Kirjanov wrote:
Fix build warning:
arch/powerpc/kvm/book3s_64_mmu.c: In function
'kvmppc_mmu_book3s_64_esid_to_vsid':
arch/powerpc/kvm/book3s_64_mmu.c:446: warning: 'slb' may be used uninitialized
in this function
On 25.06.2010, at 11:02, Denis Kirjanov wrote:
On 06/25/2010 12:42 AM, Alexander Graf wrote:
On 24.06.2010, at 21:44, Denis Kirjanov wrote:
Fix build warning:
arch/powerpc/kvm/book3s_64_mmu.c: In function
'kvmppc_mmu_book3s_64_esid_to_vsid':
arch/powerpc/kvm/book3s_64_mmu.c:446:
On 06/25/2010 01:02 PM, Denis Kirjanov wrote:
On 06/25/2010 12:42 AM, Alexander Graf wrote:
On 24.06.2010, at 21:44, Denis Kirjanov wrote:
Fix build warning:
arch/powerpc/kvm/book3s_64_mmu.c: In function
'kvmppc_mmu_book3s_64_esid_to_vsid':
arch/powerpc/kvm/book3s_64_mmu.c:446: warning:
On 23.06.2010, at 08:01, Takuya Yoshikawa wrote:
kvm_get_dirty_log() is a helper function for kvm_vm_ioctl_get_dirty_log()
which
is currently used by ia64 and ppc and the following is what it is doing:
- sanity checks
- bitmap scan to check if the slot is dirty
- copy_to_user()
Due to previous changes, the Book3S_32 guest MMU code didn't compile properly
when enabling debugging.
This patch repairs the broken code paths, making it possible to define DEBUG_MMU
and friends again.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/book3s_32_mmu.c |4 ++--
We just introduced generic functions to handle shadow pages on PPC.
This patch makes the respective backends make use of them, getting
rid of a lot of duplicate code along the way.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_book3s.h |7 ++
On 26.06.2010, at 01:16, Alexander Graf wrote:
Currently the shadow paging code keeps an array of entries it knows about.
Whenever the guest invalidates an entry, we loop through that entry,
trying to invalidate matching parts.
While this is a really simple implementation, it is probably
When the guest turns on interrupts again, it needs to know if we have an
interrupt pending for it. Because if so, it should rather get out of guest
context and get the interrupt.
So we introduce a new field in the shared page that we use to tell the guest
that there's a pending interrupt lying
When in kernel mode there are 4 additional registers available that are
simple data storage. Instead of exiting to the hypervisor to read and
write those, we can just share them with the guest using the page.
This patch converts all users of the current field to the shared page.
Signed-off-by:
For transparent variable sharing between the hypervisor and guest, I introduce
a shared page. This shared page will contain all the registers the guest can
read and write safely without exiting guest context.
This patch only implements the stubs required for the basic structure of the
shared
While running in hooked code we need to store register contents out because
we must not clobber any registers.
So let's add some fields to the shared page we can just happily write to.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_para.h |3 +++
1 files
We just introduced a new PV interface that screams for documentation. So here
it is - a shiny new and awesome text file describing the internal works of
the PPC KVM paravirtual interface.
Signed-off-by: Alexander Graf ag...@suse.de
---
Documentation/kvm/ppc-pv.txt | 164
As we now have Book3s support for the magic page, we also need BookE to
join in on the party.
This patch implements generic magic page logic for BookE and specific
TLB logic for e500. I didn't have any 440 around, so I didn't dare to
blindly try and write up broken code.
Signed-off-by: Alexander
The PowerPC ISA has a special instruction for mtmsr that only changes the EE
and RI bits, namely the L=1 form.
Since that one is reasonably often occuring and simple to implement, let's
go with this first. Writing EE=0 is always just a store. Doing EE=1 also
requires us to check for pending
Some instructions can simply be replaced by load and store instructions to
or from the magic page.
This patch replaces often called instructions that fall into the above category.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/kvm.c | 111
We have all the hypervisor pieces in place now, but the guest parts are still
missing.
This patch implements basic awareness of KVM when running Linux as guest. It
doesn't do anything with it yet though.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/Makefile |2 ++
We need to override EA as well as PA lookups for the magic page. When the guest
tells us to project it, the magic page overrides any guest mappings.
In order to reflect that, we need to hook into all the MMU layers of KVM to
force map the magic page if necessary.
Signed-off-by: Alexander Graf
Now that we have the shared page in place and the MMU code knows about
the magic page, we can expose that capability to the guest!
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_para.h |2 ++
arch/powerpc/kvm/powerpc.c | 11 +++
2 files
To communicate with KVM directly we need to plumb some sort of interface
between the guest and KVM. Usually those interfaces use hypercalls.
This hypercall implementation is described in the last patch of the series
in a special documentation file. Please read that for further information.
This
On BookE the preferred way to write the EE bit is the wrteei instruction. It
already encodes the EE bit in the instruction.
So in order to get BookE some speedups as well, let's also PV'nize thati
instruction.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kernel/kvm.c | 50
The SRR0 and SRR1 registers contain cached values of the PC and MSR
respectively. They get written to by the hypervisor when an interrupt
occurs or directly by the kernel. They are also used to tell the rfi(d)
instruction where to jump to.
Because it only gets touched on defined events that, it's
On PPC we run PR=0 (kernel mode) code in PR=1 (user mode) and don't use the
hypervisor extensions.
While that is all great to show that virtualization is possible, there are
quite some cases where the emulation overhead of privileged instructions is
killing performance.
This patchset tackles
We will be introducing a method to project the shared page in guest context.
As soon as we're talking about this coupling, the shared page is colled magic
page.
This patch introduces simple defines, so the follow-up patches are easier to
read.
Signed-off-by: Alexander Graf ag...@suse.de
---
1 - 100 of 105 matches
Mail list logo