RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Dexuan Cui
> From: Long Li > Sent: Wednesday, September 14, 2016 1:41 > > I think this code is safe here. If we reach the code > pci_stop_and_remove_bus_device_locked, create_root_hv_pci_bus() is already > called. When hv_pci_probe() -> create_root_hv_pci_bus() -> pci_scan_child_bus() is running on one cpu

[PATCH 0/3] PCI: hv: clean-up and 2 fixes to the hot-remove case

2016-11-09 Thread Dexuan Cui
improve the situation a lot. Dexuan Cui (3): PCI: hv: use the correct buffer size in new_pcichild_device() PCI: hv: fix hv_pci_remove() for hot-remove PCI: hv: delete the device earlier from hbus->children for hot-remove drivers/pci/host/pci-hyperv.c |

[PATCH 1/3] PCI: hv: use the correct buffer size in new_pcichild_device()

2016-11-09 Thread Dexuan Cui
We don't really need such a big on-stack buffer. vmbus_sendpacket() here only uses sizeof(struct pci_child_message). Signed-off-by: Dexuan Cui CC: Jake Oshins Cc: KY Srinivasan CC: Haiyang Zhang CC: Vitaly Kuznetsov --- drivers/pci/host/pci-hyperv.c | 6 +++--- 1 file changed, 3 inser

[PATCH 2/3] PCI: hv: fix hv_pci_remove() for hot-remove

2016-11-09 Thread Dexuan Cui
urces_released(). Signed-off-by: Dexuan Cui CC: Jake Oshins Cc: KY Srinivasan CC: Haiyang Zhang CC: Vitaly Kuznetsov --- I made the patch based on discussions with Jake Oshins and others. drivers/pci/host/pci-hyperv.c | 53 +++ 1 file changed, 33 in

[PATCH 3/3] PCI: hv: delete the device earlier from hbus->children for hot-remove

2016-11-09 Thread Dexuan Cui
Signed-off-by: Dexuan Cui CC: Jake Oshins Cc: KY Srinivasan CC: Haiyang Zhang CC: Vitaly Kuznetsov --- drivers/pci/host/pci-hyperv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 7590ad0..fe5179

RE: [PATCH 1/3] PCI: hv: use the correct buffer size in new_pcichild_device()

2016-11-10 Thread Dexuan Cui
> From: Jake Oshins > > From: Dexuan Cui > > Sent: Wednesday, November 9, 2016 11:18 PM > > We don't really need such a big on-stack buffer. > > vmbus_sendpacket() here only uses sizeof(struct pci_child_message). > > > > @@ -1271,9 +1271,9 @@ stati

RE: [PATCH 1/7] hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()

2016-11-27 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, November 25, 2016 20:49 > To: de...@linuxdriverproject.org > Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; Haiyang > Zhang ; Dexuan Cui ; > Stephen Hemminger > Subject: [PATCH 1/7] hv: acquire vmbus_con

RE: [PATCH 0/7] hv: CPU onlining/offlining fixes and improvements

2016-11-27 Thread Dexuan Cui
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Sunday, November 27, 2016 01:06 > To: Vitaly Kuznetsov > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; KY Srinivasan > ; Haiyang Zhang ; Dexuan Cui > > Subject: Re: [PATCH 0/7] hv: C

[PATCH] vmbus: fix the missed signaling in hv_signal_on_read()

2017-07-06 Thread Dexuan Cui
f33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()") Signed-off-by: John Starks Signed-off-by: Dexuan Cui Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: "K. Y. Srinivasan" Cc: --- include/linux/hyperv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

[PATCH net-next 1/3] VMCI: only load on VMware hypervisor

2017-08-15 Thread Dexuan Cui
-V in hv_acpi_init(). KVM's vsock_virtio_transport doesn't have the issue because it doesn't define MODULE_ALIAS_NETPROTO(PF_VSOCK). Signed-off-by: Dexuan Cui Cc: Alok Kataria Cc: Andy King Cc: Adit Ranadive Cc: George Zhang Cc: Jorgen Hansen Cc: K. Y. Srinivasan Cc: Haiyan

[PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-15 Thread Dexuan Cui
With the current code, when vsock_dequeue_accept() is removing a sock from the list, nothing prevents vsock_enqueue_accept() from adding a new sock into the list concurrently. We should add a lock to protect the list. Signed-off-by: Dexuan Cui Cc: Andy King Cc: Dmitry Torokhov Cc: George

[PATCH net-next 0/3] add Hyper-V transport for Virtual Sockets

2017-08-15 Thread Dexuan Cui
d hence it manages to share the common vsock infrastructure to greatly reduce duplicate code, and avoid adding a new address family. The details are documented in PATCH 03. Dexuan Cui (3): VMCI: only load on VMware hypervisor vsock: fix vsock_dequeue/enqueue_accept race hv_sock: implemen

[PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-15 Thread Dexuan Cui
roducing a new vsock transport for AF_VSOCK. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Andy King Cc: Dmitry Torokhov Cc: George Zhang Cc: Jorgen Hansen Cc: Reilly Grant Cc: Asias He Cc: Stefan Hajnoczi Cc: Vitaly Kuznetsov Cc: Cathy Avery

[PATCH] vmbus: suppress uevents for hv_sock devices

2017-08-15 Thread Dexuan Cui
on of udevd, e.g. 30% on a 2-cpu virtual machine. So let's suppress the uevents to avoid this. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger --- drivers/hv/vmbus_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/

[PATCH] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-08-15 Thread Dexuan Cui
; vmbus_device_release(), we'll get a deadlock, because vmbus_device_release() tries to get the same mutex. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger --- drivers/hv/channel_mgmt.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/hv/

RE: [PATCH net-next 1/3] VMCI: only load on VMware hypervisor

2017-08-16 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, August 16, 2017 11:07 > > From: Dexuan Cui > Date: Tue, 15 Aug 2017 22:13:29 + > > > + /* > > +* Check if we are running on VMware's hypervisor and bail out > > +* if we a

RE: [PATCH net-next 1/3] VMCI: only load on VMware hypervisor

2017-08-16 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > > Without the patch, vmw_vsock_vmci_transport.ko and vmw_vmci.ko can > > automatically load when an application creates an AF_VSOCK socket. > > > > This is the expected good behavior on VMware hypervisor, but as we > > are going to add hv_sock.

[PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Dexuan Cui
KVM's vsock_virtio_transport doesn't have the issue because it doesn't define MODULE_ALIAS_NETPROTO(PF_VSOCK). The patch also adds a module parameter "skip_hypervisor_check" for vmw_vsock_vmci_transport.ko. Signed-off-by: Dexuan Cui Cc: Alok Kataria Cc: Andy King Cc: A

RE: [PATCH net-next 1/3] VMCI: only load on VMware hypervisor

2017-08-17 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Wednesday, August 16, 2017 15:34 > > From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > > > Without the patch, vmw_vsock_vmci_transport.ko and vmw_vmci.ko can > > > automatically load when an application creates an AF_VSOCK socket. > &g

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, August 17, 2017 10:04 > I would avoid module parameters at all costs. > > It is the worst possible interface for users of your software. > > You really need to fundamentally solve the problems related to making > sure the proper

RE: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-17 Thread Dexuan Cui
> > On Aug 16, 2017, at 12:15 AM, Dexuan Cui wrote: > > With the current code, when vsock_dequeue_accept() is removing a sock > > from the list, nothing prevents vsock_enqueue_accept() from adding a new > > sock into the list concurrently. We should add a lock to protec

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > Sent: Thursday, August 17, 2017 08:17 > > > > Putting aside nested virtualization, I want to load the transport (vmci, > > Hyper-V, vsock) for which there is paravirtualized hardware present > > inside the guest. > > Good points. Completely ag

RE: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, August 17, 2017 07:06 > > On Tue, Aug 15, 2017 at 10:15:39PM +0000, Dexuan Cui wrote: > > With the current code, when vsock_dequeue_accept() is removing a sock > > from the list, nothing prevents vso

RE: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, August 17, 2017 07:56 > To: Dexuan Cui > On Tue, Aug 15, 2017 at 10:18:41PM +0000, Dexuan Cui wrote: > > +static u32 hvs_get_local_cid(void) > > +{ > > + return VMADDR_CID_ANY; > > +}

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > CID is not really used by us, because we only support guest<->host > communication, > > and don't support guest<->guest communication. The Hyper-V host > references > > every VM by VmID (which is invisible to the VM), and a VM can only talk t

RE: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-22 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > On Fri, Aug 18, 2017 at 10:23:54PM +, Dexuan Cui wrote: > > > > +static bool hvs_stream_allow(u32 cid, u32 port) > > > > +{ > > > > + static const u32 valid_cids[] = { > > > > +

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-22 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > > On Aug 22, 2017, at 11:54 AM, Stefan Hajnoczi > wrote: > > ... > > We *can* by looking at the destination CID. Please take a look at > > drivers/misc/vmw_vmci/vmci_route.c:vmci_route() to see how VMCI > handles > > nested virt. > > > > It b

[PATCH v2 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-22 Thread Dexuan Cui
roducing a new vsock transport for AF_VSOCK. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Andy King Cc: Dmitry Torokhov Cc: George Zhang Cc: Jorgen Hansen Cc: Reilly Grant Cc: Stefan Hajnoczi Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Rolf Neug

RE: [PATCH v2 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-24 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, August 24, 2017 18:20 > > +#define VMBUS_PKT_TRAILER (sizeof(u64)) > > This is not the packet trailer, it's the size of the packet trailer. Thanks! I'll change it to VMBUS_PKT_TRAILER_SIZE. > > + /* Have we sent the zero-lengt

[PATCH v3 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-25 Thread Dexuan Cui
roducing a new vsock transport for AF_VSOCK. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Andy King Cc: Dmitry Torokhov Cc: George Zhang Cc: Jorgen Hansen Cc: Reilly Grant Cc: Asias He Cc: Stefan Hajnoczi Cc: Vitaly Kuznetsov Cc: Cathy Avery

RE: [PATCH v3 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-28 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, August 28, 2017 15:39 > From: Dexuan Cui > Date: Sat, 26 Aug 2017 04:52:43 + > > > > > Hyper-V Sockets (hv_sock) supplies a byte-stream based communication > > mechanism between the host and th

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-28 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Tuesday, August 22, 2017 21:21 > > ... > > ... > > The only problem here would be the potential for a guest and a host app > to > > have a conflict wrt port numbers, even though they would be able to > > operate fine, if re

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-09-01 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, August 31, 2017 4:55 AM > ... > On Tue, Aug 29, 2017 at 03:37:07PM +, Jorgen S. Hansen wrote: > > > On Aug 29, 2017, at 4:36 AM, Dexuan Cui wrote: > > If we allow multiple host side transports, v

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-09-06 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > Sent: Wednesday, September 6, 2017 7:11 AM >> ... > > I'm currently working on NFS over AF_VSOCK and sock_diag support (for > > ss(8) and netstat-like tools). > > > > Multi-transport support is lower priority for me at the moment. I'm > > happ

RE: [PATCH] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-06-24 Thread Dexuan Cui
>On Tue, Jun 24, 2014 at 08:29:17AM +0800, Dexuan Cui wrote: >> Currently the VSC has no chance to notify the VSP of the dirty rectangle on >> VM >> panic because the notification work is done in a workqueue, and in panic() >> the >> kernel typically ends up i

[PATCH] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-06-25 Thread Dexuan Cui
e framebuffer driver to a "synchronous mode", meaning the VSC flushes any future framebuffer change to the VSP immediately. MS-TFS: 157532 Signed-off-by: Dexuan Cui Reviewed-by: Haiyang Zhang --- drivers/video/fbdev/hyperv_fb.c | 58 ++--- 1 fil

RE: [PATCH] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-06-26 Thread Dexuan Cui
> > >> MS-TFS: 157532 > > > > > What is this line for? > > > > Hi Greg, > > This line is for our internal bug repository. > > We have an automated system to correlate bugs with fixes so that our test > > team knows when a bug fix has been accepted upstream and they need to > > write a new test case

[PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-06-26 Thread Dexuan Cui
e framebuffer driver to a "synchronous mode", meaning the VSC flushes any future framebuffer change to the VSP immediately. v2: removed the MS-TFS line in the commit message Signed-off-by: Dexuan Cui Reviewed-by: Haiyang Zhang --- drivers/video/fbdev/hyperv_fb.c | 58 ++

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-27 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > On Tue, Aug 26, 2014 at 10:30:54AM +0000, Dexuan Cui wrote: > > > Actually I found the direct cause of the panic: sometimes > > vmbus_post_msg() can return 4 (HV_STATUS_INVALID_ALIGNMENT), but > > vmbus_open() d

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-27 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Wednesday, August 27, 2014 20:16 PM > > > do_hypercall() fails due to HV_STATUS_INVALID_ALIGNMENT, if "the > > specified input or output GPA pointer is not aligned to 8 bytes", > > or, "the specified input or output parameter lists spans

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-27 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of KY Srinivasan > Sent: Thursday, August 28, 2014 7:14 AM > > > > From: Sitsofe Wheeler [mailto:sits...@gmail.com] > > > > Sent: Wednesday, August 27, 2014 9:19 AM > > >

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-28 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Thursday, August 28, 2014 20:49 PM > > > > The only issue seen on boot now is similar to > > > > https://lkml.org/lkml/2014/8/19/227 ... > > > I don't see this issue. Do you still see the issue for EVERY boot > > after you applied KY's

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-29 Thread Dexuan Cui
> -Original Message- > From: Dan Carpenter > Sent: Friday, August 29, 2014 17:50 PM > To: KY Srinivasan > Cc: Sitsofe Wheeler; Dexuan Cui; Greg Kroah-Hartman; Haiyang Zhang; > linux-ker...@vger.kernel.org; de...@linuxdriverproject.org > Subject: Re: [PANIC, hyperv]

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-29 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Friday, August 29, 2014 19:20 PM > Because this particular return code is overloaded with multiple meanings > that can't necessarily be deduced from its name perhaps this > documentation patch would be helpful: > > diff --git a/arch/x86/

[PATCH] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-22 Thread Dexuan Cui
Signed-off-by: Dexuan Cui Reviewed-by: K. Y. Srinivasan --- tools/hv/hv_vss_daemon.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index 6a213b8..19567c5 100644 --- a/tools/hv/hv_vss_daemon.c +++ b/tools/hv

[PATCH v2] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-22 Thread Dexuan Cui
v2: I added "errno = 0;" in the ioctl() Signed-off-by: Dexuan Cui Reviewed-by: K. Y. Srinivasan --- tools/hv/hv_vss_daemon.c | 28 1 file changed, 28 insertions(+) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index 6a213b8..c1af658 10

RE: [PATCH] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-22 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dexuan Cui > Sent: Tuesday, September 23, 2014 2:02 AM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdr

RE: [PATCH v2] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-22 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dexuan Cui > Sent: Tuesday, September 23, 2014 13:01 PM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdr

RE: [PATCH v2] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-24 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Greg KH > Sent: Wednesday, September 24, 2014 14:32 PM > To: Dexuan Cui > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org

[PATCH v3] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-09-25 Thread Dexuan Cui
fails. Signed-off-by: Dexuan Cui Reviewed-by: K. Y. Srinivasan --- v2: Add "errno = 0;" before the ioctl() (Unnecessary and removed now since we remove syslog() in vss_do_freeze() in v3) v3: Remove the unsafe syslog() in vss_do_freeze(): that could write the disk. Thaw the file

RE: [PATCH v3] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-10-07 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Friday, September 26, 2014 12:52 PM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org;

[PATCH v3 RESEND] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-10-21 Thread Dexuan Cui
fails. Signed-off-by: Dexuan Cui Reviewed-by: K. Y. Srinivasan --- v2: Add "errno = 0;" before the ioctl() (Unnecessary and removed now since we remove syslog() in vss_do_freeze() in v3) v3: Remove the unsafe syslog() in vss_do_freeze(): that could write the disk. Thaw the file

RE: [PATCH v3 RESEND] Tools: hv: vssdaemon: ignore the EBUSY on multiple freezing the same partition

2014-11-03 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Dexuan Cui > Sent: Tuesday, October 21, 2014 17:56 PM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org;

[PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-12 Thread Dexuan Cui
This fixes the recent commit: Drivers: hv: vmbus: Further improve CPU affiliation logic Without the fix, reloading hv_netvsc hangs the guest. Signed-off-by: Dexuan Cui --- drivers/hv/channel_mgmt.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b

RE: [PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-12 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Wednesday, August 12, 2015 21:49 > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonic

[PATCH V2] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-12 Thread Dexuan Cui
This fixes the recent commit: Drivers: hv: vmbus: Further improve CPU affiliation logic Without the fix, reloading hv_netvsc hangs the guest. Signed-off-by: Dexuan Cui --- Change since V1: clear the related bit(s) in hv_process_channel_removal() rather than in init_vp_index

RE: [PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-12 Thread Dexuan Cui
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, August 12, 2015 21:06 > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-12 Thread Dexuan Cui
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, August 12, 2015 22:11 > To: Dexuan Cui > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vg

RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-08 Thread Dexuan Cui
> -Original Message- > From: driverdev-devel-boun...@linuxdriverproject.org [mailto:driverdev- > devel-boun...@linuxdriverproject.org] On Behalf Of Dexuan Cui > Sent: Friday, June 27, 2014 5:35 AM > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;

RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-08 Thread Dexuan Cui
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Tuesday, July 8, 2014 17:27 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; plagn...@jcrosoft.com; >

RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-08 Thread Dexuan Cui
> -Original Message- > > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > > Sent: Tuesday, July 8, 2014 17:27 PM > > > To: Dexuan Cui > > > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > driverdev- > > >

[PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-08 Thread Dexuan Cui
e framebuffer driver to a "synchronous mode", meaning the VSC flushes any future framebuffer change to the VSP immediately. v2: removed the MS-TFS line in the commit message v3: remove some 'unlikely' markings Signed-off-by: Dexuan Cui Reviewed-by: Haiyang Zhang -

[PATCH] Drivers: hv: hv_fcopy: fix a race condition for SMP guest

2014-07-15 Thread Dexuan Cui
nivasan Cc: Haiyang Zhang Cc: sta...@vger.kernel.org Signed-off-by: Dexuan Cui --- drivers/hv/hv_fcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index eaaa3d8..23b2ce2 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/

RE: [PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-23 Thread Dexuan Cui
should do. I appreciate your reply. Thanks! -- Dexuan > -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dexuan Cui > Sent: Wednesday, July 9, 2014 11:04 AM > To: gre...@linuxfoundation.org

RE: [PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-25 Thread Dexuan Cui
> -Original Message- > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Thursday, July 24, 2014 11:53 AM > > So, hi Greg and all, > > If you think the patch itself is OK, may I know if it's OK for the patch to > > go > > into Greg's char-misc.git tree, as some o

RE: [PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-07-31 Thread Dexuan Cui
> -Original Message- > From: Tomi Valkeinen [mailto:tomi.valkei...@ti.com] > Sent: Wednesday, July 30, 2014 22:24 PM > > +static struct fb_info *hvfb_info; > > Static variables like these are usually a no-no. This prevents you from > having multiple device instances. I agree. > > static

RE: [PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-08-01 Thread Dexuan Cui
> -Original Message- > From: Tomi Valkeinen [mailto:tomi.valkei...@ti.com] > Sent: Thursday, July 31, 2014 21:38 PM > > I think in hvfb_on_panic() we should be able to get the > > hvfb_info pointer by > > hvfb_info = container_of(nb, struct hv_fb_panic_nb, nb). > > > > If you like that or h

[PATCH v4] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

2014-08-01 Thread Dexuan Cui
e framebuffer driver to a "synchronous mode", meaning the VSC flushes any future framebuffer change to the VSP immediately. v2: removed the MS-TFS line in the commit message v3: remove some 'unlikely' markings v4: avoid global variables as Tomi Valkeinen suggested Cc:

[PATCH] HID: hyperv: register as a wakeup source

2014-08-01 Thread Dexuan Cui
With this patch, we can move the mouse to wake up the VM after the VM executes "echo freeze > /sys/power/state". This addresses part of https://bugzilla.redhat.com/show_bug.cgi?id=1086100 Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- drivers/hid/hid-hyperv.c | 6 ++ 1 fi

[PATCH] Input: hyperv-keyboard: register as a wakeup source

2014-08-01 Thread Dexuan Cui
With this patch, we can press a key to wake up the VM after the VM executes "echo freeze > /sys/power/state". This addresses part of https://bugzilla.redhat.com/show_bug.cgi?id=1086100 Cc: K. Y. Srinivasan Signed-off-by: Dexuan Cui --- drivers/input/serio/hyperv-ke

RE: [PATCH] Input: hyperv-keyboard: register as a wakeup source

2014-08-06 Thread Dexuan Cui
> -Original Message- > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com] > Sent: Thursday, August 7, 2014 4:34 AM > To: Dexuan Cui > On Fri, Aug 01, 2014 at 07:28:24AM -0700, Dexuan Cui wrote: > > With this patch, we can press a key to wake up the VM af

RE: [PATCH] Input: hyperv-keyboard: register as a wakeup source

2014-08-06 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dmitry Torokhov > > Hi Dmitry, > > Sorry, I didn't realize it's not public... :-) > > > > I'll remove the line and re-send the patch. > > > > No need to resend, I alr

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-07 Thread Dexuan Cui
asow...@redhat.com; > Haiyang Zhang; KY Srinivasan; Thomas Shao; Dexuan Cui > Subject: Re: [PATCH] Hyperv: Trigger DHCP renew after host hibernation > > On Mon, Jul 21, 2014 at 11:32 PM, David Miller > wrote: > > From: Olaf Hering > > Date: Mon, 21 Jul 2014 11:18:51 +020

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-08 Thread Dexuan Cui
> From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Friday, August 8, 2014 11:32 AM > > Hi Richard and all, > > > > IMO the most feasible and need-the-least-change solution may be: > > the hyperv network VSC driver passes the event > > RNDIS_STATUS_NETWORK_CHANGE to the udev daemon? > > > >

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-10 Thread Dexuan Cui
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > > > > > > > > IMO the most feasible and need-the-least-change solution may be: > > > > the hyperv network VSC driver passes the event > > > > RNDIS_STATUS_NETWORK_CHANGE to the udev daemon? > > > > > > > No, don't do

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-10 Thread Dexuan Cui
> -Original Message- > From: Dexuan Cui > Sent: Monday, August 11, 2014 11:24 AM > Now I understand it's not good to pass the event to the udev daemon, > and it's not good to use a SLEEP(10s) in the kernel space(even if it's in a > "work" task

[PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-11 Thread Dexuan Cui
ple can beware of this. Thank Claudio for the initial reporting, investigation and suggesting the fix. Signed-off-by: Dexuan Cui Reported-by: Claudio Latini Cc: K. Y. Srinivasan --- drivers/input/serio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/serio

RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-11 Thread Dexuan Cui
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Decoupling the dependency between hyperv_keyboard and i8042 needs > > non-trivial efforts and is hence a long term goal. > > > > For now, let's make the dependency explicit so people can beware of this. > > You did

RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-12 Thread Dexuan Cui
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Greg KH > > > What exactly needs to be done to fix this "correctly" that is going to > > > take too much work at the moment? > > > > To decouple the dependency between

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-12 Thread Dexuan Cui
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Monday, August 11, 2014 11:52 AM > > I suppose you meant the below logic: > > if (refresh) { > > rtnl_lock(); > > netif_carrier_off(net); > > netif_carrier_on(net); > > rt

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-12 Thread Dexuan Cui
> -Original Message- > From: Bill Fink > In the case of ifplugd, it has parameters -u | --delay-up= which > defaults to 0 seconds, and -d | --delay-down= which defaults to > 5 seconds. Maybe for hyperv you could specify --delay-down=0. > I don't know if other daemons such as systemd have

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-12 Thread Dexuan Cui
> From: Tom Gundersen > > Unluckily this logic doesn't work because the user-space daemons > > like ifplugd, usually don't renew the DHCP immediately as long as they > > receive a link-down message: they usually wait for some seconds and if > > they find the link becomes up soon, they won't trigger

RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-12 Thread Dexuan Cui
> -Original Message- > From: Dmitry Torokhov > Sent: Wednesday, August 13, 2014 1:55 AM > > > > To decouple the dependency between the hyperv-keyboard and i8042 > > > > modules, I suppose we probably have to re-implement hyperv- > keyboard by > > > > using input_allocate_device(), input_reg

RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-12 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > > The Arch users can simply select to build i8042 into the kernel as a > > workaround. > > > > The proper solution is to allow loading libps2 module even if i8042 did not > find > > its device. I wish I could simply drop this i8042_lock_chip and

RE: [PATCH] Hyperv: Trigger DHCP renew after host hibernation

2014-08-13 Thread Dexuan Cui
> -Original Message- > From: Dan Williams > > > e.g., on a bare metal host with Ubuntu 14.04, when I plug the RJ45 cable > > > out of the network card and then plug the cable back into the network card > > > quickly -- in ~3 seconds, networkd doesn't trigger DHCP renew request: in > > > /va

RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

2014-08-13 Thread Dexuan Cui
> -Original Message- > From: Dmitry Torokhov > > How about this: > > in libps2.c let's add and export a function pointer > > i8042_lock_chip_if_port_owner: it is used to replace the current > > if (i8042_check_port_owner(ps2dev->serio)) > > i8042_lock_chip(); > > The functi

[PATCH] Input: hyperv-keyboard - implement Type Clipboard Text

2014-08-15 Thread Dexuan Cui
PI for us to query the state of the keyboard. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan --- drivers/input/serio/hyperv-keyboard.c | 213 -- 1 file changed, 201 insertions(+), 12 deletions(-) diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input

RE: [PATCH] Input: hyperv-keyboard - implement Type Clipboard Text

2014-08-17 Thread Dexuan Cui
> -Original Message- > From: Dmitry Torokhov > Sent: Saturday, August 16, 2014 0:58 AM > To: Dexuan Cui > > For each char in the string, the host sends 2 events (key down/up with the > > char's UNICODE value) to the guest. > > The patch finds each ch

RE: [PATCH] Input: hyperv-keyboard - implement Type Clipboard Text

2014-08-19 Thread Dexuan Cui
> -Original Message- > From: Dmitry Torokhov > Sent: Tuesday, August 19, 2014 2:52 AM > To: Dexuan Cui > On Mon, Aug 18, 2014 at 03:54:51AM +0000, Dexuan Cui wrote: > > > -Original Message- > > > From: Dmitry Torokhov > > > Sent: Saturday

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-20 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Wednesday, August 20, 2014 17:27 PM > To: Dexuan Cui > Cc: KY Srinivasan; Greg Kroah-Hartman; Haiyang Zhang; > de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Jean-Christophe > Plagniol-Villard; linux-

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-20 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Wednesday, August 20, 2014 19:40 PM > > I suppose you're using the latest mainline v3.17-rc1(7d1311b9). > > That's right - Linux 3.17-rc1 > (7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9). Ok, let me try to reproduce it first. > > Can you p

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-25 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Wednesday, August 20, 2014 17:27 PM > > While booting a Hyper-V 3.17.0-rc1 guest on a 2012 R2 host a BUG was > triggered while registering hyperv_fb which in turn caused a panic. > Various kernel debugging options (CONFIG_DEBUG_PAGEALLOC

RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)

2014-08-26 Thread Dexuan Cui
> -Original Message- > From: Sitsofe Wheeler > Sent: Tuesday, August 26, 2014 1:42 AM > > > [7.645526] hv_vmbus: registering driver hyperv_fb > > > [7.657553] BUG: unable to handle kernel paging request at > > > 88007784 > > > [7.658224] IP: [] hv_ringbuffer_write+0x7c/0

RE: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop

2017-12-22 Thread Dexuan Cui
> From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > Sent: Friday, December 22, 2017 06:21 > > In the absence of logs, the best I can do at the moment is attach a > picture of the screen I am presented with on the apic=debug boot > attempt. > Alex The panic happens in irq_matrix_assign_sy

RE: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop

2017-12-22 Thread Dexuan Cui
> From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > Sent: Friday, December 22, 2017 14:29 > > The output of that precise command run just now on a freshly-compiled > copy of that commit is attached. > > On Fri, Dec 22, 2017 at 09:31:28PM +, Dexuan Cui wrote:

RE: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop

2017-12-28 Thread Dexuan Cui
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Thursday, December 28, 2017 03:03 > > > On Wed, Dec 20, 2017 at 02:12:05AM +0000, Dexuan Cui wrote: > > > > For Linux VM running on Hyper-V, we did get "spurious APIC interrupt > > > through ve

[PATCH] tools: hv: fix compiler warnings about major/target_fname

2018-01-10 Thread Dexuan Cui
. hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040 bytes into a destination of size 260 Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan --- tools/hv/hv_fcopy_daemon.c | 3 ++- tools/hv/hv_vss_daemon.c | 1 + 2 files changed, 3 insertions(+), 1 d

[PATCH 1/3] PCI: hv: fix a comment typo in _hv_pcifront_read_config()

2018-03-02 Thread Dexuan Cui
No functional change. Signed-off-by: Dexuan Cui Fixes: bdd74440d9e8 ("PCI: hv: Add explicit barriers to config space access") Cc: Vitaly Kuznetsov Cc: sta...@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 2 +- 1 file changed, 1 inser

[PATCH 2/3] PCI: hv: serialize the present/eject work items

2018-03-02 Thread Dexuan Cui
ing list_del(&hpdev->list_entry), causing general protection fault, because system_wq can run them concurrently. The patch eliminates the race condition. Signed-off-by: Dexuan Cui Tested-by: Adrian Suhov Tested-by: Chris Valean Cc: Vitaly Kuznetsov Cc: Jack Morgenstein Cc: sta...@vger.ker

[PATCH 3/3] PCI: hv: fix 2 hang issues in hv_compose_msi_msg()

2018-03-02 Thread Dexuan Cui
the PCI vendor ID. Note: actually the above issues also happen to a SMP VM, if "hbus->hdev->channel->target_cpu == smp_processor_id()" is true. Signed-off-by: Dexuan Cui Tested-by: Adrian Suhov Tested-by: Chris Valean Cc: sta...@vger.kernel.org Cc: Stephen Hemminger

<    1   2   3   4   5   6   >