From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: fes@google.com, aarcange@redhat.com, riel@redhat.com,
kvm@vger.kernel.org, yvugenfi@redhat.com,
linux-kernel@vger.kernel.org, mikew@google.com,
yinghan@google.com, Paolo Bonzini <pbonzini@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio-balloon spec: provide a version of the "silent deflate" feature that works
Date: Fri, 07 Sep 2012 16:09:50 +0930 [thread overview]
Message-ID: <87vcfqfia1.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20120907054202.GA3452@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Fri, Sep 07, 2012 at 09:15:46AM +0930, Rusty Russell wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> > Instead, VIRTIO_NET_F_HOST_MUST_SEND_GARP would be a "negative" feature:
>> > if set, the host _may not_ rely on the guest to send a gARP. Similarly
>> > if VIRTIO_BALLOON_F_MUST_TELL_HOST is set, the guest _may not_ use
>> > ballooned pages directly.
>> >
>> > There are _no_ other negative features besides
>> > VIRTIO_BALLOON_F_MUST_TELL_HOST in the spec, and for a good
>> > reason---because they're broken.
>> >
>> > (Hmm, actually we have one, VIRTIO_BLK_F_RO. It is also a bit broken,
>> > but it is not so important because it depends on user input more than
>> > hypervisor version).
>>
>> Yes, this is the key observation, and an important lesson for the
>> future. Thanks!
>> Note that these two negative features were in the original spec, where
>> it's assumed that every device supports them. That's not explicitly
>> documented, however.
>
> I'm curious what would we do for the future? I tried to imagine that _RO
> was not in the original spec, so virtio-blk expects a r/w device.
> Now we can not add _RW - old hypervisors do not set it, and old
> drivers do not ack it.
> What would a new flag with equivalent functionality be?
Backwards compatibility in the R/O case would actually work: just fail
writes. Because it's just friendly advice to the OS, really.
The final test is always: does it break users? If there are no users
who will notice, we can do anything. If there are users, we have to
keep backwards compatibility, and that implies we can't add "must know"
features.
> So it looks like a bug: we should teach driver to tell host first on leak?
> Yan, Vadim, can you comment please?
>
> Also if true, looks like this bit will be useful to detect a fixed driver on
> the hypervisor side - to avoid unmapping such pages? Rusty what do you
> think?
So, feature is unimplemented in qemu, and broken in drivers. I starting
to share Paolo's dislike of it.
Don't understand why we'd care about fixed drivers though, if we remove
the feature bit....
Cheers,
Rusty.
WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
fes@google.com, aarcange@redhat.com, riel@redhat.com,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
mikew@google.com, yinghan@google.com,
virtualization@lists.linux-foundation.org, yvugenfi@redhat.com,
vrozenfe@redhat.com
Subject: Re: [PATCH] virtio-balloon spec: provide a version of the "silent deflate" feature that works
Date: Fri, 07 Sep 2012 16:09:50 +0930 [thread overview]
Message-ID: <87vcfqfia1.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20120907054202.GA3452@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Fri, Sep 07, 2012 at 09:15:46AM +0930, Rusty Russell wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> > Instead, VIRTIO_NET_F_HOST_MUST_SEND_GARP would be a "negative" feature:
>> > if set, the host _may not_ rely on the guest to send a gARP. Similarly
>> > if VIRTIO_BALLOON_F_MUST_TELL_HOST is set, the guest _may not_ use
>> > ballooned pages directly.
>> >
>> > There are _no_ other negative features besides
>> > VIRTIO_BALLOON_F_MUST_TELL_HOST in the spec, and for a good
>> > reason---because they're broken.
>> >
>> > (Hmm, actually we have one, VIRTIO_BLK_F_RO. It is also a bit broken,
>> > but it is not so important because it depends on user input more than
>> > hypervisor version).
>>
>> Yes, this is the key observation, and an important lesson for the
>> future. Thanks!
>> Note that these two negative features were in the original spec, where
>> it's assumed that every device supports them. That's not explicitly
>> documented, however.
>
> I'm curious what would we do for the future? I tried to imagine that _RO
> was not in the original spec, so virtio-blk expects a r/w device.
> Now we can not add _RW - old hypervisors do not set it, and old
> drivers do not ack it.
> What would a new flag with equivalent functionality be?
Backwards compatibility in the R/O case would actually work: just fail
writes. Because it's just friendly advice to the OS, really.
The final test is always: does it break users? If there are no users
who will notice, we can do anything. If there are users, we have to
keep backwards compatibility, and that implies we can't add "must know"
features.
> So it looks like a bug: we should teach driver to tell host first on leak?
> Yan, Vadim, can you comment please?
>
> Also if true, looks like this bit will be useful to detect a fixed driver on
> the hypervisor side - to avoid unmapping such pages? Rusty what do you
> think?
So, feature is unimplemented in qemu, and broken in drivers. I starting
to share Paolo's dislike of it.
Don't understand why we'd care about fixed drivers though, if we remove
the feature bit....
Cheers,
Rusty.
next prev parent reply other threads:[~2012-09-07 6:39 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 7:46 [PATCH] virtio-balloon spec: provide a version of the "silent deflate" feature that works Paolo Bonzini
2012-09-06 7:46 ` Paolo Bonzini
2012-09-06 8:47 ` Michael S. Tsirkin
2012-09-06 8:47 ` Michael S. Tsirkin
2012-09-06 9:24 ` Paolo Bonzini
2012-09-06 9:24 ` Paolo Bonzini
2012-09-06 9:44 ` Michael S. Tsirkin
2012-09-06 9:44 ` Michael S. Tsirkin
2012-09-06 9:57 ` Paolo Bonzini
2012-09-06 9:57 ` Paolo Bonzini
2012-09-06 10:53 ` Michael S. Tsirkin
2012-09-06 10:53 ` Michael S. Tsirkin
2012-09-06 12:13 ` Paolo Bonzini
2012-09-06 12:13 ` Paolo Bonzini
2012-09-06 12:51 ` Michael S. Tsirkin
2012-09-06 12:51 ` Michael S. Tsirkin
2012-09-06 13:12 ` Paolo Bonzini
2012-09-06 13:12 ` Paolo Bonzini
2012-09-06 23:45 ` Rusty Russell
2012-09-07 5:42 ` Michael S. Tsirkin
2012-09-07 5:42 ` Michael S. Tsirkin
2012-09-07 6:39 ` Rusty Russell [this message]
2012-09-07 6:39 ` Rusty Russell
2012-09-07 9:27 ` Paolo Bonzini
2012-09-07 9:27 ` Paolo Bonzini
2012-09-07 10:53 ` Michael S. Tsirkin
2012-09-07 10:53 ` Michael S. Tsirkin
2012-09-07 11:20 ` Paolo Bonzini
2012-09-07 11:20 ` Paolo Bonzini
2012-09-07 12:17 ` Michael S. Tsirkin
2012-09-07 12:17 ` Michael S. Tsirkin
2012-09-07 12:22 ` Paolo Bonzini
2012-09-07 12:22 ` Paolo Bonzini
2012-09-07 12:44 ` Michael S. Tsirkin
2012-09-07 12:44 ` Michael S. Tsirkin
2012-09-07 14:04 ` Paolo Bonzini
2012-09-07 14:04 ` Paolo Bonzini
2012-09-07 14:25 ` Michael S. Tsirkin
2012-09-07 14:25 ` Michael S. Tsirkin
2012-09-07 14:44 ` Paolo Bonzini
2012-09-07 14:44 ` Paolo Bonzini
2012-09-08 22:22 ` Michael S. Tsirkin
2012-09-08 22:22 ` Michael S. Tsirkin
2012-09-10 5:50 ` Paolo Bonzini
2012-09-10 5:50 ` Paolo Bonzini
2012-09-10 6:03 ` Michael S. Tsirkin
2012-09-10 6:03 ` Michael S. Tsirkin
2012-09-10 6:38 ` Paolo Bonzini
2012-09-10 6:38 ` Paolo Bonzini
2012-09-10 6:47 ` Michael S. Tsirkin
2012-09-10 6:47 ` Michael S. Tsirkin
2012-09-10 6:55 ` Paolo Bonzini
2012-09-10 6:55 ` Paolo Bonzini
2012-09-07 10:43 ` Michael S. Tsirkin
2012-09-07 10:43 ` Michael S. Tsirkin
2012-09-08 5:06 ` Rusty Russell
2012-09-08 5:06 ` Rusty Russell
2012-09-08 10:32 ` Paolo Bonzini
2012-09-08 10:32 ` Paolo Bonzini
2012-09-08 22:37 ` Michael S. Tsirkin
2012-09-08 22:37 ` Michael S. Tsirkin
2012-09-10 1:43 ` Rusty Russell
2012-09-10 1:43 ` Rusty Russell
2012-09-10 5:51 ` Paolo Bonzini
2012-09-10 5:51 ` Paolo Bonzini
2012-09-10 5:51 ` Michael S. Tsirkin
2012-09-10 5:51 ` Michael S. Tsirkin
2012-09-12 6:24 ` Rusty Russell
2012-09-12 6:24 ` Rusty Russell
2012-09-06 23:41 ` Michael S. Tsirkin
2012-09-06 23:41 ` Michael S. Tsirkin
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=87vcfqfia1.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=aarcange@redhat.com \
--cc=fes@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikew@google.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=riel@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=yinghan@google.com \
--cc=yvugenfi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.