caching of FQDN in kvp_daemon

2018-11-05 Thread Olaf Hering
In commit 58125210ab ("Tools: hv: cache FQDN in kvp_daemon to avoid timeouts") I changed the code to lookup the hostname just once during start. While this works most of the time, there is still a slim chance that name resolution does not work properly at that time. As a result the host will alw

Re: [PATCH V2 3/4] vmbus: add per-channel sysfs info

2018-10-18 Thread Olaf Hering
Am Sun, 17 Sep 2017 20:54:18 -0700 schrieb k...@exchange.microsoft.com: > This extends existing vmbus related sysfs structure to provide per-channel > state information. This is useful when diagnosing issues with multiple > queues in networking and storage. > +++ b/drivers/hv/vmbus_drv.c > +stati

[PATCH v2] tools: hv: update lsvmbus to be compatible with python3

2018-05-22 Thread Olaf Hering
Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering --- v2: correct author tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hv/lsvmbus

[PATCH v1] tools: hv: update lsvmbus to be compatible with python3

2018-05-22 Thread Olaf Hering
From: Olaf Hering Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering --- tools/hv/lsvmbus | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hv/lsvmbus

[PATCH] tools: hv: include string.h in hv_fcopy_daemon

2018-01-08 Thread Olaf Hering
The usage of strchr requires inclusion of string.h. Fixes: 0c38cda64aec ("tools: hv: remove unnecessary header files and netlink related code") Signed-off-by: Olaf Hering --- tools/hv/hv_fcopy_daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/hv/hv_fcopy_daemon.c

Re: [PATCHv2] tools: hv: hv_set_ifconfig.sh double check before setting ip

2017-12-08 Thread Olaf Hering
On Fri, Dec 08, Eduardo Otubo wrote: > tools/hv/hv_set_ifconfig.sh | 45 > +++-- > 1 file changed, 43 insertions(+), 2 deletions(-) > +# let's wait for 3 minutes Was this codepath runtime tested? Last time this came up, the conclusion was that W

Re: [PATCH] tools: hv: handle EINTR in hv_fcopy_daemon

2017-09-05 Thread Olaf Hering
On Tue, Sep 05, KY Srinivasan wrote: > Were you planning on sending a patch for this. No, not yet. I dont know how SA_RESTART works. Olaf signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.li

Re: [PATCHv2] hv_set_ifconfig.sh double check before setting ip

2017-08-28 Thread Olaf Hering
On Mon, Aug 28, Eduardo Otubo wrote: > +sleep 30s; Was this runtime tested? Once this sleep(1) is done, HV_UTIL_TIMEOUT kicks in and the daemon dies. Olaf signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.or

Re: [PATCH] tools: hv: handle EINTR in hv_fcopy_daemon

2017-08-25 Thread Olaf Hering
On Fri, Aug 25, Vitaly Kuznetsov wrote: > Shall we request SA_RESTART with sigaction() in all three daemons instead? If that works better, probably yes. Olaf signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org

[PATCH] Drivers: hv: fcopy: restore correct transfer length

2017-08-25 Thread Olaf Hering
slightly less than expected. Fix this by restoring the expected buffer size in case of WRITE_TO_FILE. Fixes: c7e490fc23eb ("Drivers: hv: fcopy: convert to hv_utils_transport") Fixes: 3f2baa8a7d2e ("Tools: hv: update buffer handling in hv_fcopy_daemon") Signed-off-by: Olaf Her

[PATCH] tools: hv: handle EINTR in hv_fcopy_daemon

2017-08-25 Thread Olaf Hering
If strace attaches to the daemon pread returns with EINTR, and the process exits. Catch this case and continue with the next iteration. Signed-off-by: Olaf Hering --- tools/hv/hv_fcopy_daemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv

[PATCH RESEND] tools: hv: update buffer handling in hv_fcopy_daemon

2017-08-09 Thread Olaf Hering
members as needed. This also gives the correct size for the buffer (~6K instead of 64K). Signed-off-by: Olaf Hering --- tools/hv/hv_fcopy_daemon.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv

[PATCH] Tools: hv: fix snprintf warning in kvp_daemon

2017-08-09 Thread Olaf Hering
Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering --- tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 88

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Olaf Hering
On Fri, Jan 13, Vitaly Kuznetsov wrote: > + hv_ptp_clock = ptp_clock_register(&ptp_hyperv_info, NULL); > + if (IS_ERR(hv_ptp_clock)) { Should that be IS_ERR_OR_NULL to catch "!IS_REACHABLE(CONFIG_PTP_1588_CLOCK)"? Olaf signature.asc Description: PGP signature __

Re: [PATCH 03/15] hyperv: use standard bitops

2016-12-21 Thread Olaf Hering
On Tue, Dec 20, Roman Kagan wrote: Reverting commit 22356585712d ("staging: hv: use sync_bitops when interacting with the hypervisor") is save because ... > - sync_set_bit(channel->monitor_bit, > + set_bit(channel->monitor_bit, Olaf signature.asc Description: PGP s

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-15 Thread Olaf Hering
On Thu, Dec 15, Vitaly Kuznetsov wrote: > -> K. Y., but these words were written before I implemented > vmbus_wait_for_unload(), to me they just explain how we read messages. Another question for KY: In my testing, while busy-looping in vmbus_wait_for_unload, I see a few "message_type==1, hdr->msg

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-15 Thread Olaf Hering
On Thu, Dec 15, Vitaly Kuznetsov wrote: > vmbus_wait_for_unload() may be receiving a message (not necessarily the > CHANNELMSG_UNLOAD_RESPONSE, we may see some other message) on the same > CPU it runs and in this case wrmsrl() makes sense. In other cases it > does nothing (neither good nor bad).

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-15 Thread Olaf Hering
On Thu, Dec 15, Vitaly Kuznetsov wrote: > We actually need to read the reply and empty the message slot to make > unload happen. And reading on a different CPU may not work, see: > > http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-December/097330.html Does the following se

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-15 Thread Olaf Hering
On Thu, Dec 15, Olaf Hering wrote: > On Thu, Dec 15, Vitaly Kuznetsov wrote: > > > I see a number of minor but at least one major issue against such move: > > At least for some Hyper-V versions (2012R2 for example) > > CHANNELMSG_UNLOAD_RESPONSE is delivered to the

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-15 Thread Olaf Hering
On Thu, Dec 15, Vitaly Kuznetsov wrote: > I see a number of minor but at least one major issue against such move: > At least for some Hyper-V versions (2012R2 for example) > CHANNELMSG_UNLOAD_RESPONSE is delivered to the CPU which initially sent > CHANNELMSG_REQUESTOFFERS and on kdump we may not

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-07 Thread Olaf Hering
On Wed, Dec 07, KY Srinivasan wrote: > May be a better solution might be to have a new mechanism to indicate > to the host that all state of the previous incarnation of the kernel > needs to be cleaned up. This will be close to what we have on > hardware. That would be cool, but until this appea

Re: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-07 Thread Olaf Hering
On Wed, Dec 07, KY Srinivasan wrote: > Is there a mechanism for stashing away state that can be retrieved in > the context of the execed kernel. I have to find out. To simplify things the new approach may only be used in the kdump case, which already passes various info in cmdline. Most likely th

RE: move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-07 Thread Olaf Hering
Am 7. Dezember 2016 16:04:29 MEZ, schrieb KY Srinivasan : >Yes; I had played with this approach a while ago. The issue is that the >host knows about a >bunch of in memory state that will be different in the kexec kernel. >For instance if we did all >the cleanup as part of the boot sequence, we wi

move hyperv CHANNELMSG_UNLOAD from crashed kernel to kdump kernel

2016-12-07 Thread Olaf Hering
KY, if a hyperv VM crashes alot of work must be done to prepare the environment for the kdump kernel. This approach is different compared to all the other VM types, or baremetal. Since the just crashed kernel is per definition unreliable all that work should be done within the kdump kernel because

Re: [PATCH 1/1] Drivers: hv: hv_util: Avoid dynamic allocation in time synch

2016-09-14 Thread Olaf Hering
On Fri, Sep 09, k...@exchange.microsoft.com wrote: > + * This check is safe since we are executing in the > + * interrupt context and time synch messages arre always Typo. Olaf signature.asc Description: PGP signature ___ devel mailing list

Re: [PATCH 3/3] Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.

2016-09-14 Thread Olaf Hering
On Tue, Sep 13, Alex Ng (LIS) wrote: > > On Thu, Sep 08, k...@exchange.microsoft.com wrote: > > Perhaps a better approach would be to list the known existing hosts and use > > the new protocol for upcoming, unknown hosts via 'default:'. > This is a good idea. I will create another patch that addre

Re: [PATCH 3/3] Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.

2016-09-13 Thread Olaf Hering
On Thu, Sep 08, k...@exchange.microsoft.com wrote: > - default: > + case(VERSION_WIN10): > util_fw_version = UTIL_FW_VERSION; > sd_srv_version = SD_VERSION; > ts_srv_version = TS_VERSION; > hb_srv_version = HB_VERSION; > +

Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-07-07 Thread Olaf Hering
On Thu, Jun 30, Dexuan Cui wrote: > +/* The MTU is 16KB per the host side's design. */ > +struct hvsock_recv_buf { > + unsigned int data_len; > + unsigned int data_offset; > + > + struct vmpipe_proto_header hdr; > + u8 buf[PAGE_SIZE * 4]; Please use some macro related to the proto

Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-06-30 Thread Olaf Hering
On Thu, Jun 30, Olaf Hering wrote: > On Thu, Jun 30, Dexuan Cui wrote: > > > -#define AF_MAX 43 /* For now.. */ > > +#define AF_MAX 44 /* For now.. */ > > Should this patch also change the places where AF_MAX is used, > like all th

Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-06-30 Thread Olaf Hering
On Thu, Jun 30, Dexuan Cui wrote: > -#define AF_MAX 43 /* For now.. */ > +#define AF_MAX 44 /* For now.. */ Should this patch also change the places where AF_MAX is used, like all the arrays in net/core/sock.c? Olaf signature.asc Description: PGP signature

Re: [PATCH v3] storvsc: use small sg_tablesize on x86

2016-06-09 Thread Olaf Hering
On Thu, Jun 09, James Bottomley wrote: > On Thu, 2016-06-09 at 18:25 +0200, Olaf Hering wrote: > > Reducing the sg_tablesize allows booting of 32bit kernels in VMs, > > after > > commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set > > the > &

[PATCH v3] storvsc: use small sg_tablesize on x86

2016-06-09 Thread Olaf Hering
Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the tablesize based on the information given by the host") [5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20 Signed

[PATCH] tools: hv: update buffer handling in hv_fcopy_daemon

2016-05-17 Thread Olaf Hering
members as needed. This also gives the correct size for the buffer (~6K instead of 64K). Signed-off-by: Olaf Hering --- tools/hv/hv_fcopy_daemon.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv

Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test robot

2016-01-28 Thread Olaf Hering
On Wed, Jan 27, K. Y. Srinivasan wrote: > + depends on SCSI_FC_ATTRS I think 'depends' instead of 'select' will cause HYPERV_STORAGE to disapepar during make oldconfig if SCSI_FC_ATTRS was not set before. Not sure what the policy of 'depends' vs. 'select' actually is. If SCSI_FC_ATTRS is su

Re: [PATCH V6 8/8] hvsock: introduce Hyper-V Socket feature

2016-01-26 Thread Olaf Hering
On Tue, Jan 26, Dexuan Cui wrote: > +#define AF_MAX 42 /* For now.. */ Maybe net/core/sock.c needs additional strings for the new socket? Olaf ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.or

[PATCH v2] Drivers: hv: vss: run only on supported host versions

2015-10-20 Thread Olaf Hering
icframe_vercnt/icmsg_vercnt. But the host ignores that and continues to send ICMSGTYPE_NEGOTIATE messages. The result are weird errors during boot and general misbehaviour. Check the Windows version to work around the host bug, skip hv_vss_init on WS2012 and older. Signed-off-by: Olaf Hering --- v2

[PATCH] Drivers: hv: vss: run only on supported host versions

2015-10-13 Thread Olaf Hering
icframe_vercnt/icmsg_vercnt. But the host ignores that and continues to send ICMSGTYPE_NEGOTIATE messages. The result are weird errors during boot and general misbehaviour. Check the Windows version to work around the host bug, skip hv_vss_init on WS2012 and older. Signed-off-by: Olaf Hering

Re: [PATCH 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-10-13 Thread Olaf Hering
On Fri, Oct 09, Olaf Hering wrote: > On Thu, Oct 08, KY Srinivasan wrote: > > > > yes, but after doing fcopy_respond_to_host(). I'd suggest we leave the > > > check in place, better safe than sorry. > > > > Agreed; Olaf, if it is ok with you, I can fi

Re: [PATCH 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-10-09 Thread Olaf Hering
On Fri, Oct 09, Vitaly Kuznetsov wrote: > Olaf Hering writes: > > > On Thu, Oct 08, KY Srinivasan wrote: > > > >> > yes, but after doing fcopy_respond_to_host(). I'd suggest we leave the > >> > check in place, better safe than sorry. > >>

Re: [PATCH 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-10-09 Thread Olaf Hering
On Thu, Oct 08, KY Srinivasan wrote: > > yes, but after doing fcopy_respond_to_host(). I'd suggest we leave the > > check in place, better safe than sorry. > > Agreed; Olaf, if it is ok with you, I can fix it up and send. I will retest with this part reverted. I think without two code paths ente

Re: [PATCH 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-10-08 Thread Olaf Hering
On Thu, Oct 08, Vitaly Kuznetsov wrote: > > @@ -295,9 +288,6 @@ static int fcopy_on_msg(void *msg, int len) > > if (fcopy_transaction.state == HVUTIL_DEVICE_INIT) > > return fcopy_handle_handshake(*val); > > > > - if (fcopy_transaction.state != HVUTIL_USERSPACE_REQ) > > -

Re: [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services

2015-10-08 Thread Olaf Hering
On Wed, Oct 07, K. Y. Srinivasan wrote: > Util services such as KVP and FCOPY need assistance from daemon's running > in user space. Increase the timeout so we don't prematurely terminate > the transaction in the kernel. Is this an arbitrary number, or does the host allow such a large delay for t

[PATCH 4/5] Drivers: hv: util: catch allocation errors

2015-10-05 Thread Olaf Hering
Catch allocation errors in hvutil_transport_send. Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction') Signed-off-by: Olaf Hering --- drivers/hv/hv_utils_transport.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/

[PATCH 2/5] tools: hv: report ENOSPC errors in hv_fcopy_daemon

2015-10-05 Thread Olaf Hering
Currently some "Unspecified error 0x80004005" is reported on the Windows side if something fails. Handle the ENOSPC case and return ERROR_DISK_FULL, which allows at least Copy-VMFile to report a meaning full error. Signed-off-by: Olaf Hering --- include/uapi/linux/hyperv.h | 1 +

[PATCH 0/5] various hyperv fixes

2015-10-05 Thread Olaf Hering
Various hyperv changes, based on v4.3-rc4 linux.git Olaf Olaf Hering (5): Drivers: hv: utils: run polling callback always in interrupt context tools: hv: report ENOSPC errors in hv_fcopy_daemon tools: hv: remove repeated HV_FCOPY string Drivers: hv: util: catch allocation errors

[PATCH 3/5] tools: hv: remove repeated HV_FCOPY string

2015-10-05 Thread Olaf Hering
HV_FCOPY is already used as identifier in syslog. Signed-off-by: Olaf Hering --- tools/hv/hv_fcopy_daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c index f1d7426..fdc9ca4 100644 --- a/tools/hv

[PATCH 5/5] Drivers: hv: utils: use memdup_user in hvt_op_write

2015-10-05 Thread Olaf Hering
Use memdup_user to handle OOM. Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction') Signed-off-by: Olaf Hering --- drivers/hv/hv_utils_transport.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv_utils_tra

[PATCH 1/5] Drivers: hv: utils: run polling callback always in interrupt context

2015-10-05 Thread Olaf Hering
rst interrupt after negociation. Signed-off-by: Olaf Hering --- drivers/hv/hv_fcopy.c | 37 + drivers/hv/hv_kvp.c | 28 ++-- drivers/hv/hv_snapshot.c | 29 +++-- drivers/hv/hyperv_vmbus.h | 6 +-

Re: [PATCH 2/5] hv: add helpers to handle hv_util device state

2015-09-21 Thread Olaf Hering
On Mon, Sep 21, Vitaly Kuznetsov wrote: > I'd like to see a trace from the hang, it is not obvious to me how it > happened and what caused it. (or if you have such hang scenario in your > head, can you please reveal it?) There is no trace. I think fcopy_respond_to_host notifies the host, which in

Re: [PATCH 2/5] hv: add helpers to handle hv_util device state

2015-09-21 Thread Olaf Hering
On Sun, Sep 20, Greg KH wrote: > Just use a lock, that's what it is there for. How would that help? It might help because it enforces ordering. But that requires that all three utils get refactored to deal with the introduced locking. I will let KY comment on this. The issue I see with fcopy is

Re: [PATCH 4/5] hv: kvp: use wrappers to propaigate state

2015-09-21 Thread Olaf Hering
On Sun, Sep 20, Greg KH wrote: > On Tue, Sep 15, 2015 at 05:37:53PM -0700, K. Y. Srinivasan wrote: > > @@ -122,8 +125,8 @@ static void kvp_timeout_func(struct work_struct *dummy) > > + if (kvp_get_state() > HVUTIL_READY) > > + kvp_set_state(HVUTIL_READY); > And what if the state chan

[PATCH 2/4] hv: fcopy: use wrapper to propate state

2015-09-07 Thread Olaf Hering
The .state is used by several threads of execution. Propagate the state to make changes visible. Also propagate context change in hv_fcopy_onchannelcallback. Without this change fcopy may hang at random points. Signed-off-by: Olaf Hering --- drivers/hv/hv_fcopy.c | 36

[PATCH 1/4] hv: add helpers to handle hv_util device state

2015-09-07 Thread Olaf Hering
with a memory barrier. Signed-off-by: Olaf Hering --- drivers/hv/hyperv_vmbus.h | 12 1 file changed, 12 insertions(+) diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 3d70e36..6c03925 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h

[PATCH 4/4] hv: vss: use wrapper to propate state

2015-09-07 Thread Olaf Hering
The .state is used by several threads of execution. Propagate the state to make changes visible. Also propagate context change in vss_on_msg. Signed-off-by: Olaf Hering --- drivers/hv/hv_snapshot.c | 37 - 1 file changed, 20 insertions(+), 17 deletions

[PATCH 3/4] hv: kvp: use wrapper to propate state

2015-09-07 Thread Olaf Hering
The .state is used by several threads of execution. Propagate the state to make changes visible. Also propagate context change in kvp_on_msg. Signed-off-by: Olaf Hering --- drivers/hv/hv_kvp.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff

[PATCH 0/4] hv: utils: propagate state to interrupt thread

2015-09-07 Thread Olaf Hering
fter a timeout Copy-VMFile fails with timeout. In my initial testing for a fix I put a "mb()" after the last .state change in fcopy_write. But this series implementes read/write memory barriers as needed. Let me know if this is overdoing things. Olaf Olaf Hering (4): hv: add helpers to handl

Re: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Olaf Hering
On Tue, Jul 07, Dexuan Cui wrote: > OK, removing the line seems better than 'default n', though both reproduce > the same "# CONFIG_HYPERV_SOCK is not set". Perhaps "default VMBUS" (or whatever syntax is needed) may be the way to enable it conditionally. Olaf

Re: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Olaf Hering
On Tue, Jul 07, Paul Bolle wrote: > On ma, 2015-07-06 at 07:47 -0700, Dexuan Cui wrote: > > --- /dev/null > > +++ b/net/hv_sock/Kconfig > > > +config HYPERV_SOCK > > + tristate "Microsoft Hyper-V Socket (EXPERIMENTAL)" > > + depends on HYPERV > > + default m > It's a bit odd to advise to s

Re: [PATCH V2 04/10] Drivers: hv: vmbus: add special kexec handler

2015-06-23 Thread Olaf Hering
On Thu, Jun 04, K. Y. Srinivasan wrote: > +++ b/arch/x86/kernel/cpu/mshyperv.c > @@ -18,6 +18,9 @@ > #include > #include > #include > +#ifdef CONFIG_KEXEC > +#include > +#endif Is this #ifdef required? Olaf ___ devel mailing list de...@linuxdriv

Re: [PATCH 6/7] scsi: storvsc: Don't assume that the scatterlist is not chained

2015-03-24 Thread Olaf Hering
On Mon, Mar 23, K. Y. Srinivasan wrote: > @@ -653,32 +640,39 @@ static unsigned int copy_from_bounce_buffer(struct > scatterlist *orig_sgl, > unsigned long bounce_addr = 0; > unsigned long dest_addr = 0; > unsigned long flags; > + struct scatterlist *cur_dest_sgl; > + st

Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Olaf Hering
On Thu, Mar 12, Vitaly Kuznetsov wrote: > My "Drivers: hv: hv_balloon: eliminate the trylock path in > acquire/release_region_mutex" (b05d8d9ef5ef21d1b18440430f950304836e1aaa > in char-misc-next) removed these wrappers. I see now. There are many changes in char-misc-next. The description gives th

Re: [PATCH 2/2 net-next] hyperv: Support batched notification

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, KY Srinivasan wrote: > This is the convention that we have used for patches submitted to > David's tree. I see, it refers to the directory name. In a bunch of backports it gives the impression it affects the Hyper-V support as whole, while in fact a given change is just for the ne

Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, K. Y. Srinivasan wrote: > +++ b/drivers/hv/hv_balloon.c > @@ -652,6 +652,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned > long size, > } > has->ha_end_pfn -= HA_CHUNK; > has->covered_end_pfn -= proce

Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, K. Y. Srinivasan wrote: > The current Linux 4.0 RC3 tree is broken and this patch fixes the problem. This does not seem to apply to master. What it is based on? checking file drivers/hv/channel_mgmt.c Hunk #3 FAILED at 139. Hunk #4 succeeded at 194 (offset -31 lines). Hunk #5 suc

Re: [PATCH 2/2 net-next] hyperv: Support batched notification

2015-03-11 Thread Olaf Hering
On Tue, Mar 10, K. Y. Srinivasan wrote: > Optimize notifying the host by deferring notification until there > are no more packets to be sent. This will help in batching the requests > on the host. The subjects for the network driver say "hyperv:". But all such changes should get "netvsc:" as pref

[PATCH] storvsc: use KBUILD_MODNAME to fill .proc_name

2015-03-10 Thread Olaf Hering
Since the previous patch ead3700d893654d440edcb66fb3767a0c0db54cf ("storvsc: use cmd_size to allocate per-command data") fills .proc_name now anyway give it a usable content for v4.0. Old mkinitrd in SLES makes use of this variable to find the required storage driver. Signed-off-by: O

Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data

2015-03-10 Thread Olaf Hering
On Tue, Mar 10, Christoph Hellwig wrote: > On Tue, Mar 10, 2015 at 12:42:33PM +0100, Olaf Hering wrote: > > It would be nice to change .proc_name to KBUILD_MODNAME before v4.0 is > > released. We carry a patch which adds this field. Of cource we can just > > change the pa

Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data

2015-03-10 Thread Olaf Hering
On Mon, Dec 29, Christoph Hellwig wrote: > +++ b/drivers/scsi/storvsc_drv.c > static struct scsi_host_template scsi_driver = { > .module = THIS_MODULE, > .name = "storvsc_host_t", > + .cmd_size = sizeof(struct storvsc_cmd_request), >

Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-23 Thread Olaf Hering
On Tue, Sep 23, Thomas Shao wrote: > In current hyper-v time sync service,it only gets the initial clock time > from the host. It didn't process the following time samples. This change > introduced a module parameter called host_time_sync. If it is set to true, > the guest will periodically sychro

Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages

2014-09-18 Thread Olaf Hering
ed-off-by: K. Y. Srinivasan Reviewed-by: Olaf Hering ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages

2014-09-18 Thread Olaf Hering
On Wed, Sep 17, Christoph Hellwig wrote: > Also the two patches at > http://thread.gmane.org/gmane.linux.drivers.driver-project.devel/56242/ Wasnt the outcome that this was a bad idea? Or at least doing it globally is bad. In any case, its not something I can help with. Olaf ___

Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages

2014-09-17 Thread Olaf Hering
On Mon, Sep 08, KY Srinivasan wrote: > > -Original Message- > > From: Christoph Hellwig [mailto:h...@infradead.org] > > Sent: Thursday, September 4, 2014 10:40 PM > > To: KY Srinivasan > > Subject: Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages > > > > Looks good to m

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

2014-07-21 Thread Olaf Hering
On Mon, Jul 21, Richard Weinberger wrote: > My concern is that 10 seconds is maybe not a the right choice. > (As we cannot know all implementations) Until someone reports an issue with it, 10 is fine. Just like 20 or 666. Olaf ___ devel mailing list de

Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

2014-06-26 Thread Olaf Hering
On Mon, Jun 23, Haiyang Zhang wrote: > Yes, there is a link down/up event from the host, we currently call > netif_carrier_off() > / netif_carrier_on() with these events. Will hotplug scripts be triggered by > netif_carrier_off/on? Where are the scripts located at (SLES)? In /etc/sysconfig/net

Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

2014-06-23 Thread Olaf Hering
On Mon, Jun 23, Haiyang Zhang wrote: > I have tried some possibilities, like IF_OPER_DORMANT then IF_OPER_UP with > netdev_state_change() etc. but not able to trigger DHCP review. I will look > at this > further... Is there a link down/up event anyway? If the interface is configured to "on hotp

Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

2014-06-23 Thread Olaf Hering
On Mon, Jun 23, Haiyang Zhang wrote: > > I think its reasonable to expect guest config changes on this new kind > > of host. Would a link-down/link-up event work? I'm sure it will, there > > is enough code floating around in the guests which handles cable unplug. > > Do you mean netif_carrier_off

Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

2014-06-23 Thread Olaf Hering
On Fri, Jun 20, Haiyang Zhang wrote: > This command ("/etc/init.d/network restart") exists on our supported distros > currently. We will also look into some better ways to refresh the network for > the distros without this command. I have tried setting IF_OPER_DORMANT then > IF_OPER_UP, but not w

Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

2014-06-19 Thread Olaf Hering
On Thu, Jun 19, Haiyang Zhang wrote: > The RNDIS_STATUS_NETWORK_CHANGE event is received after the Hyper-V host > sleep or hibernation. We refresh network at this time. > + char *argv[] = { "/etc/init.d/network", "restart", NULL }; What happens if that file does not exist? Dead network in th

Re: [PATCH V2 1/1] X86: Probe for PIC and set legacy_pic appropriately

2014-04-14 Thread Olaf Hering
On Fri, Apr 11, K. Y. Srinivasan wrote: > Probe for the existance of legacy PIC, if one does not exist, use the > null_legacy_pic. > Signed-off-by: K. Y. Srinivasan Tested-by: Olaf Hering Fixes the crash on Gen1 VMs for me, which was introduced by "x86/platform/hyperv: When

Re: [PATCH V5 1/1] Drivers: hv: Implement the file copy service

2014-02-12 Thread Olaf Hering
On Sat, Feb 08, K. Y. Srinivasan wrote: > + fcopy_fd = open("/dev/vmbus/hv_fcopy", O_RDWR); > + > + if (fcopy_fd < 0) { > + syslog(LOG_ERR, "open /dev/hv_fcopy failed; error: %d %s", The error message mentions the old path. Olaf __

Re: [PATCH V4 1/1] Drivers: hv: Implement the file copy service

2014-01-23 Thread Olaf Hering
On Tue, Jan 21, K. Y. Srinivasan wrote: > Implement the file copy service for Linux guests on Hyper-V. This permits the > host to copy a file (over VMBUS) into the guest. This facility is part of > "guest integration services" supported on the Windows platform. > Here is a link that provides addit

Re: [PATCH V3 1/1] Drivers: hv: Implement the file copy service

2014-01-21 Thread Olaf Hering
On Tue, Jan 21, K. Y. Srinivasan wrote: Looks better. A few comments below: > +++ b/drivers/hv/hv_fcopy.c > +static bool daemon_died; This is a write only variable. > +static u32 daemon_version; This is a write only variable. > +static int fcopy_handle_handshake(u32 version) > +{ > + pr

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-20 Thread Olaf Hering
On Mon, Jan 20, KY Srinivasan wrote: > I am cleaning up the code based on your feedback. By the time I am > done with my cleanup, I doubt if this patch would apply. Do you mind > if I were to include your changes here as part of my cleanup? Yes, thats fine. Olaf

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: This function should return valid numbers: > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > + size_t count, loff_t *ppos) > +{ > + int error = 0; > + > + if (count != sizeof(int)) > + return

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-16 Thread Olaf Hering
ith attribute warn_unused_result [-Wunused-result] daemon(1, 0); ^ hv_fcopy_daemon.c:132:7: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] write(fcopy_fd, &version, sizeof(int)); ^ hv_fcopy_daemon.c:171:9: wa

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +++ b/include/linux/hyperv.h > @@ -26,6 +26,8 @@ > #define _HYPERV_H > > #include > +#include > +#include limits.h is not required. Olaf ___ devel mailing list de...@linuxdriverproject.org http://driverd

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +enum hv_fcopy_op { > + START_FILE_COPY = 0, > + WRITE_TO_FILE, > + COMPLETE_FCOPY, > + CANCEL_FCOPY, > +}; > + > +struct hv_fcopy_hdr { > + enum hv_fcopy_op operation; > + uuid_le service_id0; /* currently unused */ > + uuid_le

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-15 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +static int hv_start_fcopy(struct hv_start_fcopy *smsg) > + if (access((char *)smsg->path_name, F_OK)) { > + if (smsg->copy_flags & CREATE_PATH) { > + if (mkdir((char *)smsg->path_name, 0755)) { KY, I guess this needs

Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

2014-01-14 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > + size_t count, loff_t *ppos) > +{ > + int error = 0; > + > + if (count != sizeof(int)) > + return 0; > + > + if (copy_from_user(&error, b

Re: [PATCH 1/1] Drivers: hv: Implement the file copy service

2014-01-09 Thread Olaf Hering
On Wed, Jan 08, K. Y. Srinivasan wrote: > +++ b/tools/hv/hv_fcopy_daemon.c > + len = pread(fcopy_fd, buffer, (4096 * 2), 0); > + > + if (len <= 0) { > + syslog(LOG_ERR, "Read error: %s\n", strerror(errno)); > + continue; This could

Re: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency from the hypervisor

2013-09-27 Thread Olaf Hering
On Fri, Sep 27, KY Srinivasan wrote: > > This leads to build errors on 32bit: > > > > linux-3.12-rc2/arch/x86/kernel/cpu/mshyperv.c:88: undefined reference to > > `__udivdi3' > > > > Up to now I have only tested on 64bit, sorry for that. > > Thanks Olaf. I am travelling currently; I will fix it

Re: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency from the hypervisor

2013-09-27 Thread Olaf Hering
On Tue, Sep 03, K. Y. Srinivasan wrote: > Hyper-V supports a mechanism for retrieving the local APIC frequency.Use this > and bypass > the calibration code in the kernel. This would allow us to boot the Linux > kernel as a > "modern VM" on Hyper-V where many of the legacy devices (such as PIT) a

Re: [PATCH V2 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-23 Thread Olaf Hering
On Wed, Sep 18, Dmitry Torokhov wrote: > This looks much better. Could you tell me if the patch below (on top of > yours) still works? The help text is slightly incorrect, its a dash not underscore: drivers/input/serio/hyperv-keyboard.ko Olaf ___ devel