xen: fixes for 4.19-rc5
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCW6dGhgAKCRCAXGG7T9hj vs1UAPwPSDmelfUus+P5ndRQZdK/iQWuRgQUe9Gd3RUVTfcQ7AEAljcN4/dSj7SB hOgRlCp5WB1s5/vFF7z4jc2wtqvOPAk= =8P9c -----END PGP SIGNATURE----- Merge tag 'for-linus-4.19d-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Juergen writes: "xen: Two small fixes for xen drivers." * tag 'for-linus-4.19d-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: issue warning message when out of grant maptrack entries xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
This commit is contained in:
Коммит
18d49ec3c6
|
@ -478,7 +478,7 @@ static void xen_convert_regs(const struct xen_pmu_regs *xen_regs,
|
||||||
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id)
|
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
int err, ret = IRQ_NONE;
|
int err, ret = IRQ_NONE;
|
||||||
struct pt_regs regs;
|
struct pt_regs regs = {0};
|
||||||
const struct xen_pmu_data *xenpmu_data = get_xenpmu_data();
|
const struct xen_pmu_data *xenpmu_data = get_xenpmu_data();
|
||||||
uint8_t xenpmu_flags = get_xenpmu_flags();
|
uint8_t xenpmu_flags = get_xenpmu_flags();
|
||||||
|
|
||||||
|
|
|
@ -1040,18 +1040,33 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
/* Retry eagain maps */
|
switch (map_ops[i].status) {
|
||||||
if (map_ops[i].status == GNTST_eagain)
|
case GNTST_okay:
|
||||||
gnttab_retry_eagain_gop(GNTTABOP_map_grant_ref, map_ops + i,
|
{
|
||||||
&map_ops[i].status, __func__);
|
|
||||||
|
|
||||||
if (map_ops[i].status == GNTST_okay) {
|
|
||||||
struct xen_page_foreign *foreign;
|
struct xen_page_foreign *foreign;
|
||||||
|
|
||||||
SetPageForeign(pages[i]);
|
SetPageForeign(pages[i]);
|
||||||
foreign = xen_page_foreign(pages[i]);
|
foreign = xen_page_foreign(pages[i]);
|
||||||
foreign->domid = map_ops[i].dom;
|
foreign->domid = map_ops[i].dom;
|
||||||
foreign->gref = map_ops[i].ref;
|
foreign->gref = map_ops[i].ref;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case GNTST_no_device_space:
|
||||||
|
pr_warn_ratelimited("maptrack limit reached, can't map all guest pages\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GNTST_eagain:
|
||||||
|
/* Retry eagain maps */
|
||||||
|
gnttab_retry_eagain_gop(GNTTABOP_map_grant_ref,
|
||||||
|
map_ops + i,
|
||||||
|
&map_ops[i].status, __func__);
|
||||||
|
/* Test status in next loop iteration. */
|
||||||
|
i--;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче