VMware, Inc [Thu, 15 Oct 2009 21:20:57 +0000 (14:20 -0700)]
Internal branch sync. Included in this change:
. Changes in shared code that don't affect open-vm-tools functionality.
. Don't linearize vmxnet3-shm tx packets. We don't need/want to linearize
shm packets, and the re-estimate of the number of TX descriptors needed was
too low. This led to next2fill skipping over next2comp and corruption of the
TX ring. This corruption caused device resets, which uncovered a race between
tq_xmit and reset_work. Finally, remove some suspicious code duplication and
replace with a call to vmxnet3_dev_kfree_skb.
VMware, Inc [Thu, 15 Oct 2009 21:14:17 +0000 (14:14 -0700)]
Move the CPUID-related functions out of vm_basic_asm.h into a new
file, x86cpuid_asm.h.
This allows us to remove the dependency between vm_basic_asm.h and
x86cpuid.h. This is desirable because many of the files that include
vm_basic_asm.h don't care about the CPUID functions. This is a win,
because x86cpuid.h is both heavily modified and included in a
very large number of files.
VMware, Inc [Thu, 15 Oct 2009 21:12:51 +0000 (14:12 -0700)]
Handle capabilities in VMwareUser on Vista/Win7. We can't set the guest
resolution without a user session attached to the console in Vista/Win7
because of session 0 isolation.
VMware, Inc [Thu, 15 Oct 2009 21:09:34 +0000 (14:09 -0700)]
Add checking errors returned by CPName_GetComponent.
CPName_GetComponent returns either length of the name or -1
in case of errors. Need to check for -1 everywhere before using
the result of this function. Need to make sure that returned value is
assigned to a signed variable otherwise error condition is lost.
VMware, Inc [Thu, 15 Oct 2009 21:05:19 +0000 (14:05 -0700)]
Run programs in a user environment without Tools' settings.
vmware-user on Linux uses the app-loader tool to set up its
environment so it can use various bundled libraries. However,
this cause these environment variables to be set that when
VIX runs programs or scripts from vmware-user, these processes
fail due to library conflicts. For example, gedit on RHEL 4 was
compiled with a version of libpango that conflicts with the
version of this library that ships with the Tools.
The solution is to store the original, pre-app-loader
environment with the VIX tools module. Some of the
infrastructure was already in place to fix a similar issue when
launching a web browser to view the Help from toolbox. However,
this needed to be plumbed through VIX, and added to lib/procMgr.
Also, one further wrinkle is that VIX allows clients to
programatically change the environment. So, we keep track of the
environment using a hash table, update it when processing
WriteVariable commands, then serial the hashtable into a environ
block when RunProgram or RunScript are called.
VMware, Inc [Thu, 15 Oct 2009 21:04:31 +0000 (14:04 -0700)]
Pvscsi driver accepts 16 byte CDBs, emulation rejects OUT_OF_BAND_CDB flag
As pointed out in bug 472258, our linux driver doesn't set
host->max_cmd_len, so the guest kernel uses the default of 12. That
means 16-byte long commands won't make it through to our emulation at
all. Since disklib doesn't support 2TB disks yet, its not that bad, but
we would like to support >2TB disks connected as s/g devices for klnext.
That requires READ16 and WRITE16. One line driver fix.
The other bug here is that we advertise a flag for sending OUT_OF_BAND_CDBs,
a method for sending > 16 bytes of CDB. We don't implement it and silently
ignore it. Thats bad -- we'd like to at least reject these commands
so future revs of the driver could use this flag for something interesting
without worrying about silent failures.
VMware, Inc [Thu, 15 Oct 2009 21:02:41 +0000 (14:02 -0700)]
Clean up usage of vm_app.h in bora-vmsoft.
That header has been "deprecated" and replaced by more app-specific ones in
the new guestABI component. This change focuses mostly on files that are part
of open-vm-tools (so we can at least remove the deprecated header there).
VMware, Inc [Thu, 15 Oct 2009 21:01:14 +0000 (14:01 -0700)]
Save the native environment in vmtoolsd.
Save the native environment so that applications that need to execute
sub-processes using it are able to retrieve it. For that, make it
available in the application context structure.
VMware, Inc [Thu, 15 Oct 2009 20:58:32 +0000 (13:58 -0700)]
Add support for a "common" plugin directory to vmtoolsd.
This allows sharing the same binary for plugins that will be loaded in
different containers. This will be the case for hgfsServer / vix when
vmware-user is converted to use vmtoolsd, and is also useful for other
cases (such as plugins providing pluggable transports).
OVT: use 1:1 threading library instead of pthreads on FreeBSD
This is a followup to the chage that switches from using pthread
library to 1:1 threading library on FreeBSD, but this time it
affects open-vm-tools build instead of our stock build.
Original Description:
Add RPC to support enabling and disabling 3D in guest.
Add an RPC that allows the UI to reset Aero -> essentially net
stop/start uxsms. Programatically done by DCE Win32 APIs. See
http://msdn.microsoft.com/en-us/library/aa969538%28VS.85%29.aspx.
This is basically a fix for 467709 until a better solution becomes
available (one that requires methods that are not supported
right now, like PCI hotplug).
The fix is a bit ugly, we need to refactor a bit in the code that
spawns resolution set.
Furthermore, we need to broadcast this to all user sessions, not
just the active one. A loop that iterates all guest sessions will
come later.
Requested nearly a year ago by Ken Barr, this change introduces a new
Tools config option for the GuestInfo plugin. It is
- guestinfo.poll-interval: an integer which defines the
GuestInfoGather poll interval in seconds. A value of 0 disables
the poll loop.
This is the first plugin making use of the new tcs_conf_reload signal.
Changes to the Tools config file emit this signal. In response to
receiving it, iff the poll interval has changed, the GuestInfoGather
timeout source is canceled, and a new one with the new interval is
created and attached.
A small side effect of this change is the addition of a macro,
CONFGROUPNAME_GUESTINFO, which specifies the config file group for
GuestInfo variables.
Make the RpcChannel API more obvious by providing RpcChannel_Start
and RpcChannel_Stop functions instead of relying on the function
pointers in the RpcChannel struct.
open-vm-tools: remove reference to perl installer from README.
Also link to new correct URL for getting information about packaging
(had to update the sourceforge site since they killed all our old wiki
content in some recent update).
Gtk innards broke our crazy session locking scheme. (Note to self:
look into doing something sane like using D-Bus service registration.)
This only became apparent after vmware-user was apploaderized, causing
Gtk to retitle windows as "vmware-user-loader", while our scheme only
considered windows titled "vmware-user".
This change initializes Glib's "g_prgname" variable, which Gtk uses
when determining new window titles, such that all top level windows
will have a title of "vmware-user", regardless of the name of the
binary.
RedHat backported GRO patch to 2.6.18 which brought napi_sturct
definition to that kernel; it conflicts with our stub. For pre-2.6.24
kernels check if NETIF_F_GRO is defined and if it is assume that
struct napi_struct is present.
Toolbox: do not crash when user closes yes/no dialog window
The code did not expect that user may close Yes/No dialog window
by pressing "X" instead of clicking on Yes/No button. Assume that
if user tried to close the window he did not want the changes to
be saved.
. rpcgen wasn't finding ghiCommonDefines.h if the build directory was
not the same as the source directory, so need to copy the header file
to the build directory in that case.
. the new "eventfd.c" file should only be compiled in certain cases,
otherwise it errors out.
. VIX_DEBUG() uses symbols that are not available in open-vm-tools; instead
of going and fixing this whole VIX mess, just do not compile the
offending statement when in open vm tools.
Add support for rewinddir() and refresh dirent on first readdir() call.
rm -rf 6.10+ breaks because it does following:
1) fd = open(); // opendir() call to Hgfs
2) unlinkat(); // Remove an entry from director
3) dirp = fdopendir(fd);
4) while() readdir() // checking if entry is deleted
You may look at coreutils/src/remove.c
On 1) hgfsserver gets all the directory entries, thus changes
made by 2) are not reflected and rm -rf gets confused. Ideally,
we would like to detect 3) and alert hgfsserver that entries are
stale or reopen a directory. However, to my knowledge, we do not
get call on fdopendir().
So as a workaround, we ask the server to populate entries on
first readdir() call rather than opendir(). This effect is
achieved by closing and reopening the directory.
This change also introduces support for rewinddir(), since it suffered
from the same problem. rewinddir() semantics require that directory entries
should be refreshed. Thus an application doing following breaks:
. Use eventfd() instead of pipe() to create waitable objects
in syncWaitQ. Using eventfd() has couple of benefits:
in the kernel they need just 8 bytes instead of whatever
size kernel allocates by default (64 bytes at the cost of
some non-trivial code when pipe wants to grow), and also
each syncWaitQ now consumes only one file descriptor
instead of two.
Misc changes for getting the driver ready for upstreaming.
- Added parameter definition for missing msg_ring_pages.
- use the module_param_named macro for module parameters.
- drop the redundant "pvscsi_" prefix from each module parameter name.
- remove inline hints for all the function. Dmirty pointed out that
compilers are usually smart in deciding which to inline.
- use Linux defined min/max macros.
- print the revision number as a integer rather than characters.
- define the rev field in pvscsi_adapter as u8.
- formatting cleanup (tab/spaces) and some camel naming style cleanup.
- bumped the version for the driver to 1.0.0.0.
This is all just code movement, no functional changes.
No function declarations are needed now, also moved the macro
and struct definitions to start of the file.
This is part of the cleanup/preparatory work that is being done
to get pvscsi driver ready for upstreaming.
. add information about what folders changed to the launch menu RPC.
. add a black list of categories that should not be exposed in the
host launch menu (e.g., screensavers).
. fix window stacking order in Unity.
. don't ignore minimize events on sticky windows.
. save the active NIC list so that it can be restored at resume time.
This fixes an issue where Debian would disable certain NICs when
suspending, causing them to not be restored when resuming the VM.
Fix according to Marcelo's comments Change parameter name of GuestApp_ControlRecord Remove root protection for record Fix mnemonic conflict in record tab