xen: branch for v6.1-rc6
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCY3TN0wAKCRCAXGG7T9hj voAOAP4i3FjRj/ilXohox3F7iyPsRbFrGnayYcHRPeFF8UPz8QEAzyLP/FBGbmho sSuhcmb6r9foGKri7zyTKHIA4bkz4Qo= =/KaG -----END PGP SIGNATURE----- Merge tag 'for-linus-6.1-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two trivial cleanups, and three simple fixes" * tag 'for-linus-6.1-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/platform-pci: use define instead of literal number xen/platform-pci: add missing free_irq() in error path xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too xen/pcpu: fix possible memory leak in register_pcpu() x86/xen: Use kstrtobool() instead of strtobool()
This commit is contained in:
commit
cc675d22e4
|
@ -23,6 +23,7 @@
|
|||
#include <linux/start_kernel.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/mm.h>
|
||||
|
@ -113,7 +114,7 @@ static __read_mostly bool xen_msr_safe = IS_ENABLED(CONFIG_XEN_PV_MSR_SAFE);
|
|||
static int __init parse_xen_msr_safe(char *str)
|
||||
{
|
||||
if (str)
|
||||
return strtobool(str, &xen_msr_safe);
|
||||
return kstrtobool(str, &xen_msr_safe);
|
||||
return -EINVAL;
|
||||
}
|
||||
early_param("xen_msr_safe", parse_xen_msr_safe);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/memblock.h>
|
||||
|
@ -85,7 +86,7 @@ static void __init xen_parse_512gb(void)
|
|||
arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit=");
|
||||
if (!arg)
|
||||
val = true;
|
||||
else if (strtobool(arg + strlen("xen_512gb_limit="), &val))
|
||||
else if (kstrtobool(arg + strlen("xen_512gb_limit="), &val))
|
||||
return;
|
||||
|
||||
xen_512gb_limit = val;
|
||||
|
|
|
@ -228,7 +228,7 @@ static int register_pcpu(struct pcpu *pcpu)
|
|||
|
||||
err = device_register(dev);
|
||||
if (err) {
|
||||
pcpu_release(dev);
|
||||
put_device(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ static uint64_t get_callback_via(struct pci_dev *pdev)
|
|||
pin = pdev->pin;
|
||||
|
||||
/* We don't know the GSI. Specify the PCI INTx line instead. */
|
||||
return ((uint64_t)0x01 << HVM_CALLBACK_VIA_TYPE_SHIFT) | /* PCI INTx identifier */
|
||||
return ((uint64_t)HVM_PARAM_CALLBACK_TYPE_PCI_INTX <<
|
||||
HVM_CALLBACK_VIA_TYPE_SHIFT) |
|
||||
((uint64_t)pci_domain_nr(pdev->bus) << 32) |
|
||||
((uint64_t)pdev->bus->number << 16) |
|
||||
((uint64_t)(pdev->devfn & 0xff) << 8) |
|
||||
|
@ -144,7 +145,7 @@ static int platform_pci_probe(struct pci_dev *pdev,
|
|||
if (ret) {
|
||||
dev_warn(&pdev->dev, "Unable to set the evtchn callback "
|
||||
"err=%d\n", ret);
|
||||
goto out;
|
||||
goto irq_out;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,13 +153,16 @@ static int platform_pci_probe(struct pci_dev *pdev,
|
|||
grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
|
||||
ret = gnttab_setup_auto_xlat_frames(grant_frames);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto irq_out;
|
||||
ret = gnttab_init();
|
||||
if (ret)
|
||||
goto grant_out;
|
||||
return 0;
|
||||
grant_out:
|
||||
gnttab_free_auto_xlat_frames();
|
||||
irq_out:
|
||||
if (!xen_have_vector_callback)
|
||||
free_irq(pdev->irq, pdev);
|
||||
out:
|
||||
pci_release_region(pdev, 0);
|
||||
mem_out:
|
||||
|
|
|
@ -190,13 +190,16 @@ static const struct config_field caplist_pm[] = {
|
|||
};
|
||||
|
||||
static struct msi_msix_field_config {
|
||||
u16 enable_bit; /* bit for enabling MSI/MSI-X */
|
||||
unsigned int int_type; /* interrupt type for exclusiveness check */
|
||||
u16 enable_bit; /* bit for enabling MSI/MSI-X */
|
||||
u16 allowed_bits; /* bits allowed to be changed */
|
||||
unsigned int int_type; /* interrupt type for exclusiveness check */
|
||||
} msi_field_config = {
|
||||
.enable_bit = PCI_MSI_FLAGS_ENABLE,
|
||||
.allowed_bits = PCI_MSI_FLAGS_ENABLE,
|
||||
.int_type = INTERRUPT_TYPE_MSI,
|
||||
}, msix_field_config = {
|
||||
.enable_bit = PCI_MSIX_FLAGS_ENABLE,
|
||||
.allowed_bits = PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL,
|
||||
.int_type = INTERRUPT_TYPE_MSIX,
|
||||
};
|
||||
|
||||
|
@ -229,7 +232,7 @@ static int msi_msix_flags_write(struct pci_dev *dev, int offset, u16 new_value,
|
|||
return 0;
|
||||
|
||||
if (!dev_data->allow_interrupt_control ||
|
||||
(new_value ^ old_value) & ~field_config->enable_bit)
|
||||
(new_value ^ old_value) & ~field_config->allowed_bits)
|
||||
return PCIBIOS_SET_FAILED;
|
||||
|
||||
if (new_value & field_config->enable_bit) {
|
||||
|
|
Loading…
Reference in New Issue