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 : > "Michael S. Tsirkin" writes: > >> (((sid) >> 8) && 0xff) makes no sense >> (((sid) >> 8) & 0xff) seems to be what was meant. >> >> Suggested-by: Markus Armbruster > > Actually by the reporter of https://bugs.launchpad.net/bugs/1382477

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 : > 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 emulati

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

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

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

2014-08-15 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 --- hw/i386/intel_iommu.c | 188 +++-- hw/i386

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

2014-08-15 Thread Le Tan
Fix coding style issues around in hw/pci-host/q35.c and hw/core/machine.c. Signed-off-by: Le Tan --- 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 index 0708de5

[Qemu-devel] [PATCH v4 8/8] intel-iommu: add IOTLB using hash table

2014-08-15 Thread Le Tan
Add IOTLB to cache information about the translation of input-addresses. IOTLB use a GHashTable as cache. The key of the hash table is the logical-OR of gfn and source id after left-shifting. Signed-off-by: Le Tan --- hw/i386/intel_iommu.c | 213

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

2014-08-15 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 --- hw/i386/acpi-build.c | 39

[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
etup_iommu() 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 --- hw/core/machine.c | 17 + hw/pci-host/q35.c

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

2014-08-15 Thread Le Tan
se 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 (8): iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps intel-iommu: introduce Intel IOMMU (VT-d

[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 --- exec.c

[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 --- hw/i386

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 : > 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 +

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 : > 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: &

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 : > On Thu, Aug 14, 2014 at 07:33:29PM +0800, Le Tan wrote: >> 2014-08-14 19:12 GMT+08:00 Michael S. Tsirkin : >> > On Mon, Aug 11, 2014 at 03:05:01PM +0800, Le Tan wrote: >> >> Add Intel IOMMU emulation to q35 chip

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 : > 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 that >

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 : > 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 >> lin

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 : > 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 supp

[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
etup_iommu() 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 --- hw/core/machine.c | 27 +--- hw/pci-host/q35.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 --- exec.c

[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 --- hw/i386

[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 --- hw/i386/acpi-build.c | 41

[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 --- hw/i386/intel_iommu.c | 381 - hw/i386/intel_iommu_internal.h | 15 +- 2 files changed, 393 insertions(+), 3

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

2014-08-11 Thread Le Tan
s -change machine option to "iommu=on|off" Thanks very much! Git 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 t

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 : > 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 materi

[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 Ca

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 : > On Fri, 2014-08-01 at 09:35 +0800, Le Tan wrote: >> Hi Alex, >> >> 2014-07-30 22:46 GMT+08:00 Alex Williamson : >> > On Wed, 2014-07-30 at 22:16 +0800, Le Tan wrote: >> >> Hi Michael, >> >&g

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 : > 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 : >> > On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote: >> >> Hi, >> &

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 : > 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 &

[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 rese

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

2014-07-27 Thread Le Tan
etup_iommu() 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 --- hw/core/machine.c | 27 -- hw/pci-host/q35.c

[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 --- hw/i386/acpi-build.c | 41

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

2014-07-27 Thread Le Tan
not implemented yet. Signed-off-by: Le Tan --- 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, 1244 insertions

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

2014-07-27 Thread Le Tan
ove dead code -rename constant definitions with consistent prefix VTD_ -rename some struct 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://g

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 : > 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 suppor

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 : > 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) >> +{ >> +*

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 : > 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. Implemen

[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
etup_iommu() 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 --- hw/core/machine.c | 27 -- hw/pci-host/q35.c

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

2014-07-22 Thread Le Tan
4. Basic fault reporting; 5. Caching propertities of IOTLB; 6. Clear up codes related 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 i

[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 --- hw/i386/acpi-build.c | 41

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

2014-07-22 Thread Le Tan
not implemented yet. Signed-off-by: Le Tan --- 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/i386/intel_iommu.c

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

2014-07-05 Thread Le Tan
this value. 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 --- 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/ahci.c +++ b/hw/ide

[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 --- hw/pci/pci.c |2 +- 1 file changed, 1 ins

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

2014-07-01 Thread Le Tan
2014-07-01 20:56 GMT+08:00 Jan Kiszka : > On 2014-07-01 14:55, Le Tan wrote: >> 2014-07-01 20:52 GMT+08:00 Le Tan : >>> Hi Jan, >>> >>> 2014-07-01 15:34 GMT+08:00 Jan Kiszka : >>>> Hi Le, >>>> >>>> On 2014-07-01 04:

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

2014-07-01 Thread Le Tan
2014-07-01 20:52 GMT+08:00 Le Tan : > Hi Jan, > > 2014-07-01 15:34 GMT+08:00 Jan Kiszka : >> 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

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 : > 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

[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 = PCI_BUS(qdev_get_pare

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 : > On 2014-06-27 07:46, Le Tan wrote: >> 2014-06-27 12:55 GMT+08:00 Paolo Bonzini : >>> Il 27/06/2014 04:08, Le Tan ha scritto: >>> >>>> 1. In struct IOMMUTLBEntry, I think the addr_mask field should be the >>

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 : > 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()

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 : > 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

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 : > 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

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

2014-06-26 Thread Le Tan
OMMU 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

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- block-migration.c |6 +-

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 : > 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 "\n"s of the @fmt argume

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

2014-05-23 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 : > 21.05.2014 04:10, Le Tan wrote: >> Replace fprintf(stderr,...) with error_report() in files block/*, block.c, >> block-

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

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 21:18 GMT+08:00 Peter Crosthwaite : > On Sat, May 10, 2014 at 9:55 AM, Le Tan wrote: >>

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 : > Replace fprintf(stderr,...) with error_report() in the f

[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

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- arch_init.c | 32 +++- 1 file c

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- block-migration.c |5 +-

[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 er

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 : > On Sat, May 10, 2014 at 9:55 AM, Le Tan wrote: >> Replace fprintf(stderr,...) with error_report() in files block/*, block.c, >> block-migration.c and blockdev.c. The trailing "\n"s of the @fmt argument >> ha

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- block-migration.c |4 +

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- bsd-user/bsdload.c |2 +- bsd-user/elfload.c |2 +- bsd-u

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- arch_init.c | 36 +--- 1 file c

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

2014-05-09 Thread Le Tan
ntf(stderr,...), 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

[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 "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan --- audio/spiceaudio.c |2 +- audio/wavcapture.c |4 ++-- 2 files

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

2014-05-01 Thread Le Tan
be something like "reformat the >> printing of these messages" or so. > > Replacing some more fprintf(stderr, "foo\n") with error_report("foo") > 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
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
. So maybe 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 : > On Fri, Mar 14, 2014 at 04:02:58PM +0800, Le Tan wrote: > > Hi, I

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

2014-03-19 Thread Le Tan
ve me 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

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 : > 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 ou

[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

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

2014-03-14 Thread Le Tan
problem of compatibility? Thanks! --Le Tan

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

2014-03-12 Thread Le Tan
th "-enable-kvm", 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 : > On Wed, 03/12 20:27, Le Tan wrote: > > Hi Stefan, > > Thanks for your help. I find that the sourc

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

2014-03-12 Thread Le Tan
ourse, with qemu-kvm, 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 : > 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

[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!