Selectively control Unmapped Page Cache (nospam version)
From: Balbir Singh
This patch implements unmapped page cache control via preferred
page cache reclaim. The current patch hooks into kswapd and reclaims
page cache if the user has requested for unmapped page control.
This is useful in the f
On 03/15/2010 08:27 AM, Marcelo Tosatti wrote:
You should disable out of sync shadow so that l1 guest writes to
l1-nested-ptables always trap.
Why? The guest is under obligation to flush the tlb if it writes to
a page table, and we will resync on that tlb flush.
The guests hype
On 03/03/2010 09:12 PM, Joerg Roedel wrote:
This patch implements logic to make sure that either a
page-fault/page-fault-vmexit or a nested-page-fault-vmexit
is propagated back to the guest.
Signed-off-by: Joerg Roedel
---
arch/x86/kvm/mmu.h |1 +
arch/x86/kvm/paging_tmpl.h |2
On 03/14/2010 07:35 PM, Gleb Natapov wrote:
On Sun, Mar 14, 2010 at 06:54:11PM +0200, Avi Kivity wrote:
On 03/14/2010 06:21 PM, Gleb Natapov wrote:
in/out emulation is broken now. The breakage is different depending
on where IO device resides. If it is in userspace emulator reports
em
On 03/14/2010 08:06 PM, Gleb Natapov wrote:
Suggest simply reentering every N executions.
This restart mechanism is, in fact, needed for ins read ahead to work.
After reading ahead from IO port we need to avoid entering decoder
until entire cache is consumed otherwise decoder will clear c
On Mon, Mar 15, 2010 at 09:41:51AM +0200, Avi Kivity wrote:
> On 03/14/2010 07:35 PM, Gleb Natapov wrote:
> >On Sun, Mar 14, 2010 at 06:54:11PM +0200, Avi Kivity wrote:
> >>On 03/14/2010 06:21 PM, Gleb Natapov wrote:
> >>>in/out emulation is broken now. The breakage is different depending
> >>>on w
On 03/15/2010 09:22 AM, Balbir Singh wrote:
Selectively control Unmapped Page Cache (nospam version)
From: Balbir Singh
This patch implements unmapped page cache control via preferred
page cache reclaim. The current patch hooks into kswapd and reclaims
page cache if the user has requested for u
* Avi Kivity [2010-03-15 09:48:05]:
> On 03/15/2010 09:22 AM, Balbir Singh wrote:
> >Selectively control Unmapped Page Cache (nospam version)
> >
> >From: Balbir Singh
> >
> >This patch implements unmapped page cache control via preferred
> >page cache reclaim. The current patch hooks into kswapd
Make use of bool as return valuses.
Signed-off-by: Gui Jianfeng
---
arch/x86/kvm/vmx.c | 72 ++--
1 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 06108f3..cc0628e 100644
--- a/arch/x8
On 03/15/2010 10:07 AM, Balbir Singh wrote:
* Avi Kivity [2010-03-15 09:48:05]:
On 03/15/2010 09:22 AM, Balbir Singh wrote:
Selectively control Unmapped Page Cache (nospam version)
From: Balbir Singh
This patch implements unmapped page cache control via preferred
page cache reclai
On 03/15/2010 10:23 AM, Gui Jianfeng wrote:
Make use of bool as return valuses.
-static inline int cpu_has_vmx_tpr_shadow(void)
+static inline bool cpu_has_vmx_tpr_shadow(void)
{
- return vmcs_config.cpu_based_exec_ctrl& CPU_BASED_TPR_SHADOW;
+ return !!(vmcs_config.cpu_based_exe
On Fri, Mar 05, 2010 at 12:11:48PM +0800, Wei Yongjun wrote:
> This patch use generic linux function native_store_idt()
> instead of kvm_get_idt(), and also removed the useless
> function kvm_get_idt().
>
> Signed-off-by: Wei Yongjun
> ---
> arch/x86/include/asm/kvm_host.h |5 -
> arch/x
On Mon, Mar 08, 2010 at 05:22:43PM +0900, Takuya Yoshikawa wrote:
> Hi, I would like to hear your comments about the following plan:
>
> Moving dirty bitmaps to userspace
> - Double buffering approach
>
> especially I would be glad if I can hear some advice about how
> to keep the compatibi
>> +/* The structure to notify the virtqueue for async socket */
>> +struct vhost_notifier {
>> +struct list_head list;
> >+struct vhost_virtqueue *vq;
> >+int head;
> >+int size;
> >+int log;
> >+void *ctrl;
> >+void (*dtor)(struct vhost_notifier *);
> >+};
> >+
>So IM
On 03/15/2010 10:33 AM, Marcelo Tosatti wrote:
Are there any good ways to solve this kind of problems?
You can introduce a new get_dirty_log ioctl that passes the address
of the next bitmap in userspace, and use it (after pinning with
get_user_pages), instead of vmalloc'ing.
No pi
On Mon, Mar 15, 2010 at 09:36:52AM +0200, Avi Kivity wrote:
> On 03/03/2010 09:12 PM, Joerg Roedel wrote:
>> This patch implements logic to make sure that either a
>> page-fault/page-fault-vmexit or a nested-page-fault-vmexit
>> is propagated back to the guest.
>>
>> Signed-off-by: Joerg Roedel
>>
* Avi Kivity [2010-03-15 10:27:45]:
> On 03/15/2010 10:07 AM, Balbir Singh wrote:
> >* Avi Kivity [2010-03-15 09:48:05]:
> >
> >>On 03/15/2010 09:22 AM, Balbir Singh wrote:
> >>>Selectively control Unmapped Page Cache (nospam version)
> >>>
> >>>From: Balbir Singh
> >>>
> >>>This patch implement
On 03/15/2010 11:06 AM, Joerg Roedel wrote:
On Mon, Mar 15, 2010 at 09:36:52AM +0200, Avi Kivity wrote:
On 03/03/2010 09:12 PM, Joerg Roedel wrote:
This patch implements logic to make sure that either a
page-fault/page-fault-vmexit or a nested-page-fault-vmexit
is propagated back to t
On Mon, Mar 15, 2010 at 04:46:50PM +0800, Xin, Xiaohui wrote:
> >> +/* The structure to notify the virtqueue for async socket */
> >> +struct vhost_notifier {
> >> + struct list_head list;
> > >+ struct vhost_virtqueue *vq;
> > >+ int head;
> > >+ int size;
> > >+ int log;
> > >+ void *ctrl;
On 03/15/2010 11:17 AM, Balbir Singh wrote:
* Avi Kivity [2010-03-15 10:27:45]:
On 03/15/2010 10:07 AM, Balbir Singh wrote:
* Avi Kivity [2010-03-15 09:48:05]:
On 03/15/2010 09:22 AM, Balbir Singh wrote:
Selectively control Unmapped Page Cache (nospam version)
Make use of bool as return values, and remove some useless
bool value converting. Thanks Avi to point this out.
Signed-off-by: Gui Jianfeng
---
arch/x86/kvm/vmx.c | 54 ++--
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/x8
On Mon, Mar 15, 2010 at 11:23:07AM +0200, Avi Kivity wrote:
> On 03/15/2010 11:06 AM, Joerg Roedel wrote:
>> On Mon, Mar 15, 2010 at 09:36:52AM +0200, Avi Kivity wrote:
>>
>>> On 03/03/2010 09:12 PM, Joerg Roedel wrote:
>>>
This patch implements logic to make sure that either a
On Mon, Mar 15, 2010 at 09:44:26AM +0200, Avi Kivity wrote:
> On 03/14/2010 08:06 PM, Gleb Natapov wrote:
> >>Suggest simply reentering every N executions.
> >>
> >This restart mechanism is, in fact, needed for ins read ahead to work.
> >After reading ahead from IO port we need to avoid entering de
On 03/15/2010 11:44 AM, Gleb Natapov wrote:
On Mon, Mar 15, 2010 at 09:44:26AM +0200, Avi Kivity wrote:
On 03/14/2010 08:06 PM, Gleb Natapov wrote:
Suggest simply reentering every N executions.
This restart mechanism is, in fact, needed for ins read ahead to work.
After re
On Mon, Mar 15, 2010 at 11:56:32AM +0200, Avi Kivity wrote:
> On 03/15/2010 11:44 AM, Gleb Natapov wrote:
> >On Mon, Mar 15, 2010 at 09:44:26AM +0200, Avi Kivity wrote:
> >>On 03/14/2010 08:06 PM, Gleb Natapov wrote:
> Suggest simply reentering every N executions.
>
> >>>This restart mecha
On 03/15/2010 12:07 PM, Gleb Natapov wrote:
Or we can make the buffer larger for everyone (outside this patchset
though).
I am not sure what do you mean here. INS read ahead and MMIO read cache are
different beasts. Former is needed to speed-up string pio reads, later
(not yet implement
On Sun, Mar 14, 2010 at 09:03:47AM +0200, Avi Kivity wrote:
> On 03/10/2010 04:50 PM, Avi Kivity wrote:
> >Currently when we emulate a locked operation into a shadowed guest page
> >table, we perform a write rather than a true atomic. This is indicated
> >by the "emulating exchange as write" messa
On Mon, Mar 15, 2010 at 12:15:22PM +0200, Avi Kivity wrote:
> On 03/15/2010 12:07 PM, Gleb Natapov wrote:
> >
> >>Or we can make the buffer larger for everyone (outside this patchset
> >>though).
> >>
> >I am not sure what do you mean here. INS read ahead and MMIO read cache are
> >different beasts
On 03/15/2010 12:19 PM, Gleb Natapov wrote:
On Mon, Mar 15, 2010 at 12:15:22PM +0200, Avi Kivity wrote:
On 03/15/2010 12:07 PM, Gleb Natapov wrote:
Or we can make the buffer larger for everyone (outside this patchset
though).
I am not sure what do you mean here. IN
On Mon, Mar 15, 2010 at 12:24:43PM +0200, Avi Kivity wrote:
> On 03/15/2010 12:19 PM, Gleb Natapov wrote:
> >On Mon, Mar 15, 2010 at 12:15:22PM +0200, Avi Kivity wrote:
> >>On 03/15/2010 12:07 PM, Gleb Natapov wrote:
> Or we can make the buffer larger for everyone (outside this patchset
> t
* Avi Kivity [2010-03-15 11:27:56]:
> >>>The knobs are for
> >>>
> >>>1. Selective enablement
> >>>2. Selective control of the % of unmapped pages
> >>An alternative path is to enable KSM for page cache. Then we have
> >>direct read-only guest access to host page cache, without any guest
> >>mod
Avi Kivity wrote:
On 03/15/2010 10:33 AM, Marcelo Tosatti wrote:
Are there any good ways to solve this kind of problems?
You can introduce a new get_dirty_log ioctl that passes the address
of the next bitmap in userspace, and use it (after pinning with
get_user_pages), instead of vmallo
Gleb Natapov wrote:
Use (get|set)_cr callback to emulate lmsw inside emulator.
I see that vmx.c:handle_cr() is the only other user of kvm_lmsw(). If we
fix this place similar like you did below, we could get rid of
kvm_lmsw() entirely. But I am not sure whether it's OK to remove an
exported sy
Avi Kivity wrote on 2010-03-10 13:03:25 +0200:
> On 03/10/2010 12:26 PM, Erik van der Kouwe wrote:
>> I've submitted this bug report a week ago:
>> http://sourceforge.net/tracker/?func=detail&aid=2962575&group_id=180599&atid=893831
>>
>
> MINIX is using big real mode which is currently not well
On 03/15/2010 01:02 PM, Andre Przywara wrote:
Gleb Natapov wrote:
Use (get|set)_cr callback to emulate lmsw inside emulator.
I see that vmx.c:handle_cr() is the only other user of kvm_lmsw(). If
we fix this place similar like you did below, we could get rid of
kvm_lmsw() entirely. But I am not
On 03/15/2010 12:16 PM, Marcelo Tosatti wrote:
On Sun, Mar 14, 2010 at 09:03:47AM +0200, Avi Kivity wrote:
On 03/10/2010 04:50 PM, Avi Kivity wrote:
Currently when we emulate a locked operation into a shadowed guest page
table, we perform a write rather than a true atomic. This is in
Commit fb341f57 removed the pte prefetch on guest invlpg, citing guest races.
However, the SDM is adamant that prefetch is allowed:
"The processor may create entries in paging-structure caches for
translations required for prefetches and for accesses that are a
result of speculative execut
Once upon a time, locked operations were emulated while holding the mmu mutex.
Since mmu pages were write protected, it was safe to emulate the writes in
a non-atomic manner, since there could be no other writer, either in the
guest or in the kernel.
These days emulation takes place without holdin
The update_pte() path currently uses a nontrapping spte when a nonpresent
(or nonaccessed) gpte is written. This is fine since at present it is only
used on sync pages. However, on an unsync page this will cause an endless
fault loop as the guest is under no obligation to invlpg a gpte that
trans
Currently emulated atomic operations are immediately followed by a non-atomic
operation, so that kvm_mmu_pte_write() can be invoked. This updates the mmu
but undoes the whole point of doing things atomically.
Fix by only performing the atomic operation and the mmu update, and avoiding
the non-ato
kvm_mmu_pte_write() reads guest ptes in two different occasions, both to
allow a 32-bit pae guest to update a pte with 4-byte writes. Consolidate
these into a single read, which also allows us to consolidate another read
from an invlpg speculating a gpte into the shadow page table.
Signed-off-by:
Currently when we emulate a locked operation into a shadowed guest page
table, we perform a write rather than a true atomic. This is indicated
by the "emulating exchange as write" message that shows up in dmesg.
In addition, the pte prefetch operation during invlpg suffered from a
race. This was
On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
Hi there,
Our wiki page for the Summer of Code 2010 is doing quite well:
http://wiki.qemu.org/Google_Summer_of_Code_2010
I will add another project - iommu emulation. Could be very useful for
doing device assignment to nested guests, wh
On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
> On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
>> Hi there,
>>
>> Our wiki page for the Summer of Code 2010 is doing quite well:
>>
>> http://wiki.qemu.org/Google_Summer_of_Code_2010
>>
>
> I will add another project - iommu emul
On 03/15/2010 02:38 PM, Joerg Roedel wrote:
On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
Hi there,
Our wiki page for the Summer of Code 2010 is doing quite well:
http://wiki.qemu.org/Google_Summer_of_Code_2010
On 03/15/2010 12:54 PM, Antoine Leca wrote:
When doing switch, the cached segment selectors are preserved,
which allows one to use protected mode segments in real-address mode
(this is called unreal mode).
Now this is a by-product of the implementation inside the BIOS.
In fact, even if t
On Mon, Mar 15, 2010 at 04:30:47AM +, Daniel K. wrote:
> Joerg Roedel wrote:
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index 2883ce8..9f8b02d 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -314,6 +314,19 @@ void kvm_inject_page_fault(struct kvm_vcpu *vcpu,
On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
> On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
> > Hi there,
> >
> > Our wiki page for the Summer of Code 2010 is doing quite well:
> >
> >http://wiki.qemu.org/Google_Summer_of_Code_2010
>
> I will add another project - iommu emulati
On Mon, Mar 15, 2010 at 05:53:13AM -0700, Muli Ben-Yehuda wrote:
> On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
> > On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
>
> > > Hi there,
> > >
> > > Our wiki page for the Summer of Code 2010 is doing quite well:
> > >
> > >http://wiki.qe
Gleb Natapov wrote:
Use this callback instead of directly call kvm function. Also rename
realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing
to do with real mode.
Do you mind removing the static before emulator_{set,get}_cr and marking
it EXPORT_SYMBOL? Then one could use i
kvm_coalesced_mmio_init() keeps to hold the addresses of a coalesced
mmio ring page and dev even after it has freed them.
Also, if this function fails, though it might be rare, it seems to be
suggesting the system's serious state: so we'd better stop the works
following the kvm_creat_vm().
This p
On Mon, Mar 15, 2010 at 02:06:48PM +0100, Andre Przywara wrote:
> Gleb Natapov wrote:
> >Use this callback instead of directly call kvm function. Also rename
> >realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing
> >to do with real mode.
> Do you mind removing the static befor
On 03/15/2010 03:03 PM, Joerg Roedel wrote:
I will add another project - iommu emulation. Could be very useful
for doing device assignment to nested guests, which could make
testing a lot easier.
Our experiments show that nested device assignment is pretty much
required for I/O perfor
On 03/15/2010 03:06 PM, Andre Przywara wrote:
Gleb Natapov wrote:
Use this callback instead of directly call kvm function. Also rename
realmode_(set|get)_cr to emulator_(set|get)_cr since function has
nothing
to do with real mode.
Do you mind removing the static before emulator_{set,get}_cr an
On 03/15/2010 07:42 AM, Avi Kivity wrote:
On 03/15/2010 02:38 PM, Joerg Roedel wrote:
On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
Hi there,
Our wiki page for the Summer of Code 2010 is doing quite well:
http://wiki.qemu.org
Gleb,
what is the purpose of this patch? Is this a preparation for something
upcoming? I don't see a reason to change this, in my eyes it is not a
simplification.
Regards,
Andre.
Gleb Natapov wrote:
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |1 +
arch/x86/kvm
On Mon, Mar 15, 2010 at 02:16:01PM +0100, Andre Przywara wrote:
> Gleb,
>
> what is the purpose of this patch? Is this a preparation for
> something upcoming? I don't see a reason to change this, in my eyes
> it is not a simplification.
>
To make emulator independent of KVM. All direct calls from
On 03/15/2010 08:11 AM, Avi Kivity wrote:
On 03/15/2010 03:03 PM, Joerg Roedel wrote:
I will add another project - iommu emulation. Could be very useful
for doing device assignment to nested guests, which could make
testing a lot easier.
Our experiments show that nested device assignment is
On Mon, Mar 15, 2010 at 03:11:42PM +0200, Avi Kivity wrote:
> On 03/15/2010 03:03 PM, Joerg Roedel wrote:
>>
I will add another project - iommu emulation. Could be very useful
for doing device assignment to nested guests, which could make
testing a lot easier.
>>> Our e
In our KVM system we have two iSCSI backends (master/slave
configuration) with failover and two KVM hosts supporting live migration.
The iSCSI volumes are shared by the host as a block device in KVM, and
the volumes are available on both frontends. After a reboot one of the
KVMs where not able t
On 03/13/10 09:54, Avi Kivity wrote:
>
> If the slowdown is indeed due to I/O, LVM (with cache=off) should
> eliminate it completely.
>
As promised I have installed LVM: The difference is remarkable.
My test case (running 8 vhosts in parallel, each building a Linux
kernel) just works. There is no
On 03/15/2010 08:24 AM, Joerg Roedel wrote:
On Mon, Mar 15, 2010 at 03:11:42PM +0200, Avi Kivity wrote:
On 03/15/2010 03:03 PM, Joerg Roedel wrote:
I will add another project - iommu emulation. Could be very useful
for doing device assignment to nested guests, which could mak
On 03/15/2010 08:46 AM, Espen Berg wrote:
In our KVM system we have two iSCSI backends (master/slave
configuration) with failover and two KVM hosts supporting live migration.
The iSCSI volumes are shared by the host as a block device in KVM, and
the volumes are available on both frontends. Afte
On Mon, Mar 15, 2010 at 08:59:10AM -0500, Anthony Liguori wrote:
> On 03/15/2010 08:46 AM, Espen Berg wrote:
> >In our KVM system we have two iSCSI backends (master/slave
> >configuration) with failover and two KVM hosts supporting live migration.
> >
> >The iSCSI volumes are shared by the host as
Mov reg, cr instruction doesn't change flags in any meaningful way, so
no need to update rflags after instruction execution.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h |3 +--
arch/x86/kvm/emulate.c |3 +--
arch/x86/kvm/x86.c |4 +---
3 file
Check return value against correct define instead of open code
the value.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 4dce805..670ca8f 100644
--- a/arch/x86/
Set correct operation length. Add RAX (64bit) handling.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |7 +--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 2832a8c..0b70a36 100644
--- a/arch/x86/kvm/emulate.c
This is the first series of patches that tries to cleanup emulator code.
This is mix of bug fixes and moving code that does emulation from x86.c
to emulator.c while making it KVM independent. The status of the patches:
works for me. realtime.flat test now also pass where it failed before.
ChangeLo
It is undefined and should generate #UD.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index c3b9334..7c7debb 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm
Use (get|set)_cr callback to emulate lmsw inside emulator.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h |2 --
arch/x86/kvm/emulate.c |4 ++--
arch/x86/kvm/x86.c |7 ---
3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/
mov r/m, sreg generates #UD ins sreg is incorrect.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |7 +++
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 2c27aa4..c3b9334 100644
--- a/arch/x86/kvm/emulate.c
+++
Resent spec says that for 0f (20|21|22|23) the 2 bits in the mod field
are ignored. Interestingly enough older spec says that 11 is only valid
encoding.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |8
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/arch/x86
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index fa4604e..836e97b 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2520,6 +2520,13 @@ two
Return X86EMUL_PROPAGATE_FAULT is fault was injected. Also inject #UD
for those instruction when appropriate.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 17 +++--
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emu
Use this callback instead of directly call kvm function. Also rename
realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing
to do with real mode.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |3 +-
arch/x86/include/asm/kvm_host.h|2 -
arch/x86
in/out emulation is broken now. The breakage is different depending
on where IO device resides. If it is in userspace emulator reports
emulation failure since it incorrectly interprets kvm_emulate_pio()
return value. If IO device is in the kernel emulation of 'in' will do
nothing since kvm_emulate_
When x86_emulate_insn() does not know how to emulate instruction it
exits via cannot_emulate label in all cases except when emulating
grp3. Fix that.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 12
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/x8
To optimize "rep ins" instruction do IO in big chunks ahead of time
instead of doing it only when required during instruction emulation.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |7 ++
arch/x86/kvm/emulate.c | 43 +++
All struct operand fields are initialized during decoding for all
operand types except OP_MEM, but there is no reason for that. Move
OP_MEM operand initialization into decoding stage for consistency.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 66 +-
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 15 ---
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 6ebd642..a166235 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2407,13 +2407,
Remove old task switch code from x86.c
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/x86.c | 557 ++--
1 files changed, 17 insertions(+), 540 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2ef83db..7d1b481 100644
--- a/arc
Unify all conditions that get us back into emulator after returning from
userspace.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/x86.c | 32 ++--
1 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cd0043a..1
Currently when string instruction is only partially complete we go back
to a guest mode, guest tries to reexecute instruction and exits again
and at this point emulation continues. Avoid all of this by restarting
instruction without going back to a guest mode, but return to a guest
mode each 1024 i
Currently emulation is done outside of emulator so things like doing
ins/outs to/from mmio are broken it also makes it hard (if not impossible)
to implement single stepping in the future. The implementation in this
patch is not efficient since it exits to userspace for each IO while
previous implem
Provide get_cached_descriptor(), set_cached_descriptor(),
get_segment_selector(), set_segment_selector(), get_gdt(),
write_std() callbacks.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h | 16 +
arch/x86/kvm/x86.c | 130 +++--
c->eip is never written back in case of emulation failure, so no need to
set it to old value.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |9 +
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 1bedbb6..541
Implement emulation of 16/32 bit task switch in emulator.c
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |5 +
arch/x86/kvm/emulate.c | 563
2 files changed, 568 insertions(+), 0 deletions(-)
diff --git a/arch/x86/includ
During rep emulation access length to RCX depends on current address
mode.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 0b70a36..4dce805 100644
--- a/arch/x
If LOCK prefix is used dest arg should be memory, otherwise instruction
should generate #UD.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index b89a8f2..46a7ee3 100
Add decoding of X,Y parameters from Intel SDM which are used by string
instruction to specify source and destination. Use this new decoding
to implement movs, cmps, stos, lods in a generic way.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 125 +---
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |1 +
arch/x86/kvm/emulate.c | 15 ---
arch/x86/kvm/x86.c |6 ++
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/arch/x86/include/asm/kvm_emulate.h
b/arch/x86
If CR4.DE=1 access to registers DR4/DR5 cause #UD.
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 18 --
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 836e97b..5afddcf 100644
--- a/arch/x86/kvm/em
Eliminate the need to call back into KVM to get it from emulator.
Signed-off-by: Gleb Natapov
---
arch/x86/include/asm/kvm_emulate.h |3 ++-
arch/x86/kvm/emulate.c | 12 ++--
arch/x86/kvm/x86.c |1 +
3 files changed, 9 insertions(+), 7 deletions(-)
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c | 10 +-
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index db4776c..702bfff 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1508,7 +1508,7 @@ s
Signed-off-by: Gleb Natapov
---
arch/x86/kvm/emulate.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 1393bf0..b89a8f2 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2563,7 +2563,7 @@ twobyte
On Mon, Mar 15, 2010 at 02:03:11PM +0100, Joerg Roedel wrote:
> On Mon, Mar 15, 2010 at 05:53:13AM -0700, Muli Ben-Yehuda wrote:
> > On Mon, Mar 15, 2010 at 02:25:41PM +0200, Avi Kivity wrote:
> > > On 03/10/2010 11:30 PM, Luiz Capitulino wrote:
> >
> > > > Hi there,
> > > >
> > > > Our wiki
On 03/15/2010 04:38 PM, Gleb Natapov wrote:
This is the first series of patches that tries to cleanup emulator code.
This is mix of bug fixes and moving code that does emulation from x86.c
to emulator.c while making it KVM independent. The status of the patches:
works for me. realtime.flat test n
On 03/15/2010 03:23 PM, Anthony Liguori wrote:
On 03/15/2010 08:11 AM, Avi Kivity wrote:
On 03/15/2010 03:03 PM, Joerg Roedel wrote:
I will add another project - iommu emulation. Could be very useful
for doing device assignment to nested guests, which could make
testing a lot easier.
Our ex
Gleb Natapov wrote:
If LOCK prefix is used dest arg should be memory, otherwise instruction
should generate #UD.
Well, there is one exception:
There is an AMD specific "lock mov cr0 = mov cr8" equivalence, where
there is no memory involved (and we intercept this). I am not sure if
anyone actua
On Mon, 15 Mar 2010 12:52:15 +0530 Balbir Singh wrote:
> Selectively control Unmapped Page Cache (nospam version)
>
> From: Balbir Singh
>
> This patch implements unmapped page cache control via preferred
> page cache reclaim. The current patch hooks into kswapd and reclaims
> page cache if the
1 - 100 of 122 matches
Mail list logo