minios: Correct HYPERVISOR_physdev_op()
PATCH 1/1 minios: Correct HYPERVISOR_physdev_op()
A physdev_op is a two argument hypercall, taking a command paramter and an optional pointer to a structure.
--- extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 4 ++-- extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +2 -2
@@ -255,9 +255,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline int
extras/mini-os/include/x86/x86_64/hypercall-x86_64.h +2 -2
@@ -256,9 +256,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline int
Signature · 1 line
1.7.10.4
Quoted 1 line · Andrew Cooper
A
physdev_opis a two argument hypercall, taking a command paramter and an
^^^^^^^- parameter
Quoted 50 lines
optional pointer to a structure.
Signed-off-by Andrew Cooper <[email protected]>CC Stefano Stabellini <[email protected]>CC Samuel Thibault <[email protected]>--- extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 4 ++-- extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +2
-2@@ -255,9 +255,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intextras/mini-os/include/x86/x86_64/hypercall-x86_64.h +2
-2@@ -256,9 +256,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intSignature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 2 lines · Andrew Cooper, le Fri 24 Jan 2014 18:28:11 +0000, a écrit :
A
physdev_opis a two argument hypercall, taking a command paramter and an optional pointer to a structure.
Mmm, this this a remnant of the old hypercall which was taking one parameter only, indeed.
Quoted 3 lines
Signed-off-by Andrew Cooper <[email protected]>CC Stefano Stabellini <[email protected]>CC Samuel Thibault <[email protected]>
Quoted 40 lines
--- extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 4 ++-- extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +2
-2@@ -255,9 +255,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intextras/mini-os/include/x86/x86_64/hypercall-x86_64.h +2
-2@@ -256,9 +256,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intSignature · 1 line
1.7.10.4
Signature · 2 lines
Samuel #include <culture.h>
Quoted 6 lines · Andrew Cooper
A
physdev_opis a two argument hypercall, taking a command paramter and an optional pointer to a structure.Signed-off-by Andrew Cooper <[email protected]>CC Stefano Stabellini <[email protected]>CC Samuel Thibault <[email protected]>
This hypercall is unused in minios and stubdoms I think? (Trying to gauge how critical the error is).
Quoted 37 lines
--- extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 4 ++-- extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +2
-2@@ -255,9 +255,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intextras/mini-os/include/x86/x86_64/hypercall-x86_64.h +2
-2@@ -256,9 +256,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline int
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Andrew Cooper
A
physdev_opis a two argument hypercall, taking a command paramter and an optional pointer to a structure.Signed-off-by Andrew Cooper <[email protected]>CC Stefano Stabellini <[email protected]>CC Samuel Thibault <[email protected]>This hypercall is unused in minios and stubdoms I think? (Trying to gauge how critical the error is).
Correct. I suppose it is more of a "nice to fix" than "must fix" at this stage, although I was quite surprised that I needed to fix it.
~Andrew
Quoted 39 lines
Quoted 38 lines
--- extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 4 ++-- extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +2
-2@@ -255,9 +255,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline intextras/mini-os/include/x86/x86_64/hypercall-x86_64.h +2
-2@@ -256,9 +256,9 @@ HYPERVISOR_console_io(static inline int HYPERVISOR_physdev_op ( -void *physdev_op) +int cmd,void *physdev_op) { -return _hypercall1 (int, physdev_op, physdev_op); +return _hypercall2 (int, physdev_op, cmd, physdev_op); } static inline int
Quoted 5 lines · Andrew Cooper
Quoted 4 lines · Ian Campbell
Quoted 3 lines · Andrew Cooper
A
physdev_opis a two argument hypercall, taking a command paramter and an optional pointer to a structure.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Andrew Cooper <[email protected]>CC Stefano Stabellini <[email protected]>CC Samuel Thibault <[email protected]>This hypercall is unused in minios and stubdoms I think? (Trying to gauge how critical the error is).
Correct. I suppose it is more of a "nice to fix" than "must fix" at this stage, although I was quite surprised that I needed to fix it.
Given that the function is just wrong and that it appears to be unused in tree I think a simple compile test to confirm is sufficient to take it into 4.4. Since that succeeded I have acked + applied.
Ian.