Coder Social home page Coder Social logo

Comments (4)

bssrikanth avatar bssrikanth commented on August 29, 2024

I see now that the PCI device ID format on Power is different than x86, which the existing logic does. Will try to modify accordingly and post a patch

from virt-test.

bssrikanth avatar bssrikanth commented on August 29, 2024

the current code in qemu_vm.py is found to be discarding pci domain part [look at my initial comment] which is not expected.
lspci [which test_setup.py uses to identify pci id] does not display domain ID for pci devices if all devices in host are in same domain [example pci domain 0000]. But if the pci devices are on different domains, like in my scenario, we end up in issue where the pci_id used will not be found on the host.

from virt-test.

bssrikanth avatar bssrikanth commented on August 29, 2024

same issue here:

05:12:34 INFO | The following pci_ids were found: ['0004:01:00.1']
05:12:34 INFO | Context: preprocessing --> Bind device 0004:01:00.1 to stub
05:12:34 INFO | short ID: 01:00.1
05:12:34 INFO | Vendor ID: 15b3 1004
10df f100
10df e220
05:12:34 INFO | stub_new_id: /sys/bus/pci/drivers/pci-stub/new_id
05:12:34 INFO | unbind_dev :
05:12:34 INFO | stub_bind : /sys/bus/pci/drivers/pci-stub/bind
05:12:34 INFO | stub_remove_id : /sys/bus/pci/drivers/pci-stub/remove_id
05:12:34 INFO | Write '15b3 1004
10df f100
10df e220' to file '/sys/bus/pci/drivers/pci-stub/new_id'
05:12:34 INFO | Write '0004:01:00.1' to file ''
05:12:34 INFO | Write '0004:01:00.1' to file '/sys/bus/pci/drivers/pci-stub/bind'
05:12:34 INFO | Write '15b3 1004
10df f100
10df e220' to file '/sys/bus/pci/drivers/pci-stub/remove_id'
05:12:34 ERROR| Binding device 0004:01:00.1 to stub failed

test_setup.py:

def request_devs(self, devices=None):
    """
    Implement setup process: unbind the PCI device and then bind it
    to the device driver.

    :param devices: List of device dict
    :type devices: List of dict
    :return: List of successfully requested devices' PCI IDs.
    :rtype: List of string
    """
    if not self.pf_vf_info:
        self.pf_vf_info = self.get_pf_vf_info()
    base_dir = "/sys/bus/pci"
    stub_path = os.path.join(base_dir, "drivers/%s" % self.device_driver)
    self.pci_ids = self.get_devs(devices)
    logging.info("The following pci_ids were found: %s", self.pci_ids)
    requested_pci_ids = []
    # Setup all devices specified for assignment to guest
    for p_id in self.pci_ids:
        if self.device_driver == "vfio-pci":
            pci_ids = self.get_same_group_devs(p_id)
            logging.info("Following devices are in same group: %s", pci_ids)
        else:
            pci_ids = [p_id]
        for pci_id in pci_ids:
           short_id = pci_id[5:]

similar issue in _release_dev as well

from virt-test.

bssrikanth avatar bssrikanth commented on August 29, 2024

I have this issue addressed for Power arch in PR 2303

from virt-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.