Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ebff0113
Commit
ebff0113
authored
Feb 11, 2015
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lguest: Convert console device to virtio 1.0 PCI.
Signed-off-by:
Rusty Russell
<
rusty@rustcorp.com.au
>
parent
0d5b5d39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tools/lguest/lguest.c
tools/lguest/lguest.c
+7
-7
No files found.
tools/lguest/lguest.c
View file @
ebff0113
...
@@ -2221,9 +2221,6 @@ static void init_pci_config(struct pci_config *pci, u16 type,
...
@@ -2221,9 +2221,6 @@ static void init_pci_config(struct pci_config *pci, u16 type,
* PCI have specific codes for different types of devices.
* PCI have specific codes for different types of devices.
* Linux doesn't care, but it's a good clue for people looking
* Linux doesn't care, but it's a good clue for people looking
* at the device.
* at the device.
*
* eg :
* VIRTIO_ID_CONSOLE: class = 0x07, subclass = 0x00
*/
*/
pci
->
class
=
class
;
pci
->
class
=
class
;
pci
->
subclass
=
subclass
;
pci
->
subclass
=
subclass
;
...
@@ -2370,7 +2367,7 @@ static void setup_console(void)
...
@@ -2370,7 +2367,7 @@ static void setup_console(void)
tcsetattr
(
STDIN_FILENO
,
TCSANOW
,
&
term
);
tcsetattr
(
STDIN_FILENO
,
TCSANOW
,
&
term
);
}
}
dev
=
new_
device
(
"console"
,
VIRTIO_ID_CONSOLE
);
dev
=
new_
pci_device
(
"console"
,
VIRTIO_ID_CONSOLE
,
0x07
,
0x00
);
/* We store the console state in dev->priv, and initialize it. */
/* We store the console state in dev->priv, and initialize it. */
dev
->
priv
=
malloc
(
sizeof
(
struct
console_abort
));
dev
->
priv
=
malloc
(
sizeof
(
struct
console_abort
));
...
@@ -2382,10 +2379,13 @@ static void setup_console(void)
...
@@ -2382,10 +2379,13 @@ static void setup_console(void)
* stdin. When they put something in the output queue, we write it to
* stdin. When they put something in the output queue, we write it to
* stdout.
* stdout.
*/
*/
add_virtqueue
(
dev
,
VIRTQUEUE_NUM
,
console_input
);
add_pci_virtqueue
(
dev
,
console_input
);
add_virtqueue
(
dev
,
VIRTQUEUE_NUM
,
console_output
);
add_pci_virtqueue
(
dev
,
console_output
);
/* There's no configuration area for this device. */
no_device_config
(
dev
);
verbose
(
"device %u: console
\n
"
,
++
devices
.
device_num
);
verbose
(
"device %u: console
\n
"
,
devices
.
device_num
);
}
}
/*:*/
/*:*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment