CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: riastradh Date: Sat Feb 25 00:34:49 UTC 2023 Modified Files: src/sys/arch/xen/include: hypervisor.h Log Message: xen/hypervisor.h: Nix trailing whitespace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/xen/include/hypervisor.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/hypervisor.h diff -u src/sys/arch/xen/include/hypervisor.h:1.56 src/sys/arch/xen/include/hypervisor.h:1.57 --- src/sys/arch/xen/include/hypervisor.h:1.56 Sat Feb 25 00:32:26 2023 +++ src/sys/arch/xen/include/hypervisor.h Sat Feb 25 00:34:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.h,v 1.56 2023/02/25 00:32:26 riastradh Exp $ */ +/* $NetBSD: hypervisor.h,v 1.57 2023/02/25 00:34:48 riastradh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,21 +26,21 @@ */ /* - * + * * Communication to/from hypervisor. - * + * * Copyright (c) 2002-2004, K A Fraser - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -187,10 +187,10 @@ void hypervisor_set_ipending(uint64_t, i void hypervisor_machdep_attach(void); void hypervisor_machdep_resume(void); -/* +/* * Force a proper event-channel callback from Xen after clearing the * callback mask. We do this in a very simple manner, by making a call - * down into Xen. The pending flag will be checked by Xen on return. + * down into Xen. The pending flag will be checked by Xen on return. */ static __inline void hypervisor_force_callback(void) {
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: riastradh Date: Sat Feb 25 00:34:49 UTC 2023 Modified Files: src/sys/arch/xen/include: hypervisor.h Log Message: xen/hypervisor.h: Nix trailing whitespace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/xen/include/hypervisor.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: riastradh Date: Sat Feb 25 00:32:26 UTC 2023 Modified Files: src/sys/arch/xen/include: hypervisor.h xenring.h Log Message: xen: Fix sense of xen_rmb/wmb to make sense. Use membar_acquire and membar_release, not membar_consumer and membar_producer, out of paranoia -- that better matches Linux's rmb/wmb (at least for non-I/O loads and stores). Proposed on port-xen: https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/xen/include/hypervisor.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/xen/include/xenring.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/hypervisor.h diff -u src/sys/arch/xen/include/hypervisor.h:1.55 src/sys/arch/xen/include/hypervisor.h:1.56 --- src/sys/arch/xen/include/hypervisor.h:1.55 Wed Sep 7 00:40:19 2022 +++ src/sys/arch/xen/include/hypervisor.h Sat Feb 25 00:32:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.h,v 1.55 2022/09/07 00:40:19 knakahara Exp $ */ +/* $NetBSD: hypervisor.h,v 1.56 2023/02/25 00:32:26 riastradh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -111,8 +111,8 @@ struct xen_npx_attach_args { #undef xen_wmb #define xen_mb() membar_sync() -#define xen_rmb() membar_producer() -#define xen_wmb() membar_consumer() +#define xen_rmb() membar_acquire() +#define xen_wmb() membar_release() #endif /* __XEN_INTERFACE_VERSION */ #include Index: src/sys/arch/xen/include/xenring.h diff -u src/sys/arch/xen/include/xenring.h:1.6 src/sys/arch/xen/include/xenring.h:1.7 --- src/sys/arch/xen/include/xenring.h:1.6 Sat Apr 25 15:26:17 2020 +++ src/sys/arch/xen/include/xenring.h Sat Feb 25 00:32:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: xenring.h,v 1.6 2020/04/25 15:26:17 bouyer Exp $ */ +/* $NetBSD: xenring.h,v 1.7 2023/02/25 00:32:26 riastradh Exp $ */ /* * Glue goop for xbd ring request/response protocol structures. @@ -25,8 +25,8 @@ #undef xen_wmb #define xen_mb() membar_sync() -#define xen_rmb() membar_producer() -#define xen_wmb() membar_consumer() +#define xen_rmb() membar_acquire() +#define xen_wmb() membar_release() /* * Define ring types. These were previously part of the public API.
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: riastradh Date: Sat Feb 25 00:32:26 UTC 2023 Modified Files: src/sys/arch/xen/include: hypervisor.h xenring.h Log Message: xen: Fix sense of xen_rmb/wmb to make sense. Use membar_acquire and membar_release, not membar_consumer and membar_producer, out of paranoia -- that better matches Linux's rmb/wmb (at least for non-I/O loads and stores). Proposed on port-xen: https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/xen/include/hypervisor.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/xen/include/xenring.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: dyoung Date: Thu Feb 25 22:20:03 UTC 2010 Modified Files: src/sys/arch/xen/include: pci_machdep.h Log Message: Fix Xen. XXX Almost everything in this header file, x86, amd64, and i386 should XXX share. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: dyoung Date: Thu Feb 25 22:20:03 UTC 2010 Modified Files: src/sys/arch/xen/include: pci_machdep.h Log Message: Fix Xen. XXX Almost everything in this header file, x86, amd64, and i386 should XXX share. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/pci_machdep.h diff -u src/sys/arch/xen/include/pci_machdep.h:1.15 src/sys/arch/xen/include/pci_machdep.h:1.16 --- src/sys/arch/xen/include/pci_machdep.h:1.15 Tue Feb 16 00:47:46 2010 +++ src/sys/arch/xen/include/pci_machdep.h Thu Feb 25 22:20:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.15 2010/02/16 00:47:46 dyoung Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.16 2010/02/25 22:20:03 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -79,19 +79,50 @@ } mode2; }; -typedef union x86_pci_tag_u pcitag_t; - #ifndef DOM0OPS int xpci_enumerate_bus(struct pci_softc *, const int *, int (*)(struct pci_attach_args *), struct pci_attach_args *); #define PCI_MACHDEP_ENUMERATE_BUS xpci_enumerate_bus #endif -typedef void *pci_chipset_tag_t; +struct pci_chipset_tag; +struct pci_attach_args; +/* + * Types provided to machine-independent PCI code + */ +typedef struct pci_chipset_tag *pci_chipset_tag_t; +typedef union x86_pci_tag_u pcitag_t; typedef struct xen_intr_handle pci_intr_handle_t; +struct pci_chipset_tag { + pcireg_t (*pc_conf_read)(pci_chipset_tag_t, pcitag_t, int); + + void (*pc_conf_write)(pci_chipset_tag_t, pcitag_t, int, pcireg_t); + +#if 0 + int (*pc_find_rom)(struct pci_attach_args *, bus_space_tag_t, + bus_space_handle_t, int, bus_space_handle_t *, bus_space_size_t *); +#endif + + int (*pc_intr_map)(struct pci_attach_args *, pci_intr_handle_t *); + + const char *(*pc_intr_string)(pci_chipset_tag_t, pci_intr_handle_t); + + const struct evcnt *(*pc_intr_evcnt)(pci_chipset_tag_t, + pci_intr_handle_t); + + void *(*pc_intr_establish)(pci_chipset_tag_t, pci_intr_handle_t, int, + int (*)(void *), void *); + + void (*pc_intr_disestablish)(pci_chipset_tag_t, void *); + + pcitag_t (*pc_make_tag)(pci_chipset_tag_t, int, int, int); + + void (*pc_decompose_tag)(pci_chipset_tag_t, pcitag_t, + int *, int *, int *); +}; + /* functions provided to MI PCI */ -struct pci_attach_args; void pci_attach_hook(device_t, device_t, struct pcibus_attach_args *);
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: dyoung Date: Mon Feb 15 23:55:25 UTC 2010 Modified Files: src/sys/arch/xen/include: pci_machdep.h Log Message: Get pci_mode out of the global namespace. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/xen/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.