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));
+
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,
only need to set assigned_dev_id for deassignment, use
match-flags to judge and deassign it.
Acked-by: Mark McLoughlin mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
virt/kvm/kvm_main.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git
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 mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
add this to support hot remove device with iommu
Acked-by: Mark McLoughlin mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
libkvm/libkvm.c | 14 ++
libkvm/libkvm.h | 13 +
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git
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 mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
qemu/hw/device-assignment.c | 12
just wrap assign_device and assign_irq, no functional changes
Acked-by: Mark McLoughlin mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
qemu/hw/device-assignment.c | 121 +--
1 files changed, 70 insertions(+), 51 deletions(-)
diff
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 mar...@redhat.com
Signed-off-by: Weidong Han weidong@intel.com
---
qemu/hw/device-assignment.c | 28
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 jamie at shareable.org writes:
As you see from the subject, I'm
- 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 filtering
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
should
On Thu, Feb 12, 2009 at 11:56 PM, Ross McKay ro...@zeta.org.au 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
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 the device
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
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
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.
I agree,
Yu Zhao yu.z...@intel.com 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;
+
+
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
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-vlan)
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.
We can do
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
Can drop the
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
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:
-
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 ag...@suse.de wrote:
Jeffry Molanus wrote:
Ps. I
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 that's
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
* 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 (and
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.h,
* 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, and it
Matteo Frigo wrote:
Avi Kivity a...@redhat.com 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,
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 a...@redhat.com 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
Matteo Frigo wrote:
Avi Kivity a...@redhat.com 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
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. Devices implementing
Does the first or second level guest panic?
Alex
On 13.02.2009, at 18:38, Jeffry Molanus jeffry.mola...@gmail.com
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
Avi Kivity a...@redhat.com 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
Avi Kivity a...@redhat.com 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.
Matteo Frigo wrote:
Avi Kivity a...@redhat.com 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.
Avi Kivity a...@redhat.com 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
Matteo Frigo wrote:
Avi Kivity a...@redhat.com 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.
Matteo Frigo wrote:
Avi Kivity a...@redhat.com 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.
Avi Kivity a...@redhat.com 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
Matteo Frigo ath...@fftw.org writes:
Avi Kivity a...@redhat.com 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
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 kvm/qemu
Matteo Frigo wrote:
Matteo Frigo ath...@fftw.org writes:
Avi Kivity a...@redhat.com 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
Avi Kivity a...@redhat.com 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
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!
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
On Sat, Feb 14, 2009 at 12:56:44AM +0800, Andi Kleen wrote:
Yu Zhao yu.z...@intel.com 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;
+
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 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 guests.
On Fri, Feb 13, 2009 at 8:23 AM, Jamie Lokier ja...@shareable.org 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
52 matches
Mail list logo