Displaying 20 results from an estimated 23 matches for "region_size".
2020 Aug 05
1
[PATCH v3 35/38] virtio_mem: convert to LE accessors
...diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index f26f5f64ae82..c08512fcea90 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -1530,21 +1530,21 @@ static void virtio_mem_refresh_config(struct virtio_mem *vm)
uint64_t new_plugged_size, usable_region_size, end_addr;
/* the plugged_size is just a reflection of what _we_ did previously */
- virtio_cread(vm->vdev, struct virtio_mem_config, plugged_size,
- &new_plugged_size);
+ virtio_cread_le(vm->vdev, struct virtio_mem_config, plugged_size,
+ &new_plugged_size);
if (WARN_ON...
2020 Jun 08
4
[PATCH] virtio_mem: prevent overflow with subblock size
...device block size (for communicating with the device). */
- uint32_t device_block_size;
+ uint64_t device_block_size;
/* The translated node id. NUMA_NO_NODE in case not specified. */
int nid;
/* Physical start address of the memory region. */
@@ -86,7 +86,7 @@ struct virtio_mem {
uint64_t region_size;
/* The subblock size. */
- uint32_t subblock_size;
+ uint64_t subblock_size;
/* The number of subblocks per memory block. */
uint32_t nb_sb_per_mb;
@@ -1698,9 +1698,9 @@ static int virtio_mem_init(struct virtio_mem *vm)
* - At least the device block size.
* In the worst case, a sin...
2020 Jun 08
4
[PATCH] virtio_mem: prevent overflow with subblock size
...device block size (for communicating with the device). */
- uint32_t device_block_size;
+ uint64_t device_block_size;
/* The translated node id. NUMA_NO_NODE in case not specified. */
int nid;
/* Physical start address of the memory region. */
@@ -86,7 +86,7 @@ struct virtio_mem {
uint64_t region_size;
/* The subblock size. */
- uint32_t subblock_size;
+ uint64_t subblock_size;
/* The number of subblocks per memory block. */
uint32_t nb_sb_per_mb;
@@ -1698,9 +1698,9 @@ static int virtio_mem_init(struct virtio_mem *vm)
* - At least the device block size.
* In the worst case, a sin...
2020 Aug 03
0
[PATCH v2 13/24] virtio_mem: correct tags for config space fields
...e. */
- __u64 block_size;
+ __le64 block_size;
/* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */
- __u16 node_id;
+ __le16 node_id;
__u8 padding[6];
/* Start address of the memory region. Cannot change. */
- __u64 addr;
+ __le64 addr;
/* Region size (maximum). Cannot change. */
- __u64 region_size;
+ __le64 region_size;
/*
* Currently usable region size. Can grow up to region_size. Can
* shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL (in which case no config
* update will be sent).
*/
- __u64 usable_region_size;
+ __le64 usable_region_size;
/*
* Currently used size. Changes due t...
2020 Aug 05
0
[PATCH v3 13/38] virtio_mem: correct tags for config space fields
...e. */
- __u64 block_size;
+ __le64 block_size;
/* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */
- __u16 node_id;
+ __le16 node_id;
__u8 padding[6];
/* Start address of the memory region. Cannot change. */
- __u64 addr;
+ __le64 addr;
/* Region size (maximum). Cannot change. */
- __u64 region_size;
+ __le64 region_size;
/*
* Currently usable region size. Can grow up to region_size. Can
* shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL (in which case no config
* update will be sent).
*/
- __u64 usable_region_size;
+ __le64 usable_region_size;
/*
* Currently used size. Changes due t...
2014 Jul 10
3
[LLVMdev] Proposal: ASan debugging API
...ADDRESS_TYPE_* enum values. If global or stack,
tries
// to also return the variable name, address and size. If heap, tries to
// return the chunk address and size.
int __asan_get_address_type(void *addr, char **region_name,
void **region_address, size_t *region_size);
// Useful for calling from the debugger to get the allocation stack
trace
// and thread ID for a heap address. Returns 1 on success, 0 on error.
int __asan_get_alloc_stack(void *addr, void **trace, size_t
*frame_count,
void **top_frame_bp, int *thread_i...
2020 Jun 08
0
[PATCH] virtio_mem: prevent overflow with subblock size
...ng with the device). */
> - uint32_t device_block_size;
> + uint64_t device_block_size;
> /* The translated node id. NUMA_NO_NODE in case not specified. */
> int nid;
> /* Physical start address of the memory region. */
> @@ -86,7 +86,7 @@ struct virtio_mem {
> uint64_t region_size;
>
> /* The subblock size. */
> - uint32_t subblock_size;
> + uint64_t subblock_size;
> /* The number of subblocks per memory block. */
> uint32_t nb_sb_per_mb;
>
> @@ -1698,9 +1698,9 @@ static int virtio_mem_init(struct virtio_mem *vm)
> * - At least the dev...
2020 Mar 02
0
[PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug
...state(vm, mb_id, VIRTIO_MEM_MB_STATE_UNUSED);
+ }
+
+ return 0;
+}
+
+/*
+ * Update all parts of the config that could have changed.
+ */
+static void virtio_mem_refresh_config(struct virtio_mem *vm)
+{
+ const uint64_t phys_limit = 1UL << MAX_PHYSMEM_BITS;
+ uint64_t new_plugged_size, usable_region_size, end_addr;
+
+ /* the plugged_size is just a reflection of what _we_ did previously */
+ virtio_cread(vm->vdev, struct virtio_mem_config, plugged_size,
+ &new_plugged_size);
+ if (WARN_ON_ONCE(new_plugged_size != vm->plugged_size))
+ vm->plugged_size = new_plugged_size;
+
+ /* c...
2020 Mar 03
1
[PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug
...8:2: error: unknown type name 'uint16_t'
uint16_t padding;
^
>> ./usr/include/linux/virtio_mem.h:190:2: error: unknown type name 'uint64_t'
uint64_t addr;
^
./usr/include/linux/virtio_mem.h:192:2: error: unknown type name 'uint64_t'
uint64_t region_size;
^
./usr/include/linux/virtio_mem.h:198:2: error: unknown type name 'uint64_t'
uint64_t usable_region_size;
^
./usr/include/linux/virtio_mem.h:203:2: error: unknown type name 'uint64_t'
uint64_t plugged_size;
^
./usr/include/linux/virtio_mem.h:205:2...
2020 May 07
17
[PATCH v4 00/15] virtio-mem: paravirtualized memory
...v2)
-- "mm: Allow to offline unmovable PageOffline() pages via ..."
-- "mm/memory_hotplug: Introduce offline_and_remove_memory()"
v2 -> v3:
- "virtio-mem: Paravirtualized memory hotplug"
-- Include "linux/slab.h" to fix build issues
-- Remember the "region_size", helpful for patch #11
-- Minor simplifaction in virtio_mem_overlaps_range()
-- Use notifier_from_errno() instead of notifier_to_errno() in notifier
-- More reliable check for added memory when unloading the driver
- "virtio-mem: Allow to specify an ACPI PXM as nid"
-- Also print th...
2020 Jun 08
2
[PATCH] virtio_mem: prevent overflow with subblock size
...uint32_t device_block_size;
> > + uint64_t device_block_size;
> > /* The translated node id. NUMA_NO_NODE in case not specified. */
> > int nid;
> > /* Physical start address of the memory region. */
> > @@ -86,7 +86,7 @@ struct virtio_mem {
> > uint64_t region_size;
> >
> > /* The subblock size. */
> > - uint32_t subblock_size;
> > + uint64_t subblock_size;
> > /* The number of subblocks per memory block. */
> > uint32_t nb_sb_per_mb;
> >
> > @@ -1698,9 +1698,9 @@ static int virtio_mem_init(struct virt...
2020 Jun 08
2
[PATCH] virtio_mem: prevent overflow with subblock size
...uint32_t device_block_size;
> > + uint64_t device_block_size;
> > /* The translated node id. NUMA_NO_NODE in case not specified. */
> > int nid;
> > /* Physical start address of the memory region. */
> > @@ -86,7 +86,7 @@ struct virtio_mem {
> > uint64_t region_size;
> >
> > /* The subblock size. */
> > - uint32_t subblock_size;
> > + uint64_t subblock_size;
> > /* The number of subblocks per memory block. */
> > uint32_t nb_sb_per_mb;
> >
> > @@ -1698,9 +1698,9 @@ static int virtio_mem_init(struct virt...
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
...2].
[1] https://lkml.kernel.org/r/20200311171422.10484-1-david at redhat.com
[2] https://lkml.kernel.org/r/20200506094948.76388-1-david at redhat.com
v2 -> v3:
- "virtio-mem: Paravirtualized memory hotplug"
-- Include "linux/slab.h" to fix build issues
-- Remember the "region_size", helpful for patch #11
-- Minor simplifaction in virtio_mem_overlaps_range()
-- Use notifier_from_errno() instead of notifier_to_errno() in notifier
-- More reliable check for added memory when unloading the driver
- "virtio-mem: Allow to specify an ACPI PXM as nid"
-- Also print th...
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
...2].
[1] https://lkml.kernel.org/r/20200311171422.10484-1-david at redhat.com
[2] https://lkml.kernel.org/r/20200506094948.76388-1-david at redhat.com
v2 -> v3:
- "virtio-mem: Paravirtualized memory hotplug"
-- Include "linux/slab.h" to fix build issues
-- Remember the "region_size", helpful for patch #11
-- Minor simplifaction in virtio_mem_overlaps_range()
-- Use notifier_from_errno() instead of notifier_to_errno() in notifier
-- More reliable check for added memory when unloading the driver
- "virtio-mem: Allow to specify an ACPI PXM as nid"
-- Also print th...
2020 Mar 11
12
[PATCH v2 00/10] virtio-mem: paravirtualized memory
...at can be plugged
or unplugged. The device driver is responsible for (un)plugging memory
blocks on demand.
Virtio-mem devices can only operate on their assigned memory region in
order to (un)plug memory. A device cannot (un)plug memory belonging to
other devices.
The "region_size" corresponds to the maximum amount of memory that can
be provided by a device. The "size" corresponds to the amount of memory
that is currently plugged. "requested_size" corresponds to a request
from the device to the device driver to (un)plug blocks. The
de...
2020 May 07
0
[PATCH v3 00/15] virtio-mem: paravirtualized memory
...rg/r/20200311171422.10484-1-david at redhat.com
> [2] https://lkml.kernel.org/r/20200506094948.76388-1-david at redhat.com
>
> v2 -> v3:
> - "virtio-mem: Paravirtualized memory hotplug"
> -- Include "linux/slab.h" to fix build issues
> -- Remember the "region_size", helpful for patch #11
> -- Minor simplifaction in virtio_mem_overlaps_range()
> -- Use notifier_from_errno() instead of notifier_to_errno() in notifier
> -- More reliable check for added memory when unloading the driver
> - "virtio-mem: Allow to specify an ACPI PXM as nid&qu...
2020 Mar 02
20
[PATCH v1 00/11] virtio-mem: paravirtualized memory
...at can be plugged
or unplugged. The device driver is responsible for (un)plugging memory
blocks on demand.
Virtio-mem devices can only operate on their assigned memory region in
order to (un)plug memory. A device cannot (un)plug memory belonging to
other devices.
The "region_size" corresponds to the maximum amount of memory that can
be provided by a device. The "size" corresponds to the amount of memory
that is currently plugged. "requested_size" corresponds to a request
from the device to the device driver to (un)plug blocks. The
de...
2020 Mar 02
20
[PATCH v1 00/11] virtio-mem: paravirtualized memory
...at can be plugged
or unplugged. The device driver is responsible for (un)plugging memory
blocks on demand.
Virtio-mem devices can only operate on their assigned memory region in
order to (un)plug memory. A device cannot (un)plug memory belonging to
other devices.
The "region_size" corresponds to the maximum amount of memory that can
be provided by a device. The "size" corresponds to the amount of memory
that is currently plugged. "requested_size" corresponds to a request
from the device to the device driver to (un)plug blocks. The
de...
2019 Sep 19
14
[PATCH RFC v3 0/9] virtio-mem: paravirtualized memory
...ry blocks that can be plugged
or unplugged. The device driver is responsible for (un)plugging memory
blocks on demand.
Virtio-mem devices can only operate on their assigned memory region in
order to (un)plug memory. A device cannot (un)plug memory belonging to
other devices.
The "region_size" corresponds to the maximum amount of memory that can
be provided by a device. The "size" corresponds to the amount of memory
that is currently plugged. "requested_size" corresponds to a request
from the device to the device driver to (un)plug blocks. The
device dri...
2019 Dec 12
19
[PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
...ry blocks that can be plugged
or unplugged. The device driver is responsible for (un)plugging memory
blocks on demand.
Virtio-mem devices can only operate on their assigned memory region in
order to (un)plug memory. A device cannot (un)plug memory belonging to
other devices.
The "region_size" corresponds to the maximum amount of memory that can
be provided by a device. The "size" corresponds to the amount of memory
that is currently plugged. "requested_size" corresponds to a request
from the device to the device driver to (un)plug blocks. The
device dri...