[Xen-devel] [RFC PATCH] p2m-pt: avoid get the pte falgs repeatedly.

2016-11-17 Thread Liang Li
There are a lot of code try to get the pte flags repeatedly, why not save the result and reuse it in the following code? It can help to save some CPU cycles and make the code cleaner, no? I am not sure if this is the right direction, just change one place. Signed-off-by: Liang Li <lian

[Xen-devel] [PATCH] libxc: Expose the MPX cpuid flag to guest

2016-01-11 Thread Liang Li
If hardware support memory protect externsion, expose this feature to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on. Signed-off-by: Liang Li <liang.z...@intel.com> --- tools/libxc/xc_cpufeature.h | 1 + tools/libxc/xc_cpuid_x86.c | 6 ++ 2

[Xen-devel] [RESEND] xen-netback: remove duplicated function definition

2015-07-05 Thread Liang Li
There are two duplicated xenvif_zerocopy_callback() definitions. Remove one of them. Signed-off-by: Liang Li liang.z...@intel.com --- drivers/net/xen-netback/common.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index

[Xen-devel] [PATCH] xen-netback: remove duplicated function definition

2015-07-03 Thread Liang Li
There are two duplicated xenvif_zerocopy_callback() definitions. Remove one of them. Signed-off-by: Liang Li liang.z...@intel.com --- drivers/net/xen-netback/common.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index

[Xen-devel] [v3] nested EPT: fix the handling of nested EPT

2015-06-29 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. the current code does not do this, and it's wrong. I have tested this patch, the L2 guest can boot and run as normal. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com Reported-by: Tim

[Xen-devel] [v2] nested EPT: fix the handling of nested EPT

2015-06-26 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. the current code does not do this, and it's wrong. I have tested this patch, the L2 guest can boot and run as normal. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z...@intel.com Reported-by: Tim

[Xen-devel] [v2 RESEND] nested EPT: fix the handling of nested EPT

2015-06-26 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. the current code does not do this, and it's wrong. I have tested this patch, the L2 guest can boot and run as normal. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com Reported-by: Tim

[Xen-devel] [PATCH] xen-netfront: Remove the meaningless code

2015-06-26 Thread Liang Li
The function netif_set_real_num_tx_queues() will return -EINVAL if the second parameter 1, so call this function with the second parameter set to 0 is meaningless. Signed-off-by: Liang Li liang.z...@intel.com --- drivers/net/xen-netfront.c | 7 --- 1 file changed, 7 deletions(-) diff --git

[Xen-devel] [RESEND] nested EPT: fix the handling of nested EPT.

2015-06-02 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. The current code does not do this, and it's wrong. Reported-by: Tim Deegan t...@xen.org Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- xen/arch/x86/mm/p2m-ept.c | 4 1 file

[Xen-devel] [PATCH] nested EPT: fix the handling of nested EPT.

2015-06-01 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. The current code does not do this, and it's wrong. Reported-by: Tim Deegan t...@xen.org Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- xen/arch/x86/mm/p2m-ept.c | 4 1 file

[Xen-devel] [v2] VMX: replace some plain numbers

2015-04-16 Thread Liang Li
... making the code better document itself. No functional change intended. Signed-off-by: Liang Li liang.z...@intel.com --- xen/arch/x86/hvm/vmx/vmx.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index

[Xen-devel] [PATCH] VMX: replace some plain numbers

2015-04-16 Thread Liang Li
... making the code better document itself. No functional change intended. Signed-off-by: Liang Li liang.z...@intel.com --- xen/arch/x86/hvm/vmx/vmx.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index

[Xen-devel] [PATCH] xen-pt: Fix bug cause PCI devices re-attach failed

2015-04-13 Thread Liang Li
the device is re-attached. I sent a patch to fix a similar bug before, but the patch could not fix the issue completely. Signed-off-by: Liang Li liang.z...@intel.com --- hw/xen/xen_pt.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index

[Xen-devel] [v2] Avoid needless EPT table ajustment and cache flush

2015-02-04 Thread Liang Li
) becoming true, force the p2m_memory_type_changed and flush_all when the first device is assigned to guest to amend this issue. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com Acked-by: Kevin Tian kevin.t...@intel.com --- xen/arch/x86/hvm/mtrr.c

[Xen-devel] [RFC] Add the panic info when disable VT-d

2015-01-19 Thread Liang Li
Before the chang, if setting iommu=0 option in xen boot option, the painc info is Couldn't enable IOMMU and iomm=required/force, this will confuse the users because the iommu has been disabled. Signed-off-by: Liang Li liang.z...@intel.com --- xen/arch/x86/apic.c | 5 + 1 file changed, 5

[Xen-devel] [PATCH] xen-pt: Fix PCI devices re-attach failed

2014-12-24 Thread Liang Li
:qmp_handle_error_response: receive an error message from QMP server: Duplicate ID 'pci-pt-03_10.1' for device. The count of calling xen_pt_region_add and xen_pt_region_del are not the same will cause the XenPCIPassthroughState and it's related QemuOpts object not be released properly. Signed-off-by: Liang Li liang.z

[Xen-devel] [v4] libxc: Expose the 1GB pages cpuid flag to guest

2014-11-28 Thread Liang Li
for shadow mode case. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- tools/libxc/xc_cpuid_x86.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index a18b1ff..c97f91a 100644 --- a/tools/libxc

[Xen-devel] [v3] libxc: Expose the 1GB pages cpuid flag to guest

2014-11-27 Thread Liang Li
If hardware support the 1GB pages, expose the feature to guest by default. Users don't have to use a 'cpuid= ' option in config fil e to turn it on. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- tools/libxc/xc_cpuid_x86.c | 3 +++ xen/arch/x86