From: Avi Kivity a...@redhat.com
Conflicts:
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c
Signed-off-by: Avi Kivity a...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at
From: Joerg Roedel joerg.roe...@amd.com
This patch adds the get_supported_cpuid callback to
kvm_x86_ops. It will be used in do_cpuid_ent to delegate the
decission about some supported cpuid bits to the
architecture modules.
Cc: sta...@kernel.org
Signed-off-by: Joerg Roedel joerg.roe...@amd.com
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp
As Avi pointed out, testing bit part in mark_page_dirty() was important
in the days of shadow paging, but currently EPT and NPT has already become
common and the chance of faulting a page more that once per iteration is
small. So let's remove
From: Joerg Roedel joerg.roe...@amd.com
This patch implements propagation of a failes guest vmrun
back into the guest instead of killing the whole guest.
Signed-off-by: Joerg Roedel joerg.roe...@amd.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git a/arch/x86/kvm/svm.c
From: Joerg Roedel joerg.roe...@amd.com
This patch fixes a bug where a nested guest always went over
the same instruction because the rip was not advanced on a
nested vmexit.
Signed-off-by: Joerg Roedel joerg.roe...@amd.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git
From: Joerg Roedel joerg.roe...@amd.com
This patch prevents MCE intercepts from being propagated
into the L1 guest if they happened in an L2 guest.
Signed-off-by: Joerg Roedel joerg.roe...@amd.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
From: Joerg Roedel joerg.roe...@amd.com
This patch adds logic to kvm/x86 which allows to mark an
injected exception as reinjected. This allows to remove an
ugly hack from svm_complete_interrupts that prevented
exceptions from being reinjected at all in the nested case.
The hack was necessary
Changlog v2:
- when level is PT_DIRECTORY_LEVEL, the 'offset' should be
'role.quadrant 8', thanks Avi for point it out
- keep invlpg code in paging_tmpl.h address Avi's suggestion
- split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient()
to clarify the code address Avi's
If the guest is 32-bit, we should use 'quadrant' to adjust gpa
offset
Changlog v2:
- when level is PT_DIRECTORY_LEVEL, the 'offset' should be
'role.quadrant 8', thanks Avi for point it out
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/paging_tmpl.h | 13
Convert mmu tracepoints by using DECLARE_EVENT_CLASS
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmutrace.h | 69 +-
1 files changed, 26 insertions(+), 43 deletions(-)
diff --git a/arch/x86/kvm/mmutrace.h
Move unsync/sync tracepoints to the proper place, it's good
for us to obtain unsync page live time
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
Using is_last_spte() to cleanup invlpg code
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/paging_tmpl.h |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 83cc72f..8eb98eb 100644
Split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient()
to clarify the code address Avi's suggestion
kvm_sync_page_transient() function only update shadow page but not mark
it sync and not write protect sp-gfn. it will be used by later patch
Signed-off-by: Xiao Guangrong
Two cases maybe happen in kvm_mmu_get_page() function:
- one case is, the goal sp is already in cache, if the sp is unsync,
we only need update it to assure this mapping is valid, but not
mark it sync and not write-protect sp-gfn since it not broke unsync
rule(one shadow page for a gfn)
-
In current code, shadow page can become asynchronous only if one
shadow page for a gfn, this rule is too strict, in fact, we can
let all last mapping page(i.e, it's the pte page) become unsync,
and sync them at invlpg or flush tlb time.
This patch allow more page become asynchronous at gfn
Allow more page become asynchronous at getting sp time, if need create new
shadow page for gfn but it not allow unsync(level 1), we should unsync all
gfn's unsync page
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c | 21 +++--
1 files
Let invlpg not depends on kvm_mmu_pte_write path, later patch will need
this feature
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
arch/x86/kvm/mmu.c | 12 +++-
arch/x86/kvm/paging_tmpl.h | 33 ++---
2 files changed, 29
invlpg only need update unsync page, sp-unsync and sp-unsync_children
can help us to find it
Now, a gfn may have many shadow pages, when one sp need be synced, we
write protect sp-gfn and sync this sp but we keep other shadow pages
asynchronous
So, while gfn happen page fault, let it not touch
On 04/22/2010 01:33 PM, Joerg Roedel wrote:
Hi Avi, Marcelo,
here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V
root domain booting. The patches also add better handling for nested entry
failures and mce intercepts.
Also in this patchset are the fixes for the
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
include/linux/netdevice.h | 19 ++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git
From: Xin Xiaohui xiaohui@intel.com
If the driver want to allocate external buffers,
then it can export it's capability, as the skb
buffer header length, the page length can be DMA, etc.
The external buffers owner may utilize this.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
From: Xin Xiaohui xiaohui@intel.com
The external buffer owner can use the functions to get
the capability of the underlying NIC driver.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
include/linux/netdevice.h |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git
From: Xin Xiaohui xiaohui@intel.com
Export 2 func for device to assign/deassign new strucure
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
include/linux/netdevice.h |3 +++
net/core/dev.c
From: Xin Xiaohui xiaohui@intel.com
If buffer is external, then use the callback to destruct
buffers.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
net/core/skbuff.c | 11 +++
1 files
From: Xin Xiaohui xiaohui@intel.com
The hook is called in netif_receive_skb().
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
net/core/dev.c | 35 +++
1 files
From: Xin Xiaohui xiaohui@intel.com
Add a dev parameter to __alloc_skb(), skb-data
points to external buffer, recompute skb-head,
maintain shinfo of the external buffer, record
external buffer info into destructor_arg field.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by:
From: Xin Xiaohui xiaohui@intel.com
Currently, it can get external buffers from mp device.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
include/linux/skbuff.h | 12
net/core/skbuff.c
From: Xin Xiaohui xiaohui@intel.com
Make the skb-data and skb-head from external buffer
to be consistent, we ignore the room reserved by driver
for kernel skb.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
net/core/skbuff.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/core/skbuff.c
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
include/linux/mpassthru.h | 29 +
1 files changed, 29 insertions(+), 0 deletions(-)
From: Xin Xiaohui xiaohui@intel.com
The ioctl is used by mp device to bind an underlying
NIC, it will query hardware capability and declare the
NIC to use external buffers.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
net/core/dev.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/core/dev.c
From: Xin Xiaohui xiaohui@intel.com
Currently, vhost-net is only user to the mp device.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
drivers/vhost/mpassthru.c | 321
From: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
drivers/vhost/Kconfig | 10 ++
drivers/vhost/Makefile |2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git
From: Xin Xiaohui xiaohui@intel.com
How external buffer comes from, how to destroy.
Signed-off-by: Xin Xiaohui xiaohui@intel.com
Signed-off-by: Zhao Yu yzha...@gmail.com
Reviewed-by: Jeff Dike jd...@linux.intel.com
---
drivers/vhost/mpassthru.c | 237
From: Xin Xiaohui xiaohui@intel.com
Provides multiple submits and asynchronous notifications.
The vhost-net backend now only supports synchronous send/recv
operations. The patch provides multiple submits and asynchronous
notifications. This is needed for zero-copy case.
We provide an zero-copy method which driver side may get external
buffers to DMA. Here external means driver don't use kernel space
to allocate skb buffers. Currently the external buffer can be from
guest virtio-net driver.
The idea is simple, just to pin the guest VM user space and then
let host
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote:
+static int dev_is_mpassthru(struct net_device *dev)
+{
+ if (dev dev-mp_port)
+ return 1;
+ return 0;
+}
+
Please make it a inline function. And you would write it with less
lines of code.
return
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote:
+static int dev_is_mpassthru(struct net_device *dev)
bool return value should be better here.
--
Regards,
Changli Gao(xiao...@gmail.com)
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to
On 04/25/2010 10:00 AM, Xiao Guangrong wrote:
If the guest is 32-bit, we should use 'quadrant' to adjust gpa
offset
Changlog v2:
- when level is PT_DIRECTORY_LEVEL, the 'offset' should be
'role.quadrant 8', thanks Avi for point it out
Signed-off-by: Xiao
On 04/25/2010 10:00 AM, Xiao Guangrong wrote:
Split kvm_sync_page() into kvm_sync_page() and kvm_sync_page_transient()
to clarify the code address Avi's suggestion
kvm_sync_page_transient() function only update shadow page but not mark
it sync and not write protect sp-gfn. it will be used by
From: Changli Gao xiao...@gmail.com
Date: Sun, 25 Apr 2010 17:33:02 +0800
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote:
+static int dev_is_mpassthru(struct net_device *dev)
+{
+ if (dev dev-mp_port)
+ return 1;
+ return 0;
+}
+
Please make it
From: Changli Gao xiao...@gmail.com
Date: Sun, 25 Apr 2010 17:35:01 +0800
On Sun, Apr 25, 2010 at 5:19 PM, xiaohui@intel.com wrote:
+static int dev_is_mpassthru(struct net_device *dev)
bool return value should be better here.
Right.
--
To unsubscribe from this list: send the line
From: xiaohui@intel.com
Date: Sun, 25 Apr 2010 17:20:06 +0800
The idea is simple, just to pin the guest VM user space and then let
host NIC driver has the chance to directly DMA to it.
Isn't it much easier to map the RX ring of the network device into the
guest's address space, have DMA
On 04/25/2010 10:02 AM, Xiao Guangrong wrote:
Let invlpg not depends on kvm_mmu_pte_write path, later patch will need
this feature
if (mmu_topup_memory_caches(vcpu))
return;
- kvm_mmu_pte_write(vcpu, pte_gpa, NULL, sizeof(pt_element_t), 0);
+
+
On 04/25/2010 10:00 AM, Xiao Guangrong wrote:
Two cases maybe happen in kvm_mmu_get_page() function:
- one case is, the goal sp is already in cache, if the sp is unsync,
we only need update it to assure this mapping is valid, but not
mark it sync and not write-protect sp-gfn since it not
On Sun, Apr 25, 2010 at 02:55:29AM -0700, David Miller wrote:
From: xiaohui@intel.com
Date: Sun, 25 Apr 2010 17:20:06 +0800
The idea is simple, just to pin the guest VM user space and then let
host NIC driver has the chance to directly DMA to it.
Isn't it much easier to map the RX
On Sun, Apr 25, 2010 at 05:20:06PM +0800, xiaohui@intel.com wrote:
We provide an zero-copy method which driver side may get external
buffers to DMA. Here external means driver don't use kernel space
to allocate skb buffers. Currently the external buffer can be from
guest virtio-net driver.
On 04/24/2010 10:34 AM, Jan Kiszka wrote:
Marcelo Tosatti wrote:
Otherwise there is no way to differentiate between global and slot
specific logging, so for example
vga dirty log start
migration start
migration fail
Disables dirty logging for the vga slot.
This is not true (unless
On 04/23/2010 08:04 PM, Marcelo Tosatti wrote:
Looks good.
--
error compiling committee.c: too many arguments to function
--
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
On 04/21/2010 11:13 PM, Leszek Urbanski wrote:
20100421200358.gh24...@us.ibm.com; from Ryan Harper on Wed, Apr 21, 2010 at
15:03:58 -0500
Debugging with mtrace() also pointed to the iovec code as the culprit.
I've not used mtrace before, could you dump your command invocation for
Signed-off-by: Avi Kivity a...@redhat.com
---
Documentation/kvm/api.txt | 44
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index baa8fde..a237518 100644
---
On 04/22/2010 08:18 PM, Pekka Enberg wrote:
Hi!
I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is
completely undocumented. I assume it has something to do with
multiprocessor but I am unable to work out the details unless I take a
peek at arch/x86/kvm.
Patch sent.
--
error
Avi Kivity wrote:
Signed-off-by: Avi Kivity a...@redhat.com
Acked-by: Pekka Enberg penb...@cs.helsinki.fi
--
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
From: Stefan Hajnoczi stefa...@gmail.com
The MALLOC_TRACE output didn't look useful when I tried it either.
Instead I used the following to find origin of the leak. Still very basic but
works better with qemu_malloc() and friends.
This is just a hack but I wanted to share it in case someone
On 04/25/2010 04:27 PM, Stefan Hajnoczi wrote:
From: Stefan Hajnoczistefa...@gmail.com
The MALLOC_TRACE output didn't look useful when I tried it either.
Instead I used the following to find origin of the leak. Still very basic but
works better with qemu_malloc() and friends.
This is just a
Avi Kivity wrote:
On 04/24/2010 10:34 AM, Jan Kiszka wrote:
Marcelo Tosatti wrote:
Otherwise there is no way to differentiate between global and slot
specific logging, so for example
vga dirty log start
migration start
migration fail
Disables dirty logging for the vga slot.
On 04/25/2010 04:57 PM, Jan Kiszka wrote:
It's still a good idea. The current API assumes that there will be only
one slot-based client (or that multiple clients will keep the refcount
themselves).
After the bytemap - multiple bitmaps conversion this can be extended to
each client getting
Avi Kivity wrote:
On 04/25/2010 04:57 PM, Jan Kiszka wrote:
It's still a good idea. The current API assumes that there will be only
one slot-based client (or that multiple clients will keep the refcount
themselves).
After the bytemap - multiple bitmaps conversion this can be
extended to
On 04/25/2010 05:29 PM, Jan Kiszka wrote:
There isn't. But I don't like hidden breakage.
It's (so far) an unproblematic API property we can document. I don't
like changing APIs just for there might be the case that
I guess it's one of those agree to disagree things. I
Avi Kivity wrote:
On 04/25/2010 05:29 PM, Jan Kiszka wrote:
There isn't. But I don't like hidden breakage.
It's (so far) an unproblematic API property we can document. I don't
like changing APIs just for there might be the case that
I guess it's one of those agree to
On 04/25/2010 05:51 PM, Jan Kiszka wrote:
Avi Kivity wrote:
On 04/25/2010 05:29 PM, Jan Kiszka wrote:
There isn't. But I don't like hidden breakage.
It's (so far) an unproblematic API property we can document. I don't
like changing APIs just for there might be
Avi Kivity wrote:
On 04/25/2010 05:51 PM, Jan Kiszka wrote:
Avi Kivity wrote:
On 04/25/2010 05:29 PM, Jan Kiszka wrote:
There isn't. But I don't like hidden breakage.
It's (so far) an unproblematic API property we can document. I don't
like changing APIs just
On 04/25/2010 06:07 PM, Jan Kiszka wrote:
The fact that the API assumes a single user is what's broken IMO.
If the API were to take a memory slot as parameter you could say it is
the responsibility of the slot's owner to multiplex (and since vga has a
single owner, no need to multiplex). But
It's been a while since I dug into this, as I recall the media change
needs to be detected to flush cached data. I believe mounting and
unmounting the DVD in the host will work as well, as well as dropping
the cache on the host. I needed an event mechanism rather than polling
for a once in a blue
Avi Kivity wrote:
On 04/25/2010 06:07 PM, Jan Kiszka wrote:
The fact that the API assumes a single user is what's broken IMO.
If the API were to take a memory slot as parameter you could say it is
the responsibility of the slot's owner to multiplex (and since vga has a
single owner, no need
On 04/23/2010 10:36 AM, Fernando Luis Vázquez Cao wrote:
On 04/23/2010 02:17 PM, Yoshiaki Tamura wrote:
Dor Laor wrote:
[...]
Second, even if it wasn't the case, the tsc delta and kvmclock are
synchronized as part of the VM state so there is no use of trapping it
in the middle.
I should
When trying to boot installer iso's on this platform I get the
following error about 40 times per second in my kern.log.
kernel: [ 4857.828875] handle_exception: unexpected, vectoring info
0x880e intr info 0x8b0d
These options have no effect: -no-kvm-irqchip or -no-kvm-pit
QEMU is working
Avi Kivity wrote:
On 04/25/2010 10:00 AM, Xiao Guangrong wrote:
If the guest is 32-bit, we should use 'quadrant' to adjust gpa
offset
Changlog v2:
- when level is PT_DIRECTORY_LEVEL, the 'offset' should be
'role.quadrant 8', thanks Avi for point it out
Signed-off-by: Xiao
Avi Kivity wrote:
This isn't a split; it duplicates the code.
Since there are some parts in the middle of kvm_sync_page() you don't
want in sync_page_transient(), you can put them into helpers so that
sync_page and sync_page_transient only call helpers.
Will fix it in v3, thanks
Avi Kivity wrote:
On 04/25/2010 10:02 AM, Xiao Guangrong wrote:
Let invlpg not depends on kvm_mmu_pte_write path, later patch will need
this feature
if (mmu_topup_memory_caches(vcpu))
return;
-kvm_mmu_pte_write(vcpu, pte_gpa, NULL, sizeof(pt_element_t), 0);
+
+
Avi Kivity wrote:
On 04/25/2010 10:00 AM, Xiao Guangrong wrote:
Two cases maybe happen in kvm_mmu_get_page() function:
- one case is, the goal sp is already in cache, if the sp is unsync,
we only need update it to assure this mapping is valid, but not
mark it sync and not
On 04/25/2010 07:42 PM, Jan Kiszka wrote:
Unrelated:
cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa, 0xa8000);
cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb);
Will this sync to the right place (whatever those windows alias to)?
It should. Or
Avi,
I guess I only really care about intercepting ring 0 - ring 3
transitions in the guest. Is there an easier way of intercepting these?
Never mind about this. I figured out a solution to my problem that
didn't need to intercept these transitions.
Unfortunately, now I have a new
75 matches
Mail list logo