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

2019-08-15 Thread Zhao Yakui
After ACRN devicemodel finishes the emulation of trapped MMIO/IO/PCICFG access, it needs to inject one interrupt to notify that the guest can be resumed. IC_SET_IRQLINE: This is used to inject virtual IOAPIC gsi interrupt IC_INJECT_MSI: Inject virtual MSI interrupt to guest OS IC_VM_INTR_MONITOR:

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

2019-08-15 Thread Zhao Yakui
The ioventfd/irqfd based on eventfd is one mechanism that is widely used to implement virtio kernel backend driver. After the ioreq is trigged from virtio front driver, the eventfd_signal is called to notify the eventfd so that the virtio kernel backend driver is waked up to handle the request.

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

2019-08-15 Thread Zhao Yakui
In order to launch the ACRN guest system, it needs to setup the mapping between GPA (guest physical address) and HPA (host physical address). This is based on memory virtualization and configured in EPT table. The ioctl related with memory management is added and then the hypercall is called so

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

2019-08-15 Thread Zhao Yakui
After ACRN hypervisor captures the io_request(mmio, IO, PCI access) from guest OS, it will send the IRQ interrupt to SOS system. The HYPERVISOR_CALLBACK_VECTOR ISR handler will be executed and it needs to call the driver-specific ISR handler to dispatch emulated io_request. After the emulation of

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

2019-08-15 Thread Zhao Yakui
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/interrupt for other ACRN guest. The user-space applications can use the provided ACRN ioctls to interact

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

2019-08-15 Thread Zhao Yakui
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 for embedded IOT with small footprint and real-time features. More details can be found in

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

2019-08-15 Thread Zhao Yakui
In order to assure that the ACRN module can work with the required ACRN hypervisor, it needs to check whether the required version is consistent with the queried version from ACRN ypervisor. If it is inconsistent, it won't coninue the initialization of ACRN_HSM module. Similarly the user-space

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

2019-08-15 Thread Zhao Yakui
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/device/ interrupt for guest operating system. On x86 it is implemented with the VMCALL

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

2019-08-15 Thread Zhao Yakui
Pass-through device plays an important role for guest OS when it is accessed exclusively by guest OS. This is critical for the performance scenario. After one PCI device is assigned to guest OS, it can be accessed exclusively by guest system. It can avoid the device emulation and provide the

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

2019-08-15 Thread Zhao Yakui
The px/cx data is critical to support the power transition. DM will get these data to build DSDT for UOS. With this DSDT, UOS would have the capability on power control if acpi-cpufreq/idle driver is enabled in kernel. Add the PM ioctl that is used to obtain the info of power state so that the DM

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

2019-08-15 Thread Zhao Yakui
The ACRN-hypervisor works in partition mode. In such case the guest OS and domain0 kernel will run in the different CPUs. In course of booting domain0 kernel, it can use all the available CPUs,which can accelerate the booting. But after the booting is finished, it needs to offline the other CPUs

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

2019-08-15 Thread Zhao Yakui
After guest UOS is booted, the MMIO/IO access will cause that it exits from VMX non-root env into ACRN hypervisor. Then the ACRN hypervisor will inject virtual irq into the Linux guest with ACRN HSM module. The ACRN_HSM handles this virtual irq (which is based on HYPERVISOR_CALLBACK_VECTOR),

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

2019-08-15 Thread Zhao Yakui
After the ACRN hypervisor sends the upcall notify interrupt, the upcall ISR handler will be served. Now almost nothing is handled in upcall ISR handler except acking EOI. The driver-specific ISR handler is registered by the driver, which helps to handle the real notification from ACRN hypervisor.

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

2019-08-15 Thread Zhao Yakui
After the user-space calls the ioctls, the module will then call the defined hypercall so that the ACRN hypervisor can take the corresponding action. It includes the management of creating vcpu, guest memory management and interrupt injection, pass-through device management. The available

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

2019-08-15 Thread Zhao Yakui
The VM management is one important role of acrn module. It is used to manage another VM based on the user-space ioctls. It includes the following VM operation: CREATE/START/PAUSE/DESTROY VM, CREATE_VCPU, IC_SET_VCPU_REGS. acrn_ioctl is provided so that the user of /dev/acrn_hsm can manage the VM

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

2019-08-15 Thread Zhao Yakui
After lapic is switched from xapic to x2apic mode, it can use the APIC MSR register to access local apic register in ACRN guest. This will help to remove some traps of lapic access in ACRN guest. Report the X2APIC so that the ACRN guest can be switched to x2apic mode. Co-developed-by: Jason Chen

Re: [PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-15 Thread Steve Longerbeam
On 8/14/19 4:15 PM, Russell King - ARM Linux admin wrote: On Wed, Aug 14, 2019 at 04:00:30PM -0700, Steve Longerbeam wrote: On 8/14/19 3:04 PM, Russell King - ARM Linux admin wrote: On Wed, Aug 14, 2019 at 12:04:41PM -0700, Steve Longerbeam wrote: On 8/14/19 3:30 AM, Russell King - ARM

Re: [PATCH v8 00/24] erofs: promote erofs from staging v8

2019-08-15 Thread Gao Xiang
Hi Linus, On Thu, Aug 15, 2019 at 09:18:12AM -0700, Linus Torvalds wrote: > On Thu, Aug 15, 2019 at 2:06 AM Greg Kroah-Hartman > wrote: > > > > I know everyone is busy, but given the length this has been in staging, > > and the constant good progress toward cleaning it all up that has been > >

Re: [PATCH v3 1/2] binder: Add default binder devices through binderfs when configured

2019-08-15 Thread Joel Fernandes
On Thu, Aug 08, 2019 at 03:27:25PM -0700, Hridya Valsaraju wrote: > Currently, since each binderfs instance needs its own > private binder devices, every time a binderfs instance is > mounted, all the default binder devices need to be created > via the BINDER_CTL_ADD IOCTL. This patch aims to >

Re: [PATCH v3 1/2] binder: Add default binder devices through binderfs when configured

2019-08-15 Thread Joel Fernandes
On Thu, Aug 08, 2019 at 03:27:25PM -0700, Hridya Valsaraju wrote: > Currently, since each binderfs instance needs its own > private binder devices, every time a binderfs instance is > mounted, all the default binder devices need to be created > via the BINDER_CTL_ADD IOCTL. This patch aims to >

Re: [PATCH v8 07/24] erofs: add directory operations

2019-08-15 Thread Gao Xiang
Hi Linus, On Thu, Aug 15, 2019 at 09:13:19AM -0700, Linus Torvalds wrote: > On Wed, Aug 14, 2019 at 9:42 PM Gao Xiang wrote: > > > > + > > +static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = { > > + [EROFS_FT_UNKNOWN] = DT_UNKNOWN, > > + [EROFS_FT_REG_FILE] =

Re: [PATCH v3 2/2] binder: Validate the default binderfs device names.

2019-08-15 Thread Joel Fernandes
On Thu, Aug 08, 2019 at 03:27:26PM -0700, Hridya Valsaraju wrote: > Length of a binderfs device name cannot exceed BINDERFS_MAX_NAME. > This patch adds a check in binderfs_init() to ensure the same > for the default binder devices that will be created in every > binderfs instance. > >

Re: [PATCH v8 00/24] erofs: promote erofs from staging v8

2019-08-15 Thread Linus Torvalds
On Thu, Aug 15, 2019 at 2:06 AM Greg Kroah-Hartman wrote: > > I know everyone is busy, but given the length this has been in staging, > and the constant good progress toward cleaning it all up that has been > happening, I want to get this moved out of staging soon. Since it doesn't touch

Re: [PATCH v8 07/24] erofs: add directory operations

2019-08-15 Thread Linus Torvalds
On Wed, Aug 14, 2019 at 9:42 PM Gao Xiang wrote: > > + > +static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = { > + [EROFS_FT_UNKNOWN] = DT_UNKNOWN, > + [EROFS_FT_REG_FILE] = DT_REG, > + [EROFS_FT_DIR] = DT_DIR, > + [EROFS_FT_CHRDEV] =

Re: [PATCH v3 0/2] Add default binderfs devices

2019-08-15 Thread Greg Kroah-Hartman
On Thu, Aug 08, 2019 at 03:27:24PM -0700, Hridya Valsaraju wrote: > Binderfs was created to help provide private binder devices to > containers in their own IPC namespace. Currently, every time a new binderfs > instance is mounted, its private binder devices need to be created via > IOCTL calls.

Re: [PATCH v2] staging: drivers: rtl8712: removing unnecessary parenthesis

2019-08-15 Thread Greg KH
On Thu, Aug 15, 2019 at 11:26:40AM -0400, hugoziviani wrote: > Fix checkpatch error "CHECK: Remove unecessary parenthesis in > drivers/staging/rtl8712/rtl871x_mlme.c" > > Signed-off-by: hugoziviani > --- > drivers/staging/rtl8712/rtl871x_mlme.c | 84 +- > 1 file

[PATCH v2] staging: drivers: rtl8712: removing unnecessary parenthesis

2019-08-15 Thread hugoziviani
Fix checkpatch error "CHECK: Remove unecessary parenthesis in drivers/staging/rtl8712/rtl871x_mlme.c" Signed-off-by: hugoziviani --- drivers/staging/rtl8712/rtl871x_mlme.c | 84 +- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git

Re: [PATCH] staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delay

2019-08-15 Thread Ian Abbott
On 15/08/2019 11:53, Colin King wrote: From: Colin Ian King Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by:

[PATCH] staging: sm750fb: fix odd license text

2019-08-15 Thread Greg Kroah-Hartman
There is some "confusing" license text in some of the sm750fb driver files. After discussing it with the company, it turns out to have been a mistake and these lines can be safely removed. The files are all to be licensed under the GPLv2 license. Cc: Sudip Mukherjee Cc: Teddy Wang Cc:

Re: static analysis bug report in drivers/staging/iio/dac/ad5380.c

2019-08-15 Thread Lars-Peter Clausen
On 8/15/19 12:21 PM, Colin Ian King wrote: > Hi, > > Static analysis with Coverity Scan has detected a potential assignment > bug in ad5380.c: > > 217case IIO_CHAN_INFO_CALIBBIAS: > 218ret = regmap_read(st->regmap, > AD5380_REG_OFFSET(chan->address), > 219

[PATCH] staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delay

2019-08-15 Thread Colin King
From: Colin Ian King Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

static analysis bug report in drivers/staging/iio/dac/ad5380.c

2019-08-15 Thread Colin Ian King
Hi, Static analysis with Coverity Scan has detected a potential assignment bug in ad5380.c: 217case IIO_CHAN_INFO_CALIBBIAS: 218ret = regmap_read(st->regmap, AD5380_REG_OFFSET(chan->address), 219val); 220if (ret) 221

Re: [PATCH v8 00/24] erofs: promote erofs from staging v8

2019-08-15 Thread Greg Kroah-Hartman
On Thu, Aug 15, 2019 at 12:41:31PM +0800, Gao Xiang wrote: > [I strip the previous cover letter, the old one can be found in v6: > https://lore.kernel.org/r/20190802125347.166018-1-gaoxian...@huawei.com/] > > We'd like to submit a formal moving patch applied to staging tree > for 5.4, before

[PATCH] staging: rtl8192u: fix up indentation of a statement

2019-08-15 Thread Colin King
From: Colin Ian King There is a statement that is indented one level too deeply, remove the extraneous tab. Addresses-Coverity: ("Identation does not match nesting level") Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r8190_rtl8256.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH v7 08/24] erofs: add namei functions

2019-08-15 Thread Gao Xiang
Hi Pavel, On Thu, Aug 15, 2019 at 09:01:32AM +0200, Pavel Machek wrote: > Hi! > > > > > + /* > > > > +* on-disk error, let's only BUG_ON in the debugging mode. > > > > +* otherwise, it will return 1 to just skip the invalid name > > > > +* and go on (in

Re: [PATCH v7 08/24] erofs: add namei functions

2019-08-15 Thread Pavel Machek
Hi! > > > + /* > > > + * on-disk error, let's only BUG_ON in the debugging mode. > > > + * otherwise, it will return 1 to just skip the invalid name > > > + * and go on (in consideration of the lookup performance). > > > + */ > > > + DBG_BUGON(qd->name > qd->end); > > > > I believe you