-
Notifications
You must be signed in to change notification settings - Fork 21
Adjust the pci format and add new example for qemu with pci #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7b5cf7c
Adjust the pci format and add new example for qemu with pci
dallasxy 9f5073e
fmt
dallasxy 7b6ff70
update for new pcie
dallasxy febd052
Merge remote-tracking branch 'upstream/main'
dallasxy b3ff20f
Merge remote-tracking branch 'upstream/main'
dallasxy 9fd2351
update pcie config
dallasxy b38e455
update magic version
dallasxy 23d3311
fmt
dallasxy 76b5841
1.Correctly modify the configuration file in the example
dallasxy f72e1e5
update config for zone0 in aarch64
dallasxy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,5 +74,5 @@ | |
| }, | ||
| "num_pci_devs": 0, | ||
| "alloc_pci_devs": [], | ||
| "pci_config": {} | ||
| "pci_config": [{}] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
examples/qemu-aarch64/with_virtio_blk_console/zone1_linux_with_pci.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| { | ||
| "name": "linux2", | ||
| "zone_id": 1, | ||
| "cpus": [2, 3], | ||
| "memory_regions": [ | ||
| { | ||
| "type": "ram", | ||
| "physical_start": "0x50000000", | ||
| "virtual_start": "0x50000000", | ||
| "size": "0x30000000" | ||
| }, | ||
| { | ||
| "type": "virtio", | ||
| "physical_start": "0xa000000", | ||
| "virtual_start": "0xa000000", | ||
| "size": "0x4000" | ||
| } | ||
| ], | ||
| "interrupts": [76, 78], | ||
| "ivc_configs": [], | ||
| "kernel_filepath": "./Image", | ||
| "dtb_filepath": "./linux2.dtb", | ||
| "kernel_load_paddr": "0x50400000", | ||
| "dtb_load_paddr": "0x50000000", | ||
| "entry_point": "0x50400000", | ||
| "arch_config": { | ||
| "gic_version": "v3", | ||
| "gicd_base": "0x8000000", | ||
| "gicd_size": "0x10000", | ||
| "gicr_base": "0x80a0000", | ||
| "gicr_size": "0xf60000", | ||
| "gits_base": "0x8080000", | ||
| "gits_size": "0x20000", | ||
| "is_aarch32": false | ||
| }, | ||
| "pci_config": [{ | ||
| "ecam_base": "0x4010000000", | ||
| "ecam_size": "0x10000000", | ||
| "io_base": "0x3eff0000", | ||
| "io_size": "0x10000", | ||
| "pci_io_base": "0x0", | ||
| "mem32_base": "0x10000000", | ||
| "mem32_size": "0x2eff0000", | ||
| "pci_mem32_base": "0x10000000", | ||
| "mem64_base": "0x8000000000", | ||
| "mem64_size": "0x8000000000", | ||
| "pci_mem64_base": "0x8000000000", | ||
| "bus_range_begin": "0x0", | ||
| "bus_range_end": "0x1f", | ||
| "domain": "0x0" | ||
| }], | ||
| "num_pci_devs": 2, | ||
| "alloc_pci_devs": [ | ||
| { | ||
| "domain": "0x0", | ||
| "bus": "0x0", | ||
| "device": "0x0", | ||
| "function": "0x0", | ||
| "dev_type": "0" | ||
| }, | ||
| { | ||
| "domain": "0x0", | ||
| "bus": "0x0", | ||
| "device": "0x11", | ||
| "function": "0x0", | ||
| "dev_type": "0" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we added
bus_range_beginandbus_range_endto thepci_configof hvisor,we should probably add the same fields to the
pci_configof hvisor-tools as well.It would also be better to implement the corresponding JSON parsing logic.
Or the hvisor would panic at https://github.com/syswonder/hvisor/blob/new_pcie/src/hypercall/mod.rs#L200
See the following link for reference: https://github.com/syswonder/hvisor/blob/new_pcie/src/config.rs#L58