Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-29 Thread Lan Tianyu
On 2017年10月18日 22:05, Roger Pau Monné wrote: >> +int viommu_register_type(uint64_t type, struct viommu_ops *ops) >> > +{ >> > +struct viommu_type *viommu_type = NULL; >> > + >> > +if ( !viommu_enabled() ) >> > +return -ENODEV; >> > + >> > +if ( viommu_get_type(type) ) >> > +

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-29 Thread Lan Tianyu
On 2017年10月25日 09:43, Lan Tianyu wrote: >> For all platforms supporting HVM, for PV I don't think it makes sense. >> > Since AFAIK ARM guest type is also HVM I would rather introduce this >> > field in the hvm_domain structure rather than the generic domain >> &g

Re: [Xen-devel] [PATCH V3 8/29] tools/libxl: create vIOMMU during domain construction

2017-10-26 Thread Lan Tianyu
On 2017年10月26日 20:05, Wei Liu wrote: > On Thu, Oct 19, 2017 at 11:13:57AM +0100, Roger Pau Monné wrote: >>> + >>> +if (viommu->type == LIBXL_VIOMMU_TYPE_INTEL_VTD) { >>> +ret = xc_viommu_create(ctx->xch, domid, >>> VIOMMU_TYPE_INTEL_VTD, >>> +

Re: [Xen-devel] [Qemu-devel] [PATCH] x86: Skip check apic_id_limit for Xen

2017-10-26 Thread Lan Tianyu
On 2017年10月26日 22:27, Michael S. Tsirkin wrote: > On Thu, Oct 26, 2017 at 02:19:43PM +0200, Eduardo Habkost wrote: >> On Mon, Aug 21, 2017 at 10:22:15AM +0800, Lan Tianyu wrote: >>> On 2017年08月19日 00:38, Eduardo Habkost wrote: >>>> On Thu, Aug 17, 2017 at 09:3

Re: [Xen-devel] [PATCH V3 20/29] VIOMMU: Add get irq info callback to convert irq remapping request

2017-10-25 Thread Lan Tianyu
On 2017年10月25日 15:43, Roger Pau Monné wrote: > On Wed, Oct 25, 2017 at 03:30:39PM +0800, Lan Tianyu wrote: >> On 2017年10月19日 23:42, Roger Pau Monné wrote: >>> On Thu, Sep 21, 2017 at 11:02:01PM -0400, Lan Tianyu wrote: >>> >>>> >>>> struct vi

Re: [Xen-devel] [PATCH V3 20/29] VIOMMU: Add get irq info callback to convert irq remapping request

2017-10-25 Thread Lan Tianyu
On 2017年10月19日 23:42, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:02:01PM -0400, Lan Tianyu wrote: >> This patch is to add get_irq_info callback for platform implementation >> to convert irq remapping request to irq info (E,G vector, dest, dest_mode >> and so on). >

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-25 Thread Lan Tianyu
On 2017年10月19日 16:40, Roger Pau Monné wrote: > On Thu, Oct 19, 2017 at 04:09:02PM +0800, Lan Tianyu wrote: >> On 2017年10月18日 23:12, Roger Pau Monné wrote: >>>> diff --git a/tools/libacpi/libacpi.h b/tools/libacpi/libacpi.h >>>> index a2efd23..fdd6a78 100644 &

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-24 Thread Lan Tianyu
On 2017年10月19日 16:47, Roger Pau Monné wrote: > For all platforms supporting HVM, for PV I don't think it makes sense. > Since AFAIK ARM guest type is also HVM I would rather introduce this > field in the hvm_domain structure rather than the generic domain > structure. > This sounds reasonable.

Re: [Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-10-24 Thread Lan Tianyu
On 2017年10月19日 19:28, Jan Beulich wrote: >>>> On 19.10.17 at 10:49, <roger@citrix.com> wrote: >> On Thu, Oct 19, 2017 at 10:26:36AM +0800, Lan Tianyu wrote: >>> Hi Roger: >>> Thanks for review. >>> >>> On 2017年10月18日 21:26, Ro

Re: [Xen-devel] [PATCH V3 00/29]

2017-10-22 Thread Lan Tianyu
On 2017年10月20日 19:36, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:41PM -0400, Lan Tianyu wrote: >> Change since v2: >>1) Remove vIOMMU hypercall of query capabilities and introduce when >> necessary. >>2) Remove length field of vIOMMU

Re: [Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-10-20 Thread Lan Tianyu
On 2017年10月20日 14:56, Jan Beulich wrote: >>>> On 20.10.17 at 04:46, <chao@intel.com> wrote: >> On Thu, Oct 19, 2017 at 12:20:35PM +0100, Roger Pau Monné wrote: >>> On Thu, Sep 21, 2017 at 11:01:52PM -0400, Lan Tianyu wrote: >>>> From: Chao Gao &

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 23:12, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:46PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> The BIOS reports the remapping hardware units in a platform to system >> software >> through the DM

Re: [Xen-devel] [PATCH V3 4/29] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:36, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:45PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> Add dmar table structure according Chapter 8 "BIOS Considerations" of >> VTd spec Rev. 2.4. >>

Re: [Xen-devel] [PATCH V3 3/29] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:18, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:44PM -0400, Lan Tianyu wrote: >> This patch is to introduce create, destroy and query capabilities >> command for vIOMMU. vIOMMU layer will deal with requests and call >> arch vIOMMU ops. >> &

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:05, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:43PM -0400, Lan Tianyu wrote: >> +int viommu_destroy_domain(struct domain *d) >> +{ >> +int ret; >> + >> +if ( !d->viommu ) >> +return -EINVAL; >

Re: [Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-10-18 Thread Lan Tianyu
Hi Roger: Thanks for review. On 2017年10月18日 21:26, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:42PM -0400, Lan Tianyu wrote: >> This patch is to add Xen virtual IOMMU doc to introduce motivation, >> framework, vIOMMU hypercall and xl configuration. >> >>

[Xen-devel] [PATCH V3 20/29] VIOMMU: Add get irq info callback to convert irq remapping request

2017-09-22 Thread Lan Tianyu
This patch is to add get_irq_info callback for platform implementation to convert irq remapping request to irq info (E,G vector, dest, dest_mode and so on). Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/common/viommu.c | 16 xen/include/asm-x86/viommu.

[Xen-devel] [PATCH V3 24/29] tools/libxc: Add a new interface to bind remapping format msi with pirq

2017-09-22 Thread Lan Tianyu
dicate a physical interrupt is bound with remapping format guest interrupt. Thus, we can use (HVM_IRQ_DPCI_GUEST_REMAPPED | HVM_IRQ_DPCI_GUEST_MSI) to show the new binding type. Also provide an new interface to manage the new binding. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Ti

[Xen-devel] [PATCH V3 28/29] x86/vvtd: Add queued invalidation (QI) support

2017-09-22 Thread Lan Tianyu
<chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/iommu.h | 19 ++- xen/drivers/passthrough/vtd/vvtd.c | 232 2 files changed, 250 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/

[Xen-devel] [PATCH V3 29/29] x86/vvtd: save and restore emulated VT-d

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> Provide a save-restore pair to save/restore registers and non-register status. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - use one entry to save both vvtd registers and other i

[Xen-devel] [PATCH V3 26/29] x86/vvtd: Handle interrupt translation faults

2017-09-22 Thread Lan Tianyu
ault() records the fault information and viommu_report_non_recoverable_fault() reports faults to software. Currently, only Primary Fault Logging is supported and the Number of Fault-recording Registers is 1. Signed-off-by: Chao Gao <chao....@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com>

[Xen-devel] [PATCH V3 27/29] x86/vvtd: Enable Queued Invalidation through GCMD

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> Software writes to QIE field of GCMD to enable or disable queued invalidations. This patch emulates QIE field of GCMD. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthroug

[Xen-devel] [PATCH V3 22/29] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-09-22 Thread Lan Tianyu
Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/arch/x86/hvm/vioapic.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 5d0d1cd..9e47ef

[Xen-devel] [PATCH V3 15/29] x86/vvtd: Process interrupt remapping request

2017-09-22 Thread Lan Tianyu
patch introduces viommu_handle_irq_request() to emulate the process how remapping hardware handles a remapping interrupt request. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - Encode map_guest_page()'s error into void* to avoid using anothe

[Xen-devel] [PATCH V3 19/29] x86/vioapic: Hook interrupt delivery of vIOAPIC

2017-09-22 Thread Lan Tianyu
ecking the request's validity. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - use the new interface to check remapping format. --- xen/arch/x86/hvm/vioapic.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/x86/h

[Xen-devel] [PATCH V3 25/29] x86/vmsi: Hook delivering remapping format msi to guest

2017-09-22 Thread Lan Tianyu
routed to common vIOMMU layer if it is in remapping format. For the latter, if the pt irq is bound to a guest remapping msi, a new remapping msi is constructed based on the binding information and routed to common vIOMMU layer. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Ti

[Xen-devel] [PATCH V3 16/29] x86/vvtd: decode interrupt attribute from IRTE

2017-09-22 Thread Lan Tianyu
cquire interrupt attributes, for example: 1. vioapic_get_vector(). With vIOMMU, the RTE may don't contain vector. 2. perform EOI which is always based on the interrupt vector. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - add exam

[Xen-devel] [PATCH V3 21/29] VIOMMU: Introduce callback of checking irq remapping mode

2017-09-22 Thread Lan Tianyu
This patch is to add callback for vIOAPIC and vMSI to check whether interrupt remapping is enabled. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/common/viommu.c | 15 +++ xen/include/xen/viommu.h | 10 ++ 2 files changed, 25 insertions(+) diff --git

[Xen-devel] [PATCH V3 23/29] passthrough: move some fields of hvm_gmsi_info to a sub-structure

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> No functional change. It is a preparation for introducing new fields in hvm_gmsi_info to manage remapping format msi bound to a physical msi. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> ---

[Xen-devel] [PATCH V3 13/29] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2017-09-22 Thread Lan Tianyu
d adds some new fields in VVTD to track info (e.g. the table's gfn and max supported entries) of interrupt remapping table. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - ignore unaligned r/w of vt-d hardware registers and return X

[Xen-devel] [PATCH V3 14/29] x86/vvtd: Enable Interrupt Remapping through GCMD

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> Software writes this field to enable/disable interrupt reampping. This patch emulate IRES field of GCMD. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/iom

[Xen-devel] [PATCH V3 18/29] VIOMMU: Add irq request callback to deal with irq remapping

2017-09-22 Thread Lan Tianyu
This patch is to add irq request callback for platform implementation to deal with irq remapping request. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/common/viommu.c | 15 + xen/include/asm-x86/viommu.h | 72 xen/i

[Xen-devel] [PATCH V3 12/29] x86/vvtd: Add MMIO handler for VVTD

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> This patch adds VVTD MMIO handler to deal with MMIO access. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/vvtd.c | 91 ++

[Xen-devel] [PATCH V3 10/29] vtd: add and align register definitions

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> No functional changes. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/iommu.h | 54 + 1 file changed, 31 insertions(+), 23

[Xen-devel] [PATCH V3 17/29] x86/vvtd: add a helper function to decide the interrupt format

2017-09-22 Thread Lan Tianyu
s when .check_irq_remapping() return true. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/vvtd.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/xen/drivers/pass

[Xen-devel] [PATCH V3 9/29] tools/libxc: Add viommu operations in libxc

2017-09-22 Thread Lan Tianyu
ed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - Remove API for querying viommu capabilities - Remove pointless cast - Polish commit message - Coding style --- tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h |

[Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-09-22 Thread Lan Tianyu
g file. construct_dmar() is added to build DMAR table according to the new fields. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - Remove chip-set specific IOAPIC BDF. Instead, let IOAPIC-related info be passed by struct acpi_config.

[Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> This patch adds create/destroy function for the emulated VTD and adapts it to the common VIOMMU abstraction. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/drivers/passthrough/vtd/Make

[Xen-devel] [PATCH V3 8/29] tools/libxl: create vIOMMU during domain construction

2017-09-22 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> If guest is configured to have a vIOMMU, create it during domain construction. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - Remove the process of querying capabilities. --- tools

[Xen-devel] [PATCH V3 7/29] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-09-22 Thread Lan Tianyu
<chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - build dmar and initialize related acpi_modules struct in libxl_x86_acpi.c, keeping in accordance with pvh. --- tools/libxl/libxl_x86.c | 3 +- tools/libxl/lib

[Xen-devel] [PATCH V3 6/29] tools/libxl: Add a user configurable parameter to control vIOMMU attributes

2017-09-22 Thread Lan Tianyu
intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- v3: - allow an array of viommu other than only one viommu to present to guest. During domain building, an error would be raised for multiple viommus case since we haven't implemented this yet. - provide a libxl__viommu_set_de

[Xen-devel] [PATCH V3 00/29]

2017-09-22 Thread Lan Tianyu
ort x86/vvtd: save and restore emulated VT-d Lan Tianyu (6): Xen/doc: Add Xen virtual IOMMU doc VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance DOMCTL: Introduce new DOMCTL commands for vIOMMU support VIOMMU: Add irq request callback to deal with irq remapping VIOM

[Xen-devel] [PATCH V3 4/29] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-09-22 Thread Lan Tianyu
.@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/acpi2_0.h | 61 + 1 file changed, 61 insertions(+) diff --git a/tools/libacpi/acpi2_0.h b/tools/libacpi/acpi2_0.h index 2619ba3..758a823 100644 --- a/tools/l

[Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-09-22 Thread Lan Tianyu
This patch is to introduce an abstract layer for arch vIOMMU implementation to deal with requests from dom0. Arch vIOMMU code needs to provide callback to do create and destroy operation. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- docs/misc/xen-command-line.markdown | 7 ++ xe

[Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-09-22 Thread Lan Tianyu
This patch is to add Xen virtual IOMMU doc to introduce motivation, framework, vIOMMU hypercall and xl configuration. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- docs/misc/viommu.txt | 136 +++ 1 file changed, 136 insertions(+)

[Xen-devel] [PATCH V3 3/29] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-09-22 Thread Lan Tianyu
This patch is to introduce create, destroy and query capabilities command for vIOMMU. vIOMMU layer will deal with requests and call arch vIOMMU ops. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/common/domctl.c | 6 ++ xen/common/viommu.c

Re: [Xen-devel] [RFC PATCH V3 1/3] Xen: Increase hap/shadow page pool size to support more vcpus support

2017-09-21 Thread Lan Tianyu
On 2017年09月20日 23:13, Wei Liu wrote: > On Tue, Sep 19, 2017 at 11:06:26AM +0800, Lan Tianyu wrote: >> Hi Wei: >> >> On 2017年09月18日 21:06, Wei Liu wrote: >>> On Wed, Sep 13, 2017 at 12:52:47AM -0400, Lan Tianyu wrote: >>>> This patch is to increase pag

Re: [Xen-devel] [RFC PATCH V3 1/3] Xen: Increase hap/shadow page pool size to support more vcpus support

2017-09-18 Thread Lan Tianyu
Hi Wei: On 2017年09月18日 21:06, Wei Liu wrote: > On Wed, Sep 13, 2017 at 12:52:47AM -0400, Lan Tianyu wrote: >> This patch is to increase page pool size when max vcpu number is larger >> than 128. >> >> Signed-off-by: Lan Tianyu <tianyu@intel.com> >>

[Xen-devel] [RFC PATCH V3 2/3] Tool/ACPI: DSDT extension to support more vcpus

2017-09-13 Thread Lan Tianyu
This patch is to change DSDT table for processor object to support >128 vcpus accroding to ACPI spec 8.4 Declaring Processors Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/mk_dsdt.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions

[Xen-devel] [RFC PATCH V3 3/3] hvmload: Add x2apic entry support in the MADT build

2017-09-13 Thread Lan Tianyu
This patch is to add x2apic entry support for ACPI MADT table according to ACPI spec 5.2.12.12 Processor Local x2APIC Structure. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/acpi2_0.h | 10 + tools/libacpi/bu

[Xen-devel] [RFC PATCH V3 0/3] Extend resources to support more vcpus in single VM.

2017-09-13 Thread Lan Tianyu
event channel, hap and so) to support more vcpus for single VM. Lan Tianyu (3): Xen: Increase hap/shadow page pool size to support more vcpus support Tool/ACPI: DSDT extension to support more vcpus hvmload: Add x2apic entry support in the MADT build tools/libacpi/acpi2_0.h | 10 ++

[Xen-devel] [RFC PATCH V3 1/3] Xen: Increase hap/shadow page pool size to support more vcpus support

2017-09-13 Thread Lan Tianyu
This patch is to increase page pool size when max vcpu number is larger than 128. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/arch/arm/domain.c| 5 + xen/arch/x86/domain.c| 25 + xen/common/domctl.c | 3 +++ xen/include/xen/domain.

Re: [Xen-devel] [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus

2017-09-04 Thread Lan Tianyu
On 2017年09月04日 17:05, Roger Pau Monné wrote: > On Mon, Sep 04, 2017 at 11:07:14AM +0800, Lan Tianyu wrote: >> On 2017年09月01日 17:41, Roger Pau Monné wrote: >>> On Fri, Sep 01, 2017 at 10:54:02AM +0800, Lan Tianyu wrote: >>>> On 2017年08月31日 23:38, Roger Pau Monné wro

Re: [Xen-devel] [RFC PATCH V2 3/4] hvmload: Add x2apic entry support in the MADT build

2017-09-04 Thread Lan Tianyu
On 2017年09月01日 17:57, Roger Pau Monné wrote: > On Thu, Aug 31, 2017 at 01:01:48AM -0400, Lan Tianyu wrote: >> This patch is to add x2apic entry support for ACPI MADT table >> according to ACPI spec 5.2.12.12 Processor Local x2APIC Structure >> >> Signed-off-by: C

Re: [Xen-devel] [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus

2017-09-03 Thread Lan Tianyu
On 2017年09月01日 17:41, Roger Pau Monné wrote: > On Fri, Sep 01, 2017 at 10:54:02AM +0800, Lan Tianyu wrote: >> On 2017年08月31日 23:38, Roger Pau Monné wrote: >>> On Thu, Aug 31, 2017 at 01:01:47AM -0400, Lan Tianyu wrote: >>>> This patch is to change DSDT table for pr

Re: [Xen-devel] [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support

2017-09-01 Thread Lan Tianyu
On 2017年09月01日 16:34, Jan Beulich wrote: >>>> On 01.09.17 at 10:19, <tianyu@intel.com> wrote: >> On 2017年08月31日 21:56, Andrew Cooper wrote: >>> On 31/08/17 06:01, Lan Tianyu wrote: >>>> This patch is to increase hap page pool size to support more v

Re: [Xen-devel] [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support

2017-09-01 Thread Lan Tianyu
On 2017年08月31日 21:56, Andrew Cooper wrote: > On 31/08/17 06:01, Lan Tianyu wrote: >> This patch is to increase hap page pool size to support more vcpus in single >> VM. >> >> Signed-off-by: Lan Tianyu <tianyu@intel.com> >> --- >> xen/arch/x86/mm

Re: [Xen-devel] [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus

2017-08-31 Thread Lan Tianyu
On 2017年08月31日 23:38, Roger Pau Monné wrote: > On Thu, Aug 31, 2017 at 01:01:47AM -0400, Lan Tianyu wrote: >> This patch is to change DSDT table for processor object to support >128 vcpus >> accroding to ACPI spec 8.4 Declaring Processors >> >> Signed-off-by: La

[Xen-devel] [RFC PATCH V2 4/4] xl/libacpi: extend lapic_id() to uint32_t

2017-08-31 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> This patch is to extend lapic_id() to support more vcpus. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/firmware/hvmloader/util.c | 2 +- tools/libacpi/libacpi.h |

[Xen-devel] [RFC PATCH V2 0/4] Extend resources to support more vcpus in single VM

2017-08-31 Thread Lan Tianyu
255 in dsdt and use x2APIC structure for other vcpus in the ACPI MADT table. This patchset is to extend some resources(i.e, event channel, hap and so) to support more vcpus for single VM. Chao Gao (1): xl/libacpi: extend lapic_id() to uint32_t Lan Tianyu (3): xen/hap: Increase hap size for more

[Xen-devel] [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support

2017-08-31 Thread Lan Tianyu
This patch is to increase hap page pool size to support more vcpus in single VM. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/arch/x86/mm/hap/hap.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap

[Xen-devel] [RFC PATCH V2 3/4] hvmload: Add x2apic entry support in the MADT build

2017-08-31 Thread Lan Tianyu
This patch is to add x2apic entry support for ACPI MADT table according to ACPI spec 5.2.12.12 Processor Local x2APIC Structure Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/acpi2_0.h | 10 + tools/libacpi/bu

[Xen-devel] [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus

2017-08-31 Thread Lan Tianyu
This patch is to change DSDT table for processor object to support >128 vcpus accroding to ACPI spec 8.4 Declaring Processors Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/mk_dsdt.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --gi

Re: [Xen-devel] [RFC PATCH 0/5] Extend resources to support more vcpus in single VM

2017-08-29 Thread Lan Tianyu
On 2017年08月29日 16:49, Jan Beulich wrote: On 29.08.17 at 06:38, wrote: >> On 2017年08月25日 22:10, Meng Xu wrote: >>> How many VCPUs for a single VM do you want to support with this patch set? >> >> Hi Meng: >> Sorry for later response. We hope to increase max vcpu

Re: [Xen-devel] [RFC PATCH 3/5] Tool/ACPI: DSDT extension to support more vcpus

2017-08-28 Thread Lan Tianyu
On 2017年08月25日 18:36, Roger Pau Monné wrote: > On Thu, Aug 24, 2017 at 10:52:18PM -0400, Lan Tianyu wrote: >> This patch is to change DSDT table for processor object to support >255 >> vcpus. > > The note in ACPI 6.1A spec section 5.2.12.12 contains the following:

Re: [Xen-devel] [RFC PATCH 3/5] Tool/ACPI: DSDT extension to support more vcpus

2017-08-28 Thread Lan Tianyu
On 2017年08月25日 20:01, Jan Beulich wrote: >>>> On 25.08.17 at 12:36, <roger@citrix.com> wrote: >> On Thu, Aug 24, 2017 at 10:52:18PM -0400, Lan Tianyu wrote: >>> This patch is to change DSDT table for processor object to support >255 >> vcpus. >>

Re: [Xen-devel] [RFC PATCH 0/5] Extend resources to support more vcpus in single VM

2017-08-28 Thread Lan Tianyu
On 2017年08月25日 22:10, Meng Xu wrote: > Hi Tianyu, > > On Thu, Aug 24, 2017 at 10:52 PM, Lan Tianyu <tianyu@intel.com> wrote: >> >> This patchset is to extend some resources(i.e, event channel, >> hap and so) to support more vcpus for single VM. >> >

Re: [Xen-devel] [RFC PATCH 4/5] hvmload: Add x2apic entry support in the MADT build

2017-08-28 Thread Lan Tianyu
On 2017年08月25日 18:11, Roger Pau Monné wrote: > On Thu, Aug 24, 2017 at 10:52:19PM -0400, Lan Tianyu wrote: >> This patch is to add x2apic entry support for ACPI MADT table. >> >> Signed-off-by: Lan Tianyu <tianyu@intel.com> >> Signed-off-by: Chao Gao <

Re: [Xen-devel] [RFC PATCH 3/5] Tool/ACPI: DSDT extension to support more vcpus

2017-08-28 Thread Lan, Tianyu
On 8/25/2017 5:25 PM, Wei Liu wrote: On Thu, Aug 24, 2017 at 10:52:18PM -0400, Lan Tianyu wrote: This patch is to change DSDT table for processor object to support >255 vcpus. Can you provide a link to the spec so people can check if you modification is correct? OK. Will add in the n

Re: [Xen-devel] [RFC PATCH 2/5] XL: Increase event channels to support more vcpus

2017-08-28 Thread Lan, Tianyu
On 8/25/2017 6:04 PM, Wei Liu wrote: On Fri, Aug 25, 2017 at 10:57:26AM +0100, Roger Pau Monné wrote: On Fri, Aug 25, 2017 at 10:18:24AM +0100, Wei Liu wrote: On Thu, Aug 24, 2017 at 10:52:17PM -0400, Lan Tianyu wrote: This patch is to increase event channels to support more vcpus in single

Re: [Xen-devel] [RFC PATCH 1/5] xen/hap: Increase hap size for more vcpus support

2017-08-28 Thread Lan, Tianyu
On 8/25/2017 5:14 PM, Wei Liu wrote: On Thu, Aug 24, 2017 at 10:52:16PM -0400, Lan Tianyu wrote: This patch is to increase hap size to support more vcpus in single VM. Signed-off-by: Lan Tianyu <tianyu@intel.com> Can we maybe derive the number of pages needed from the number of

[Xen-devel] [RFC PATCH 0/5] Extend resources to support more vcpus in single VM

2017-08-25 Thread Lan Tianyu
This patchset is to extend some resources(i.e, event channel, hap and so) to support more vcpus for single VM. Chao Gao (1): xl/libacpi: extend lapic_id() to uint32_t Lan Tianyu (4): xen/hap: Increase hap size for more vcpus support XL: Increase event channels to support more vcpus Tool

[Xen-devel] [RFC PATCH 3/5] Tool/ACPI: DSDT extension to support more vcpus

2017-08-25 Thread Lan Tianyu
This patch is to change DSDT table for processor object to support >255 vcpus. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libacpi/mk_dsdt.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsd

[Xen-devel] [RFC PATCH 2/5] XL: Increase event channels to support more vcpus

2017-08-25 Thread Lan Tianyu
This patch is to increase event channels to support more vcpus in single VM. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/libxl/libxl_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 1

[Xen-devel] [RFC PATCH 1/5] xen/hap: Increase hap size for more vcpus support

2017-08-25 Thread Lan Tianyu
This patch is to increase hap size to support more vcpus in single VM. Signed-off-by: Lan Tianyu <tianyu@intel.com> --- xen/arch/x86/mm/hap/hap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index cdc77a9..c

[Xen-devel] [RFC PATCH 5/5] xl/libacpi: extend lapic_id() to uint32_t

2017-08-25 Thread Lan Tianyu
From: Chao Gao <chao@intel.com> This patch is to extend lapic_id() to support more vcpus. Signed-off-by: Chao Gao <chao@intel.com> Signed-off-by: Lan Tianyu <tianyu@intel.com> --- tools/firmware/hvmloader/util.c | 2 +- tools/libacpi/libacpi.h |

[Xen-devel] [RFC PATCH 4/5] hvmload: Add x2apic entry support in the MADT build

2017-08-25 Thread Lan Tianyu
This patch is to add x2apic entry support for ACPI MADT table. Signed-off-by: Lan Tianyu <tianyu@intel.com> Signed-off-by: Chao Gao <chao@intel.com> --- tools/libacpi/acpi2_0.h | 10 tools/libacpi/build.c | 61 ++--- 2 f

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-25 Thread Lan Tianyu
On 2017年08月25日 11:19, Lan Tianyu wrote: > On 2017年08月24日 19:08, Wei Liu wrote: >>>>> If add dmar table for hvmlite, we should combine dmar table with other >>>>>>>> ACPI table and populate into acpi_modules[2]. This is how hvmlite add >>

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-24 Thread Lan Tianyu
On 2017年08月24日 19:08, Wei Liu wrote: If add dmar table for hvmlite, we should combine dmar table with other > >> ACPI table and populate into acpi_modules[2]. This is how hvmlite add > >> other ACPI tables in libxl__dom_load_acpi(). > >> >>> > > >>> > > Sure, that sounds

Re: [Xen-devel] [PATCH V2 11/25] x86/hvm: Introduce a emulated VTD for HVM

2017-08-24 Thread Lan Tianyu
On 2017年08月24日 16:49, Roger Pau Monné wrote: > On Thu, Aug 24, 2017 at 10:16:32AM +0800, Lan Tianyu wrote: >> On 2017年08月23日 15:58, Roger Pau Monné wrote: >>> On Wed, Aug 09, 2017 at 04:34:12PM -0400, Lan Tianyu wrote: >>>> From: Chao Gao <chao@intel.

Re: [Xen-devel] [PATCH V2 7/25] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-08-24 Thread Lan Tianyu
On 2017年08月24日 14:54, Jan Beulich wrote: >>>> On 24.08.17 at 04:33, <tianyu@intel.com> wrote: >> On 2017年08月23日 16:04, Roger Pau Monné wrote: >>> On Wed, Aug 23, 2017 at 03:52:01PM +0800, Lan Tianyu wrote: >>>> On 2017年08月23日 00:41, Roger

Re: [Xen-devel] [PATCH V2 19/25] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-08-24 Thread Lan Tianyu
On 2017年08月24日 14:59, Jan Beulich wrote: >>>> On 24.08.17 at 08:11, <tianyu@intel.com> wrote: >> On 2017年08月23日 18:14, Roger Pau Monné wrote: >>> On Wed, Aug 09, 2017 at 04:34:20PM -0400, Lan Tianyu wrote: >>>> --- a/xen/arch/x86/hvm/vi

Re: [Xen-devel] [PATCH V2 24/25] x86/vvtd: Add queued invalidation (QI) support

2017-08-24 Thread Lan Tianyu
On 2017年08月23日 20:16, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:25PM -0400, Lan Tianyu wrote: >> > From: Chao Gao <chao@intel.com> >> > >> > Queued Invalidation Interface is an expanded invalidation interface with >> > extended

Re: [Xen-devel] [PATCH V2 19/25] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-08-24 Thread Lan Tianyu
On 2017年08月23日 18:14, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:20PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> When IOAPIC RTE is in remapping format, it doesn't contain the vector of >> interrupt. For this case, the R

Re: [Xen-devel] [PATCH V2 16/25] x86/vioapic: Hook interrupt delivery of vIOAPIC

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 17:59, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:17PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> When irq remapping is enabled, IOAPIC Redirection Entry may be in remapping >> format. If that, generate

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 16:34, Wei Liu wrote: > On Wed, Aug 23, 2017 at 01:35:17PM +0800, Lan Tianyu wrote: >> On 2017年08月22日 21:48, Wei Liu wrote: >>>>> Hi, Wei >>>>> Thanks for your comments. >>>>> >>>>> iirc, HVM only supports one modu

Re: [Xen-devel] [PATCH V2 7/25] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 16:04, Roger Pau Monné wrote: > On Wed, Aug 23, 2017 at 03:52:01PM +0800, Lan Tianyu wrote: >> On 2017年08月23日 00:41, Roger Pau Monné wrote: >>>>> +drhd = (struct acpi_dmar_hardware_unit *)((void*)dmar + >>>>> sizeof(*dmar)); >>>&

Re: [Xen-devel] [PATCH V2 11/25] x86/hvm: Introduce a emulated VTD for HVM

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 15:58, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:12PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> This patch adds create/destroy/query function for the emulated VTD >> and adapts it to the common VIOMMU abstr

Re: [Xen-devel] [PATCH V2 2/25] VIOMMU: Add irq request callback to deal with irq remapping

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 17:24, Jan Beulich wrote: >>>> On 23.08.17 at 09:42, <tianyu@intel.com> wrote: >> On 2017年08月22日 23:32, Roger Pau Monné wrote: >>> On Wed, Aug 09, 2017 at 04:34:03PM -0400, Lan Tianyu wrote: >>>> +static inline void irq_request_ioapic

Re: [Xen-devel] [PATCH V2 1/25] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 15:22, Roger Pau Monné wrote: > On Wed, Aug 23, 2017 at 02:06:17PM +0800, Lan Tianyu wrote: >> Hi Roger: >> Thanks for your review. >> >> On 2017年08月22日 22:32, Roger Pau Monné wrote: >>> On Wed, Aug 09, 2017 at 04:34:02PM -0400, Lan

Re: [Xen-devel] [PATCH V2 10/25] tools/libxl: create vIOMMU during domain construction

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 15:45, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:11PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> If guest is configured to have a vIOMMU, create it during domain >> construction. >> >> Signed-of

Re: [Xen-devel] [PATCH V2 7/25] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-08-23 Thread Lan Tianyu
On 2017年08月23日 00:41, Roger Pau Monné wrote: >> > +drhd = (struct acpi_dmar_hardware_unit *)((void*)dmar + >> > sizeof(*dmar)); >> > +drhd->type = ACPI_DMAR_TYPE_HARDWARE_UNIT; >> > +drhd->length = sizeof(*drhd) + ioapic_scope_size; >> > +drhd->flags = ACPI_DMAR_INCLUDE_PCI_ALL;

Re: [Xen-devel] [PATCH V2 3/25] VIOMMU: Add get irq info callback to convert irq remapping request

2017-08-23 Thread Lan Tianyu
On 2017年08月22日 23:38, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:04PM -0400, Lan Tianyu wrote: >> This patch is to add get_irq_info callback for platform implementation >> to convert irq remapping request to irq info (E,G vector, dest, dest_mode >> and so on). >

Re: [Xen-devel] [PATCH V2 2/25] VIOMMU: Add irq request callback to deal with irq remapping

2017-08-23 Thread Lan Tianyu
On 2017年08月22日 23:32, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:03PM -0400, Lan Tianyu wrote: >> This patch is to add irq request callback for platform implementation >> to deal with irq remapping request. >> >> Signed-off-by: Lan Tianyu <tianyu@in

Re: [Xen-devel] [PATCH V2 4/25] Xen/doc: Add Xen virtual IOMMU doc

2017-08-23 Thread Lan Tianyu
On 2017年08月22日 23:55, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:05PM -0400, Lan Tianyu wrote: >> This patch is to add Xen virtual IOMMU doc to introduce motivation, >> framework, vIOMMU hypercall and xl configuration. >> >> Signed-off-by: Lan T

Re: [Xen-devel] [PATCH V2 1/25] VIOMMU: Add vIOMMU helper functions to create, destroy and query capabilities

2017-08-23 Thread Lan Tianyu
On 2017年08月22日 23:27, Roger Pau Monné wrote: > On Thu, Aug 17, 2017 at 08:22:16PM -0400, Lan Tianyu wrote: >> This patch is to introduct an abstract layer for arch vIOMMU implementation >> to deal with requests from dom0. Arch vIOMMU code needs to provide callback >> to pe

Re: [Xen-devel] [PATCH V2 1/25] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-08-23 Thread Lan Tianyu
Hi Roger: Thanks for your review. On 2017年08月22日 22:32, Roger Pau Monné wrote: > On Wed, Aug 09, 2017 at 04:34:02PM -0400, Lan Tianyu wrote: >> This patch is to introduce create, destroy and query capabilities >> command for vIOMMU. vIOMMU layer will deal with requests a

Re: [Xen-devel] [PATCH V2 9/25] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-08-22 Thread Lan Tianyu
On 2017年08月22日 21:48, Wei Liu wrote: >> > Hi, Wei >> > Thanks for your comments. >> > >> > iirc, HVM only supports one module; DMAR cannot be a new module. Joining to >> > the existing one is the approach we are taking. >> > >> > Which kind of conflicts you think should be resolved? If you mean

Re: [Xen-devel] [PATCH V2 6/25] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-08-22 Thread Lan Tianyu
On 2017年08月22日 20:56, Wei Liu wrote: > On Wed, Aug 09, 2017 at 04:34:07PM -0400, Lan Tianyu wrote: >> From: Chao Gao <chao@intel.com> >> >> Add dmar table structure according Chapter 8 "BIOS Considerations" of >> VTd spec Rev. 2.4. >> >> V

Re: [Xen-devel] [PATCH V2 8/25] tools/libxl: Add a user configurable parameter to control vIOMMU attributes

2017-08-22 Thread Lan Tianyu
On 2017年08月22日 21:19, Wei Liu wrote: >> +=over 4 >> > + >> > +=item

  1   2   3   4   >