[Xen-devel] [PATCH v4 1/2] AMD IOMMU: Removing currently non-functioning guest iommu feature

2016-06-01 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit The guest IOMMU feature is currently not functioning. However, the current guest_iommu_init() is causing issue when it tries to register mmio handler because the it is currently called by the following code path: arch/x86/domain.c:

[Xen-devel] [PATCH v4 2/2] x86/hvm: Add check when register io handler

2016-06-01 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit At the time of registering HVM I/O handler, the HVM domain might not have been initialized, which means the hvm_domain.io_handler would be NULL. In the hvm_next_io_handler(), this should be asserted. Reviewed-by: Paul Durrant

[Xen-devel] [PATCH v4 0/2] Fix xen crash when starting HVM guest due to missing io handler

2016-06-01 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Hi All, Changes from V3: * Remove calls to guest_iommu_init()/destroy() for now since the guest iommu feature is not functing and causing breakage. * Do not change the ordering of the iommu_domain_init() and

[Xen-devel] [PATCH v4] AMD IOMMU: Introduce support for IVHD block type 11h

2016-05-31 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Along with the IVHD block type 10h, newer AMD platforms also come with types 11h, which is a superset of the older one. Having multiple IVHD block types in the same platform allows backward compatibility of newer systems to work with

[Xen-devel] [PATCH v3] AMD IOMMU: Introduce support for IVHD block type 11h

2016-05-25 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Along with the IVHD block type 10h, newer AMD platforms also come with types 11h, which is a superset of the older one. Having multiple IVHD block types in the same platform allows backward compatibility of newer systems to work with

[Xen-devel] [PATCH v2] AMD IOMMU: Introduce support for IVHD block type 11h

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Along with the IVHD block type 10h, newer AMD platforms also come with types 11h, which is a superset of the older one. Having multiple IVHD block types in the same platform allows backward compatibility of newer systems to work with

[Xen-devel] [PATCH v3 3/3] AMD IOMMU: Check io_handler before registering mmio handler

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit guest_iommu_init tries to register mmio handler before HVM domain is initialized. This cause registration to silently failing. This patch adds a sanitiy check and puts out error message. Signed-off-by: Suravee Suthikulapanit

[Xen-devel] [PATCH v3 0/3] Fix xen crash when starting HVM guest due to missing io handler

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Hi All, Changes from V2: * Use assert instead of sanity check before count increment in the hvm_next_io_handler(). * Post-pone iommu_domain_init() and add proper error handling code to destroy hvm in case of failure. *

[Xen-devel] [PATCH v3 1/3] x86/hvm: Add check when register io handler

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit At the time of registering HVM I/O handler, the HVM domain might not have been initialized, which means the hvm_domain.io_handler would be NULL. In the hvm_next_io_handler(), this should be asserted. Signed-off-by: Suravee Suthikulpanit

[Xen-devel] [PATCH v3 2/3] svm: iommu: Only call guest_iommu_init() after initialized HVM domain

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit The guest_iommu_init() is currently called by the following code path: arch/x86/domain.c: arch_domain_create() ]- drivers/passthrough/iommu.c: iommu_domain_init() |- drivers/passthrough/amd/pci_amd_iommu.c:

[Xen-devel] [PATCH v3 1/3] x86/hvm: Add check when register io handler

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit At the time of registering HVM I/O handler, the HVM domain might not have been initialized, which means the hvm_domain.io_handler would be NULL. In the hvm_next_io_handler(), this should be asserted. Signed-off-by: Suravee Suthikulpanit

[Xen-devel] [PATCH v3 2/3] svm: iommu: Only call guest_iommu_init() after initialized HVM domain

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit The guest_iommu_init() is currently called by the following code path: arch/x86/domain.c: arch_domain_create() ]- drivers/passthrough/iommu.c: iommu_domain_init() |- drivers/passthrough/amd/pci_amd_iommu.c:

[Xen-devel] [PATCH v3 0/3] Fix xen crash when starting HVM guest due to missing io handler

2016-05-21 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Hi All, Changes from V2: * Use assert instead of sanity check before count increment in the hvm_next_io_handler(). * Post-pone iommu_domain_init() and add proper error handling code to destroy hvm in case of failure. *

[Xen-devel] [PATCH] AMD IOMMU: Introduce support for IVHD block type 11h

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Along with the IVHD block type 10h, newer AMD platforms also come with types 11h, which is a superset of the older one. Having multiple IVHD block types in the same platform allows backward compatibility of newer systems to work with

[Xen-devel] [PATCH V2 2/2] svm: iommu: Only call guest_iommu_init() after initialized HVM domain

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit The guest_iommu_init() is currently called by the following code path: arch/x86/domain.c: arch_domain_create() ]- drivers/passthrough/iommu.c: iommu_domain_init() |- drivers/passthrough/amd/pci_amd_iommu.c:

[Xen-devel] [PATCH V2 0/2] Fix xen crash when starting HVM guest due to missing io handler

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Hi All, On systems with iommu v2 enabled, the hypervisor crashes when trying to start up an HVM guest. Investigating shows that the guest_iommu_init() is called before the HVM domain is initialized. It then tries to

[Xen-devel] [PATCH V2 1/2] x86/hvm: Add check when register io handler

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit At the time of registering HVM I/O handler, the HVM domain might not have been initialized, which means the hvm_domain.io_handler would be NULL. In the hvm_next_io_handler(), this should be checked before returning and referencing the

[Xen-devel] [PATCH 0/2] Fix xen crash when starting HVM guest due to missing io handler

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Hi All, On systems with iommu v2 enabled, the hypervisor crashes when trying to start up an HVM guest. Investigating shows that the guest_iommu_init() is called before the HVM domain is initialized. It then tries to

[Xen-devel] [PATCH 2/2] svm: iommu: Only call guest_iommu_init() after initialized HVM domain

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit The guest_iommu_init() is currently called by the following code path: arch/x86/domain.c: arch_domain_create() ]- drivers/passthrough/iommu.c: iommu_domain_init() |- drivers/passthrough/amd/pci_amd_iommu.c:

[Xen-devel] [PATCH 1/2] x86/hvm: Add check when register io handler

2016-05-13 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit At the time of registering HVM I/O handler, the HVM domain might not have been initialized, which means the hvm_domain.io_handler would be NULL. In the hvm_next_io_handler(), this should be checked before returning and referencing the