ce cleanup function of MSI is implemented, delete the open-code
in vpci_deassign_device().
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v11->v12 changes:
* In cleanup_msi(), move "if ( !hide )" above vpci_remove_registers()
since deassign device will do
.
Best regards,
Jiqian Chen.
---
cc: "Roger Pau Monné"
---
Jiqian Chen (3):
vpci/rebar: Implement cleanup function for Rebar
vpci/msi: Implement cleanup function for MSI
vpci/msix: Implement cleanup function for MSI-X
xen/drivers/vpci/msi.c | 55 ++
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v11->v12 changes:
* In cleanup_rebar(), move the check "if ( !hide )" above the
vpci_remove_registers().
* In init_rebar(), change return rc to continue when "if ( index >=
PCI_HEADER_NORMAL_NR_BARS )&qu
regards,
Jiqian Chen.
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
Jiqian Chen (5):
vpci: Use cleanup to free capability resource during deassign
vpci: Refactor vpci_remove_register to remove matched registers
vpci/rebar: Implement cleanup function for Rebar
vpci/msi: Impleme
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v10->v11 changes:
* Add ASSERT_UNREACHABLE() when vpci_remove_registers() fails
* When hide == true, add handlers to let Rebar ctrl be RO.
* Remove Roger's Reviewed-by since patch change.
v9->v10 changes:
v8->v9 c
vpci_init_capabilities() require
different cleanup actions, add a boolean parameter to cleanup hook
to distinguish them.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v10->v11 changes:
new patch.
---
xen/drivers/vpci/vpci.c | 25 -
xen/include/xen/vpci.h |
ls.
Since cleanup function of MSI-X is implemented, delete the open-code
in vpci_deassign_device().
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v10->v11 changes:
* Move calling all cleanup hook in vpci_deassign_device() out of this patch.
* Add hide parameter to cleanup_msix
ce cleanup function of MSI is implemented, delete the open-code
in vpci_deassign_device().
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v10->v11 changes:
* Add hide paratemer to cleanup_msi().
* Check hide, if false return directly instead of letting ctrl RO.
* Delete xfr
.
Note: two test cases don't math the new logic of
vpci_remove_registers(), then modify them.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v10->v11 changes:
No.
v9->v10 changes:
* Since logic change of vpci_remove_registers() affect the test c
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v9->v10 changes:
No.
v8->v9 changes:
* Add Roger's Reviewed-by.
v7->v8 changes:
* Add a comment to des
.
Note: two test cases don't math the new logic of
vpci_remove_registers(), then modify them.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v9->v10 changes:
* Since logic change of vpci_remove_registers() affect the test cases of
tools/tests/vpci/m
a.
As all supported capabilities have been switched to use the cleanup
hooks call those from vpci_deassign_device() instead of open-code the
capability specific cleanup in there.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v9->v10 changes:
* Call all cleanup hook in vpci_de
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v9->v10 changes:
v8->v9 changes:
No.
v7->v8 changes:
* Add Roger's Reviewed-by.
v6->v7 changes
,
Jiqian Chen.
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
Jiqian Chen (4):
vpci: Refactor vpci_remove_register to remove matched registers
vpci/rebar: Free Rebar resources when init_rebar() fails
vpci/msi: Free MSI resources when init_msi() fails
vpci/msix: Free MSIX reso
.
Signed-off-by: Jiqian Chen
Reviewed-by: Jan Beulich
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v8->v9 changes:
* Add Jan and Roger's Reviewed-by.
v7->v8 changes:
* Remove the unnecessary function vpci_hw_write32, since it can cause the value
of the
exten
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v8->v9 changes:
No.
v7->v8 changes:
* Add Roger's Reviewed-by.
v6->v7 changes:
* Change the point
this change, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v8->v9 changes:
*
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v8->v9 changes:
* Add Roger's Reviewed-by.
v7->v8 changes:
* Add a comment to describe why "-2" i
a.
As all supported capabilities have been switched to use the cleanup
hooks call those from vpci_deassign_device() instead of open-code the
capability specific cleanup in there.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v8->v9 changes:
* Modify commit message.
*
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v8->v9 changes:
v7->v8 changes:
v6->v7 changes:
No.
v5->v6 changes:
* Modify commit message.
* Add Roger's Reviewed-by.
v4->v5 changes:
No.
v3->v4 change
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v8->v9 changes:
* Add Roger'
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v8->v9 changes:
No
v7->v8 changes:
* s/and force/hopefully forcing/ in vpci_ext
.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (8):
vpci/header: Emulate extended capability list for dom0
vpci: Refactor REGISTER_VPCI_INIT
core_parking_helper() and get_cur_idle_nums() are only used for
XENPF_core_parking, so wrap them.
Signed-off-by: Jiqian Chen
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
"# CONFIG_PLATFORM_OP is not set" in preset configs for PV shim on x86.
With that, all dependent option get covered and could be deleted.
Signed-off-by: Jiqian Chen
---
cc: Stefano Stabellini
cc: Julien Grall
cc: Bertrand Marquis
cc: Michal Orzel
cc: Volodymyr Babchuk
cc: Andrew
alloc_hotadd_mfn
share_hotadd_m2p_table
transfer_pages_to_heap
destroy_m2p_mapping
destroy_compat_m2p_mapping
cleanup_frame_table
hotadd_mem_valid
Signed-off-by: Jiqian Chen
---
cc: Jan Beulich
cc: Andrew Cooper
cc: "Roger Pau
Since xsm_resource_plug_core and xsm_resource_unplug_core are only
used for arch/x86/platform_hypercall.c and arch/sysctl.c, so wrap
around them with CONFIG_SYSCTL and CONFIG_PLATFORM_OP.
Signed-off-by: Jiqian Chen
---
cc: "Daniel P. Smith"
---
xen/include/xsm/xsm.h | 8 +++
efi_get_info() is only used for XEN_FW_EFI_INFO of XENPF_firmware_info,
so wrap it.
And wrap its compat function efi_compat_get_info().
Signed-off-by: Jiqian Chen
---
cc: "Daniel P. Smith"
cc: "Marek Marczykowski-Górecki"
cc: Jan Beulich
---
xen/common/efi/common-stub.c
compat_set_px_pminfo and compat_set_cx_pminfo related functions,
also wrap them.
Signed-off-by: Jiqian Chen
---
cc: Jan Beulich
cc: Andrew Cooper
cc: "Roger Pau Monné"
---
xen/arch/x86/acpi/cpu_idle.c| 6 ++
xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 ++
xen/arch/x86/
;
cc: Anthony PERARD
cc: Michal Orzel
cc: Julien Grall
cc: Stefano Stabellini
cc: Lukasz Hawrylko
cc: "Daniel P. Smith"
cc: "Mateusz Mówka"
cc: Dario Faggioli
cc: Juergen Gross
cc: George Dunlap
cc: "Marek Marczykowski-Górecki"
cc: Bertrand Marquis
cc: Vo
As function xsm_platform_op() is solely invoked in platform_hypercall.c,
it needs to be wrapped around with CONFIG_PLATFORM_OP.
Signed-off-by: Jiqian Chen
---
cc: "Daniel P. Smith"
---
xen/include/xsm/xsm.h | 4
xen/xsm/dummy.c | 3 +++
xen/xsm/flask/hooks.c | 5
serial_resume
console_giveback
tboot_s3_resume
tboot_s3_error
acpi_sleep_post
enable_nonboot_cpus
thaw_domains
Signed-off-by: Jiqian Chen
efi_runtime_call() is only used for XENPF_efi_runtime_call, wrap
it and its compat function and its calling functions:
efi_compat_runtime_call()
gwstrlen()
cast_time()
cast_guid()
Signed-off-by: Jiqian Chen
---
cc: "Daniel P. Smith"
cc: "Marek Marczykowski-Górecki"
cc: J
wait_for_condition
wait_cpu_callin
wait_cpu_callout
primary_thread_fn
secondary_thread_fn
Signed-off-by: Jiqian Chen
---
cc: Jan Beulich
cc: Andrew Cooper
the final patch.
Signed-off-by: Jiqian Chen
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
xen/common/Kconfig | 4
1 file changed, 4 insertions(+)
diff --git a/xen/common/Kconfig
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v7->v8 changes:
* Add a comment to describe why "-2" in cleanup_msi().
* Given the code in vpci_remove_registers() an error in the removal
.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (8):
vpci/header: Emulate extended capability list for dom0
vpci: Refactor REGISTER_VPCI_INIT
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v7->v8 changes:
v6->v7 changes:
No.
v5->v6 changes:
* Modify commit message.
* Add Roger's Reviewed-by.
v4->v5 changes:
No.
v3->v4 changes:
* Use list_
this change, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v7->v8 changes:
* Recover vp
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v7->v8 changes:
* Add Roger's Reviewed-by.
v6->v7 changes:
* Change the pointer parameter of c
ed in cleanup function of MSIX.
To do that, implement cleanup function for MSIX.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v7->v8 changes:
* Given the code in vpci_remove_registers() an error in the removal of
registers would likely imply memory corruption, at which
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v7->v8 changes:
* s/and force/hopefully forcing/ in vpci_ext_capability_hide().
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v7->v8 changes:
* Remove the unnecessary function vpci_hw_write32, since it can cause the value
of the
extended capability header cached in vPCI of dom0 is inconsistent with the
hardware.
v6->v7 changes:
* Change word &quo
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v7->v8 changes:
* Change the type of next from uint31_t to un
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v6->v7 changes:
No.
v5->v6 changes:
* Modify commit message.
* Add Roger's Reviewed-by.
v4->v5 changes:
No.
v3->v4 changes:
* Use list_for_each_entry_safe ins
vpci_make_msix_hole() in modify_decoding() since it is not needed.
The cleanup hook is also added in this change, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
There is a byte alignment problem in the array __start_vpci_array, which can be
solved after
&qu
ed in cleanup function of MSIX.
To do that, implement cleanup function for MSIX.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v6->v7 changes:
* Change the pointer parameter of cleanup_msix() to be const.
* When vpci_remove_registers() in cleanup_msix() fails, not to
.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (8):
vpci/header: Emulate extended capability list for dom0
vpci: Refactor REGISTER_VPCI_INIT
.
Signed-off-by: Jiqian Chen
---
Comment left over for the situation that "capability in 0x100 can't be removed
case"
from Jan in last version, need Roger's input.
Jan:
Can we rely on OSes recognizing ID 0 as "just skip"?
Since the size isn't encoded in the header,
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v6->v7 changes:
* Change the pointer parameter of cleanup_msi() to be const.
* When vpci_remove_registers() in cleanup_msi() fails, not to return
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v6->v7 changes:
* Change the pointer parameter of cleanup_rebar() to be const.
* Print error when vpci_remove_registers() fail in cleanu
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v6->v7 changes:
* Change the pointer parameter of vpci
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v6->v7 changes:
* Change word "guest" to "DomU" in vpci_init_ext_capability_list().
* Change parameter of vpci_init_ext_capability_list() to be const.
* Delete check "if ( !header )" in the while loop of
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v5->v6 changes:
* Delete unnecessary parameter "ttl" in vpci_init_ext_capability_list()
since vpci_add_register() can already detect the overlaps.
v4->v5 changes:
* Add check: if capability list of hardware has a
.
Signed-off-by: Jiqian Chen
Reviewed-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v5->v6 changes:
* Modify commit message.
* Add Roger's Reviewed-by.
v4->v5 changes:
No.
v3->v4 changes:
* Use list_for_each_entry_safe instead of list_for_each_e
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v5->v6 changes:
No.
v4->v5 changes:
* Change definition "static void cleanup_rebar" to "static int cf_check
cleanup_reb
.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (8):
vpci/header: Emulate extended capability list for dom0
vpci: Refactor REGISTER_VPCI_INIT
this change, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v5->v6 c
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v5->v6 changes:
* Rename parameter rm to r in vpci_get_register
ed in cleanup function of MSIX.
To do that, implement cleanup function for MSIX.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v5->v6 changes:
* Change the logic to add dummy handler when !vpci->msix in cleanup_msix().
v4->v5 changes:
* Change definition "
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v5->v6 changes:
No.
v4->v5 changes:
* Change definition "static void cleanup_msi" to "static int cf_check
cleanup_msi" since
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v5->v6 changes:
* Change to use for loop to compact code of
vpci_get_previous_ext_cap_register().
* Rename paramet
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Return early if dom0, so that I didn't need to change the exiting return
chunk.
v3->v4 changes:
* Also pass supported_caps to pci_find_next_cap_ttl() for dom0 since the n is
zero when dom0,
ed in cleanup function of MSI.
To do that, implement cleanup function for MSI.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Change definition "static void cleanup_msi" to "static int cf_check
cleanup_msi" since cleanup hook is changed
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Add check: if capability list of hardware has a overlap, print warning and
return 0.
v3->v4 changes:
* Add check "if ( !header ) return 0;" to avoid adding handler for
device that has no exte
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Modify vpci_get_register() to delete some unne
ed in cleanup function of MSIX.
To do that, implement cleanup function for MSIX.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Change definition "static void cleanup_msix" to "static int cf_check
cleanup_msix" since cleanup hook i
moved in cleanup function of Rebar.
To do that, implement cleanup function for Rebar.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
* Change definition "static void cleanup_rebar" to "static int cf_check
cleanup_rebar" since clea
hange, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v4->v5 changes:
* Rename REGISTER_
No functional changes.
Follow-on changes will benifit from this.
Signed-off-by: Jiqian Chen
Acked-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v4->v5 changes:
No.
v3->v4 changes:
* Add Acked-by of Roger.
v2->v3 changes:
new patch.
Best regards,
Jiqian Chen.
--
prefix.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v4->v5 changes:
No.
v3->v4 changes:
* Use list_for_each_entry_safe instead of list_for_each_entry.
* Return ERANGE if overlap.
v2->v3 changes:
* Add new check to return error if registers ove
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v4->v5 changes:
* Modify the hex digits of PCI_EXT_CAP_NEXT_MASK and PCI_EXT_CAP_NEXT to be low
c
patch #7, #8, #9, #10.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (10):
vpci/header: Move emulating cap list logic into new function
v
.
So, add new function to hide legacy capability when initialization
fails. And remove the failed legacy capability from the vpci emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Modify the commit message.
sible
registered registers.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Change function name from fini_rebar() to cleanup_rebar().
* Change the error number to be E2BIG and ENXIO in init_rebar().
v2->v3 changes:
* Use fini_rebar() to remove all regis
When init_msix() fails, it needs to clean all MSIX resources.
So, add a new function to do that.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Change function name from fini_msix() to cleanup_msix().
* Change to use XFREE to free vpci->msix.
* In
calculating the size of msi registers.
v1->v2 changes:
* Added a new function fini_msi to free all MSI resources instead of using an
array to record registered registers.
Best regards,
Jiqian Chen.
---
xen/drivers/vpci/msi.c | 22 +-
1 file changed, 21 insertions(+), 1 de
prefix.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v3->v4 changes:
* Use list_for_each_entry_safe instead of list_for_each_entry.
* Return ERANGE if overlap.
v2->v3 changes:
* Add new check to return error if registers overlap but not inside range.
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Also pass supported_caps to pci_find_next_cap_ttl() for dom0 since the n is
zero when dom0,
and add a comment to explain it.
* Restrict adding PCI_STATUS register only for domU since dom0 has no
limitat
hange, even if it's still
unused. Further changes will make use of it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: Stefano Stabellini
---
v3->v4 changes
* Delete the useless
No functional changes.
Follow-on changes will benifit from this.
Signed-off-by: Jiqian Chen
Acked-by: Roger Pau Monné
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Add Acked-by of Roger.
v2->v3 changes:
new patch.
Best regards,
Jiqian Chen.
---
xen/drivers/vpc
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Add check "if ( !header ) return 0;" to avoid adding handler for
device that has no extended capabilities.
v2->v3 changes:
* In vpci_init_ext_capability_list(), when domain is domU, directly retu
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v3->v4 changes:
* Change definition of PCI_EXT_CAP_NEXT to be "#define PCI_EXT_CAP_NEXT(header)
(MASK_EXTR(header, PCI_EXT_CAP_NEXT_MASK) & 0xFFCU)" to avoid redundancy.
* Modify the commit message.
* Change vpci_ext_
patch #7, #8, #9, #10.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (10):
vpci/header: Move emulating cap list logic into new function
v
nfig space.
Note:
Call vpci_make_msix_hole() in the end of init_msix() since the
change of sequence of init_header() and init_msix().
The fini hook will be implemented in follow-on changes.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Andrew Cooper
cc: Anthony PERARD
cc: M
to remove a non exist register, so remove the
__must_check prefix.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
cc: Anthony PERARD
---
v2->v3 changes:
* Add new check to return error if registers overlap but not inside range.
v1->v2 changes:
new patch
Best rega
sters.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Use fini_rebar() to remove all register instead of in the failure path of
init_rebar();
v1->v2 changes:
* Called vpci_remove_registers() to remove all possible registered registers
instead of using
Current logic of emulating legacy capability list is only for domU.
So, expand it to emulate for dom0 too. Then it will be easy to hide
a capability whose initialization fails in a function.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Not to a
handler from vpci
extended capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Separated from the last version patch "vpci: Hide capability when it fails to
initialize".
* Whole implementation changed because last version is wro
emulated
legacy capability list.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Separated from the last version patch "vpci: Hide capability when it fails to
initialize"
* Whole implementation changed because last version is wrong.
This ve
Modify function pci_find_next_cap_ttl to support returning position
of next capability when size "n" is zero.
That can help caller to get next capability offset if caller just
has a information of current capability offset.
That will be used in a follow-on change.
Signed-off-by: J
.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* In vpci_init_ext_capability_list(), when domain is domU, directly return
after adding a handler(hiding all extended capability for domU).
* In vpci_init_ext_capability_list(), change condition to be "whil
When init_msix() fails, it needs to clean all MSIX resources.
So, add a new function to do that.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Remove unnecessary clean operations in fini_msix().
v1->v2 changes:
new patch.
Best regards,
Jiqia
, including patch #8, #9, #10, #11.
Best regards,
Jiqian Chen.
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
Jiqian Chen (11):
vpci/header: Move emulating cap list logic into new function
ff-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
* Remove all fail path, and use fini_msi() hook instead.
* Change the method to calculating the size of msi registers.
v1->v2 changes:
* Added a new function fini_msi to free all MSI resources instead of using an
array
No functional changes.
Follow-on changes will benifit from this.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
---
v2->v3 changes:
new patch.
Best regards,
Jiqian Chen.
---
xen/drivers/vpci/header.c | 138 --
1 file changed, 73 inse
Add a new function to emulate extended capability list for host,
and call it in init_header(). So that, it will be easy to hide
a capability whose initialization fails.
As for the extended capability list of guest, keep hiding it.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
When init_msix() fails, it needs to clean all MSIX resources.
So, add a new function fini_msix() to do that.
And to unregister the mmio handler of vpci_msix_table_ops, add
a new function.
Signed-off-by: Jiqian Chen
---
cc: Jan Beulich
cc: Andrew Cooper
cc: "Roger Pau Monné"
Current logic of init_header() only emulates legacy capability list
for guest, expand it to emulate for host too. So that it will be
easy to hide a capability whose initialization fails and no need
to distinguish host or guest.
Signed-off-by: Jiqian Chen
---
cc: "Roger Pau Monné"
n a follow-on change.
Signed-off-by: Jiqian Chen
---
cc: Andrew Cooper
cc: Anthony PERARD
cc: Michal Orzel
cc: Jan Beulich
cc: Julien Grall
cc: "Roger Pau Monné"
cc: Stefano Stabellini
---
v1->v2 changes:
new patch
Best regards,
Jiqian Chen.
---
xen/drivers/pci/pci.c | 6 +-
xen/
1 - 100 of 280 matches
Mail list logo