Commit 3946b46c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-5.15b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:

 - fix two minor issues in the Xen privcmd driver plus a cleanup patch
   for that driver

 - fix multiple issues related to running as PVH guest and some related
   earlyprintk fixes for other Xen guest types

 - fix an issue introduced in 5.15 the Xen balloon driver

* tag 'for-linus-5.15b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/balloon: fix cancelled balloon action
  xen/x86: adjust data placement
  x86/PVH: adjust function/data placement
  xen/x86: hook up xen_banner() also for PVH
  xen/x86: generalize preferred console model from PV to PVH Dom0
  xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU
  xen/x86: allow "earlyprintk=xen" to work for PV Dom0
  xen/x86: make "earlyprintk=xen" work better for PVH Dom0
  xen/x86: allow PVH Dom0 without XEN_PV=y
  xen/x86: prevent PVH type from getting clobbered
  xen/privcmd: drop "pages" parameter from xen_remap_pfn()
  xen/privcmd: fix error handling in mmap-resource processing
  xen/privcmd: replace kcalloc() by kvcalloc() when allocating empty pages
parents 0dcf60d0 319933a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1266,7 +1266,7 @@
			The VGA and EFI output is eventually overwritten by
			the real console.

			The xen output can only be used by Xen PV guests.
			The xen option can only be used in Xen domains.

			The sclp output can only be used on s390.

+7 −4
Original line number Diff line number Diff line
@@ -14,16 +14,19 @@ static inline int pci_xen_hvm_init(void)
	return -1;
}
#endif
#if defined(CONFIG_XEN_DOM0)
#ifdef CONFIG_XEN_PV_DOM0
int __init pci_xen_initial_domain(void);
int xen_find_device_domain_owner(struct pci_dev *dev);
int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
int xen_unregister_device_domain_owner(struct pci_dev *dev);
#else
static inline int __init pci_xen_initial_domain(void)
{
	return -1;
}
#endif
#ifdef CONFIG_XEN_DOM0
int xen_find_device_domain_owner(struct pci_dev *dev);
int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
int xen_unregister_device_domain_owner(struct pci_dev *dev);
#else
static inline int xen_find_device_domain_owner(struct pci_dev *dev)
{
	return -1;
+9 −6
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi,
				 false /* no mapping of GSI to PIRQ */);
}

#ifdef CONFIG_XEN_DOM0
#ifdef CONFIG_XEN_PV_DOM0
static int xen_register_gsi(u32 gsi, int triggering, int polarity)
{
	int rc, irq;
@@ -261,7 +261,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
	return irq;
}

#ifdef CONFIG_XEN_DOM0
#ifdef CONFIG_XEN_PV_DOM0
static bool __read_mostly pci_seg_supported = true;

static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
@@ -375,10 +375,10 @@ static void xen_initdom_restore_msi_irqs(struct pci_dev *dev)
		WARN(ret && ret != -ENOSYS, "restore_msi -> %d\n", ret);
	}
}
#else /* CONFIG_XEN_DOM0 */
#else /* CONFIG_XEN_PV_DOM0 */
#define xen_initdom_setup_msi_irqs	NULL
#define xen_initdom_restore_msi_irqs	NULL
#endif /* !CONFIG_XEN_DOM0 */
#endif /* !CONFIG_XEN_PV_DOM0 */

static void xen_teardown_msi_irqs(struct pci_dev *dev)
{
@@ -555,7 +555,7 @@ int __init pci_xen_hvm_init(void)
	return 0;
}

#ifdef CONFIG_XEN_DOM0
#ifdef CONFIG_XEN_PV_DOM0
int __init pci_xen_initial_domain(void)
{
	int irq;
@@ -583,6 +583,9 @@ int __init pci_xen_initial_domain(void)
	}
	return 0;
}
#endif

#ifdef CONFIG_XEN_DOM0

struct xen_device_domain_owner {
	domid_t domain;
@@ -656,4 +659,4 @@ int xen_unregister_device_domain_owner(struct pci_dev *dev)
	return 0;
}
EXPORT_SYMBOL_GPL(xen_unregister_device_domain_owner);
#endif
#endif /* CONFIG_XEN_DOM0 */
+6 −6
Original line number Diff line number Diff line
@@ -16,15 +16,15 @@
/*
 * PVH variables.
 *
 * pvh_bootparams and pvh_start_info need to live in the data segment since
 * pvh_bootparams and pvh_start_info need to live in a data segment since
 * they are used after startup_{32|64}, which clear .bss, are invoked.
 */
struct boot_params pvh_bootparams __section(".data");
struct hvm_start_info pvh_start_info __section(".data");
struct boot_params __initdata pvh_bootparams;
struct hvm_start_info __initdata pvh_start_info;

unsigned int pvh_start_info_sz = sizeof(pvh_start_info);
const unsigned int __initconst pvh_start_info_sz = sizeof(pvh_start_info);

static u64 pvh_get_root_pointer(void)
static u64 __init pvh_get_root_pointer(void)
{
	return pvh_start_info.rsdp_paddr;
}
@@ -107,7 +107,7 @@ void __init __weak xen_pvh_init(struct boot_params *boot_params)
	BUG();
}

static void hypervisor_specific_init(bool xen_guest)
static void __init hypervisor_specific_init(bool xen_guest)
{
	if (xen_guest)
		xen_pvh_init(&pvh_bootparams);
+12 −7
Original line number Diff line number Diff line
@@ -43,13 +43,9 @@ config XEN_PV_SMP
	def_bool y
	depends on XEN_PV && SMP

config XEN_DOM0
	bool "Xen PV Dom0 support"
	default y
	depends on XEN_PV && PCI_XEN && SWIOTLB_XEN
	depends on X86_IO_APIC && ACPI && PCI
	help
	  Support running as a Xen PV Dom0 guest.
config XEN_PV_DOM0
	def_bool y
	depends on XEN_PV && XEN_DOM0

config XEN_PVHVM
	def_bool y
@@ -86,3 +82,12 @@ config XEN_PVH
	def_bool n
	help
	  Support for running as a Xen PVH guest.

config XEN_DOM0
	bool "Xen Dom0 support"
	default XEN_PV
	depends on (XEN_PV && SWIOTLB_XEN) || (XEN_PVH && X86_64)
	depends on X86_IO_APIC && ACPI && PCI
	select X86_X2APIC if XEN_PVH && X86_64
	help
	  Support running as a Xen Dom0 guest.
Loading