Skip to content
Snippets Groups Projects
Commit 98bfe4d6 authored by Guy Zana's avatar Guy Zana Committed by Dor Laor
Browse files

Enable msix and write the right queue for the host for it

parent 66948f34
No related branches found
No related tags found
No related merge requests found
......@@ -46,9 +46,14 @@ namespace virtio {
msix_isr_list* isrs = new msix_isr_list;
void* stk1 = malloc(10000);
thread* isr = new thread([this] { this->interrupt(); } , {stk1, 10000});
isrs->insert(std::make_pair(0, isr));
isrs->insert(std::make_pair(_q_index, isr));
interrupt_manager::instance()->easy_register(_dev, *isrs);
// Setup queue_id:entry_id 1:1 correlation...
_dev->virtio_conf_writel(VIRTIO_PCI_QUEUE_SEL, _q_index);
_dev->virtio_conf_writel(VIRTIO_MSI_QUEUE_VECTOR, _q_index);
enable_callback();
_callback = nullptr;
}
......
......@@ -34,6 +34,8 @@ namespace virtio {
{
_dev->set_bus_master(true);
_dev->msix_enable();
//make sure the queue is reset
_dev->reset_host_side();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment