All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v3 2/4] KVM: Add unified KVM_GET/SET_VCPU_STATE IOCTL
Date: Wed, 04 Nov 2009 12:35:53 +0100	[thread overview]
Message-ID: <4AF16719.5050601@siemens.com> (raw)
In-Reply-To: <4AF16312.4030208@redhat.com>

Avi Kivity wrote:
> On 11/02/2009 06:20 PM, Jan Kiszka wrote:
>> Add a new IOCTL pair to retrieve or set the VCPU state in one chunk.
>> More precisely, the IOCTL is able to process a list of substates to be
>> read or written. This list is easily extensible without breaking the
>> existing ABI, thus we will no longer have to add new IOCTLs when we
>> discover a missing VCPU state field or want to support new hardware
>> features.
>>
>> This patch establishes the generic infrastructure for KVM_GET/
>> SET_VCPU_STATE, introduces KVM_CHECK_VCPU_STATES to query supported
>> substates, and adds support for the generic substates REGS, SREGS, FPU,
>> and MP. To avoid code duplication, the entry point for the corresponding
>> original IOCTLs are converted to make use of the new infrastructure
>> internally, too.
>>
>> +
>> +struct kvm_vcpu_substate {
>> +	__u32 type;	/* KVM_VCPU_STATE_* or KVM_$(ARCH)_VCPU_STATE_* */
>> +	__u32 pad;
>> +	__s64 offset;	/* payload offset to kvm_vcpu_state in bytes */
>> +};
>>    
> 
> 64-bit offset is a bit too much, and can't be made to work on 32-bit 
> hosts.  Also, why signed?  it's begging for trouble.

Please elaborate what troubles you see precisely. The offset is supposed
to make the whole user's address space reachable relative to the
header's base address. Therefore 64 bit, therefore signed.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-11-04 11:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 16:20 [PATCH v3 0/4] Extensible VCPU state IOCTL Jan Kiszka
2009-11-02 16:20 ` [PATCH v3 1/4] KVM: Reorder IOCTLs in main kvm.h Jan Kiszka
2009-11-10 10:17   ` Avi Kivity
2009-11-02 16:20 ` [PATCH v3 2/4] KVM: Add unified KVM_GET/SET_VCPU_STATE IOCTL Jan Kiszka
2009-11-04 11:18   ` Avi Kivity
2009-11-04 11:35     ` Jan Kiszka [this message]
2009-11-04 12:52       ` Avi Kivity
2009-11-10 10:14   ` Avi Kivity
2009-11-10 12:03     ` Jan Kiszka
2009-11-10 12:57       ` Avi Kivity
2009-11-10 13:22         ` Jan Kiszka
2009-11-10 13:31           ` Avi Kivity
2009-11-10 13:41             ` Jan Kiszka
2009-11-02 16:20 ` [PATCH v3 3/4] KVM: x86: Add support for KVM_GET/SET_VCPU_STATE Jan Kiszka
2009-11-02 16:20 ` [PATCH v3 4/4] KVM: x86: Add VCPU substate for event states Jan Kiszka
2009-11-04 11:23   ` Avi Kivity
2009-11-04 11:34     ` Jan Kiszka
2009-11-04 12:51       ` Avi Kivity
2009-11-04 14:44         ` Jan Kiszka
2009-11-05  8:25   ` [PATCH v4 " Jan Kiszka
2009-11-05 11:00     ` Gleb Natapov
2009-11-05 11:51     ` [PATCH v5 " Jan Kiszka

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=4AF16719.5050601@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.