[Xen-devel] [PATCH 2/2] IOMMU/MMU: Adjust low level functions for VT-d Device-TLB flush error.

2016-03-19 Thread Quan Xu
Current code would be panic(), when VT-d Device-TLB flush timed out. the panic() is going to be eliminated, so we must check all kinds of error and all the way up the call trees. Signed-off-by: Quan Xu CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Keir Fraser CC: Jan Beulich CC

[Xen-devel] [PATCH v7 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed

2016-03-19 Thread Quan Xu
Signed-off-by: Quan Xu --- docs/misc/xen-command-line.markdown | 7 +++ xen/drivers/passthrough/vtd/qinval.c | 19 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index ca77e3b

[Xen-devel] [PATCH v7 0/2] VT-d Device-TLB flush issue

2016-03-19 Thread Quan Xu
ock for pdev-s list. * Print SBDF in canonical :bb:dd.f form. * Handle 'ret'/'rc' variables in the same function, and remove the pointless rc. --Changes in v7: #patch 1 * Enhance printout infomation. * Enhance time unit conversion. #patch 2 *Enhance chan

[Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Quan Xu
If Device-TLB flush timed out, we would hide the target ATS device and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning. The hidden device should be disallowed to be further assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers

[Xen-devel] [PATCH v7 3/6] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver

2015-05-11 Thread Quan Xu
xen_hvm_init() [...] -->xen_fe_register("vtpm", ...) -->xenstore_fe_scan() -->xen_fe_try_init(ops) --> XenDevOps.init() -->xen_fe_get_xendev() --> XenDevOps.alloc() -->xen_fe_check() -->xen_fe_try_initialise()

[Xen-devel] [PATCH v7 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-05-11 Thread Quan Xu
Signed-off-by: Quan Xu Reviewed-by: Eric Blake --- configure| 14 ++ hmp.c| 2 ++ qapi-schema.json | 16 ++-- qemu-options.hx | 13 +++-- tpm.c| 7 ++- 5 files changed, 47 insertions(+), 5 deletions(-) diff --git a

[Xen-devel] [PATCH v7 6/6] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

2015-05-11 Thread Quan Xu
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init() Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --- vl.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index 74c2681..7bc87f1

[Xen-devel] [PATCH v7 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-05-11 Thread Quan Xu
pmdev xenstubdoms,id=xenvtpm0 -device tpm-tis,tpmdev=xenvtpm0" Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --Changes in v7: -Redefine DPRINTF macro. --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_xenstubdoms.c | 276 +++ 2 files ch

[Xen-devel] [PATCH v7 4/6] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c

2015-05-11 Thread Quan Xu
and rename it to tpm_util_is_selftest(). Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_passthrough.c | 13 + hw/tpm/tpm_util.c| 39 +++ include/sysemu

[Xen-devel] [PATCH v7 0/6] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2015-05-11 Thread Quan Xu
physical TPM 1.2 that is soldered onto the motherboard. --Changes in v7: -Redefine DPRINTF macro. -Move 'extern struct XenDevOps xen_vtpmdev_ops' from patch #2 to patch #3. -Replace PAGE_SIZE with VTPM_PAGE_SIZE. -Move vtpm_backend_changed() to hw/tpm/xen_vtpm_frontend.c. Quan Xu (6):

[Xen-devel] [PATCH v7 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-11 Thread Quan Xu
ackend, such as xendevs queue and xenstore update functions. Signed-off-by: Quan Xu --Changes in v7: -Move 'extern struct XenDevOps xen_vtpmdev_ops' to patch #3. --- hw/display/xenfb.c | 4 +- hw/xen/Makefile.objs | 2 +- hw/xen/xe

[Xen-devel] [PATCH v8 6/7] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-05-17 Thread Quan Xu
pmdev xenstubdoms,id=xenvtpm0 -device tpm-tis,tpmdev=xenvtpm0" Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_xenstubdoms.c | 276 +++ 2 files changed, 277 insertions(+), 1 deletion(-) create m

[Xen-devel] [PATCH v8 0/7] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2015-05-17 Thread Quan Xu
physical TPM 1.2 that is soldered onto the motherboard. --Changes in v8: -split patch#2 in two, patch#2 and patch#3. Quan Xu (7): Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Qemu-Xen-vTPM: Create a new file xen_pvdev.c Qemu-Xen-vTPM: Xen frontend driver infrastructure

[Xen-devel] [PATCH v8 7/7] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

2015-05-17 Thread Quan Xu
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init() Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --- vl.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index 74c2681..7bc87f1

[Xen-devel] [PATCH v8 5/7] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c

2015-05-17 Thread Quan Xu
and rename it to tpm_util_is_selftest(). Signed-off-by: Quan Xu Reviewed-by: Stefan Berger --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_passthrough.c | 13 + hw/tpm/tpm_util.c| 39 +++ include/sysemu

[Xen-devel] [PATCH v8 0/7] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2015-05-17 Thread Quan Xu
physical TPM 1.2 that is soldered onto the motherboard. --Changes in v8: -split patch#2 in two, patch#2 and patch#3. Quan Xu (7): Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Qemu-Xen-vTPM: Create a new file xen_pvdev.c Qemu-Xen-vTPM: Xen frontend driver infrastructure

[Xen-devel] [PATCH v8 3/7] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-17 Thread Quan Xu
ndle event channel between the virtual machines. Call xen_fe_register() function to register XenDevOps, and make sure, XenDevOps's flags is DEVOPS_FLAG_FE, which is flag bit to point out the XenDevOps is Xen frontend. Signed-off-by: Quan Xu --- hw/xen/Makefile.objs | 2 +- hw/xen

[Xen-devel] [PATCH v8 2/7] Qemu-Xen-vTPM: Create a new file xen_pvdev.c

2015-05-17 Thread Quan Xu
for some common part of xen frontend and backend, such as xendevs queue and xenstore update functions. Signed-off-by: Quan Xu --- hw/display/xenfb.c | 4 +- hw/xen/Makefile.objs | 2 +- hw/xen/xen_backend.c | 353 --- hw/xen/xen_pvdev.c

[Xen-devel] [PATCH v8 4/7] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver

2015-05-17 Thread Quan Xu
xen_hvm_init() [...] -->xen_fe_register("vtpm", ...) -->xenstore_fe_scan() -->xen_fe_try_init(ops) --> XenDevOps.init() -->xen_fe_get_xendev() --> XenDevOps.alloc() -->xen_fe_check() -->xen_fe_try_initialise() -->

[Xen-devel] [PATCH v8 1/7] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-05-17 Thread Quan Xu
Signed-off-by: Quan Xu Reviewed-by: Eric Blake --- configure| 14 ++ hmp.c| 2 ++ qapi-schema.json | 16 ++-- qemu-options.hx | 13 +++-- tpm.c| 7 ++- 5 files changed, 47 insertions(+), 5 deletions(-) diff --git a

Re: [Xen-devel] [v9 00/19] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2016-07-17 Thread Quan Xu
On 2016 Jul 14 (Thu) 23:34, Stefano Stabellini  wrote:> Hi Quan, >  > thanks for CC'ing me. sstabell...@kernel.org is the right address to > reach me now. > > I am also CC'ing Anthony Perard who is Xen co-maintainer in QEMU. >  > Cheers, > > Stefano thanks in advance!! :):)Quan _

Re: [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c

2016-07-17 Thread Quan Xu
[Quan:]: comment starts with [Quan:] The purpose of the new file is to store generic functions shared by frontendand  backends such as xenstore operations, xendevs. Signed-off-by: Quan Xu  Signed-off-by: Emil Condrea  ---  hw/xen/Makefile.objs |   2 +-  hw/xen/xen_backend.c

Re: [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c

2016-07-22 Thread Quan Xu
-devel ; Daniel De Graaf ; xen-devel ; Stefano Stabellini ; Quan Xu ; wei.liu2 ; stefanb ; anthony.perard Subject:Re: [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c Eric, this is the link to the original patch which is well formatted: http://marc.info/?l=xen-devel&a

Re: [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c

2016-07-22 Thread Quan Xu
16 15:50:27 +0100, anthony.perard wrote:> On Sun, Jul 17, 2016 at 03:41:26PM +0800, Quan Xu wrote: > -int xenstore_write_int(const char *base, const char *node, int ival) > -{ > -char val[12]; > - > [Quan:]: why 12 ? what about XEN_BUFSIZE?  That is the number of digit in I

[Xen-devel] [PATCH v5 6/7] VT-d: Refactor iommu_flush .iotlb()

2016-02-05 Thread Quan Xu
to pass down a flag indicating whether the lock is being held, and check the way up the call trees. Signed-off-by: Quan Xu --- xen/arch/x86/mm/p2m-ept.c| 3 +- xen/drivers/passthrough/vtd/iommu.c | 73 ++-- xen/drivers/passthrough/vtd/iommu.h | 3

[Xen-devel] [PATCH v5 5/7] VT-d: Refactor iommu_ops .map_page() and unmap_page()

2016-02-05 Thread Quan Xu
to pass down a flag indicating whether the lock is being held, and check the way up the call trees. Signed-off-by: Quan Xu --- xen/arch/x86/mm.c | 9 ++--- xen/arch/x86/mm/p2m-ept.c | 7 --- xen/arch/x86/mm/p2m-pt.c

[Xen-devel] [PATCH v5 4/7] VT-d: Refactor iommu_ops .iotlb_flush() and iotlb_flush_all()

2016-02-05 Thread Quan Xu
to pass down a flag indicating whether the lock is being held. Signed-off-by: Quan Xu --- xen/arch/arm/p2m.c | 2 +- xen/common/memory.c | 4 ++-- xen/drivers/passthrough/iommu.c | 9 + xen/drivers/passthrough/vtd/iommu.c | 5 +++-- xen/drivers

[Xen-devel] [PATCH v5 1/7] VT-d: Check VT-d Device-TLB flush error(IOMMU part).

2016-02-05 Thread Quan Xu
This patch checks all kinds of error and all the way up the call trees of VT-d Device-TLB flush(IOMMU part). Signed-off-by: Quan Xu --- xen/drivers/passthrough/amd/iommu_init.c | 4 +- xen/drivers/passthrough/amd/pci_amd_iommu.c | 4 +- xen/drivers/passthrough/arm/smmu.c

[Xen-devel] [PATCH v5 7/7] VT-d: Fix vt-d Device-TLB flush timeout issue.

2016-02-05 Thread Quan Xu
If Device-TLB flush is timeout, we'll hide the target ATS device and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning. The hidden device will be disallowed to be further assigned to any domain. Signed-off-by: Quan Xu --- xen/dr

[Xen-devel] [PATCH v5 2/7] VT-d: Check VT-d Device-TLB flush error(MMU part).

2016-02-05 Thread Quan Xu
This patch checks all kinds of error and all the way up the call trees of VT-d Device-TLB flush(MMU part). Signed-off-by: Quan Xu --- xen/arch/x86/acpi/power.c | 6 +- xen/arch/x86/crash.c| 3 ++- xen/arch/x86/domain_build.c | 5 - xen/arch/x86/mm.c | 10

[Xen-devel] [PATCH v5 3/7] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.

2016-02-05 Thread Quan Xu
Signed-off-by: Quan Xu --- docs/misc/xen-command-line.markdown | 7 +++ xen/drivers/passthrough/vtd/qinval.c | 11 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index a565c1b..6ed5cd8

[Xen-devel] [PATCH v5 0/7] VT-d Device-TLB flush issue

2016-02-05 Thread Quan Xu
be trivially avoided.(P7) * Enhance the print out message. (P7) * Enhance the comment.(P7) * Consult the bitmap along with the domain ID array.(P7) Quan Xu (7): VT-d: Check VT-d Device-TLB flush error(IOMMU part). VT-d: Check VT-d Device-TLB flush error(MMU part). VT-d: Reduce spin timeout t

[Xen-devel] [PATCH 0/2] VT-d flush issue

2015-12-03 Thread Quan Xu
Comments are welcomed. Device marked as unassignable will be disallowed to be further assigned to any domain. *Kevin Tian did basic functional review. Quan Xu (2): VT-d: Reduce spin timeout to 1ms, which can be boot-time changed. VT-d: Fix vt-d flush timeout issue. xen/drivers/passthrough/vtd/i

[Xen-devel] [PATCH 2/2] VT-d: Fix vt-d flush timeout issue.

2015-12-03 Thread Quan Xu
hardware domain, just throw out a warning. It's an open here whether we want to kill Dom0 or hardware domain (or directly panic hypervisor). Comments are welcomed. Device marked as unassignable will be disallowed to be further assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers/pas

[Xen-devel] [PATCH 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.

2015-12-03 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/qinval.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c index b81b0bd..990baf2 100644 --- a/xen/drivers/passthrough/vtd/qinval.c

[Xen-devel] [PATCH v2 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.

2015-12-10 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/qinval.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c index b81b0bd..990baf2 100644 --- a/xen/drivers/passthrough/vtd/qinval.c

[Xen-devel] [PATCH v2 2/2] VT-d: Fix vt-d flush timeout issue.

2015-12-10 Thread Quan Xu
assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/extern.h | 4 ++ xen/drivers/passthrough/vtd/iommu.c | 6 +++ xen/drivers/passthrough/vtd/iommu.h | 5 ++ xen/drivers/passthrough/vtd/qinval.c | 86 ++- xen/drivers/passthroug

[Xen-devel] [PATCH v2 0/2] VT-d flush issue

2015-12-10 Thread Quan Xu
eck within dev_invalidate_iotlb for each ATS device, to identify bogus device accurately. Quan Xu (2): VT-d: Reduce spin timeout to 1ms, which can be boot-time changed. VT-d: Fix vt-d flush timeout issue. xen/drivers/passthrough/vtd/extern.h | 4 ++ xen/drivers/passthrough/vtd/iommu.c

[Xen-devel] [PATCH v3 0/2] VT-d flush issue

2015-12-12 Thread Quan Xu
then ignore these INVALID_* parameters. 3. Change macros(mark_pdev_unassignable/IS_PDEV_UNASSIGNABLE) into static inline functions. Quan Xu (2): VT-d: Reduce spin timeout to 1ms, which can be boot-time changed. VT-d: Fix vt-d flush timeout issue. xen/drivers/passthrough/vtd/exte

[Xen-devel] [PATCH v3 1/2] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.

2015-12-12 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/qinval.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c index b81b0bd..990baf2 100644 --- a/xen/drivers/passthrough/vtd/qinval.c

[Xen-devel] [PATCH v3 2/2] VT-d: Fix vt-d flush timeout issue.

2015-12-12 Thread Quan Xu
assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/extern.h | 5 +++ xen/drivers/passthrough/vtd/iommu.c | 6 +++ xen/drivers/passthrough/vtd/qinval.c | 78 ++- xen/drivers/passthrough/vtd/x86/ats.c | 16 +++ xen/in

[Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.

2015-12-23 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/qinval.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c index 946e812..b227e4e 100644 --- a/xen/drivers/passthrough/vtd/qinval.c

[Xen-devel] [PATCH v4 3/3] VT-d: Fix vt-d Device-TLB flush timeout issue.

2015-12-23 Thread Quan Xu
ll be disallowed to be further assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers/passthrough/pci.c | 2 +- xen/drivers/passthrough/vtd/extern.h | 2 + xen/drivers/passthrough/vtd/qinval.c | 80 ++- xen/drivers/passthrough/vtd/x86/ats.c

[Xen-devel] [PATCH v4 0/3] VT-d Device-TLB flush issue

2015-12-23 Thread Quan Xu
pervisor. The coming patch set will fix it. Quan Xu (3): VT-d: Check VT-d Device-TLB flush error. VT-d: Reduce spin timeout to 1ms, which can be boot-time changed. VT-d: Fix vt-d Device-TLB flush timeout issue. xen/arch/x86/acpi/power.c | 8 +- xen/arch/x86/crash.

[Xen-devel] [PATCH v4 1/3] VT-d: Check VT-d Device-TLB flush error.

2015-12-23 Thread Quan Xu
This patch checks all kinds of error and all the way up the call trees of VT-d Device-TLB flush. Signed-off-by: Quan Xu --- xen/arch/x86/acpi/power.c | 8 +- xen/arch/x86/crash.c | 3 +- xen/arch/x86/domain_build.c | 5 +- xen

[Xen-devel] [PATCH v3 6/7] vTPM: Parse envent string from QEMU frontend

2015-03-10 Thread Quan Xu
Signed-off-by: Quan Xu --- extras/mini-os/tpmback.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/extras/mini-os/tpmback.c b/extras/mini-os/tpmback.c index 8a0a983..b8f4c8f 100644 --- a/extras/mini-os/tpmback.c +++ b/extras/mini-os/tpmback.c

[Xen-devel] [PATCH v3 5/7] vTPM: Delete the xenstore directory of frontend device

2015-03-10 Thread Quan Xu
when virtual machine is destroyed. Signed-off-by: Quan Xu --- tools/libxl/libxl_device.c | 61 +++--- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index b1a71fe..668bf71 100644

[Xen-devel] [PATCH v3 7/7] vTPM: add QEMU_STUBDOM_VTPM compile option

2015-03-10 Thread Quan Xu
Signed-off-by: Quan Xu --- Config.mk | 4 tools/Makefile | 7 +++ 2 files changed, 11 insertions(+) diff --git a/Config.mk b/Config.mk index a5b6c41..5a5f413 100644 --- a/Config.mk +++ b/Config.mk @@ -254,6 +254,10 @@ endif OVMF_UPSTREAM_REVISION

[Xen-devel] [PATCH v3 4/7] vTPM: add vTPM device for HVM virtual machine

2015-03-10 Thread Quan Xu
refactor libxl__device_vtpm_add to call the right helpers libxl__device_vtpm_add_{pv,hvm}. For HVM virtual machine, it does not support hot-plug and hot-unplug, as it requires SeaBios to initalize ACPI and virtual MMIO space for TPM TIS when virtual machine starts. Signed-off-by: Quan Xu

[Xen-devel] [PATCH v4 0/5] QEMU:Xen stubdom vTPM for HVM virtual machine

2015-03-10 Thread Quan Xu
vtpm_recv() directly. --Changes in v2: -adding xen_fe_register() that handle any Xen PV frontend registration -remove a private structure 'QEMUBH' -change version number to 2.3 in qapi-schema.json -move hw/xen/xen_stubdom_vtpm.c to hw/tpm/xen_stubdom_vtpm.c Quan Xu (5):

[Xen-devel] [PATCH v4 3/5] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver

2015-03-10 Thread Quan Xu
-> XenDevOps.initialise() -->xen_fe_try_connected() --> XenDevOps.connected() -->xs_watch() [...] --Changes in v3: -Move xen_stubdom_vtpm.c to xen_vtpm_frontend.c -Read Xen vTPM status via XenStore --Changes in v4: -Redesign vTPM xenstore architecture for HV

[Xen-devel] [PATCH v3 0/7] vTPM: Xen stubdom vTPM for HVM virtual machine

2015-03-10 Thread Quan Xu
-Delete the domain type reading for domid -refactor libxl__device_vtpm_add() -rename libxl__device_hvm_vtpm_add() to libxl__device_vtpm_add_hvm() Quan Xu (7): vTPM: event channel bind interdomain with para/hvm virtual machine vTPM: limit libxl__add_vtpms() function to para virtual machine vTPM: add TPM TCPA and SSD

[Xen-devel] [PATCH v4 5/5] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

2015-03-10 Thread Quan Xu
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init() Signed-off-by: Quan Xu --- vl.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index f6b3546..0bbdaa1 100644 --- a/vl.c +++ b/vl.c

[Xen-devel] [PATCH v4 1/5] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-03-10 Thread Quan Xu
--Changes in v4: -qapi schema enhancement. -remove no need code. Signed-off-by: Quan Xu --- configure| 14 ++ hmp.c| 2 ++ qapi-schema.json | 18 -- qemu-options.hx | 13 +++-- tpm.c| 7 ++- 5 files changed, 49

[Xen-devel] [PATCH v3 2/7] vTPM: limit libxl__add_vtpms() function to para virtual machine

2015-03-10 Thread Quan Xu
Signed-off-by: Quan Xu --- tools/libxl/libxl_create.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index b1ff5ae..66877b3 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1358,8

[Xen-devel] [PATCH v3 3/7] vTPM: add TPM TCPA and SSDT for HVM virtual machine when vTPM is added

2015-03-10 Thread Quan Xu
Signed-off-by: Quan Xu --- tools/firmware/hvmloader/acpi/build.c | 7 --- tools/libxl/libxl_create.c| 5 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/firmware/hvmloader/acpi/build.c b/tools/firmware/hvmloader/acpi/build.c index 1431296..49f6772

[Xen-devel] [PATCH] SeaBios/vTPM: Enable Xen stubdom vTPM for HVM virtual machine

2015-03-10 Thread Quan Xu
Signed-off-by: Quan Xu Signed-off-by: Stefan Berger --- Makefile | 2 +- src/post.c | 3 + src/tpm.c | 309 + src/tpm.h | 141 4 files changed, 454 insertions(+), 1 deletion(-) create mode 100644

[Xen-devel] [PATCH] SeaBios/vTPM: Enable Xen stubdom vTPM for HVM virtual machine

2015-03-10 Thread Quan Xu
-by: Quan Xu Signed-off-by: Stefan Berger Quan Xu (1): SeaBios/vTPM: Enable Xen stubdom vTPM for HVM virtual machine Makefile | 2 +- src/post.c | 3 + src/tpm.c | 309 + src/tpm.h | 141 4 files

[Xen-devel] [PATCH v4 2/5] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-03-10 Thread Quan Xu
n_pvdev.c -Move xenstore functions to xen_pvdev.c -Check status before setting the frontend to connect Signed-off-by: Quan Xu --- hw/display/xenfb.c | 4 +- hw/xen/Makefile.objs | 2 +- hw/xen/xen_backend.c | 353 --- hw/xen/xen_frontend

[Xen-devel] [PATCH v4 4/5] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-03-12 Thread Quan Xu
pmdev xenstubdoms,id=xenvtpm0 -device tpm-tis,tpmdev=xenvtpm0" --Changes in v3: -Call vtpm_send() and vtpm_recv() directly --Changes in v4: -Fix the comment style Signed-off-by: Quan Xu --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_xenstubdo

[Xen-devel] [PATCH v3 1/7] vTPM: event channel bind interdomain with para/hvm virtual machine

2015-03-12 Thread Quan Xu
Signed-off-by: Quan Xu --- extras/mini-os/tpmback.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/extras/mini-os/tpmback.c b/extras/mini-os/tpmback.c index 00b66e8..8a0a983 100644 --- a/extras/mini-os/tpmback.c +++ b/extras/mini-os/tpmback.c

[Xen-devel] [PATCH] Build: Fix stubdom vtpm build failure

2015-03-14 Thread Quan Xu
Typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging branch. Signed-off-by: Olaf Hering Signed-off-by: Quan Xu --- stubdom/vtpmmgr/common_types.h |9 + stubdom/vtpmmgr/tcg.h |7 +-- stubdom/vtpmmgr/tpm2.c

[Xen-devel] [PATCH v2] Build: Fix stubdom vtpm build failure

2015-03-16 Thread Quan Xu
Typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging branch. Signed-off-by: Olaf Hering Signed-off-by: Quan Xu --- stubdom/vtpmmgr/common_types.h |9 + stubdom/vtpmmgr/tcg.h |7 +-- stubdom/vtpmmgr/tpm2.c

[Xen-devel] [Patch RFC 05/13] vt-d: Clear the IWC field of Invalidation Event Control Register in

2015-09-15 Thread Quan Xu
of generating another interrupt. then, Clear IM fild of Invalidation Event Control Register for no masking of QI interrupt. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 59 + xen/drivers/passthrough/vtd/iommu.h | 6 2 files changed

[Xen-devel] [Patch RFC 06/13] vt-d: Introduce a new per-domain flag - qi_flag.

2015-09-15 Thread Quan Xu
The qi_flag is Set when submit Device-TLB invalidation requests. The qi_flag will be Clear in QI interrupt handler if there are no in-flight Device-TLB invalidation requests. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 1 + xen/drivers/passthrough/vtd/qinval.c | 1 + xen

[Xen-devel] [Patch RFC 01/13] vt-d: Redefine iommu_set_interrupt() for registering MSI interrupt

2015-09-15 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 1dffc40..17bfb76 100644 --- a/xen/drivers/passthrough/vtd

[Xen-devel] [Patch RFC 11/13] vt-d: If the Device-TLB flush is still not completed when

2015-09-15 Thread Quan Xu
to destroy virtual machine, schedule and wait on a waitqueue until the Device-TLB flush is completed. Signed-off-by: Quan Xu --- xen/common/domain.c | 10 ++ xen/drivers/passthrough/vtd/iommu.c | 9 + xen/include/xen/hvm/iommu.h | 6 ++ 3 files

[Xen-devel] [Patch RFC 04/13] vt-d: Clear invalidation table in invaidation interrupt handler

2015-09-15 Thread Quan Xu
if it has no in-flight Device-TLB invalidation request. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index db6e3a2..0e912fb

[Xen-devel] [Patch RFC 10/13] vt-d: Held on the removed page until the Device-TLB flush is completed.

2015-09-15 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/common/memory.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index 61bb94c..4b2def5 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -253,7 +253,21 @@ int

[Xen-devel] [Patch RFC 08/13] vt-d: Held on the freed page until the Device-TLB flush is completed.

2015-09-15 Thread Quan Xu
Queued Invalidation(QI) interrupt handler if the Device-TLB flush is completed. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 35 +++ xen/include/xen/hvm/iommu.h | 8 2 files changed, 43 insertions(+) diff --git a/xen/drivers

[Xen-devel] [Patch RFC 00/13] VT-d Asynchronous Device-TLB Flush for ATS Device

2015-09-15 Thread Quan Xu
here are no in-flight Device-TLB invalidation requests.)) Quan Xu (13): vt-d: Redefine iommu_set_interrupt() for registering MSI interrupt vt-d: Register MSI for async invalidation completion interrupt. vt-d: Track the Device-TLB invalidation status in an invalidation table. vt-d: Clear inva

[Xen-devel] [Patch RFC 02/13] vt-d: Register MSI for async invalidation completion interrupt.

2015-09-15 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 133 xen/drivers/passthrough/vtd/iommu.h | 10 +++ 2 files changed, 143 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 17bfb76

[Xen-devel] [Patch RFC 09/13] vt-d: Put the page in Queued Invalidation(QI) interrupt handler if

2015-09-15 Thread Quan Xu
the Device-TLB flush is completed. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 5c03e41..1297dea 100644 --- a/xen/drivers

[Xen-devel] [Patch RFC 12/13] vt-d: For gnttab_transfer, If the Device-TLB flush is still

2015-09-15 Thread Quan Xu
not completed when to map the transferring page to a remote domain, schedule and wait on a waitqueue until the Device-TLB flush is completed. Signed-off-by: Quan Xu --- xen/common/grant_table.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/common/grant_table.c b/xen

[Xen-devel] [Patch RFC 07/13] vt-d: If the qi_flag is Set, the domain's vCPUs are not allowed to

2015-09-15 Thread Quan Xu
entry guest mode and put into the SCHEDOP_yield list. Signed-off-by: Quan Xu --- xen/arch/x86/hvm/vmx/entry.S | 10 ++ xen/arch/x86/x86_64/asm-offsets.c | 1 + xen/common/domain.c | 5 + xen/include/xen/hvm/iommu.h | 2 ++ 4 files changed, 18 insertions

[Xen-devel] [Patch RFC 13/13] vt-d: Set the IF bit in Invalidation Wait Descriptor When submit Device-TLB

2015-09-15 Thread Quan Xu
invalidataion requests. If the IF bit is Set, the interrupt based mechanism will be used to track the Device-TLB invalidation requests. Do not do polling to detect whether hardware completes the Device-TLB invalidation during Device- TLB invalidation. Signed-off-by: Quan Xu --- xen/drivers

[Xen-devel] [Patch RFC 03/13] vt-d: Track the Device-TLB invalidation status in an invalidation table.

2015-09-15 Thread Quan Xu
Update invalidation table's count of in-flight Device-TLB invalidation request and assign the address of global polling parameter per domain in the Status Address of each invalidation wait descriptor, when submit Device-TLB invalidation requests. Signed-off-by: Quan Xu --- xen/dr

[Xen-devel] [PATCH] vt-d: Fix IM bit mask and unmask of Fault Event Control Register.

2015-09-24 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 3d98fea..f31d41b 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b

[Xen-devel] [PATCH resend] vt-d: Fix IM bit mask and unmask of Fault Event Control Register.

2015-09-24 Thread Quan Xu
Bit 0:29 in Fault Event Control Register are 'Reserved and Preserved', software cannot write 0 to it unconditionally. Software must preserve the value read for writes. Signed-off-by: Quan Xu Acked-by: Yang Zhang --- xen/drivers/passthrough/vtd/iommu.c | 10 -- 1 file

[Xen-devel] [PATCH] vt-d: Fix IM bit unmask of Fault Event Control Register in init_vtd_hw().

2015-09-25 Thread Quan Xu
Bit 0:29 in Fault Event Control Register are 'Reserved and Preserved', software cannot write 0 to it unconditionally. Software must preserve the value read for writes. Signed-off-by: Quan Xu Reported-by: Jan Beulich --- xen/drivers/passthrough/vtd/iommu.c | 5 - 1 file

[Xen-devel] [PATCH 05/12] vTPM/TPM2: TPM 2.0 takes ownership and create SRK

2014-12-14 Thread Quan Xu
. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 71 +++ stubdom/vtpmmgr/vtpmmgr.h | 3 ++ 2 files changed, 74 insertions(+) diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index f3aa02f..c654071 100644 --- a/stubdom/vtpmmgr/init.c

[Xen-devel] [PATCH 04/12] vTPM/TPM2: Add TPM 2.0 Exposed APIs

2014-12-14 Thread Quan Xu
These TPM 2.0 Exposed APIs for the Mini-os to access TPM 2.0 hardware. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/Makefile | 2 +- stubdom/vtpmmgr/tpm2.c | 455 +++ stubdom/vtpmmgr/tpm2.h | 104 +++ 3 files changed, 560 insertions(+), 1

[Xen-devel] [PATCH 02/12] vTPM/TPM2: TPM 2.0 data structures marshal

2014-12-14 Thread Quan Xu
Add TPM 2.0 data structure marshal for packing and unpacking TPM 2.0 data structures. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/tpm2_marshal.h | 673 + 1 file changed, 673 insertions(+) create mode 100644 stubdom/vtpmmgr/tpm2_marshal.h diff --git a

[Xen-devel] [PATCH 09/12] vTPM/TPM2: Support '--tpm2' extra command line.

2014-12-14 Thread Quan Xu
=16 disk=["file:/var/scale/vdisk/vmgr,hda,w"] name="vtpmmgr" iomem=["fed40,5"] extra="--tpm2" vtpm-stubdom domain configuration on TPM 1.x: kernel="/usr/lib/xen/boot/vtpmmgr-stubdom.gz" memory=16 disk=["file:/var/scale/vdisk/vmgr,hda,w"

[Xen-devel] [PATCH 03/12] vTPM/TPM2: Add global data in vtpm_globals{}

2014-12-14 Thread Quan Xu
These data is for the Mini-os to access TPM 2.0 hardware. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/vtpmmgr.h | 9 + 1 file changed, 9 insertions(+) diff --git a/stubdom/vtpmmgr/vtpmmgr.h b/stubdom/vtpmmgr/vtpmmgr.h index 2d9d153..0d0c604 100644 --- a/stubdom/vtpmmgr/vtpmmgr.h +++ b

[Xen-devel] [PATCH 06/12] vTPM/TPM2: Create and load SK on TPM 2.0

2014-12-14 Thread Quan Xu
TPM2_LoadExternal command is used. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 101 ++ stubdom/vtpmmgr/vtpmmgr.h | 1 + 2 files changed, 102 insertions(+) diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index c654071..8244bb0 100644

[Xen-devel] [PATCH 10/12] vTPM/TPM2: Support TPM 2.0 bind and unbind data

2014-12-14 Thread Quan Xu
decryption using the indicated padding scheme according to PKCS#1v2.1(PKCS#1). Signed-off-by: Quan Xu --- stubdom/vtpmmgr/disk_tpm.c | 42 -- stubdom/vtpmmgr/disk_tpm.h | 4 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/stubdom/vtpmmgr

[Xen-devel] [PATCH 00/12] Enable vTPM subsystem on TPM 2.0

2014-12-14 Thread Quan Xu
it will extend the hash of the kernel that it boots into PCR #4, and will extend the command line and initrd into PCR #5 before booting so that a domU booted in this way can attest to its early boot state. -- REFERENCES -- Berlios TPM Emulat

[Xen-devel] [PATCH 07/12] vTPM/TPM2: TPM2.0 TIS initialization and self test.

2014-12-14 Thread Quan Xu
call the TPM 2.0 various registers that allow communication between the TPM 2.0 and platform hardware and software. TPM2_SelfTest causes the TPM 2.0 to perform a test of its capabilities. Signed-off-by: Quan Xu --- extras/mini-os/include/tpm_tis.h | 1 + extras/mini-os/tpm_tis.c | 156

[Xen-devel] [PATCH 11/12] vTPM/TPM2: Bind group keys and sectors data on disk

2014-12-14 Thread Quan Xu
Signed-off-by: Quan Xu --- stubdom/vtpmmgr/disk_write.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/stubdom/vtpmmgr/disk_write.c b/stubdom/vtpmmgr/disk_write.c index 4c825c5..73018ef 100644 --- a/stubdom/vtpmmgr/disk_write.c +++ b/stubdom

[Xen-devel] [PATCH 12/12] vTPM/TPM2: Unind group keys and sectors data on disk

2014-12-14 Thread Quan Xu
Signed-off-by: Quan Xu --- stubdom/vtpmmgr/disk_read.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/stubdom/vtpmmgr/disk_read.c b/stubdom/vtpmmgr/disk_read.c index 33aacdd..57573e4 100644 --- a/stubdom/vtpmmgr/disk_read.c +++ b/stubdom/vtpmmgr

[Xen-devel] [PATCH 01/12] vTPM/TPM2: Add TPM 2.0 data structures and commands definition

2014-12-14 Thread Quan Xu
Add TPM 2.0 data structures on Trusted Platform Module Library Part 2: Structures and Trust Platform Module Library Part 3: Commands. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/tpm2_types.h | 978 +++ 1 file changed, 978 insertions(+) create mode 100644

[Xen-devel] [PATCH 08/12] vTPM/TPM2: Add main entrance vtpmmgr2_init()

2014-12-14 Thread Quan Xu
Accept commands from the vtpm-stubdom domains via the mini-os TPM backend driver. The vTPM manager communicates directly with hardware TPM 2.0 using the mini-os tpm2_tis driver. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 110 ++ stubdom

[Xen-devel] [PATCH v2 00/14] Enable vTPM subsystem on TPM 2.0

2014-12-17 Thread Quan Xu
http://tpm-emulator.berlios.de/ Xen docs/misc/vtpm.txt Xen docs/misc/vtpm-platforms.txt Xen docs/misc/vtpmmgr.txt --Changes in V2: 1. Record some infomation in docs/misc/vtpmmgr.txt. 2. Add TPM 2.0 PCRs read. 3. Bind/Unbind the measurements of the hypervisor and other TCB components.

[Xen-devel] [PATCH v2 08/14] vTPM/TPM2: Add main entrance vtpmmgr2_init()

2014-12-17 Thread Quan Xu
Accept commands from the vtpm-stubdom domains via the mini-os TPM backend driver. The vTPM manager communicates directly with hardware TPM 2.0 using the mini-os tpm2_tis driver. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 109 ++ stubdom

[Xen-devel] [PATCH v2 06/14] vTPM/TPM2: Create and load SK on TPM 2.0

2014-12-17 Thread Quan Xu
TPM2_LoadExternal command is used. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 101 ++ stubdom/vtpmmgr/vtpmmgr.h | 1 + 2 files changed, 102 insertions(+) diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index c654071..8244bb0 100644

[Xen-devel] [PATCH v2 09/14] vTPM/TPM2: Support 'tpm2' extra command line.

2014-12-17 Thread Quan Xu
ory=16 disk=["file:/var/scale/vdisk/vmgr,hda,w"] name="vtpmmgr" iomem=["fed40,5"] extra="tpm2" vtpm-stubdom domain configuration on TPM 1.x: kernel="/usr/lib/xen/boot/vtpmmgr-stubdom.gz" memory=16 disk=["file:/var/scale/vdis

[Xen-devel] [PATCH v2 02/14] vTPM/TPM2: TPM 2.0 data structures marshal

2014-12-17 Thread Quan Xu
Add TPM 2.0 data structure marshal for packing and unpacking TPM 2.0 data structures. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/tpm2_marshal.h | 673 + 1 file changed, 673 insertions(+) create mode 100644 stubdom/vtpmmgr/tpm2_marshal.h diff --git a

[Xen-devel] [PATCH v2 05/14] vTPM/TPM2: TPM 2.0 takes ownership and create SRK

2014-12-17 Thread Quan Xu
. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/init.c| 71 +++ stubdom/vtpmmgr/vtpmmgr.h | 3 ++ 2 files changed, 74 insertions(+) diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index f3aa02f..c654071 100644 --- a/stubdom/vtpmmgr/init.c

[Xen-devel] [PATCH v2 01/14] vTPM/TPM2: Add TPM 2.0 data structures and commands definition

2014-12-17 Thread Quan Xu
Add TPM 2.0 data structures on Trusted Platform Module Library Part 2: Structures and Trust Platform Module Library Part 3: Commands. Signed-off-by: Quan Xu --- stubdom/vtpmmgr/tpm2_types.h | 978 +++ 1 file changed, 978 insertions(+) create mode 100644

<    1   2   3   4   >