Xiao Guangrong | 1 Jul 2010 02:50
Favicon

Re: [PATCH v3 3/11] KVM: MMU: fix direct sp's access corruptted


Marcelo Tosatti wrote:

>> -		if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep))
>> -			continue;
>> +		if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep)) {
>> +			struct kvm_mmu_page *child;
>> +			unsigned direct_access;
>> +
>> +			if (level != gw->level)
>> +				continue;
> 
> This will skip the check for the sp at level 1 when emulating 1GB pages
> with 4k host pages (where there are direct sp's at level 2 and 1).
> Should be > instead of !=.
> 

Marcelo,

I think the patch is right.

Every level's direct sp has the same access in the mapping since while we setup the
mapping we find the direct sp with the same access.
(Note: we have encode the D bit to the sp->role.access)

Consider guest 1G writable clean pages and host 4K pages, the shadow pages mapping
is like this:

indirect L4 --> indirect L3 --> direct ReadOnly L2 --> direct ReadOnly L1

(Continue reading)

Hidetoshi Seto | 1 Jul 2010 05:30
Favicon

[PATCH] Add QMP/qmp-commands.txt to .gitignore

QMP/qmp-commands.txt is a generated file.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi <at> jp.fujitsu.com>
---
 .gitignore |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index ce66ed5..a32b7c4 100644
--- a/.gitignore
+++ b/.gitignore
 <at>  <at>  -28,6 +28,7  <at>  <at>  qemu-img-cmds.texi
 qemu-img-cmds.h
 qemu-io
 qemu-monitor.texi
+QMP/qmp-commands.txt
 .gdbinit
 *.a
 *.aux
--

-- 
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hidetoshi Seto | 1 Jul 2010 05:31
Favicon

[PATCH] Add vapic.bin to .gitignore

# This patch is for qemu-kvm.git

The vapic.bin is a generated binary file.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi <at> jp.fujitsu.com>
---
 .gitignore |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index ddc248b..26eba20 100644
--- a/.gitignore
+++ b/.gitignore
 <at>  <at>  -53,4 +53,5  <at>  <at>  pc-bios/optionrom/linuxboot.bin
 pc-bios/optionrom/multiboot.bin
 pc-bios/optionrom/multiboot.raw
 pc-bios/optionrom/extboot.bin
+pc-bios/optionrom/vapic.bin
 .stgit-*
--

-- 
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hidetoshi Seto | 1 Jul 2010 05:34
Favicon

Re: [Qemu-devel] [PATCH] QEMU: Update .gitignore

(2010/07/01 6:33), Aurelien Jarno wrote:
> On Mon, Jun 21, 2010 at 06:14:17PM +0900, Hidetoshi Seto wrote:
>> (2010/06/21 17:19), Avi Kivity wrote:
>>> On 06/21/2010 08:24 AM, Hidetoshi Seto wrote:
>>>> I think some people have noticed that:
>>>>
>>>>> $ ./configure
>>>>> $ make
>>>>> $ git status
>>>>> # On branch master
>>>>> # Untracked files:
>>>>> #   (use "git add <file>..." to include in what will be committed)
>>>>> #
>>>>> #       QMP/qmp-commands.txt
>>>>> #       libdis-user/
>>>>> #       libdis/
>>>>> #       pc-bios/optionrom/vapic.bin
>>>>> nothing added to commit but untracked files present (use "git add" to track)
>>>>>     
>>>> Please consider applying this patch to qemu-kvm.git.
>>>
>>> This is equally applicable to qemu.git, so please sent it to the qemu
>>> mailing list, qemu-devel <at> nongnu.org.
>>
>> Thanks for your advice, Avi.
>>
>> Now this mail is sent to qemu ML, w/ above quotes as short history.
>> Could someone pick this up?
>>
>> Thanks,
(Continue reading)

Tom Lyon | 1 Jul 2010 06:30

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

On Wednesday 30 June 2010 09:16:23 pm Alex Williamson wrote:
> On Tue, 2010-06-08 at 14:21 -0700, Tom Lyon wrote:
> > +int vfio_dma_unmap_dm(struct vfio_listener *listener, struct vfio_dma_map *dmp)
> > +{
> > +	unsigned long start, npage;
> > +	struct dma_map_page *mlp;
> > +	struct list_head *pos, *pos2;
> > +	int ret;
> > +
> > +	start = dmp->vaddr & ~PAGE_SIZE;
> > +	npage = dmp->size >> PAGE_SHIFT;
> > +
> > +	ret = -ENXIO;
> > +	mutex_lock(&listener->vdev->dgate);
> > +	list_for_each_safe(pos, pos2, &listener->dm_list) {
> > +		mlp = list_entry(pos, struct dma_map_page, list);
> > +		if (dmp->vaddr != mlp->vaddr || mlp->npage != npage)
> > +			continue;
> > +		ret = 0;
> > +		vfio_dma_unmap(listener, mlp);
> > +		break;
> > +	}
> 
> Hi Tom,
> 
> Shouldn't we be matching the mlp based on daddr instead of vaddr?  We
> can have multiple dma address pointing at the same virtual address, so
> dma address is the unique element.  I'm also nervous about this dm_list.
> For qemu device assignment, we're potentially statically mapping many GB
> of iova space.  It seems like this could get incredibly bloated and
(Continue reading)

Sheng Yang | 1 Jul 2010 09:00
Picon

[PATCH] KVM: Fix IOMMU memslot reference warning

This patch fixes the following warning.

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
include/linux/kvm_host.h:259 invoked rcu_dereference_check() without
protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
no locks held by qemu-system-x86/29679.

stack backtrace:
Pid: 29679, comm: qemu-system-x86 Not tainted 2.6.35-rc3+ #200
Call Trace:
 [<ffffffff810a224e>] lockdep_rcu_dereference+0xa8/0xb1
 [<ffffffffa018a06f>] kvm_iommu_unmap_memslots+0xc9/0xde [kvm]
 [<ffffffffa018a0c4>] kvm_iommu_unmap_guest+0x40/0x4e [kvm]
 [<ffffffffa018f772>] kvm_arch_destroy_vm+0x1a/0x186 [kvm]
 [<ffffffffa01800d0>] kvm_put_kvm+0x110/0x167 [kvm]
 [<ffffffffa0180ecc>] kvm_vcpu_release+0x18/0x1c [kvm]
 [<ffffffff81156f5d>] fput+0x22a/0x3a0
 [<ffffffff81152288>] filp_close+0xb4/0xcd
 [<ffffffff8106599f>] put_files_struct+0x1b7/0x36b
 [<ffffffff81065830>] ? put_files_struct+0x48/0x36b
 [<ffffffff8131ee59>] ? do_raw_spin_unlock+0x118/0x160
 [<ffffffff81065bc0>] exit_files+0x6d/0x75
 [<ffffffff81068348>] do_exit+0x47d/0xc60
 [<ffffffff8177e7b5>] ? _raw_spin_unlock_irq+0x30/0x36
(Continue reading)

SourceForge.net | 1 Jul 2010 09:51
Picon
Favicon

[ kvm-Bugs-2091534 ] Guests see 2 CD drives if one is specified with -drive

Bugs item #2091534, was opened at 2008-09-03 19:27
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2091534&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: qemu
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Roman Yepishev (rtg20)
Assigned to: Nobody/Anonymous (nobody)
Summary: Guests see 2 CD drives if one is specified with -drive

Initial Comment:
Host: 2.6.24-19 (Ubuntu Hardy 8.04.1)
Guest: RHEL5, CentOS 5.2 (2.6.18-92.1.10.el5) on i686, FreeBSD7 on x86_64
Version: kvm-74
BIOS: $Revision: 1.182 $ $Date: 2007/08/01 17:09:51 $

Commandline: 
/usr/bin/kvm -M pc -m 500 -smp 1 -monitor pty \
-drive file=/home/rtg/vm/RHEL/RHEL.img,if=ide,boot=on \
-drive file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso,if=ide,media=cdrom \
-net nic,macaddr=52:54:00:00:00:02,vlan=0 \
-net tap,fd=11,script=,vlan=0 -usb -vnc 127.0.0.1:0
(Continue reading)

SourceForge.net | 1 Jul 2010 09:56
Picon
Favicon

[ kvm-Bugs-2084493 ] unhandled vm exit during init on Lenovo x60s

Bugs item #2084493, was opened at 2008-08-30 23:58
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2084493&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: demiurg (demiurg0420)
Assigned to: Nobody/Anonymous (nobody)
Summary: unhandled vm exit during init on Lenovo x60s

Initial Comment:
Error message attached.

Happens during the first seconds of Windows XP SP2 boot.

Works find with -no-kvm, freezes completely, i.e. the host machine, with -no-kvm-irqchip or -no-kvm-pit

Kernel - 2.6.24.3

Kvm version - 74

host arch - i386
(Continue reading)

SourceForge.net | 1 Jul 2010 09:58
Picon
Favicon

[ kvm-Bugs-2104495 ] kernel double fault (kvm induced?)

Bugs item #2104495, was opened at 2008-09-11 00:12
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2104495&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: kernel
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Shawn starr (sh0nx)
Assigned to: Nobody/Anonymous (nobody)
Summary: kernel double fault (kvm induced?)

Initial Comment:
While using KVM system threw the following exception:

Some apps died and a KVM vm is stuck running and cannot be killed with -9 even.

[ 8498.751013] br0: topology change detected, propagating
[ 8498.751025] br0: port 2(vnet1) entering forwarding state
[11227.894242] dbus-daemon[2911]: segfault at 7fcbfc5b99ed ip 00007fcbfc5b99ed sp 00007fff045d3a50
error 14
[11228.613795] gnome-keyring-d[6197] trap int3 ip:3f9b640e74 sp:7fffd9fa80a0 error:0
[11518.585177] double fault: 0000 [1] SMP DEBUG_PAGEALLOC
[11518.585191] CPU 0 
(Continue reading)

SourceForge.net | 1 Jul 2010 10:00
Picon
Favicon

[ kvm-Bugs-2113643 ] guests AND host still getting stuck under CPU load

Bugs item #2113643, was opened at 2008-09-16 09:34
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2113643&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nikola Ciprich (nikola_ciprich)
Assigned to: Nobody/Anonymous (nobody)
Summary: guests AND host still getting stuck under CPU load

Initial Comment:
I'm experiencing problems with some KVM guests getting stuck for long time
when all their "CPUs" are loaded.
Host: 8xCPU intel, 2.6.26 x86_64, kvm-74, 12GB RAM
Guest: 8XCPU, 2.6.24 x86_64 1GB RAM

while doing kernel compilation on guest (using -j8), the guest sometimes hangs
for long time, and on host I see:
Sep 12 19:04:34 vbox1 [420515.344071] BUG: soft lockup - CPU#3 stuck for 99s! [qemu-system-x86:17351]
Sep 12 19:04:34 vbox1 [420515.344071] Modules linked in: tun bitrev drbd lock_dlm gfs2 cn crc32 dlm
configfs ipmi_si ipmi_devintf ipmi_m
sghandler ipt_REJECT xt_tcpudp xt_multiport nf_conntrack_ipv4 xt_state nf_conntrack
(Continue reading)


Gmane