Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 15:39, Dan Carpenter wrote: On Mon, Aug 19, 2019 at 01:32:54PM +0800, Zhao, Yakui wrote: In fact as this driver is mainly used for embedded IOT usage, it doesn't handle the complex cleanup when such error is encountered. Instead the clean up is handled in free_guest_vm

Re: [RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 18:34, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:56AM +0800, Zhao Yakui wrote: diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c index 0602125..6868003 100644 --- a/drivers/staging/acrn/acrn_dev.c +++ b/drivers/staging/acrn/acrn_dev.c

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月19日 13:25, Greg KH wrote: On Mon, Aug 19, 2019 at 09:44:25AM +0800, Zhao, Yakui wrote: On 2019年08月16日 14:39, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 20:58, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:49AM +0800, Zhao Yakui wrote: +int hugepage_map_guest(struct acrn_vm *vm, struct vm_memmap *memmap) +{ + struct page *page = NULL, *regions_buf_pg = NULL; + unsigned long len, guest_gpa, vma; + struct

Re: [RFC PATCH 10/15] drivers/acrn: add interrupt injection support

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 21:12, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:51AM +0800, Zhao Yakui wrote: + case IC_VM_INTR_MONITOR: { + struct page *page; + + ret = get_user_pages_fast(ioctl_param, 1, 1, ); + if (unlikely(ret != 1) || !page

Re: [RFC PATCH 11/15] drivers/acrn: add the support of handling emulated ioreq

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 21:39, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:52AM +0800, Zhao Yakui wrote: +int acrn_ioreq_create_client(unsigned short vmid, +ioreq_handler_t handler, +void *client_priv, +char

Re: [RFC PATCH 04/15] drivers/acrn: add the basic framework of acrn char device driver

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 15:05, Greg KH wrote: On Fri, Aug 16, 2019 at 10:25:45AM +0800, Zhao Yakui wrote: ACRN hypervisor service module is the important middle layer that allows the Linux kernel to communicate with the ACRN hypervisor. It includes the management of virtualized CPU/memory/device

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 15:03, Greg KH wrote: On Fri, Aug 16, 2019 at 08:39:25AM +0200, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs for the driver and reports the X2APIC caps

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 14:39, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs for the driver and reports the X2APIC caps. The remaining patches add the ACRN driver module, which

[RFC PATCH 14/15] drivers/acrn: add the support of irqfd and eventfd

2019-08-15 Thread Zhao Yakui
the interrupt injection on acrn_hsm side. Co-developed-by: Shuo Liu Signed-off-by: Shuo Liu Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 4 +- drivers/staging/acrn/acrn_dev.c | 19 ++ drivers/staging/acrn/acrn_drv_internal.h | 10 + drivers/staging/acrn

[RFC PATCH 13/15] drivers/acrn: add service to obtain Power data transition

2019-08-15 Thread Zhao Yakui
can construct the DSDT with Power frequence/C-state idle for guest system. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Victor Sun Signed-off-by: Victor Sun Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 75

[RFC PATCH 01/15] x86/acrn: Report X2APIC for ACRN guest

2019-08-15 Thread Zhao Yakui
CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/kernel/cpu/acrn.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/acrn.c b/arch/x86/kernel/cpu/acrn.c index 676022e..95db5c4 100644 --- a/arch/x86/kernel/cpu/acrn.c +++ b/arch

[RFC PATCH 06/15] drivers/acrn: add the support of querying ACRN api version

2019-08-15 Thread Zhao Yakui
module also needs to check the driver version. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 47 +++ include/uapi/linux/acrn

[RFC PATCH 04/15] drivers/acrn: add the basic framework of acrn char device driver

2019-08-15 Thread Zhao Yakui
-by: Zhao Yakui --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile| 1 + drivers/staging/acrn/Kconfig| 18 ++ drivers/staging/acrn/Makefile | 2 + drivers/staging/acrn/acrn_dev.c | 123 5 files changed, 146 insertions

[RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-08-15 Thread Zhao Yakui
interrupt is triggered. Co-developed-by: Gao, Shiqing Signed-off-by: Gao, Shiqing Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 77 +++ drivers/staging/acrn/acrn_drv_internal.h

[RFC PATCH 12/15] drivers/acrn: add driver-specific IRQ handle to dispatch IO_REQ request

2019-08-15 Thread Zhao Yakui
-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 41 + 1 file changed, 41 insertions(+) diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c index 28258fb..93f45e3 100644 --- a/drivers/staging/acrn/acrn_dev.c +++ b/drivers/staging

[RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-15 Thread Zhao Yakui
Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 4 +- drivers/staging/acrn/acrn_dev.c | 27 +++ drivers/staging/acrn/acrn_drv_internal.h | 90 +++--- drivers/staging/acrn/acrn_mm.c| 227 drivers/staging/acrn

[RFC PATCH 11/15] drivers/acrn: add the support of handling emulated ioreq

2019-08-15 Thread Zhao Yakui
(int client_id); Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Yin FengWei Signed-off-by: Yin FengWei Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn

[RFC PATCH 10/15] drivers/acrn: add interrupt injection support

2019-08-15 Thread Zhao Yakui
: monitor the interrupt info for one guest OS Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Mingqiang Chi Signed-off-by: Mingqiang Chi Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 48 +++ drivers/staging

[RFC PATCH 03/15] x86/acrn: Add hypercall for ACRN guest

2019-08-15 Thread Zhao Yakui
instruction. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/include/asm/acrn.h | 54 + 1 file changed, 54 insertions(+) diff --git a/arch/x86/include/asm/acrn.h b/arch/x86/include/asm/acrn.h index

[RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-15 Thread Zhao Yakui
vices/system/cpu/cpuX/online Currently this is mainly used in user-space device model before booting other ACRN guest. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 45 + 1

[RFC PATCH 02/15] x86/acrn: Add two APIs to add/remove driver-specific upcall ISR handler

2019-08-15 Thread Zhao Yakui
. This is similar to that in XEN/HyperV. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/include/asm/acrn.h | 3 +++ arch/x86/kernel/cpu/acrn.c | 12 2 files changed, 15 insertions(+) diff --git a/arch/x86/include/asm/acrn.h b

[RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-15 Thread Zhao Yakui
the X2APIC caps. The remaining patches add the ACRN driver module, which accepts the ioctl from user-space and then communicate with the low-level ACRN hypervisor by using hypercall. Zhao Yakui (15): x86/acrn: Report X2APIC for ACRN guest x86/acrn: Add two APIs to add/remove driver-specific upcall ISR

[RFC PATCH 05/15] drivers/acrn: add driver-specific hypercall for ACRN_HSM

2019-08-15 Thread Zhao Yakui
Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn/acrn_hv_defs.h | 65 drivers/staging/acrn/acrn_hypercall.c | 136 ++ drivers/staging/acrn

[RFC PATCH 07/15] drivers/acrn: add acrn vm/vcpu management for ACRN_HSM char device

2019-08-15 Thread Zhao Yakui
is destroyed, the low-level ACRN hypervisor will free the corresponding vcpu implicitly. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn

[tip:x86/platform] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-06-11 Thread tip-bot for Zhao Yakui
Commit-ID: 498ad39368865dfdbf15d3516c43694947074b88 Gitweb: https://git.kernel.org/tip/498ad39368865dfdbf15d3516c43694947074b88 Author: Zhao Yakui AuthorDate: Tue, 30 Apr 2019 11:45:25 +0800 Committer: Borislav Petkov CommitDate: Tue, 11 Jun 2019 21:31:31 +0200 x86/acrn: Use

[tip:x86/platform] x86: Add support for Linux guests on an ACRN hypervisor

2019-06-11 Thread tip-bot for Zhao Yakui
Commit-ID: ec7972c99fffb4d2739f286ce9b544a71aa1d05f Gitweb: https://git.kernel.org/tip/ec7972c99fffb4d2739f286ce9b544a71aa1d05f Author: Zhao Yakui AuthorDate: Tue, 30 Apr 2019 11:45:24 +0800 Committer: Borislav Petkov CommitDate: Tue, 11 Jun 2019 21:29:22 +0200 x86: Add support

[tip:x86/platform] x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol

2019-06-11 Thread tip-bot for Zhao Yakui
Commit-ID: ecca25029473bee6e98ce062e76b7310904bbdd1 Gitweb: https://git.kernel.org/tip/ecca25029473bee6e98ce062e76b7310904bbdd1 Author: Zhao Yakui AuthorDate: Tue, 30 Apr 2019 11:45:23 +0800 Committer: Borislav Petkov CommitDate: Tue, 11 Jun 2019 21:21:11 +0200 x86/Kconfig: Add new

[PATCH v7 3/3] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-05-28 Thread Zhao Yakui
-by: Zhao Yakui Reviewed-by: Thomas Gleixner --- V1->V2: Remove the unused API definition of acrn_setup_intr_handler and acrn_remove_intr_handler. Adjust the order of header file Add the declaration of acrn_hv_vector_handler and tracing definition of acrn_hv_callback_vector. v2-

[PATCH v7 1/3] x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-05-28 Thread Zhao Yakui
Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui Reviewed-by: Borislav Petkov Reviewed

[PATCH v7 2/3] x86: Add the support of Linux guest on ACRN hypervisor

2019-05-28 Thread Zhao Yakui
, enable hypercall and provide the interface that is used to manage the virtualized CPU/memory/device/interrupt for other guest OS. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui Reviewed-by: Thomas Gleixner --- v1->v2: Change the CONFIG_A

[PATCH v7 0/3] x86: Add the support of ACRN guest under x86

2019-05-28 Thread Zhao Yakui
for the function declaration in acrn.h Add comments about acking ACPI EOI in acrn_hv_callback_handler Minor changes for comments/commit log in patch 03/04 v6->v7: Add the missing header file of asm/apic.h in acrn.c Remove the definition of ACRN hypercall as it is not used

Re: [PATCH v6 4/4] x86/acrn: Add hypercall for ACRN guest

2019-05-27 Thread Zhao, Yakui
On 2019年05月28日 06:46, Borislav Petkov wrote: On Mon, May 27, 2019 at 10:57:09AM +0800, Zhao, Yakui wrote: I refer to the Xen/KVM hypercall to add the ACRN hypercall in one separate header. And? The ACRN hypercall is defined in one separate acrn_hypercall.h and can be included explicitly

Re: [PATCH v6 4/4] x86/acrn: Add hypercall for ACRN guest

2019-05-26 Thread Zhao, Yakui
On 2019年05月15日 15:37, Borislav Petkov wrote: On Tue, Apr 30, 2019 at 11:45:26AM +0800, Zhao Yakui wrote: When the ACRN hypervisor is detected, the hypercall is needed so that the ACRN guest can query/config some settings. For example: it can be used to query the resources in hypervisor

Re: [PATCH v6 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-05-26 Thread Zhao, Yakui
On 2019年05月16日 01:23, Borislav Petkov wrote: On Tue, Apr 30, 2019 at 11:45:25AM +0800, Zhao Yakui wrote: @@ -30,6 +36,29 @@ static bool acrn_x2apic_available(void) return false; } +static void (*acrn_intr_handler)(void); + +__visible void __irq_entry acrn_hv_vector_handler

[PATCH v6 0/4] x86: Add the support of ACRN guest under x86

2019-04-29 Thread Zhao Yakui
for the function declaration in acrn.h Add comments about acking ACPI EOI in acrn_hv_callback_handler Minor changes for comments/commit log in patch 03/04 Zhao Yakui (4): x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq_callback_count x86:

[PATCH v6 1/4] x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-04-29 Thread Zhao Yakui
Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui Reviewed-by: Borislav Petkov Reviewed

[PATCH v6 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-29 Thread Zhao Yakui
can communicate with the low-level ACRN hypervisor. On x86 it is implemented with the VMCALL instruction. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui Reviewed-by: Thomas Gleixner --- V1->V2: Refine the comments for the function of acrn_hypercall0/1/2

[PATCH v6 2/4] x86: Add the support of Linux guest on ACRN hypervisor

2019-04-29 Thread Zhao Yakui
, enable hypercall and provide the interface that is used to manage the virtualized CPU/memory/device/interrupt for other guest OS. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui Reviewed-by: Thomas Gleixner --- v1->v2: Change the CONFIG_A

[PATCH v6 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-29 Thread Zhao Yakui
-by: Zhao Yakui Reviewed-by: Thomas Gleixner --- V1->V2: Remove the unused API definition of acrn_setup_intr_handler and acrn_remove_intr_handler. Adjust the order of header file Add the declaration of acrn_hv_vector_handler and tracing definition of acrn_hv_callback_vector. v2-

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-29 Thread Zhao, Yakui
On 2019年04月29日 15:36, Borislav Petkov wrote: On Mon, Apr 29, 2019 at 09:24:12AM +0800, Zhao, Yakui wrote: Yes. "movq" only indicates explicitly that it is 64-bit mov as ACRN guest only works under 64-bit mode. I also check the usage of "mov" and &qu

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-28 Thread Zhao, Yakui
On 2019年04月28日 18:03, Borislav Petkov wrote: On Sun, Apr 28, 2019 at 09:56:35AM +0800, Zhao, Yakui wrote: Thanks for the reminder about the access width. It is 64-bit register. What I said is the "movq", not "movl". (I understand that movl is incorrect for 64-bit regis

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-27 Thread Zhao, Yakui
On 2019年04月27日 16:58, Borislav Petkov wrote: On Fri, Apr 26, 2019 at 11:18:48AM +0800, Zhao, Yakui wrote: It seems that it is seldom used in kernel although the explicit register variable is supported by GCC and makes the code look simpler. And it seems that the explicit register variable

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 19:00, Borislav Petkov wrote: On Thu, Apr 25, 2019 at 06:16:02PM +0800, Zhao, Yakui wrote: The parameter register for the VMCALL is predefined in ACRN hypervisor. Now the R8 is used to pass the hcall_id. It seems that there is no special constraint for R8~R15. So the explicit

Re: [RFC PATCH v5 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-25 Thread Zhao, Yakui
On 2019年04月26日 03:45, Ingo Molnar wrote: * Zhao, Yakui wrote: + alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, + acrn_hv_callback_vector); Why is this on two lines, not a single line? At first it used the long function name for acrn_hv_callback_vector

Re: [RFC PATCH v5 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 15:17, Ingo Molnar wrote: * Zhao Yakui wrote: Linux kernel uses the HYPERVISOR_CALLBACK_VECTOR for hypervisor upcall vector. And it is already used for Xen and HyperV. English sentences should not be started with 'and'. OK. I will remove it. After ACRN hypervisor

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 15:07, Ingo Molnar wrote: Thanks for the review. * Zhao Yakui wrote: When ACRN hypervisor is detected, the hypercall is needed so that the ACRN guest can query/config some settings. For example: it can be used to query the resources in hypervisor and manage the CPU/memory

Re: [RFC PATCH v5 0/4] x86: Add the support of ACRN guest under x86

2019-04-24 Thread Zhao, Yakui
On 2019年04月25日 06:20, Thomas Gleixner wrote: On Wed, 24 Apr 2019, Zhao Yakui wrote: ACRN is a flexible, lightweight reference hypervisor, built with real-time and safety-criticality in mind, optimized to streamline embedded development through an open source platform. It is built

[RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-23 Thread Zhao Yakui
communicate with the low-level ACRN hypervisor. It is implemented with the VMCALL instruction. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- V1->V2: Refine the comments for the function of acrn_hypercall0/1/2 v2->v3: Use the "vmcal

[RFC PATCH v5 1/4] x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-04-23 Thread Zhao Yakui
Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui Reviewed-by: Borislav Petkov --- v3

[RFC PATCH v5 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-23 Thread Zhao Yakui
Linux kernel uses the HYPERVISOR_CALLBACK_VECTOR for hypervisor upcall vector. And it is already used for Xen and HyperV. After ACRN hypervisor is detected, it will also use this defined vector to notify ACRN guest. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao

[RFC PATCH v5 2/4] x86: Add the support of Linux guest on ACRN hypervisor

2019-04-23 Thread Zhao Yakui
and enable hypercall. And after ACRN guest is supported, the ACRN driver part can add the interface that is used to manage the virtualized CPU/memory/device/interrupt for other guest system. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- v1->v2: Cha

[RFC PATCH v5 0/4] x86: Add the support of ACRN guest under x86

2019-04-23 Thread Zhao Yakui
ERCALL_H instead of _ASM_X86_ACRNHYPERCALL_H. Use the "VMCALL" mnemonic in comment/commit log. Uppercase r8/rdi/rsi/rax for hypercall parameter register in comment. Zhao Yakui (4): x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq

[RFC PATCH v4 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-14 Thread Zhao Yakui
communicate with the low-level ACRN hypervisor. It is implemented with vmacll instruction. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- V1->V2: Refine the comments for the function of acrn_hypercall0/1/2 v2->v3: Use the "vmcall" mnemonic

[RFC PATCH v4 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-14 Thread Zhao Yakui
Linux kernel uses the HYPERVISOR_CALLBACK_VECTOR for hypervisor upcall vector. And it is already used for Xen and HyperV. After ACRN hypervisor is detected, it will also use this defined vector to notify kernel. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao

[PATCH v4 2/4] x86: Add the support of Linux guest on ACRN hypervisor

2019-04-14 Thread Zhao Yakui
, enable hypercall and provide the interface that is used to manage the virtualized CPU/memory/device/interrupt for other guest OS. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- v1->v2: Change the CONFIG_ACRN to CONFIG_ACRN_GUEST, which makes it e

[RFC PATCH v4 0/4] x86: Add the support of ACRN guest under arch/x86

2019-04-14 Thread Zhao Yakui
NFIG_PARAVIRT for ACRN_GUEST v3-v4: Rename the file name of acrnhyper.h to acrn.h Refine the commit log and some other minor changes(more comments and redundant ifdef in acrn.h, sorting the header file in acrn.c) Zhao Yakui (4): x86/Kconfig: Add new config symbol to unify condition

[RFC PATCH v4 1/4] x86/Kconfig: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-04-14 Thread Zhao Yakui
Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui Reviewed-by: Borislav Petkov --- v3

Re: [RFC PATCH v3 3/4] x86: Use HYPERVISOR_CALLBACK_VECTOR for acrn_guest upcall vector

2019-04-11 Thread Zhao, Yakui
On 2019年04月11日 21:55, Borislav Petkov wrote: On Wed, Apr 10, 2019 at 03:57:08PM +0800, Zhao, Yakui wrote: It is used to avoid that one function declaration has no definition when asm/acrnhyper.h is included and ACRN_GUEST is not enabled. And that is a problem because

Re: [RFC PATCH v3 2/4] x86: Add the support of ACRN guest

2019-04-11 Thread Zhao, Yakui
On 2019年04月11日 21:49, Borislav Petkov wrote: On Wed, Apr 10, 2019 at 05:15:48PM +0800, Zhao, Yakui wrote: Currently the x2apic is not enabled in the first step. Next step it needs to check the cpu info reported by ACRN hypervisor to determine whether the x2apic should be supported. What

Re: [RFC PATCH v3 2/4] x86: Add the support of ACRN guest

2019-04-10 Thread Zhao, Yakui
On 2019年04月08日 22:39, Borislav Petkov wrote: On Mon, Apr 08, 2019 at 04:12:09PM +0800, Zhao Yakui wrote: ACRN is an open-source hypervisor maintained by Linuxfoundation. I think tglx wanted to say "by the Linux Foundation" here. Sure. It will be fixed. This is to add the L

Re: [RFC PATCH v3 4/4] x86: Add hypercall for acrn_guest

2019-04-10 Thread Zhao, Yakui
On 2019年04月08日 23:10, Borislav Petkov wrote: On Mon, Apr 08, 2019 at 04:12:11PM +0800, Zhao Yakui wrote: When acrn_hypervisor is detected, the hypercall is needed so that the acrn guest can query/config some settings. For example: it can be used to query the resources in hypervisor

Re: [RFC PATCH v3 3/4] x86: Use HYPERVISOR_CALLBACK_VECTOR for acrn_guest upcall vector

2019-04-10 Thread Zhao, Yakui
On 2019年04月08日 23:00, Borislav Petkov wrote: You can prefix your subject now like this: x86/acrn: Use ... Thanks for suggestion. It will be updated in next version. On Mon, Apr 08, 2019 at 04:12:10PM +0800, Zhao Yakui wrote: Linux kernel uses the HYPERVISOR_CALLBACK_VECTOR

Re: [RFC PATCH v3 1/4] x86: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-04-10 Thread Zhao, Yakui
On 2019年04月08日 17:35, Borislav Petkov wrote: Subject: x86/kconfig: Add ... On Mon, Apr 08, 2019 at 04:12:08PM +0800, Zhao Yakui wrote: Now the CONFIG_HYPERV and CONFIG_XEN can be used to control the definition /usage of hv_irq_callback_count. If another linux guest also needs to use

[RFC PATCH v3 2/4] x86: Add the support of ACRN guest

2019-04-08 Thread Zhao Yakui
Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- v1->v2: Change the CONFIG_ACRN to CONFIG_ACRN_GUEST, which makes it easy to understand. Remove the export of x86_hyper_acrn. v2->v3: Remove the unnecessary dependency of PARAVIRT --- arch/x86/Kconfig

[RFC PATCH v3 3/4] x86: Use HYPERVISOR_CALLBACK_VECTOR for acrn_guest upcall vector

2019-04-08 Thread Zhao Yakui
Linux kernel uses the HYPERVISOR_CALLBACK_VECTOR for hypervisor upcall vector. And it is already used for Xen and HyperV. After Acrn hypervisor is detected, it will also use this defined vector to notify kernel. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao

[RFC PATCH v3 4/4] x86: Add hypercall for acrn_guest

2019-04-08 Thread Zhao Yakui
communicate with the low-level acrn-hypervisor. On x86 it is implemented by using vmacll when the acrn hypervisor is enabled. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- V1->V2: Refine the comments for the function of acrn_hypercall0/1/2 v2->v

[RFC PATCH v3 0/4] x86: Add the support of ACRN guest under arch/x86

2019-04-08 Thread Zhao Yakui
NFIG_PARAVIRT for ACRN_GUEST Zhao Yakui (4): x86: Add new config symbol to unify conditional definition of hv_irq_callback_count x86: Add the support of ACRN guest x86: Use HYPERVISOR_CALLBACK_VECTOR for acrn_guest upcall vector x86: Add hypercall for acrn_guest arch/x86/Kconfig

[RFC PATCH v3 1/4] x86: Add new config symbol to unify conditional definition of hv_irq_callback_count

2019-04-08 Thread Zhao Yakui
Now the CONFIG_HYPERV and CONFIG_XEN can be used to control the definition /usage of hv_irq_callback_count. If another linux guest also needs to use the hv_irq_callback_count, current conditional definition looks unreadable. Signed-off-by: Zhao Yakui --- arch/x86/Kconfig | 3

Re: [RFC PATCH v2 1/3] arch/x86: add the support of ACRN guest

2019-04-07 Thread Zhao, Yakui
On 2019年04月06日 03:01, Thomas Gleixner wrote: Zhao, On Tue, 26 Mar 2019, Zhao Yakui wrote: Vs. the Subject line: arch/x86: add the support of ACRN guest The proper prefix for x86 is surprisingly 'x86:' not 'arch/x86:'. Also please start the first word after the colon with an upper case

Re: [RFC PATCH v2 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-04-07 Thread Zhao, Yakui
On 2019年04月06日 03:07, Thomas Gleixner wrote: On Tue, 26 Mar 2019, Zhao Yakui wrote: diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index d9069bb..a8f4d08 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -37,7 +37,8 @@ typedef

Re: [RFC PATCH v2 3/3] arch/x86/acrn: add hypercall for acrn_guest

2019-04-07 Thread Zhao, Yakui
On 2019年04月06日 03:19, Thomas Gleixner wrote: On Tue, 26 Mar 2019, Zhao Yakui wrote: When acrn_hypervisor is detected, the hypercall is needed so that the acrn guest can query/config some settings. For example: it can be used to query the resources in hypervisor and manage the CPU/memory

[RFC PATCH v2 1/3] arch/x86: add the support of ACRN guest

2019-03-25 Thread Zhao Yakui
hypervisor. It is restricted to X86_64. v1->v2: Change the CONFIG_ACRN to CONFIG_ACRN_GUEST, which makes it easy to understand. Remove the export of x86_hyper_acrn. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/Kcon

[RFC PATCH v2 0/3] arch/x86: Add the support of ACRN guest under arch/x86

2019-03-25 Thread Zhao Yakui
tor. Refine the comments for the function of acrn_hypercall0/1/2 Zhao Yakui (3): arch/x86: add the support of ACRN guest arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector arch/x86/acrn: add hypercall for acrn_guest arch/x86/Kconfig | 8 arch/x86/en

[RFC PATCH v2 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-03-25 Thread Zhao Yakui
ler and acrn_remove_intr_handler. Adjust the order of header file Add the declaration of acrn_hv_vector_handler and tracing definition of acrn_hv_callback_vector. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/entry/entry_64.S|

[RFC PATCH v2 3/3] arch/x86/acrn: add hypercall for acrn_guest

2019-03-25 Thread Zhao Yakui
communicate with the low-level acrn-hypervisor. On x86 it is implemented by using vmacll when the acrn hypervisor is enabled. V1->V2: Refine the comments for the function of acrn_hypercall0/1/2 Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/incl

Re: [RFC PATCH 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-03-25 Thread Zhao, Yakui
On 2019年03月25日 16:27, Thomas Gleixner wrote: On Mon, 25 Mar 2019, Zhao, Yakui wrote: +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_ACRNHYPER_H +#define _ASM_X86_ACRNHYPER_H + +#include +#include + +#ifdef CONFIG_ACRN +/* ACRN Hypervisor callback */ +void acrn_hv_callback_vector

Re: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor

2019-03-25 Thread Zhao, Yakui
On 2019年03月25日 16:30, Thomas Gleixner wrote: On Mon, 25 Mar 2019, Zhao, Yakui wrote: -Original Message- From: Thomas Gleixner [mailto:t...@linutronix.de] Sent: Saturday, March 23, 2019 12:02 AM To: Zhao, Yakui Cc: linux-kernel@vger.kernel.org; x...@kernel.org; Chen, Jason CJ

RE: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor

2019-03-25 Thread Zhao, Yakui
>-Original Message- >From: Thomas Gleixner [mailto:t...@linutronix.de] >Sent: Saturday, March 23, 2019 12:02 AM >To: Zhao, Yakui >Cc: linux-kernel@vger.kernel.org; x...@kernel.org; Chen, Jason CJ > >Subject: Re: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn

RE: [RFC PATCH 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-03-24 Thread Zhao, Yakui
>-Original Message- >From: Thomas Gleixner [mailto:t...@linutronix.de] >Sent: Friday, March 22, 2019 11:45 PM >To: Zhao, Yakui >Cc: linux-kernel@vger.kernel.org; x...@kernel.org; Chen, Jason CJ > >Subject: Re: [RFC PATCH 2/3] arch/x86/acrn: Use >HYPERVISOR_

RE: [RFC PATCH 1/3] arch/x86: add ACRN hypervisor guest

2019-03-24 Thread Zhao, Yakui
Hi, Tglx Thanks for your nice review. >-Original Message- >From: Thomas Gleixner [mailto:t...@linutronix.de] >Sent: Friday, March 22, 2019 11:20 PM >To: Zhao, Yakui >Cc: linux-kernel@vger.kernel.org; x...@kernel.org; Chen, Jason CJ > >Subject: Re: [RFC PAT

[RFC PATCH 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-03-06 Thread Zhao Yakui
that the other module can add/remove the hypervisor callback irq handler. Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/entry/entry_64.S| 5 + arch/x86/include/asm/acrnhyper.h | 16 arch/x86/include/asm/hardirq.h | 2 +- arch/x86/kernel/cpu/acrn.c

[RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor

2019-03-06 Thread Zhao Yakui
communicate with the low-level acrn-hypervisor. On x86 it is implemented by using vmacll when the acrn hypervisor is enabled. Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/include/asm/acrn_hypercall.h | 85 +++ 1 file changed, 85 insertions

[RFC PATCH 1/3] arch/x86: add ACRN hypervisor guest

2019-03-06 Thread Zhao Yakui
hypervisor. It is restricted to X86_64. Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/Kconfig | 8 arch/x86/include/asm/hypervisor.h | 1 + arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/acrn.c| 36

[RFC PATCH 0/3] arch/x86: Add the support of ACRN hypervisor under arch/x86

2019-03-06 Thread Zhao Yakui
. Following this patch set, we will send acrn driver part, which provides the interface that can be used to manage the virtualized CPU/memory/device/interrupt for other guest OS after the acrn hypervisor is detected. Zhao Yakui (3): arch/x86: add ACRN hypervisor guest arch/x86/acrn: Use

Re: pnpacpi: exceeded the max number of IO resources: 24

2008-01-07 Thread Zhao Yakui
On Mon, 2008-01-07 at 00:48 +0100, Frans Pop wrote: > (Adding the kernel list back. Any reason you did not send the reply there?) > > Sorry for the late reply: Christmas, New Year, the flue, etc. Thank you for caring this problem. > > On Friday 28 December 2007, Zhao Yakui wr

Re: pnpacpi: exceeded the max number of IO resources: 24

2008-01-07 Thread Zhao Yakui
On Mon, 2008-01-07 at 00:48 +0100, Frans Pop wrote: (Adding the kernel list back. Any reason you did not send the reply there?) Sorry for the late reply: Christmas, New Year, the flue, etc. Thank you for caring this problem. On Friday 28 December 2007, Zhao Yakui wrote: On Mon, 2007-12-24

Re: pnpacpi : exceeded the max number of IO resources

2007-11-30 Thread Zhao Yakui
On Fri, 2007-11-30 at 01:40 -0500, [EMAIL PROTECTED] wrote: > On Fri, 30 Nov 2007 10:21:28 +0800, Zhao Yakui said: > > Thanks for the acpidump & dmesg. > > In the acpidump there are so many IO resource definitions in the device > > of mem2 and the number exceeds

Re: pnpacpi : exceeded the max number of IO resources

2007-11-30 Thread Zhao Yakui
On Fri, 2007-11-30 at 01:40 -0500, [EMAIL PROTECTED] wrote: On Fri, 30 Nov 2007 10:21:28 +0800, Zhao Yakui said: Thanks for the acpidump dmesg. In the acpidump there are so many IO resource definitions in the device of mem2 and the number exceeds the predefined number(24). On a semi

RE: ACPI related Warning in 2.6.24-rc3-git2

2007-11-29 Thread Zhao Yakui
Subject: ACPI : Delete the IRQ operation in throttling controll via PTC >From : Zhao Yakui <[EMAIL PROTECTED]> The IRQ operation(enable/disable) should be avoided when throttling is controlled via PTC method. It is replaced by the migration of task. Signed-off-by: Zhao Yakui <[EMA

RE: ACPI related Warning in 2.6.24-rc3-git2

2007-11-29 Thread Zhao Yakui
Subject: ACPI : Delete the IRQ operation in throttling controll via PTC From : Zhao Yakui [EMAIL PROTECTED] The IRQ operation(enable/disable) should be avoided when throttling is controlled via PTC method. It is replaced by the migration of task. Signed-off-by: Zhao Yakui [EMAIL PROTECTED

[PATCH] PCI: Add PCI quirk function for some chipsets

2007-11-15 Thread Zhao Yakui
Subject: PCI: Add PCI quirk function for some chipsets From: Zhao Yakui <[EMAIL PROTECTED]> PCI quirk function is added for some chipsets so that the resources behind LPC bridge can be reserved. Signed-off-by: Li Shaohua <[EMAIL PROTECTED]> Signed-off-by: Zhao Yakui <[

[PATCH]: PNP: Increase the value of PNP constant

2007-11-15 Thread Zhao Yakui
Subject: PNP: Increase the value of PNP constant From: Zhao Yakui <[EMAIL PROTECTED]> On some systems the number of resources(IO,MEM) returnedy by PNP device is greater than the PNP constant, for example motherboard devices. It brings that some resources can't be reserved and re

[PATCH] PCI: Add PCI quirk function for some chipsets

2007-11-15 Thread Zhao Yakui
Subject: PCI: Add PCI quirk function for some chipsets From: Zhao Yakui [EMAIL PROTECTED] PCI quirk function is added for some chipsets so that the resources behind LPC bridge can be reserved. Signed-off-by: Li Shaohua [EMAIL PROTECTED] Signed-off-by: Zhao Yakui [EMAIL PROTECTED] --- drivers

[PATCH]: PNP: Increase the value of PNP constant

2007-11-15 Thread Zhao Yakui
Subject: PNP: Increase the value of PNP constant From: Zhao Yakui [EMAIL PROTECTED] On some systems the number of resources(IO,MEM) returnedy by PNP device is greater than the PNP constant, for example motherboard devices. It brings that some resources can't be reserved and resource confilicts