qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>
Subject: Re: [PATCH][RESEND v5 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)
Date: Thu, 22 Jun 2023 13:01:34 +0200	[thread overview]
Message-ID: <aa78a4fc-9c88-b6c1-98f8-d22348927df4@redhat.com> (raw)
In-Reply-To: <0a7cc359-f308-21a1-6c6d-7bcb51051f7e@maciej.szmigiero.name>

[...]

>>>> We'd use a memory region container as device memory region (like [1]) and would have to handle the !memdev case (I can help with that). > Into that, you can map the RAM memory region on demand (and eventually even using multiple slots like [1]).
>>>>
>>>> (2) Use a single virtual DIMM and (un)plug that on demand. Let the machine code handle (un)plugging of the device.
>>>>
>>>>
>>>> (1) feels cleanest to me, although it will require a bit more work.
>>>>
>>>
>>> I also think approach (1) makes more sense as it avoids memslot metadata
>>> overhead for not-yet-hot-added parts of the memory backing device.
>>>
>>> Not sure what you mean that the !memdev case would be problematic in this
>>> case - it is working in the current driver shape so why would adding
>>> potential memory subregions (used in the memdev case) change that?
>>
>> I'm thinking about the case where you have a hv-balloon device without a memdev.
>>
>> Without -m X,maxmem=y we don't currently expect to have memory devices around
>> (and especially them getting (un)plugged. But why should we "force" to set the
>> "maxmem" option
> 
> I guess it's only a small change to QEMU to allow having hv-balloon
> device (without a memdev) even in the case where there's no "maxmem"
> option given on the QEMU command line.
> 
>>
>> I hope I'll find some time soonish to prototype what I have in mind, to see
>> if it could be made working.
>>
> 
> Okay, so I'll wait for your prototype before commencing further work on
> the next version of this driver.

About to have something simplistic running -- I think. Want to test with 
a Linux VM, but I don't seem to get it working (also without my changes).


#!/bin/bash

build/qemu-system-x86_64 \
     --enable-kvm \
     -m 4G,maxmem=36G \
     -cpu host,hv-syndbg=on,hv-synic,hv-relaxed,hv-vpindex \
     -smp 16 \
     -nographic \
     -nodefaults \
     -net nic -net user \
     -chardev stdio,nosignal,id=serial \
     -hda Fedora-Cloud-Base-37-1.7.x86_64.qcow2 \
     -cdrom /home/dhildenb/git/cloud-init/cloud-init.iso \
     -device isa-serial,chardev=serial \
     -chardev socket,id=monitor,path=/var/tmp/mon_src,server,nowait \
     -mon chardev=monitor,mode=readline \
     -device vmbus-bridge \
     -object memory-backend-ram,size=2G,id=mem0 \
     -device hv-balloon,id=hv1,memdev=mem0



[root@vm-0 ~]# uname -r
6.3.5-100.fc37.x86_64
[root@vm-0 ~]# modprobe hv_balloon
modprobe: ERROR: could not insert 'hv_balloon': No such device


Any magic flag I am missing? Or is there something preventing this to 
work with Linux VMs?

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2023-06-22 11:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 14:00 [PATCH][RESEND v5 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️) Maciej S. Szmigiero
2023-06-12 14:00 ` [PATCH][RESEND v5 1/3] error: define g_autoptr() cleanup function for the Error type Maciej S. Szmigiero
2023-06-12 14:00 ` [PATCH][RESEND v5 2/3] Add Hyper-V Dynamic Memory Protocol definitions Maciej S. Szmigiero
2023-06-12 14:00 ` [PATCH][RESEND v5 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon) Maciej S. Szmigiero
2023-06-12 17:42   ` David Hildenbrand
2023-06-13 17:57     ` Maciej S. Szmigiero
2023-06-19 15:58       ` David Hildenbrand
2023-06-20 20:13         ` Maciej S. Szmigiero
2023-06-21 10:32           ` David Hildenbrand
2023-06-21 18:17             ` Maciej S. Szmigiero
2023-06-22 11:01               ` David Hildenbrand [this message]
2023-06-22 11:12                 ` Maciej S. Szmigiero
2023-06-22 11:15                   ` David Hildenbrand
2023-06-22 11:17                     ` Maciej S. Szmigiero
2023-06-22 12:06                       ` David Hildenbrand
2023-06-22 12:14                         ` Maciej S. Szmigiero
2023-06-22 12:27                           ` Maciej S. Szmigiero
2023-06-22 12:52                           ` David Hildenbrand
2023-06-22 18:45                             ` Maciej S. Szmigiero
2023-06-23 12:23                               ` David Hildenbrand
2023-06-23 18:04                               ` Maciej S. Szmigiero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa78a4fc-9c88-b6c1-98f8-d22348927df4@redhat.com \
    --to=david@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=mail@maciej.szmigiero.name \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).