search for: rb_page_size

Displaying 2 results from an estimated 2 matches for "rb_page_size".

2020 May 13
0
[RFC v3 for QEMU] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT
...ne BALLOON_PAGE_SIZE (1 << VIRTIO_BALLOON_PFN_SHIFT) > +#define CONT_PAGES_ORDER 9 > > typedef struct PartiallyBalloonedPage { > ram_addr_t base_gpa; > @@ -72,6 +73,8 @@ static void balloon_inflate_page(VirtIOBalloon *balloon, > RAMBlock *rb; > size_t rb_page_size; > int subpages; > + size_t inflate_size = BALLOON_PAGE_SIZE << balloon->current_pages_order; > + int pages_num; reverse christmas tree please. squash same types into a single line if possible. > > /* XXX is there a better way to get to the RAMBlock than...
2020 Jul 16
0
[RFC for qemu v4 2/2] virtio_balloon: Add dcvq to deflate continuous pages
...MemoryRegion *mr, hwaddr mr_offset, > + size_t size) > { > void *addr = memory_region_get_ram_ptr(mr) + mr_offset; > ram_addr_t rb_offset; > @@ -153,10 +154,11 @@ static void balloon_deflate_page(VirtIOBalloon *balloon, > rb_page_size = qemu_ram_pagesize(rb); > > host_addr = (void *)((uintptr_t)addr & ~(rb_page_size - 1)); > + size &= ~(rb_page_size - 1); > > /* When a page is deflated, we hint the whole host page it lives > * on, since we can't do anything smaller */ > -...