ppt.c (c94f30ea85b745a5137471876013f79689e0af03) | ppt.c (0cbc39d53d2270fa77255c663a0cfa5ed502ab0a) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2011 NetApp, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 530 unchanged lines hidden (view full) --- 539 */ 540 if (ppt->msi.startrid == 0) 541 return (FILTER_STRAY); 542 else 543 return (FILTER_HANDLED); 544} 545 546int | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2011 NetApp, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 530 unchanged lines hidden (view full) --- 539 */ 540 if (ppt->msi.startrid == 0) 541 return (FILTER_STRAY); 542 else 543 return (FILTER_HANDLED); 544} 545 546int |
547ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, | 547ppt_setup_msi(struct vm *vm, int bus, int slot, int func, |
548 uint64_t addr, uint64_t msg, int numvec) 549{ 550 int i, rid, flags; 551 int msi_count, startrid, error, tmp; 552 struct pptdev *ppt; 553 554 if (numvec < 0 || numvec > MAX_MSIMSGS) 555 return (EINVAL); --- 76 unchanged lines hidden (view full) --- 632 ppt_teardown_msi(ppt); 633 return (ENXIO); 634 } 635 636 return (0); 637} 638 639int | 548 uint64_t addr, uint64_t msg, int numvec) 549{ 550 int i, rid, flags; 551 int msi_count, startrid, error, tmp; 552 struct pptdev *ppt; 553 554 if (numvec < 0 || numvec > MAX_MSIMSGS) 555 return (EINVAL); --- 76 unchanged lines hidden (view full) --- 632 ppt_teardown_msi(ppt); 633 return (ENXIO); 634 } 635 636 return (0); 637} 638 639int |
640ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, | 640ppt_setup_msix(struct vm *vm, int bus, int slot, int func, |
641 int idx, uint64_t addr, uint64_t msg, uint32_t vector_control) 642{ 643 struct pptdev *ppt; 644 struct pci_devinfo *dinfo; 645 int numvec, alloced, rid, error; 646 size_t res_size, cookie_size, arg_size; 647 648 error = ppt_find(vm, bus, slot, func, &ppt); --- 114 unchanged lines hidden --- | 641 int idx, uint64_t addr, uint64_t msg, uint32_t vector_control) 642{ 643 struct pptdev *ppt; 644 struct pci_devinfo *dinfo; 645 int numvec, alloced, rid, error; 646 size_t res_size, cookie_size, arg_size; 647 648 error = ppt_find(vm, bus, slot, func, &ppt); --- 114 unchanged lines hidden --- |