VirtualBox

Opened 4 years ago

Last modified 17 months ago

#19168 assigned defect

Error [drm:vmw_host_log [vmwgfx]] in version 6.1.0

Reported by: DonC Owned by:
Component: guest additions/x11/graphics Version: VirtualBox 6.1.0
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

When booting my Oracle Linux 7 (4.14.35-1902.8.4.el7uek.x86_64) system I get the message: (Twice)

 [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send log

This is when I select VMSVGA as the Graphics Controller. This message does not happen if I use the old VBOXVGA. I am unsure what, if anything, this effects.

I have included the machine log to this report.

Attachments (1)

Linux 7.7 MySql-2019-12-16-22-15-52.log (90.3 KB ) - added by DonC 4 years ago.
Machine Log file

Download all attachments as: .zip

Change History (16)

by DonC, 4 years ago

Machine Log file

comment:1 by GnomeUser, 4 years ago

Can confirm this bug on Ubuntu 18.04.3 kernel 5.0.0 guest. It was also mentioned here earlier this year https://unix.stackexchange.com/questions/502540

Last edited 4 years ago by GnomeUser (previous) (diff)

comment:2 by sergiomb, 4 years ago

I also see this message on 6.1.4 with VMSVGA

[drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message.

comment:3 by Frank Batschulat (Oracle), 4 years ago

Owner: set to Frank Batschulat (Oracle)
Status: newaccepted

comment:4 by Frank Batschulat (Oracle), 4 years ago

The reason why changing the Virtualbox Graphics Controller from VMSVGA back to to VBoxVGA makes this error message disappear is quite simple. Only VMSVGA works in cooperation with the corresponding Vmware vmwgfx kernel driver inside the guest which emitted the error message.

VMSVGA: Use this graphics controller to emulate a VMware SVGA graphics device. This emulates the VMware Workstation graphics adapter with the "VMware SVGA 3D" acceleration method. This is the default for Linux guests.

https://www.virtualbox.org/manual/ch03.html#settings-screen

VMSVGA: Use this graphics controller to emulate a VMware SVGA graphics device.
 This is the default graphics controller for Linux guests. 

Eventually cooperating with the vmwgfx kernel module in the Linux guest.

https://www.mesa3d.org/vmware-guest.html

The host logging facility of the vmwgfx driver was introduced in 2016:
PATCH 1/2 drm/vmwgfx: Add VMWare host messaging capability
https://www.spinics.net/lists/dri-devel/msg105952.html
PATCH 2/2 drm/vmwgfx: Report vmwgfx version to vmware.log
https://www.spinics.net/lists/dri-devel/msg105953.html

https://elixir.bootlin.com/linux/v5.5/source/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c#L610

static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
[...]
	snprintf(host_log, sizeof(host_log), "vmwgfx: %s-%s",
		VMWGFX_REPO, VMWGFX_GIT_VERSION);
	vmw_host_log(host_log);

	memset(host_log, 0, sizeof(host_log));
	snprintf(host_log, sizeof(host_log), "vmwgfx: Module Version: %d.%d.%d",
		VMWGFX_DRIVER_MAJOR, VMWGFX_DRIVER_MINOR,
		VMWGFX_DRIVER_PATCHLEVEL);
	vmw_host_log(host_log);

https://elixir.bootlin.com/linux/v5.5/source/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c#L479

 * vmw_host_log: Sends a log message to the host
 *
 * @log: NULL terminated string
 *
 * Returns: 0 on success
 */
int vmw_host_log(const char *log)
[...]
	msg = kasprintf(GFP_KERNEL, "log %s", log);
	if (!msg) {
		DRM_ERROR("Cannot allocate memory for host log message.\n");
		return -ENOMEM;
	}
[...]
	if (vmw_open_channel(&channel, RPCI_PROTOCOL_NUM))
		goto out_open;
[...]
out_open:
	kfree(msg);
	DRM_ERROR("Failed to send host log message.\n");

vmw_open_channel() however is attempting to perform a VMWARE HYPERCALL:

https://elixir.bootlin.com/linux/v5.5/source/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c#L87

 * vmw_open_channel
 *
 * @channel: RPC channel
 * @protocol:
 *
 * Returns: 0 on success
 */
static int vmw_open_channel(struct rpc_channel *channel, unsigned int protocol)
{
	unsigned long eax, ebx, ecx, edx, si = 0, di = 0;

	VMW_PORT(VMW_PORT_CMD_OPEN_CHANNEL,
		(protocol | GUESTMSG_FLAG_COOKIE), si, di,
		0,
		VMW_HYPERVISOR_MAGIC,
		eax, ebx, ecx, edx, si, di);

	if ((HIGH_WORD(ecx) & MESSAGE_STATUS_SUCCESS) == 0)
		return -EINVAL;

https://elixir.bootlin.com/linux/v5.5/source/drivers/gpu/drm/vmwgfx/vmwgfx_msg.h#L57

 * Hypervisor-specific bi-directional communication channel.  Should never
 * execute on bare metal hardware.  The caller must make sure to check for
 * supported hypervisor before using these macros.
[...]
#define VMW_PORT(cmd, in_ebx, in_si, in_di,	\
		 flags, magic,		\
		 eax, ebx, ecx, edx, si, di)	\
({						\
	asm volatile (VMWARE_HYPERCALL :	\
[...]

https://elixir.bootlin.com/linux/v5.5/source/arch/x86/include/asm/vmware.h#L32

/* The low bandwidth call. The low word of edx is presumed clear. */
#define VMWARE_HYPERCALL						\
	ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT) ", %%dx; " \
		      "inl (%%dx), %%eax",				\
		      "vmcall", X86_FEATURE_VMCALL,			\
		      "vmmcall", X86_FEATURE_VMW_VMMCALL)

https://elixir.bootlin.com/linux/v5.5/source/arch/x86/include/asm/cpufeatures.h#L235

#define X86_FEATURE_VMCALL		( 8*32+18) /* "" Hypervisor supports the VMCALL instruction */
#define X86_FEATURE_VMW_VMMCALL		( 8*32+19) /* "" VMware prefers VMMCALL hypercall instruction */

This was introduced with:
PATCH v2 2/4 x86/vmware: Add a header file for hypercall definitions
https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg276273.html

VMware Fri, 23 Aug 2019 01:14:47 -0700
The new header is intended to be used by drivers using the backdoor.
Follow the kvm example using alternatives self-patching to
choose between vmcall, vmmcall and io instructions.
Also define two new CPU feature flags to indicate hypervisor support
for vmcall- and vmmcall instructions.

We do not support that infrastructure callbacks to the host hypervisor. I cannot find more details immediately on its implementation and intended usage.

I consider this a bug in the Vmware vmwgfx driver itself.

That action using vmw_host_log() (print driver version info) does only happen when the vmwgfx kernel module is loaded during Linux boot.

vmw_host_log() does not check and verify whether or not we have a supporting hypervisor befor using vmw_open_channel() and VMW_PORT() - it assumes failure of attempting to perform the hypercall to the host as a generic failure, where in this case here with Virtualbox there is no supporting hypervisor to talk to.

Other then this missing Vmware driver version information reporting in the host I don't think there is any real problem or failure.

Please contact the upstreams Linux driver owner for more questions.

comment:5 by Frank Batschulat (Oracle), 4 years ago

Resolution: invalid
Status: acceptedclosed

comment:6 by Cdrix_Mwg, 4 years ago

"changing the Virtualbox Graphics Controller from VMSVGA back to to VBoxVGA makes this error message disappear"

Yes, but at the same time it introduces an other error message!

Virtualbox manager (for windows) 6.1.4 r136177 (Qt5.6.2). Guest is Linux, Ubuntu (64 bit)

With Graphics Controller=="VMSVGA", I get in the guest (syslog):

Mar 24 13:10:09 hoho kernel: [ 3.824372] [drm] DX: no. Mar 24 13:10:09 hoho kernel: [ 3.824372] [drm] Atomic: yes. Mar 24 13:10:09 hoho kernel: [ 3.824373] [drm] SM4_1: no. Mar 24 13:10:09 hoho kernel: [ 3.824389] [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message. Mar 24 13:10:09 hoho kernel: [ 3.834537] [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message. Mar 24 13:10:09 hoho kernel: [ 3.843935] fbcon: svgadrmfb (fb0) is primary device Mar 24 13:10:09 hoho kernel: [ 3.844947] AVX2 version of gcm_enc/dec engaged. Mar 24 13:10:09 hoho kernel: [ 3.844947] AES CTR mode by8 optimization enabled

With Graphics Controller=="VBoxVGA", I get in the host (manager window, bottom): "Invalid settings detected [!]"

(Only one controller is "recommended", and the recommended controller is "VMSVGA".)

Version 0, edited 4 years ago by Cdrix_Mwg (next)

comment:7 by Cdrix_Mwg, 4 years ago

If you want to pass this issue to the VMSVGA developers ("it is not Virtualbox's business"), then, please forward this bug report to them. (Such a forwarding should be easy and everyday.)

And, why is the VBoxVGA "not recommended"? Does have some defects, weaknesses or drawbacks?

in reply to:  7 ; comment:8 by Frank Batschulat (Oracle), 4 years ago

Replying to Cdrix_Mwg:

If you want to pass this issue to the VMSVGA developers ("it is not Virtualbox's business"), then, please forward this bug report to them. (Such a forwarding should be easy and everyday.)

Sure, please tell me the names and email address of the corresponding Linux vmware driver maintainer. Thanks!

in reply to:  7 comment:9 by Frank Batschulat (Oracle), 4 years ago

Replying to Cdrix_Mwg:

And, why is the VBoxVGA "not recommended"? Does have some defects, weaknesses or drawbacks?

please read the bug report, the evaluation will point you to:

https://www.virtualbox.org/manual/ch03.html#settings-screen

in reply to:  8 comment:10 by GnomeUser, 4 years ago

Replying to fbatschu:

Replying to Cdrix_Mwg: Sure, please tell me the names and email address of the corresponding Linux vmware driver maintainer. Thanks!

From here https://www.kernel.org/doc/html/latest/process/maintainers.html:

DRM DRIVER FOR VMWARE VIRTUAL GPU Mail: VMware Graphics <linux-graphics-maintainer@…>, Thomas Hellstrom <thellstrom@…> Mailing list: dri-devel@…

I've mailed them the link to this ticket

comment:11 by Назаров Андрей Валерьевич, 4 years ago

Resolution: invalid
Status: closedreopened

Problem on VBox Version 6.1.8 r137981 (Qt5. 6. 2) after Ubuntu was updated from 16.04 to 18.04 there was a problem when loading the system: [1.769955] [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send log [1.770402] [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send log

comment:12 by Frank Batschulat (Oracle), 4 years ago

Resolution: invalid
Status: reopenedclosed

comment:13 by Aren Cambre, 3 years ago

Resolution: invalid
Status: closedreopened

Still an issue:

  • Host: Windows 10 20H2
  • Guest: Ubuntu 20.10
  • VirtualBox: 6.1.16

It's also random. Sometimes I boot fine, other times I get this error.

I encourage you to leave this open until the vmwgfx folks agree to take responsibility for this and that is documented as a comment here. All I am seeing is an attempt to toss this over the fence. That is just "not my problem", not evidence of an effective solution being provided for the bug.

In other words, VirtualBox needs to keep this ticket open until there's confidence vmwgfx's bug will be fixed.

comment:14 by Frank Batschulat (Oracle), 3 years ago

Owner: Frank Batschulat (Oracle) removed
Status: reopenedassigned

comment:15 by TimOr, 17 months ago

I had this in Mint 19 which is Ubuntu 18.04 with VB 6.1.40, when I recently upgraded from 6.0.

Forum link: https://forums.virtualbox.org/viewtopic.php?f=6&t=103163

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use