On Fri, Feb 13, 2009 at 8:23 AM, Jamie Lokier wrote:
>
> Marc.. this is quite a serious bug you've reported. Is there a
> reason you didn't report it earlier?
Because I only started hitting that bug a couple weeks ago after
having upgraded to a buggy kvm version.
> Is there a way to restructur
On Fri, Feb 13, 2009 at 06:12:44PM -0800, Chris Wright wrote:
> This adds a remove_id sysfs entry to allow users of new_id to later
> remove the added dynid. One use case is management tools that want to
> dynamically bind/unbind devices to pci-stub driver while devices are
> assigned to KVM guest
On Sat, Feb 14, 2009 at 01:49:59AM +0800, Matthew Wilcox wrote:
> On Fri, Feb 13, 2009 at 05:56:44PM +0100, Andi Kleen wrote:
> > > + pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl);
> > > + if (ctrl & PCI_SRIOV_CTRL_VFE) {
> > > + pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0);
On Sat, Feb 14, 2009 at 12:56:44AM +0800, Andi Kleen wrote:
> Yu Zhao writes:
> > +
> > +
> > +static int sriov_init(struct pci_dev *dev, int pos)
> > +{
> > + int i;
> > + int rc;
> > + int nres;
> > + u32 pgsz;
> > + u16 ctrl, total, offset, stride;
> > + struct pci_sriov *iov;
> > +
This adds a remove_id sysfs entry to allow users of new_id to later
remove the added dynid. One use case is management tools that want to
dynamically bind/unbind devices to pci-stub driver while devices are
assigned to KVM guests. Rather than having to track which driver was
originally bound to t
Matteo Frigo wrote:
(On kvm-83, gcc complains about passing argument 1 of
'vmx_load_host_state' from incompatible pointer type.)
Yes, should be to_vmx(vcpu). Same value anyway so it works.
Thanks for the terrific support. kvm rocks!
Thanks for the debugging help. kvm users rock!
Avi Kivity writes:
> + vmx_load_host_state(vcpu);
Works here as well (on intel).
(On kvm-83, gcc complains about passing argument 1 of
'vmx_load_host_state' from incompatible pointer type.)
Thanks for the terrific support. kvm rocks!
Regards,
Matteo Frigo
--
To unsubscribe from
Avi Kivity wrote:
Matteo Frigo wrote:
Matteo Frigo writes:
Avi Kivity writes:
Can you run the slightly modified gs.c (attached) and rerun on AMD?
The is to see if the runtime somehow restores gs.
Crashes as follows:
w2k3-64:~$ ./a.exe gs: 2b
gs:0x30: 7efdb000
Segmentation fa
Matteo Frigo wrote:
Matteo Frigo writes:
Avi Kivity writes:
Can you run the slightly modified gs.c (attached) and rerun on AMD?
The is to see if the runtime somehow restores gs.
Crashes as follows:
w2k3-64:~$ ./a.exe
gs: 2b
gs:0x30: 7efdb000
Segmentation fault (core dumpe
Matteo Frigo wrote:
Matteo Frigo writes:
Avi Kivity writes:
Can you run the slightly modified gs.c (attached) and rerun on AMD?
The is to see if the runtime somehow restores gs.
Crashes as follows:
w2k3-64:~$ ./a.exe
gs: 2b
gs:0x30: 7efdb000
Segmentation fault (core dumpe
Martin Maurer wrote:
>> -Original Message-
>> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On
>> Behalf Of David S. Ahern
>> Sent: Donnerstag, 12. Februar 2009 22:46
>> To: qemu-de...@nongnu.org; kvm-devel
>> Subject: running windows xp created by vmware server on kv
Matteo Frigo writes:
> Avi Kivity writes:
>
>> Can you run the slightly modified gs.c (attached) and rerun on AMD?
>> The is to see if the runtime somehow restores gs.
>
> Crashes as follows:
>
> w2k3-64:~$ ./a.exe
> gs: 2b
> gs:0x30: 7efdb000
> Segmentation fault (core dumped)
A little bit mo
Avi Kivity writes:
> Can you run the slightly modified gs.c (attached) and rerun on AMD?
> The is to see if the runtime somehow restores gs.
Crashes as follows:
w2k3-64:~$ ./a.exe
gs: 2b
gs:0x30: 7efdb000
Segmentation fault (core dumped)
--
To unsubscribe from this list: send the line "unsubsc
Matteo Frigo wrote:
Avi Kivity writes:
More questions:
- is the bad 'mov gs' instruction reached on AMD? or is it avoided
somehow? What about bare metal?
The instruction is indeed reached on amd, and gs is 0x2b after
the instruction. I don't know about bare metal.
- does the
Matteo Frigo wrote:
Avi Kivity writes:
More questions:
- is the bad 'mov gs' instruction reached on AMD? or is it avoided
somehow? What about bare metal?
The instruction is indeed reached on amd, and gs is 0x2b after
the instruction. I don't know about bare metal.
- does the
Avi Kivity writes:
> More questions:
> - is the bad 'mov gs' instruction reached on AMD? or is it avoided
> somehow? What about bare metal?
The instruction is indeed reached on amd, and gs is 0x2b after
the instruction. I don't know about bare metal.
> - does the attached program fail when c
Matteo Frigo wrote:
Avi Kivity writes:
- run a cygwin program in an infinite loop (while :; do :; done is
sufficient)
- 'info registers', look at gdt
- 'x/28x 0x$GDT'
I'm interested in offset 0x28, but please provide the whole thing for
sanity checking.
Here it is. This is with npt
Avi Kivity writes:
> Can you rerun on AMD, but set add npt=0 as a kvm-amd module parameter?
> This will determine if this is an mmu bug or kvm-intel bug.
AMD works fine with npt=0, both cygwin and my setjmp()/longjmp() test
program. dmesg confirms that nested paging is disabled.
Regards,
Matte
Avi Kivity writes:
> - run a cygwin program in an infinite loop (while :; do :; done is
> sufficient)
> - 'info registers', look at gdt
> - 'x/28x 0x$GDT'
>
> I'm interested in offset 0x28, but please provide the whole thing for
> sanity checking.
Here it is. This is with npt=1, but npt=0 shows
Does the first or second level guest panic?
Alex
On 13.02.2009, at 18:38, Jeffry Molanus
wrote:
I have applied the patches you suggested and the system boots. The
system boots *very* slow and panics once it boots. I do not have the
dump with me right now but its something in sched.c
Jeffr
Paul Brook wrote:
> > > A simple "Something changed, please try your filter again" callback
> > > automatically covers all these cases.
> >
> > It doesn't, if tap has no memory of how many clients require a filter.
>
> I'm talking about a callback for devices requesting an inbound
> filter. Device
Matteo Frigo wrote:
Avi Kivity writes:
Can you rerun on AMD, but set add npt=0 as a kvm-amd module parameter?
This will determine if this is an mmu bug or kvm-intel bug.
AMD works fine with npt=0, both cygwin and my setjmp()/longjmp() test
program. dmesg confirms that nested paging
Matteo Frigo wrote:
Avi Kivity writes:
Can you rerun on AMD, but set add npt=0 as a kvm-amd module parameter?
This will determine if this is an mmu bug or kvm-intel bug.
AMD works fine with npt=0, both cygwin and my setjmp()/longjmp() test
program. dmesg confirms that nested paging
Glauber Costa wrote:
e$ ./configure --prefix=/usr --with-patched-kernel
Install prefix/usr
BIOS directory/usr/share/qemu
binary directory /usr/bin
Manual directory /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/hns/kvm-userspace/qemu
C compilergcc
Matteo Frigo wrote:
Avi Kivity writes:
- add a watchpoint to break when the value of gs:[0x30] changes
It seems that the problem can be reproduced by compiling the following
simple program using cygwin's gcc. The program crashes on w2k3-amd64
on kvm-83 on core2-duo, and it does not
* Chris Wright (chr...@redhat.com) wrote:
> * Matthew Wilcox (matt...@wil.cx) wrote:
> > I might suggest a second approach which would be to have an explicit
> > echo to the bind file ignore the list of ids. Then you wouldn't need to
> > 'echo -n "8086 10de"' to begin with.
>
> I tried that first
On Fri, 2009-02-13 at 13:07 -0500, Glauber Costa wrote:
> ppc should compile with upstream qemu code, so, put these
> defines in ppc specific code that references kvm functions.
>
> We don put them in config.h in this case, since there are
> files (like vl.c) that includes both kvm.h and qemu-kvm.
* Jamie Lokier (ja...@shareable.org) wrote:
> no reason to believe kvm-83 is "stable", but there's no reason to
> believe any other version of KVM is especially stable either - there's
> no stabilising bug fix only branch that I'm aware of.
There's ad-hoc one w/out formal releases. But...never be
* Matthew Wilcox (matt...@wil.cx) wrote:
> On Fri, Feb 13, 2009 at 04:32:47PM +, Mark McLoughlin wrote:
> > - Conventional PCI devices (i.e. PCI/PCI-X, not PCIe) behind the same
> > bridge must be assigned to the same VT-d domain - i.e given device
> > A (:0f:1.0) and device B (
ppc should compile with upstream qemu code, so, put these
defines in ppc specific code that references kvm functions.
We don put them in config.h in this case, since there are
files (like vl.c) that includes both kvm.h and qemu-kvm.h,
and would break compilation.
Signed-off-by: Glauber Costa
---
On Fri, Feb 13, 2009 at 05:56:44PM +0100, Andi Kleen wrote:
> > + pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl);
> > + if (ctrl & PCI_SRIOV_CTRL_VFE) {
> > + pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0);
> > + msleep(100);
>
> That's really long. Hopefully t
I have applied the patches you suggested and the system boots. The
system boots *very* slow and panics once it boots. I do not have the
dump with me right now but its something in sched.c
Jeffry
On Thu, Feb 12, 2009 at 6:25 PM, Alexander Graf wrote:
> Jeffry Molanus wrote:
>> Ps. I did try the -
On Fri, Feb 13, 2009 at 04:32:47PM +, Mark McLoughlin wrote:
> Hi,
You raise some interesting points. Thanks for doing that rather than
going off and creating a big pile of patches and demanding they be
applied ;-)
> This gets confusing, so some background constraints first:
>
> - Convent
On Fri, Feb 13, 2009 at 01:29:42PM +0800, Sheng Yang wrote:
> The allocation only happen once, at the second time it would report error in
> current code. But allocate/deallocate is also acceptable for future.
Oops, it OK.
> > - interrupt context can read the table while kvm_vm_ioctl_set_msix_e
On Fri, Feb 13, 2009 at 11:37:45AM +0800, Sheng Yang wrote:
> > > +#define KVM_ASSIGNED_DEV_MSIX((1 << 2) | (1 << 10))
> >
> > Can you explain the usage of the two bits?
>
> Um... Just to keep consistent with formers(one for guest and one for host),
> at
> cost of one bit.
OK
> > C
On Fri, 2009-02-13 at 08:56 -0800, Greg KH wrote:
> On Fri, Feb 13, 2009 at 04:32:47PM +, Mark McLoughlin wrote:
> > Driver Unbinding
> >
> >
> > Before a device is assigned to a guest, we should make sure that no host
> > device driver is currently bound to the device.
> >
>
> > A simple "Something changed, please try your filter again" callback
> > automatically covers all these cases.
>
> It doesn't, if tap has no memory of how many clients require a filter.
I'm talking about a callback for devices requesting an inbound filter. Devices
implementing outgoing (device
On Fri, Feb 13, 2009 at 04:32:47PM +, Mark McLoughlin wrote:
> Driver Unbinding
>
>
> Before a device is assigned to a guest, we should make sure that no host
> device driver is currently bound to the device.
>
> We can do that with e.g.
>
> $> echo -n "8086 10de" > /sys/b
Yu Zhao writes:
> +
> +
> +static int sriov_init(struct pci_dev *dev, int pos)
> +{
> + int i;
> + int rc;
> + int nres;
> + u32 pgsz;
> + u16 ctrl, total, offset, stride;
> + struct pci_sriov *iov;
> + struct resource *res;
> + struct pci_dev *pdev;
> +
> + if
Paul Brook wrote:
> > Well, you do need some way to notify a client that the filter which
> > used to work has been removed because it's no longer available, for
> > example when migrating between host kernels.
>
> This is actually more evidence that the "add" and "remove" callbacks are
> bogus.
Hi,
KVM has support for PCI device assignment using VT-d and AMD IOMMU, but
there are a number of inter-related issues that need some further
discussion:
- Unbinding devices from any existing device driver before assignment
- Resetting devices before and after assignment
- Helping users f
Marc Bevand schrieb:
> I tested kvm-81 and kvm-83 as well (can't test kvm-80 or older
> because of the qcow2 performance regression caused by the default
> writethrough caching policy) but it randomly triggers an even worse
> bug: the moment I shut down a guest by typing "quit" in the monitor,
> it
On Friday 13 February 2009, Jamie Lokier wrote:
> Paul Brook wrote:
> > > We could use a changed() function, but it would need to know the
> > > direction of the change, which leads back to the same mechanics. If
> > > there's a better way, please suggest it. Thanks,
> >
> > I still don't see why
On Thu, Feb 12, 2009 at 11:56 PM, Ross McKay wrote:
> dnjap wrote:
>
>>I'm looking for a laptop on which I can run KVM.
>>
>>1. Does anyone have a list of AMD-V or VT-x capable laptop CPU's?
http://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors
The header before each chart lists whic
Paul Brook wrote:
> > We could use a changed() function, but it would need to know the
> > direction of the change, which leads back to the same mechanics. If
> > there's a better way, please suggest it. Thanks,
>
> I still don't see why the device needs to know what's changed. The response
> s
> - A device requests a filter and is told if the request is successful
> - On success the device may skip it's own filtering
> - If another vlan client is added, the following _must_ occur:
> - The "filterer" must clear (remove) the filter
> - The "filteree" must revert to using their own fi
Hi Marc,
You should not take qemu-devel out of the CC list. This is where the
bugs need to be fixed, they aren't KVM specific. I'm quoting your
complete mail to forward it to where it belongs.
Marc Bevand schrieb:
> Jamie Lokier shareable.org> writes:
>> As you see from the subject, I'm getting
free_assigned_device just frees device from qemu, it should also
deassign the device from guest when guest exits or hot remove
a device.
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
qemu/hw/device-assignment.c | 28 ++--
qemu/hw/device-assignment.h |1 +
when hot remove the assigned device with iommu, it should
deassign it from guest and free it from qemu.
assign_dev_update_irqs may not be invoked when hot add a device,
so need to assign irq after device assignment in
init_assigned_device.
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
--
just wrap assign_device and assign_irq, no functional changes
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
qemu/hw/device-assignment.c | 121 +--
1 files changed, 70 insertions(+), 51 deletions(-)
diff --git a/qemu/hw/device-assignment.c b/q
make init_assigned_device call free_assigned_device on error,
and then make free_assigned_device is static because it's only
invoked in device-assigned.c.
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
qemu/hw/device-assignment.c | 12
qemu/hw/device-assignment.h |1
add this to support hot remove device with iommu
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
libkvm/libkvm.c | 14 ++
libkvm/libkvm.h | 13 +
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 92ffe10.
define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE
for device deassignment.
the ioctl has been already implemented in the
commit: 0a920356748df4fb06e86c21c23d2ed6d31d37ad
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
include/linux/kvm.h |5 +
1 files changed, 5 i
Changelog from v2 -> v3:
only need to set assigned_dev_id for deassignment in userspace, and use
match->flags to judge and deassign it in kvm ioctl.
Regards,
Weidong--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majord
only need to set assigned_dev_id for deassignment, use
match->flags to judge and deassign it.
Acked-by: Mark McLoughlin
Signed-off-by: Weidong Han
---
virt/kvm/kvm_main.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ef
Mark McLoughlin wrote:
> On Fri, 2009-02-13 at 14:58 +0800, Han, Weidong wrote:
>> +static void deassign_device(AssignedDevInfo *adev) +{
>> +struct kvm_assigned_pci_dev assigned_dev_data;
>> +AssignedDevice *dev = adev->assigned_dev;
>> +int r;
>> +
>> +memset(&assigned_dev_data, 0
On Fri, 2009-02-13 at 14:58 +0800, Han, Weidong wrote:
> +static void deassign_device(AssignedDevInfo *adev)
> +{
> +struct kvm_assigned_pci_dev assigned_dev_data;
> +AssignedDevice *dev = adev->assigned_dev;
> +int r;
> +
> +memset(&assigned_dev_data, 0, sizeof(assigned_dev_data));
57 matches
Mail list logo