xen: branch for v5.16-rc3
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCYaD8mwAKCRCAXGG7T9hj vspAAPwLA5SUorji33PTetwmcpLcoRJ3Q4HAPz+bOPdm9iL/PgD/V8MtxFrFebBs AJoa+GmBarUNn7XCqKnCcA64iXhrpQw= =6GY3 -----END PGP SIGNATURE----- Merge tag 'for-linus-5.16c-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - Kconfig fix to make it possible to control building of the privcmd driver - three fixes for issues identified by the kernel test robot - a five-patch series to simplify timeout handling for Xen PV driver initialization - two patches to fix error paths in xenstore/xenbus driver initialization * tag 'for-linus-5.16c-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: make HYPERVISOR_set_debugreg() always_inline xen: make HYPERVISOR_get_debugreg() always_inline xen: detect uninitialized xenbus in xenbus_init xen: flag xen_snd_front to be not essential for system boot xen: flag pvcalls-front to be not essential for system boot xen: flag hvc_xen to be not essential for system boot xen: flag xen_drm_front to be not essential for system boot xen: add "not_essential" flag to struct xenbus_driver xen/pvh: add missing prototype to header xen: don't continue xenstore initialization in case of errors xen/privcmd: make option visible in Kconfig
This commit is contained in:
Коммит
6b54698aec
|
@ -281,13 +281,13 @@ HYPERVISOR_callback_op(int cmd, void *arg)
|
|||
return _hypercall2(int, callback_op, cmd, arg);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static __always_inline int
|
||||
HYPERVISOR_set_debugreg(int reg, unsigned long value)
|
||||
{
|
||||
return _hypercall2(int, set_debugreg, reg, value);
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
static __always_inline unsigned long
|
||||
HYPERVISOR_get_debugreg(int reg)
|
||||
{
|
||||
return _hypercall1(unsigned long, get_debugreg, reg);
|
||||
|
|
|
@ -64,6 +64,7 @@ void xen_arch_unregister_cpu(int num);
|
|||
|
||||
#ifdef CONFIG_PVH
|
||||
void __init xen_pvh_init(struct boot_params *boot_params);
|
||||
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
|
||||
|
|
|
@ -773,6 +773,7 @@ static struct xenbus_driver xen_driver = {
|
|||
.probe = xen_drv_probe,
|
||||
.remove = xen_drv_remove,
|
||||
.otherend_changed = displback_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
|
||||
static int __init xen_drv_init(void)
|
||||
|
|
|
@ -542,6 +542,7 @@ static struct xenbus_driver xenkbd_driver = {
|
|||
.remove = xenkbd_remove,
|
||||
.resume = xenkbd_resume,
|
||||
.otherend_changed = xenkbd_backend_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
|
||||
static int __init xenkbd_init(void)
|
||||
|
|
|
@ -522,6 +522,7 @@ static struct xenbus_driver xencons_driver = {
|
|||
.remove = xencons_remove,
|
||||
.resume = xencons_resume,
|
||||
.otherend_changed = xencons_backend_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
#endif /* CONFIG_HVC_XEN_FRONTEND */
|
||||
|
||||
|
|
|
@ -695,6 +695,7 @@ static struct xenbus_driver xenfb_driver = {
|
|||
.remove = xenfb_remove,
|
||||
.resume = xenfb_resume,
|
||||
.otherend_changed = xenfb_backend_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
|
||||
static int __init xenfb_init(void)
|
||||
|
|
|
@ -259,9 +259,15 @@ config XEN_SCSI_BACKEND
|
|||
if guests need generic access to SCSI devices.
|
||||
|
||||
config XEN_PRIVCMD
|
||||
tristate
|
||||
tristate "Xen hypercall passthrough driver"
|
||||
depends on XEN
|
||||
default m
|
||||
help
|
||||
The hypercall passthrough driver allows privileged user programs to
|
||||
perform Xen hypercalls. This driver is normally required for systems
|
||||
running as Dom0 to perform privileged operations, but in some
|
||||
disaggregated Xen setups this driver might be needed for other
|
||||
domains, too.
|
||||
|
||||
config XEN_ACPI_PROCESSOR
|
||||
tristate "Xen ACPI processor"
|
||||
|
|
|
@ -1275,6 +1275,7 @@ static struct xenbus_driver pvcalls_front_driver = {
|
|||
.probe = pvcalls_front_probe,
|
||||
.remove = pvcalls_front_remove,
|
||||
.otherend_changed = pvcalls_front_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
|
||||
static int __init pvcalls_frontend_init(void)
|
||||
|
|
|
@ -909,7 +909,7 @@ static struct notifier_block xenbus_resume_nb = {
|
|||
|
||||
static int __init xenbus_init(void)
|
||||
{
|
||||
int err = 0;
|
||||
int err;
|
||||
uint64_t v = 0;
|
||||
xen_store_domain_type = XS_UNKNOWN;
|
||||
|
||||
|
@ -949,6 +949,29 @@ static int __init xenbus_init(void)
|
|||
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
|
||||
if (err)
|
||||
goto out_error;
|
||||
/*
|
||||
* Uninitialized hvm_params are zero and return no error.
|
||||
* Although it is theoretically possible to have
|
||||
* HVM_PARAM_STORE_PFN set to zero on purpose, in reality it is
|
||||
* not zero when valid. If zero, it means that Xenstore hasn't
|
||||
* been properly initialized. Instead of attempting to map a
|
||||
* wrong guest physical address return error.
|
||||
*
|
||||
* Also recognize all bits set as an invalid value.
|
||||
*/
|
||||
if (!v || !~v) {
|
||||
err = -ENOENT;
|
||||
goto out_error;
|
||||
}
|
||||
/* Avoid truncation on 32-bit. */
|
||||
#if BITS_PER_LONG == 32
|
||||
if (v > ULONG_MAX) {
|
||||
pr_err("%s: cannot handle HVM_PARAM_STORE_PFN=%llx > ULONG_MAX\n",
|
||||
__func__, v);
|
||||
err = -EINVAL;
|
||||
goto out_error;
|
||||
}
|
||||
#endif
|
||||
xen_store_gfn = (unsigned long)v;
|
||||
xen_store_interface =
|
||||
xen_remap(xen_store_gfn << XEN_PAGE_SHIFT,
|
||||
|
@ -983,8 +1006,10 @@ static int __init xenbus_init(void)
|
|||
*/
|
||||
proc_create_mount_point("xen");
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
out_error:
|
||||
xen_store_domain_type = XS_UNKNOWN;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,19 +211,11 @@ static int is_device_connecting(struct device *dev, void *data, bool ignore_none
|
|||
if (drv && (dev->driver != drv))
|
||||
return 0;
|
||||
|
||||
if (ignore_nonessential) {
|
||||
/* With older QEMU, for PVonHVM guests the guest config files
|
||||
* could contain: vfb = [ 'vnc=1, vnclisten=0.0.0.0']
|
||||
* which is nonsensical as there is no PV FB (there can be
|
||||
* a PVKB) running as HVM guest. */
|
||||
|
||||
if ((strncmp(xendev->nodename, "device/vkbd", 11) == 0))
|
||||
return 0;
|
||||
|
||||
if ((strncmp(xendev->nodename, "device/vfb", 10) == 0))
|
||||
return 0;
|
||||
}
|
||||
xendrv = to_xenbus_driver(dev->driver);
|
||||
|
||||
if (ignore_nonessential && xendrv->not_essential)
|
||||
return 0;
|
||||
|
||||
return (xendev->state < XenbusStateConnected ||
|
||||
(xendev->state == XenbusStateConnected &&
|
||||
xendrv->is_ready && !xendrv->is_ready(xendev)));
|
||||
|
|
|
@ -112,6 +112,7 @@ struct xenbus_driver {
|
|||
const char *name; /* defaults to ids[0].devicetype */
|
||||
const struct xenbus_device_id *ids;
|
||||
bool allow_rebind; /* avoid setting xenstore closed during remove */
|
||||
bool not_essential; /* is not mandatory for boot progress */
|
||||
int (*probe)(struct xenbus_device *dev,
|
||||
const struct xenbus_device_id *id);
|
||||
void (*otherend_changed)(struct xenbus_device *dev,
|
||||
|
|
|
@ -358,6 +358,7 @@ static struct xenbus_driver xen_driver = {
|
|||
.probe = xen_drv_probe,
|
||||
.remove = xen_drv_remove,
|
||||
.otherend_changed = sndback_changed,
|
||||
.not_essential = true,
|
||||
};
|
||||
|
||||
static int __init xen_drv_init(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче