https://github.com/torvalds/linux
Revision 801e459a6f3a63af9d447e6249088c76ae16efc4 authored by Tom Lendacky on 21 February 2018, 19:39:51 UTC, committed by Radim Krčmář on 01 March 2018, 18:00:28 UTC
Provide a new KVM capability that allows bits within MSRs to be recognized
as features.  Two new ioctls are added to the /dev/kvm ioctl routine to
retrieve the list of these MSRs and then retrieve their values. A kvm_x86_ops
callback is used to determine support for the listed MSR-based features.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[Tweaked documentation. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
1 parent d4858aa
Raw File
Tip revision: 801e459a6f3a63af9d447e6249088c76ae16efc4 authored by Tom Lendacky on 21 February 2018, 19:39:51 UTC
KVM: x86: Add a framework for supporting MSR-based features
Tip revision: 801e459
notifier-error-inject.h
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/atomic.h>
#include <linux/debugfs.h>
#include <linux/notifier.h>

struct notifier_err_inject_action {
	unsigned long val;
	int error;
	const char *name;
};

#define NOTIFIER_ERR_INJECT_ACTION(action)	\
	.name = #action, .val = (action),

struct notifier_err_inject {
	struct notifier_block nb;
	struct notifier_err_inject_action actions[];
	/* The last slot must be terminated with zero sentinel */
};

extern struct dentry *notifier_err_inject_dir;

extern struct dentry *notifier_err_inject_init(const char *name,
		struct dentry *parent, struct notifier_err_inject *err_inject,
		int priority);
back to top