Re: [Qemu-devel] [PATCH] intel_iommu: fix VTD_SID_TO_BUS

2014-10-20 Thread Le Tan
Hi Markus, 2014-10-20 19:41 GMT+08:00 Markus Armbruster arm...@redhat.com: Michael S. Tsirkin m...@redhat.com writes: (((sid) 8) 0xff) makes no sense (((sid) 8) 0xff) seems to be what was meant. Suggested-by: Markus Armbruster arm...@redhat.com Actually by the reporter of

Re: [Qemu-devel] [PATCH v4 0/8] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-08-29 Thread Le Tan
Hi, 2014-08-29 5:12 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Sat, Aug 16, 2014 at 01:55:36PM +0800, Le Tan wrote: Hi, These patches are intended to introduce Intel IOMMU (VT-d) emulation to q35 chipset. The major job in these patches is to add support for emulating Intel IOMMU

[Qemu-devel] [PATCH v4 5/8] intel-iommu: fix coding style issues around in q35.c and machine.c

2014-08-16 Thread Le Tan
Fix coding style issues around in hw/pci-host/q35.c and hw/core/machine.c. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/core/machine.c | 10 +++--- hw/pci-host/q35.c | 11 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c

[Qemu-devel] [PATCH v4 7/8] intel-iommu: add context-cache to cache context-entry

2014-08-16 Thread Le Tan
the cached entries. Each VTDContextCacheEntry will have a context_cache_gen and the cached entry is valid only when context_cache_gen equals IntelIOMMUState.context_cache_gen. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/intel_iommu.c | 188

[Qemu-devel] [PATCH v4 6/8] intel-iommu: add supports for queued invalidation interface

2014-08-16 Thread Le Tan
Add supports for queued invalidation interface, an expended invalidation interface with extended capabilities. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/intel_iommu.c | 373 - hw/i386/intel_iommu_internal.h | 27 ++- 2 files changed

Re: [Qemu-devel] [PATCH v3 0/5] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-08-15 Thread Le Tan
Hi Knut, 2014-08-15 19:15 GMT+08:00 Knut Omang knut.om...@oracle.com: On Fri, 2014-08-15 at 06:42 +0200, Knut Omang wrote: On Thu, 2014-08-14 at 14:10 +0200, Jan Kiszka wrote: On 2014-08-14 13:15, Michael S. Tsirkin wrote: On Mon, Aug 11, 2014 at 03:04:57PM +0800, Le Tan wrote: Hi

[Qemu-devel] [PATCH v4 2/8] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-08-15 Thread Le Tan
Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement the logics for DMAR (DMA remapping) without PASID support. The emulation supports register-based invalidation and primary fault logging. Signed-off-by: Le Tan tamlokv...@gmail.com

[Qemu-devel] [PATCH v4 0/8] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-08-15 Thread Le Tan
=on|off Thanks very much! Git trees: https://github.com/tamlok/qemu Le Tan (8): iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps intel-iommu: introduce Intel IOMMU (VT-d) emulation intel-iommu: add DMAR table to ACPI tables intel-iommu: add Intel IOMMU

[Qemu-devel] [PATCH v4 1/8] iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps

2014-08-15 Thread Le Tan
Add a bool variable is_write as a parameter to the translate function of MemoryRegionIOMMUOps to indicate the operation of the access. It can be used for correct fault reporting from within the callback. Change the interface of related functions. Signed-off-by: Le Tan tamlokv...@gmail.com

[Qemu-devel] [PATCH v4 4/8] intel-iommu: add Intel IOMMU emulation to q35 and add a machine option iommu as a switch

2014-08-15 Thread Le Tan
() to setup q35_host_dma_iommu() as the IOMMU function for the pci bus. 3. q35_host_dma_iommu() will return different address space according to the bus_num and devfn of the device. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/core/machine.c | 17 + hw/pci-host/q35.c

Re: [Qemu-devel] [PATCH v3 4/5] intel-iommu: add Intel IOMMU emulation to q35 and add a machine option iommu as a switch

2014-08-14 Thread Le Tan
2014-08-14 19:12 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Mon, Aug 11, 2014 at 03:05:01PM +0800, Le Tan wrote: Add Intel IOMMU emulation to q35 chipset and expose it to the guest. 1. Add a machine option. Users can use -machine iommu=on|off in the command line to enable/disable Intel

Re: [Qemu-devel] [PATCH v3 3/5] intel-iommu: add DMAR table to ACPI tables

2014-08-14 Thread Le Tan
Hi Michael, 2014-08-14 19:06 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Mon, Aug 11, 2014 at 03:05:00PM +0800, Le Tan wrote: Expose Intel IOMMU to the BIOS. If object of TYPE_INTEL_IOMMU_DEVICE exists, add DMAR table to ACPI RSDT table. For now the DMAR table indicates

Re: [Qemu-devel] [PATCH v3 4/5] intel-iommu: add Intel IOMMU emulation to q35 and add a machine option iommu as a switch

2014-08-14 Thread Le Tan
2014-08-14 19:35 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Thu, Aug 14, 2014 at 07:33:29PM +0800, Le Tan wrote: 2014-08-14 19:12 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Mon, Aug 11, 2014 at 03:05:01PM +0800, Le Tan wrote: Add Intel IOMMU emulation to q35 chipset and expose

Re: [Qemu-devel] [PATCH v3 3/5] intel-iommu: add DMAR table to ACPI tables

2014-08-14 Thread Le Tan
2014-08-14 19:51 GMT+08:00 Jan Kiszka jan.kis...@web.de: On 2014-08-14 13:43, Michael S. Tsirkin wrote: On Thu, Aug 14, 2014 at 01:36:49PM +0200, Jan Kiszka wrote: On 2014-08-14 13:06, Michael S. Tsirkin wrote: On Mon, Aug 11, 2014 at 03:05:00PM +0800, Le Tan wrote: Expose Intel IOMMU

Re: [Qemu-devel] [PATCH v3 2/5] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-08-12 Thread Le Tan
Hi Jan, 2014-08-12 15:34 GMT+08:00 Jan Kiszka jan.kis...@web.de: On 2014-08-11 09:04, Le Tan wrote: Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement the logics for DMAR (DMA remapping) without PASID support. The emulation

[Qemu-devel] [PATCH v3 0/5] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-08-11 Thread Le Tan
trees: https://github.com/tamlok/qemu Le Tan (5): iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps intel-iommu: introduce Intel IOMMU (VT-d) emulation intel-iommu: add DMAR table to ACPI tables intel-iommu: add Intel IOMMU emulation to q35 and add

[Qemu-devel] [PATCH v3 5/5] intel-iommu: add supports for queued invalidation interface

2014-08-11 Thread Le Tan
Add supports for queued invalidation interface, an expended invalidation interface with extended capabilities. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/intel_iommu.c | 381 - hw/i386/intel_iommu_internal.h | 15 +- 2 files changed

[Qemu-devel] [PATCH v3 2/5] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-08-11 Thread Le Tan
Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement the logics for DMAR (DMA remapping) without PASID support. The emulation supports register-based invalidation and primary fault logging. Signed-off-by: Le Tan tamlokv...@gmail.com

[Qemu-devel] [PATCH v3 3/5] intel-iommu: add DMAR table to ACPI tables

2014-08-11 Thread Le Tan
Expose Intel IOMMU to the BIOS. If object of TYPE_INTEL_IOMMU_DEVICE exists, add DMAR table to ACPI RSDT table. For now the DMAR table indicates that there is only one hardware unit without INTR_REMAP capability on the platform. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/acpi-build.c

[Qemu-devel] [PATCH v3 1/5] iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps

2014-08-11 Thread Le Tan
Add a bool variable is_write as a parameter to the translate function of MemoryRegionIOMMUOps to indicate the operation of the access. It can be used for correct fault reporting from within the callback. Change the interface of related functions. Signed-off-by: Le Tan tamlokv...@gmail.com

[Qemu-devel] [PATCH v3 4/5] intel-iommu: add Intel IOMMU emulation to q35 and add a machine option iommu as a switch

2014-08-11 Thread Le Tan
() to setup q35_host_dma_iommu() as the IOMMU function for the pci bus. 3. q35_host_dma_iommu() will return different address space according to the bus_num and devfn of the device. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/core/machine.c | 27 +--- hw/pci-host/q35.c

[Qemu-devel] About the VT-d features that q35 chipset supports

2014-08-05 Thread Le Tan
Hi, I am now adding features to the VT-d emulation for q35 chipset. I think it is good to know what features q35 chipset supports exactly. However I can't find materials about this. Does anyone know this? Or it will be fine if someone can tell me the value of the Capability Register and Extended

Re: [Qemu-devel] About the VT-d features that q35 chipset supports

2014-08-05 Thread Le Tan
Hi Jan, 2014-08-06 1:08 GMT+08:00 Jan Kiszka jan.kis...@web.de: On 2014-08-05 14:55, Le Tan wrote: Hi, I am now adding features to the VT-d emulation for q35 chipset. I think it is good to know what features q35 chipset supports exactly. However I can't find materials about this. Does anyone

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-08-01 Thread Le Tan
2014-08-01 23:25 GMT+08:00 Alex Williamson alex.william...@redhat.com: On Fri, 2014-08-01 at 09:35 +0800, Le Tan wrote: Hi Alex, 2014-07-30 22:46 GMT+08:00 Alex Williamson alex.william...@redhat.com: On Wed, 2014-07-30 at 22:16 +0800, Le Tan wrote: Hi Michael, 2014-07-30 21:16 GMT+08

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-31 Thread Le Tan
Hi Alex, 2014-07-30 22:46 GMT+08:00 Alex Williamson alex.william...@redhat.com: On Wed, 2014-07-30 at 22:16 +0800, Le Tan wrote: Hi Michael, 2014-07-30 21:16 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote: Hi, I am testing vfio in L1

[Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-30 Thread Le Tan
Hi, I am testing vfio in L1 with my VT-d emulation project. I assigned one of the two AHCI controllers in L1 to L2 via vfio. After I ran the QEMU in L1, it complains that: qemu-system-x86_64: vfio: Cannot reset device :00:03.0, no available reset mechanism. qemu-system-x86_64: vfio: Cannot

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-07-30 Thread Le Tan
Hi Michael, 2014-07-30 21:16 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote: Hi, I am testing vfio in L1 with my VT-d emulation project. I assigned one of the two AHCI controllers in L1 to L2 via vfio. After I ran the QEMU in L1

[Qemu-devel] [PATCH v2 0/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-07-27 Thread Le Tan
definitions according to QEMU standard -rename some CSRs access functions -use endian-save functions to access CSRs -change machine option to iommu=on|off Thanks very much! Git trees: https://github.com/tamlok/qemu Le Tan (3): intel-iommu: introduce Intel IOMMU (VT-d) emulation intel-iommu

[Qemu-devel] [PATCH v2 1/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-07-27 Thread Le Tan
are not implemented yet. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/Makefile.objs | 1 + hw/i386/intel_iommu.c | 911 + hw/i386/intel_iommu_internal.h | 257 include/hw/i386/intel_iommu.h | 75 4 files changed

[Qemu-devel] [PATCH v2 2/3] intel-iommu: add DMAR table to ACPI tables

2014-07-27 Thread Le Tan
Expose Intel IOMMU to the BIOS. If object of TYPE_INTEL_IOMMU_DEVICE exists, add DMAR table to ACPI RSDT table. For now the DMAR table indicates that there is only one hardware unit without INTR_REMAP capability on the platform. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH 1/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-07-23 Thread Le Tan
Hi Paolo, 2014-07-23 15:58 GMT+08:00 Paolo Bonzini pbonz...@redhat.com: Il 22/07/2014 17:47, Le Tan ha scritto: +static inline void define_quad(IntelIOMMUState *s, hwaddr addr, uint64_t val, +uint64_t wmask, uint64_t w1cmask) +{ +*((uint64_t *)s-csr[addr]) = val

Re: [Qemu-devel] [PATCH 1/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-07-23 Thread Le Tan
Hi Stefan, 2014-07-24 4:29 GMT+08:00 Stefan Weil s...@weilnetz.de: Am 22.07.2014 17:47, schrieb Le Tan: Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement the logic for DMAR (DMA remapping) without PASID support. Use register-based

[Qemu-devel] [PATCH 2/3] intel-iommu: add DMAR table to ACPI tables

2014-07-22 Thread Le Tan
Expose Intel IOMMU to the BIOS. If object of TYPE_INTEL_IOMMU_DEVICE exists, add DMAR table to ACPI RSDT table. For now the DMAR table indicates that there is only one hardware unit without INTR_REMAP capability on the platform. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/acpi-build.c

[Qemu-devel] [PATCH 1/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-07-22 Thread Le Tan
are not implemented yet. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/i386/Makefile.objs |1 + hw/i386/intel_iommu.c | 1139 + include/hw/i386/intel_iommu.h | 350 + 3 files changed, 1490 insertions(+) create mode 100644 hw

[Qemu-devel] [PATCH 0/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation to q35 chipset

2014-07-22 Thread Le Tan
to migration. Thanks very much! Git trees: https://github.com/tamlok/qemu/commits/q35-iommu-v2 Le Tan (3): intel-iommu: introduce Intel IOMMU (VT-d) emulation intel-iommu: add DMAR table to ACPI tables intel-iommu: add Intel IOMMU emulation to q35 and add a machine option vtd as a switch hw

[Qemu-devel] [PATCH 3/3] intel-iommu: add Intel IOMMU emulation to q35 and add a machine option vtd as a switch

2014-07-22 Thread Le Tan
() to setup q35_host_dma_iommu() as the IOMMU function for the pci bus. 3. q35_host_dma_iommu() will return different address space according to the bus_num and devfn of the device. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/core/machine.c | 27 -- hw/pci-host/q35.c

Re: [Qemu-devel] [PATCH 1/3] intel-iommu: introduce Intel IOMMU (VT-d) emulation

2014-07-22 Thread Le Tan
Hi Michael, Thanks very much for your careful reviewing! 2014-07-23 4:05 GMT+08:00 Michael S. Tsirkin m...@redhat.com: On Tue, Jul 22, 2014 at 11:47:48PM +0800, Le Tan wrote: Add support for emulating Intel IOMMU according to the VT-d specification for the q35 chipset machine. Implement

[Qemu-devel] How to decide the value of Host Address Width in ACPI DMAR table

2014-07-05 Thread Le Tan
. What is the best way to decide the value of HAW? Any suggestion is appreciated. :) Thanks very much! Regards, Le Tan

[Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2014-07-03 Thread Le Tan
(), we should pass the AHCIState.as as the AddressSpace argument. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/ide/ahci.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 9bae22e..7bb0a03 100644 --- a/hw/ide

Re: [Qemu-devel] Why devfn will be -1

2014-07-01 Thread Le Tan
Hi Jan, 2014-07-01 15:34 GMT+08:00 Jan Kiszka jan.kis...@web.de: Hi Le, On 2014-07-01 04:34, Le Tan wrote: Hi Jan, I use pci_setup_iommu() to setup a PCIIOMMUFunc for the q35 pci bus. In the iommu_fn, I print out the devfn parameter and find out that it sometimes will be -1. So what does

Re: [Qemu-devel] Why devfn will be -1

2014-07-01 Thread Le Tan
2014-07-01 20:52 GMT+08:00 Le Tan tamlokv...@gmail.com: Hi Jan, 2014-07-01 15:34 GMT+08:00 Jan Kiszka jan.kis...@web.de: Hi Le, On 2014-07-01 04:34, Le Tan wrote: Hi Jan, I use pci_setup_iommu() to setup a PCIIOMMUFunc for the q35 pci bus. In the iommu_fn, I print out the devfn parameter

Re: [Qemu-devel] Why devfn will be -1

2014-07-01 Thread Le Tan
2014-07-01 20:56 GMT+08:00 Jan Kiszka jan.kis...@web.de: On 2014-07-01 14:55, Le Tan wrote: 2014-07-01 20:52 GMT+08:00 Le Tan tamlokv...@gmail.com: Hi Jan, 2014-07-01 15:34 GMT+08:00 Jan Kiszka jan.kis...@web.de: Hi Le, On 2014-07-01 04:34, Le Tan wrote: Hi Jan, I use pci_setup_iommu

[Qemu-devel] [PATCH] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space()

2014-07-01 Thread Le Tan
In function do_pci_register_device() in file hw/pci/pci.c, move the assignment of pci_dev-devfn to the position before the call to pci_device_iommu_address_space(pci_dev) which will use the value of pci_dev-devfn. Signed-off-by: Le Tan tamlokv...@gmail.com --- hw/pci/pci.c |2 +- 1 file

[Qemu-devel] Why devfn will be -1

2014-06-30 Thread Le Tan
Hi Jan, I use pci_setup_iommu() to setup a PCIIOMMUFunc for the q35 pci bus. In the iommu_fn, I print out the devfn parameter and find out that it sometimes will be -1. So what does it mean? The detail code is here: In mch_init() function, I write like this: PCIBus *pci_bus =

Re: [Qemu-devel] About AddressSpace in intel-iommu emulation

2014-06-27 Thread Le Tan
2014-06-27 17:55 GMT+08:00 Jan Kiszka jan.kis...@web.de: On 2014-06-27 07:46, Le Tan wrote: 2014-06-27 12:55 GMT+08:00 Paolo Bonzini pbonz...@redhat.com: Il 27/06/2014 04:08, Le Tan ha scritto: 1. In struct IOMMUTLBEntry, I think the addr_mask field should be the mask of the page offset

[Qemu-devel] About AddressSpace in intel-iommu emulation

2014-06-26 Thread Le Tan
MemoryRegion to the bus? I see that there is function pci_setup_iommu() that links a AddressSpace to the bus to translate accesses to PCI into system memory. Is that related? I think q35 should maintain a bus AddressSpace, but I can't find it. What do you think? Thanks very much! Regards, Le Tan

Re: [Qemu-devel] About AddressSpace in intel-iommu emulation

2014-06-26 Thread Le Tan
2014-06-26 22:05 GMT+08:00 Paolo Bonzini pbonz...@redhat.com: Il 26/06/2014 16:01, Le Tan ha scritto: Hi Paolo, I am adding intel-iommu emulation to q35 for the GSoC project. I am confused about AddressSpace and I believe that you can help me. :) 1. For intel-iommu emulation, I have to read

Re: [Qemu-devel] About AddressSpace in intel-iommu emulation

2014-06-26 Thread Le Tan
2014-06-26 22:05 GMT+08:00 Paolo Bonzini pbonz...@redhat.com: Il 26/06/2014 16:01, Le Tan ha scritto: Hi Paolo, I am adding intel-iommu emulation to q35 for the GSoC project. I am confused about AddressSpace and I believe that you can help me. :) 1. For intel-iommu emulation, I have to read

Re: [Qemu-devel] About AddressSpace in intel-iommu emulation

2014-06-26 Thread Le Tan
2014-06-27 12:55 GMT+08:00 Paolo Bonzini pbonz...@redhat.com: Il 27/06/2014 04:08, Le Tan ha scritto: 1. In struct IOMMUTLBEntry, I think the addr_mask field should be the mask of the page offset, right? But I see different usages of this field. In spapr_tce_translate_iommu(), the addr_mask

Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] block: replace fprintf(stderr, ...) with error_report()

2014-05-25 Thread Le Tan
:36 GMT+08:00 Michael Tokarev m...@tls.msk.ru: 25.05.2014 18:29, Jan Kiszka wrote: On 2014-05-25 10:44, Le Tan wrote: Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt

[Qemu-devel] [PATCH v4] block: replace fprintf(stderr, ...) with error_report()

2014-05-25 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- block-migration.c

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] block: replace fprintf(stderr, ...) with error_report()

2014-05-24 Thread Le Tan
I will fix the whitespace issues and resend this series with a new version later. Thanks very much! ;) Le 2014-05-24 4:27 GMT+08:00 Michael Tokarev m...@tls.msk.ru: 21.05.2014 04:10, Le Tan wrote: Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c

Re: [Qemu-devel] [PATCH 1/4] arch_init: replace fprintf(stderr, ...) with error_report() in arch_init.c

2014-05-23 Thread Le Tan
There is a newer version of patch to fix this problem. I forgot to add the version number when I sent the new patch. Add this comment just to indicate that this patch should be dropped. :) 2014-05-10 7:55 GMT+08:00 Le Tan tamlokv...@gmail.com: Replace fprintf(stderr,...) with error_report

Re: [Qemu-devel] [PATCH 3/4] block: replace fprintf(stderr, ...) with error_report() in block/

2014-05-23 Thread Le Tan
, Le Tan tamlokv...@gmail.com wrote: Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv

[Qemu-devel] [PATCH 0/2] replace some fprintf(stderr, ...) with error_report()

2014-05-20 Thread Le Tan
This series of patches replaces some more occurrences of fprintf(stderr, ...) with error_report() and removes the trailing \n. Those for debugging are not changed. Le Tan (2): arch_init: replace fprintf(stderr,...) with error_report() block: replace fprintf(stderr,...) with error_report

[Qemu-devel] [PATCH 2/2] block: replace fprintf(stderr, ...) with error_report()

2014-05-20 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- block-migration.c

[Qemu-devel] [PATCH 1/2] arch_init: replace fprintf(stderr, ...) with error_report()

2014-05-20 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in the file arch_init.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- arch_init.c | 32 +++- 1 file

[Qemu-devel] GSoC student self-introduction

2014-05-20 Thread Le Tan
Hi, I am a student participating in GSoC 2014. My brief introduction is given below. I am looking forward to studying QEMU and finishing the GSoC project with the community. Thank you very much! Name: Le Tan IRC nick: #tamlok Public git repo URL: https://github.com/tamlok/qemu.git Project: Intel

Re: [Qemu-devel] [PATCH 3/4] block: replace fprintf(stderr, ...) with error_report() in block/

2014-05-11 Thread Le Tan
2014-05-10 21:18 GMT+08:00 Peter Crosthwaite peter.crosthwa...@xilinx.com: On Sat, May 10, 2014 at 9:55 AM, Le Tan tamlokv...@gmail.com wrote: Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have

[Qemu-devel] [PATCH 0/4] replace some fprintf(stderr, ...) with error_report()

2014-05-09 Thread Le Tan
,...), that is, some of them remain the same while some are changed to error_report(). I have 43 more patches (most of them touch files in hw/) and would send them out once the first 4 patches are fine. Le Tan (4): arch_init: replace fprintf(stderr,...) with error_report() in arch_init.c audio

[Qemu-devel] [PATCH 2/4] audio: replace fprintf(stderr, ...) with error_report() in audio

2014-05-09 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in files audio/*. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- audio/spiceaudio.c |2 +- audio/wavcapture.c |4 ++-- 2

[Qemu-devel] [PATCH 1/4] arch_init: replace fprintf(stderr, ...) with error_report() in arch_init.c

2014-05-09 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in the file arch_init.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- arch_init.c | 36 +--- 1

[Qemu-devel] [PATCH 4/4] bsd-user: replace fprintf(stderr, ...) with error_report()

2014-05-09 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in files bsd-user/*. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- bsd-user/bsdload.c |2 +- bsd-user/elfload.c |2 +- bsd

[Qemu-devel] [PATCH 3/4] block: replace fprintf(stderr, ...) with error_report() in block/

2014-05-09 Thread Le Tan
Replace fprintf(stderr,...) with error_report() in files block/*, block.c, block-migration.c and blockdev.c. The trailing \ns of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan tamlokv...@gmail.com --- block-migration.c

Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-05-01 Thread Le Tan
) comes to mind. :) Hi, Having consulted my mentor, I want to pick up this as the warm-up task.:) I will dig into it in the following days and learn how to contribute in the community. Thanks! --Le Tan

[Qemu-devel] When QEMU is emulating DMA, can other vcpus read/write the same memory region?

2014-04-14 Thread Le Tan
this? That is, how does QEMU prevent other vcpus to access the memory? I have read through the part of the emulation of DMA, but I didn't see anything related to this. Thanks very much! --Le Tan

Re: [Qemu-devel] VNC viewer displays nothing with -enable-kvm but works fine without -enable-kvm

2014-03-20 Thread Le Tan
there is something different between before and after this? Maybe it is the problem of compatibility between the old kernel and the new QEMU? Thanks. --Le Tan 2014-03-20 15:45 GMT+08:00 Stefan Hajnoczi stefa...@gmail.com: On Fri, Mar 14, 2014 at 04:02:58PM +0800, Le Tan wrote: Hi, I used

[Qemu-devel] About Disk I/O and DMA emulation in qemu-kvm

2014-03-19 Thread Le Tan
the complete gerneral description or idea of the disk I/O in qemu-kvm? Or which part of the code should be taken in consideration? Maybe there are some useful materials? Maybe the question is a little complicated. Any help is appreciated! Thanks! --Le Tan

[Qemu-devel] How to understand the coroutine context?

2014-03-17 Thread Le Tan
Hi, I am diving into the source code of qemu. I see the word coroutine appears in so many places. I can't figure out what it means. So, please, can anyone help me, telling me the mechanism or semantic of coroutine? Thanks! --Le Tan

Re: [Qemu-devel] How to understand the coroutine context?

2014-03-17 Thread Le Tan
Thanks, that is an excellent blog! 2014-03-18 12:04 GMT+08:00 Kashyap Chamarthy kcham...@redhat.com: On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote: Hi, I am diving into the source code of qemu. I see the word coroutine appears in so many places. I can't figure out what it means. So

[Qemu-devel] VNC viewer displays nothing with -enable-kvm but works fine without -enable-kvm

2014-03-14 Thread Le Tan
. Will it be the problem of compatibility? Thanks! --Le Tan

Re: [Qemu-devel] Disk I/O in QEMU

2014-03-12 Thread Le Tan
, there is no need to add the -enable-kvm option. So with qemu-1.6.2, did I miss any options? Thanks! 2014-03-11 20:23 GMT+08:00 Stefan Hajnoczi stefa...@gmail.com: On Tue, Mar 11, 2014 at 03:08:52PM +0800, Le Tan wrote: Hi, I am now studying the disk I/O in QEMU, but I know little about QEMU. I

Re: [Qemu-devel] Disk I/O in QEMU

2014-03-12 Thread Le Tan
, the vnc viewer is just black, displaying nothing. So did I miss any options? Or there is something else wrong? Thanks! 2014-03-12 21:13 GMT+08:00 Fam Zheng f...@redhat.com: On Wed, 03/12 20:27, Le Tan wrote: Hi Stefan, Thanks for your help. I find that the source code of qemu-1.2.0 doesn't have

[Qemu-devel] Disk I/O in QEMU

2014-03-11 Thread Le Tan
Hi, I am now studying the disk I/O in QEMU, but I know little about QEMU. I want to know how QEMU implements or emulates the disk I/O? Where to find some materials about this? And if I can get all the disk I/O request from the guest in QEMU? Thanks!