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
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
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
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
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
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
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
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
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
>
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
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:
&
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 +
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +
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
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
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 +-
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
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
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
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:
>>
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-
: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
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 +-
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
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
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
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
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
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
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
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)
>> +{
>> +*
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
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
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
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
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
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
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
&
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,
>> &
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
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
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
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
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
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!
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
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
problem of compatibility?
Thanks!
--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
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
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
.
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
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
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
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
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()
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
>>
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
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
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
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:
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
(), 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
this value. What is the best way to decide the value of
HAW?
Any suggestion is appreciated. :)
Thanks very much!
Regards,
Le Tan
77 matches
Mail list logo