Re: [PATCH] release kvmclock page on reset

2011-01-29 Thread Jan Kiszka
On 2011-01-29 03:07, Glauber Costa wrote: On Fri, 2011-01-28 at 22:09 +0100, Jan Kiszka wrote: On 2011-01-28 20:48, Glauber Costa wrote: Up to know, we were relying on guest cooperation to turn off kvmclock. I just realized that even though this is fine and nice, a more robust method is to

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini pbonz...@redhat.com: On 01/28/2011 04:31 PM, Yoshiaki Tamura wrote: That's the hack I was imaging:) So your original patch is also a hack? :) TBH, yeah :) I didn't came up better idea that is not over engineered. Maybe this is just an issue of preference, but I'm

Re: Zero-copy block driver?

2011-01-29 Thread Stefan Hajnoczi
2011/1/29 Darko Petrović darko.b.petro...@gmail.com: Could you please tell me if it is possible to use a block driver that completely avoids the guest kernel and copies block data directly to/from the given buffer in the guest userspace? If yes, how to activate it? If not... why not? :)

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Paolo Bonzini
On 01/29/2011 10:31 AM, Yoshiaki Tamura wrote: OK, then while keeping -incoming kemari:tcp:host:port as a strong solution, could you please explain why placing the original parser under tcp handler wasn't a good idea? With that, -incoming exec .*,ft_mode shouldn't be a problem. But a

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini pbonz...@redhat.com: On 01/29/2011 10:31 AM, Yoshiaki Tamura wrote: OK, then while keeping -incoming kemari:tcp:host:port as a strong solution, could you please explain why placing the original parser under tcp handler wasn't a good idea?  With that, -incoming exec

Re: Zero-copy block driver?

2011-01-29 Thread Darko Petrović
Thanks for your help. Actually, I am more interested in doing it from the outside, if possible (I am not allowed to change the application code). Can the guest be tricked by KVM somehow, using the appropriate drivers? Just to clear it out, copying to/from a host buffer is fine, I just want to

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Paolo Bonzini
On 01/29/2011 12:32 PM, Yoshiaki Tamura wrote: But a hypothetical -incoming unix.*,ft_mode would have to be implemented twice. You mean Kemari should be able to use with unix domain sockets, or other local communication patch? Since Kemari needs two remote hosts, I don't see why need to

Re: Zero-copy block driver?

2011-01-29 Thread Stefan Hajnoczi
2011/1/29 Darko Petrović darko.b.petro...@gmail.com: Thanks for your help. Actually, I am more interested in doing it from the outside, if possible (I am not allowed to change the application code). Can the guest be tricked by KVM somehow, using the appropriate drivers? Just to clear it out,

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini pbonz...@redhat.com: On 01/29/2011 12:32 PM, Yoshiaki Tamura wrote:  But a hypothetical -incoming unix.*,ft_mode would have to be implemented  twice. You mean Kemari should be able to use with unix domain sockets, or other local communication patch?  Since Kemari

[PATCH 00/13] AMD IOMMU emulation patchset

2011-01-29 Thread Eduard - Gabriel Munteanu
Hi everybody, I'm a bit late, I know, school kept me busy. But here it is. I hope I answered your previous concerns in this patchset. Let me know what you think, I hope this gets merged soon. Some testing would be great. The patchset is based on mst/pci. I'll send the SeaBIOS patches soon.

[PATCH 01/13] Generic DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This introduces replacements for memory access functions like cpu_physical_memory_read(). The new interface can handle address translation and access checking through an IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |2 +- hw/dma_rw.c |

[PATCH 02/13] pci: add IOMMU support via the generic DMA layer

2011-01-29 Thread Eduard - Gabriel Munteanu
IOMMUs can now be hooked onto the PCI bus. This makes use of the generic DMA layer. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/pci.c |7 +++ hw/pci.h |7 +++ hw/pci_internals.h |1 + 3 files changed, 15 insertions(+), 0

[PATCH 03/13] AMD IOMMU emulation

2011-01-29 Thread Eduard - Gabriel Munteanu
This introduces emulation for the AMD IOMMU, described in AMD I/O Virtualization Technology (IOMMU) Specification. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |2 +- hw/amd_iommu.c | 694 +++

[PATCH 04/13] ide: use the DMA memory access interface for PCI IDE controllers

2011-01-29 Thread Eduard - Gabriel Munteanu
Emulated PCI IDE controllers now use the memory access interface. This also allows an emulated IOMMU to translate and check accesses. Map invalidation results in cancelling DMA transfers. Since the guest OS can't properly recover the DMA results in case the mapping is changed, this is a fairly

[PATCH 05/13] rtl8139: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/rtl8139.c | 100 +- 1 files changed, 57 insertions(+), 43 deletions(-) diff --git a/hw/rtl8139.c

[PATCH 06/13] eepro100: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/eepro100.c | 97 +--- 1 files changed, 57 insertions(+), 40 deletions(-) diff --git a/hw/eepro100.c

[PATCH 08/13] es1370: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/es1370.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 40cb48c..8b1a405 100644 ---

[PATCH 07/13] ac97: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/ac97.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index d71072d..383c1b3 100644 --- a/hw/ac97.c +++

[PATCH 09/13] e1000: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/e1000.c | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index af101bd..0d71650

[PATCH 11/13] pcnet: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/pcnet-pci.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 339a401..3f55c42 100644 ---

[PATCH 12/13] usb-uhci: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/usb-uhci.c | 26 ++ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index

[PATCH 13/13] usb-ohci: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/usb-ohci.c | 54 +- 1 files changed, 37 insertions(+), 17 deletions(-) diff --git a/hw/usb-ohci.c

[PATCH 10/13] lsi53c895a: use the DMA memory access interface

2011-01-29 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/lsi53c895a.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index

Re: [PATCH 00/13] AMD IOMMU emulation patchset

2011-01-29 Thread malc
On Sat, 29 Jan 2011, Eduard - Gabriel Munteanu wrote: Hi everybody, I'm a bit late, I know, school kept me busy. But here it is. I hope I answered your previous concerns in this patchset. Let me know what you think, I hope this gets merged soon. Some testing would be great. The

[PATCH] Recognize parameters surrounded by quotes v2

2011-01-29 Thread Lucas Meneghel Rodrigues
Sometime we need to pass the parameters which contains blanks and it is usually done through surrounding it with quotes. So this patch use re.findall() to try to recognize the parameter surrounded by quotes and pass it as one single argument to the control file. Kvm subtest would first benefit

[PATCH -v2 0/3] KVM, Replace is_hwpoison_address with __get_user_pages

2011-01-29 Thread Huang Ying
v2: - Export __get_user_pages, because we need other get_user_pages variants too. [PATCH -v2 1/3] mm, export __get_user_pages [PATCH -v2 2/3] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally [PATCH -v2 3/3] KVM, Replace is_hwpoison_address with __get_user_pages -- To

[PATCH -v2 2/3] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally

2011-01-29 Thread Huang Ying
Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON pages from general FAULT pages, while other callers will still get -EFAULT for all these pages, so the user space interface need not to be

[PATCH -v2 3/3] KVM, Replace is_hwpoison_address with __get_user_pages

2011-01-29 Thread Huang Ying
is_hwpoison_address only checks whether the page table entry is hwpoisoned, regardless the memory page mapped. While __get_user_pages will check both. QEMU will clear the poisoned page table entry (via unmap/map) to make it possible to allocate a new memory page for the virtual address across

[PATCH -v2 1/3] mm, export __get_user_pages

2011-01-29 Thread Huang Ying
In most cases, get_user_pages and get_user_pages_fast should be used to pin user pages in memory. But sometimes, some special flags except FOLL_GET, FOLL_WRITE and FOLL_FORCE are needed, for example in following patch, KVM needs FOLL_HWPOISON. To support these users, __get_user_pages is exported

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-29 Thread Sheng Yang
(Sorry, missed this mail...) On Mon, Jan 17, 2011 at 02:29:44PM +0200, Avi Kivity wrote: On 01/06/2011 12:19 PM, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. +int kvm_assigned_device_update_msix_mask_bit(struct kvm *kvm, +

[PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- Documentation/kvm/api.txt | 47 + 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..e6b7a1d 100644 ---

[PATCH 1/3] KVM: Move struct kvm_io_device to kvm_host.h

2011-01-29 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h Signed-off-by: Sheng Yang sh...@linux.intel.com --- include/linux/kvm_host.h | 23 +++ virt/kvm/iodev.h | 25 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-29 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c |8 +- include/linux/kvm.h | 21 include/linux/kvm_host.h | 25 virt/kvm/assigned-dev.c | 44

[PATCH 0/3 v8] MSI-X MMIO support for KVM

2011-01-29 Thread Sheng Yang
Change from v7: Update according to Marcelo and Avi's comments. BTW: I would be on vacation for Chinese New Year soon, and would be back mid Feb. Sheng Yang (3): KVM: Move struct kvm_io_device to kvm_host.h KVM: Emulate MSI-X table in kernel KVM: Add documents for MSI-X MMIO API

[PATCH 0/4 v8] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-29 Thread Sheng Yang
Update with kernel patches v8. Sheng Yang (4): qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit qemu-kvm: Ioctl for MSIX MMIO support qemu-kvm: Header file update for MSI-X MMIO support qemu-kvm: MSI-X MMIO support for assigned device

[PATCH 4/4] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 93 +-- hw/device-assignment.h |3 ++ qemu-kvm.c | 40 qemu-kvm.h | 11 ++ 4 files changed, 135 insertions(+), 12

[PATCH 2/4] qemu-kvm: Ioctl for MSIX MMIO support

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm.c | 14 ++ qemu-kvm.h |7 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 471306b..956b62a 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1050,6 +1050,20 @@ int

[PATCH 3/4] qemu-kvm: Header file update for MSI-X MMIO support

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm/include/linux/kvm.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..7b6d5b9 100644 --- a/kvm/include/linux/kvm.h +++

[PATCH 1/4] qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit

2011-01-29 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang sh...@linux.intel.com ---