VirtualBox

Ticket #19168 (closed defect: invalid)

Opened 12 months ago

Last modified 7 months ago

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

Reported by: DonC Owned by: fbatschu
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

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

Change History

Changed 12 months ago by DonC

Machine Log file

comment:1 Changed 12 months ago by GnomeUser

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 12 months ago by GnomeUser (previous) (diff)

comment:2 Changed 9 months ago by sergiomb

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 Changed 9 months ago by fbatschu

  • Owner set to fbatschu
  • Status changed from new to accepted

comment:4 Changed 9 months ago by fbatschu

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 Changed 9 months ago by fbatschu

  • Status changed from accepted to closed
  • Resolution set to invalid

comment:6 Changed 9 months ago by Cdrix_Mwg

"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".)

Last edited 9 months ago by Cdrix_Mwg (previous) (diff)

comment:7 follow-ups: ↓ 8 ↓ 9 Changed 9 months ago by 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.)

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

comment:8 in reply to: ↑ 7 ; follow-up: ↓ 10 Changed 9 months ago by fbatschu

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!

comment:9 in reply to: ↑ 7 Changed 9 months ago by fbatschu

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

comment:10 in reply to: ↑ 8 Changed 8 months ago by GnomeUser

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 Changed 7 months ago by studenttmb

  • Status changed from closed to reopened
  • Resolution invalid deleted

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 Changed 7 months ago by fbatschu

  • Status changed from reopened to closed
  • Resolution set to invalid
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use