search for: event_id

Displaying 20 results from an estimated 72 matches for "event_id".

2020 Feb 07
0
[RFC PATCH v7 53/78] KVM: introspection: add KVMI_VCPU_CONTROL_EVENTS
...introspected yet * -KVM_EBUSY - the selected vCPU has too many queued *KVMI_EVENT_PAUSE_VCPU* events +10. KVMI_VCPU_CONTROL_EVENTS +---------------------------- + +:Architectures: all +:Versions: >= 1 +:Parameters: + +:: + + struct kvmi_vcpu_hdr; + struct kvmi_vcpu_control_events { + __u16 event_id; + __u8 enable; + __u8 padding1; + __u32 padding2; + }; + +:Returns: + +:: + + struct kvmi_error_code + +Enables/disables vCPU introspection events. + +When an event is enabled, the introspection tool is notified and it +must reply with: continue, retry, crash, etc. (see **Events** below). + +Th...
2007 Jun 28
1
complete stumper: variable exists in hidden_field_tag, but nil everywhere else
...ag. If I try to use the variable anywhere else in the partial, i either get nil or an undefined error. The goal is to use the value of @event.id outside of hidden_field_tag. Here''s what works: <%= hidden_field_tag ''id'', @event && @event.id, :id => ''event_id'' %> ...spits out this HTML: <input type="hidden" name="id" id="event_id" value="771"/> So I read that to mean that @event.id is 771. Fine, good. However, if I change the line to this: <%= hidden_field_tag ''id'', @event....
2020 Feb 07
0
[RFC PATCH v7 44/78] KVM: introspection: add KVMI_VM_CONTROL_EVENTS
....rst +++ b/Documentation/virt/kvm/kvmi.rst @@ -333,11 +333,45 @@ This command is always allowed. Returns the number of online vCPUs. +5. KVMI_VM_CONTROL_EVENTS +------------------------- + +:Architectures: all +:Versions: >= 1 +:Parameters: + +:: + + struct kvmi_vm_control_events { + __u16 event_id; + __u8 enable; + __u8 padding1; + __u32 padding2; + }; + +:Returns: + +:: + + struct kvmi_error_code + +Enables/disables VM introspection events. This command can be used with +the following events:: + + KVMI_EVENT_UNHOOK + +:Errors: + +* -KVM_EINVAL - the event ID is invalid/unknown (use *KVMI...
2007 Nov 22
1
has_many :through questions
...rue end class Attendee < ActiveRecord::Base belongs_to :event belongs_to :person end The database tables are as follows: ActiveRecord::Schema.define(:version => 3) do create_table "attendees", :id => false, :force => true do |t| t.column "event_id", :integer t.column "person_id", :integer t.column "bit_flags", :integer end add_index "attendees", ["event_id"], :name => "index_attendees_on_event_id" add_index "attendees", ["person_id"], :name => &q...
2006 Mar 21
2
Sorting by computed temporary field
...ist of rides to that event, sorted by distance from the logged-in user. What are some ways to do that? Here''s what I can think of: - Make a new find_and_sort method that adds a new @distance member element and sorts the new collection. Would something like this work? def find_and_sort(event_id) @rides = Ride.find(:all, :conditions => {"event_id = ?", event_id})" for ride in @rides ride.newdistance = distance_between_zips(session[:user].zip_code, Event.find(event_id).zip_code); end uhm.... sort @rides by newdistance end What if I want to also rem...
2020 Jul 21
0
[PATCH v9 45/84] KVM: introspection: add KVMI_VM_CONTROL_EVENTS
....rst +++ b/Documentation/virt/kvm/kvmi.rst @@ -342,11 +342,45 @@ This command is always allowed. Returns the number of online vCPUs. +5. KVMI_VM_CONTROL_EVENTS +------------------------- + +:Architectures: all +:Versions: >= 1 +:Parameters: + +:: + + struct kvmi_vm_control_events { + __u16 event_id; + __u8 enable; + __u8 padding1; + __u32 padding2; + }; + +:Returns: + +:: + + struct kvmi_error_code + +Enables/disables VM introspection events. This command can be used with +the following events:: + + KVMI_EVENT_UNHOOK + +:Errors: + +* -KVM_EINVAL - the padding is not zero +* -KVM_EINVAL - t...
2004 Feb 26
2
Trivial API question
I know - I like to futz. I''m thinking of changing the way I pass optional arguments. This is from EventLog: # Write an event to the event log # Current way el.report_event( "source" => "foo", "category" => 0x2, "event_id" => 0x3, "data" => "Warning! Danger Will Robinson!", "type" => EventLog::WARN ) # Proposed way el.report_event{ |e| e.source = "foo" e.category = 0x2 e.event_id = 0x3 e.data = "Warning! Danger Will Robinson!&qu...
2010 Feb 16
0
Strange routing(?) Issue
...authorization_usages GET / authorization_usages(.:format) {:action=>"index", :controller=>"authorization_usages"} / events/:action {:controller=>"events"} event_comments GET /events/:event_id/ comments(.:format) {:action=>"index", :controller=>"comments"} POST /events/:event_id/ comments(.:format) {:action=>"create", :controller=>"comments"} new_event_comment GET /events/:event_i...
2006 May 21
6
Possible problems with EventLog#write
...=> dll_file, "category_message_file" => dll_file ) # test.rb require ''win32/eventlog'' include Win32 log = EventLog.open log.write( :source => ''foo'', :data => ''test'', :category => 0x2, :event_id => 0x3, :event_type => EventLog::WARN ) log.close I also made sure that it wasn''t a path separator issue by doing a String#tr in the add_event_source, but that didn''t seem to matter. Also, I''m not sure that doing File.expand_path on the dll name within ad...
2020 Jul 21
0
[PATCH v9 81/84] KVM: introspection: add KVMI_EVENT_SINGLESTEP
...+ req.cmd.enable = enable ? 1 : 0; + + r = __do_vcpu0_command(KVMI_VCPU_CONTROL_SINGLESTEP, + &req.hdr, sizeof(req), NULL, 0); + TEST_ASSERT(r == 0, + "KVMI_VCPU_CONTROL_SINGLESTEP failed, error %d(%s)\n", + -r, kvm_strerror(-r)); +} + +static void test_singlestep_event(__u16 event_id) +{ + struct { + struct kvmi_event common; + struct kvmi_event_singlestep singlestep; + } ev; + bool enable = true, disable = false; + struct vcpu_reply rpl = { }; + struct kvmi_msg_hdr hdr; + + __control_singlestep(enable); + + receive_event(&hdr, &ev.common, sizeof(ev), event_id); + + p...
2007 Apr 09
1
help with ActiveRecord joins
...n event recurs. I then have a table which simply enumerates dates up to an event horizon, and I get all events on dates in whatever range I''m looking at with a query like: SELECT events.*, library_dates.start_date FROM library_dates LEFT OUTER JOIN events ON 1=1 WHERE events.id IN (SELECT event_id FROM recurrences WHERE monthday IS NOT NULL AND DATEPART(dd, start_date) = monthday OR (monthday IS NULL AND weekday IS NOT NULL AND DATEPART(dw, start_date) = weekday AND (monthweek IS NULL OR datepart(dd, start_date) BETWEEN 7*(monthweek-1) + 1 AND 7*(monthweek-1) + 7) )) OR events.id I...
2006 Jul 19
1
Catch 22 with after_save. Please help.
I have a pretty strange problem. Here is basically what I have to demonstrate my problem: class Event < ActiveRecord::Base def after_create AnotherClass.find_event(id) end end class AnotherClass < ActiveRecord::Base def self.find_event(event_id) e = Event.find event_id end end Here is the catch 22 and it''s quite annoying. Basically ActiveRecord puts to whole save action into a transaction. If an exception is raised in the after_create method it rolls back the transaction, as if the save never happened. The problem is th...
2020 Jul 21
0
[PATCH v9 44/84] KVM: introspection: add KVMI_EVENT_UNHOOK
...00644 --- a/tools/testing/selftests/kvm/x86_64/kvmi_test.c +++ b/tools/testing/selftests/kvm/x86_64/kvmi_test.c @@ -72,6 +72,11 @@ static void set_event_perm(struct kvm_vm *vm, __s32 id, __u32 allow, "KVM_INTROSPECTION_EVENT"); } +static void disallow_event(struct kvm_vm *vm, __s32 event_id) +{ + set_event_perm(vm, event_id, 0, 0); +} + static void allow_event(struct kvm_vm *vm, __s32 event_id) { set_event_perm(vm, event_id, 1, 0); @@ -300,13 +305,20 @@ static void cmd_vm_check_event(__u16 id, __u16 padding, int expected_err) -r, kvm_strerror(-r), expected_err); } -static vo...
2006 Apr 22
4
Anyone know how to copy rows?
Hey all, I''m trying to write something that allows one to copy several rows from a table and create new rows based on those rows. This will be used to intentionally duplicate rows. Did I mention that I was having little luck? I''m from a PHP world, but I''ve been getting really into Rails lately. Here''s what I''ve got(assume an event has_many
2020 Aug 16
1
[PATCH 1/2] drmmode: make event handler leave a note that there are stuck events
We don't really expect to have too many events in the queue. If there are, then the algorithm we use isn't appropriate. Add a warning when the queue gets very long, as it's an indication of something having gone wrong. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/drmmode_display.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git
2006 Apr 11
1
acts_as ... hourly_list?
...(because I''m using acts_as_list). Later I use a method in Channel to recalculate the hour when that show come online, based on the duration of it and doing math based on the previous one duration and start time, starting from 0:00. So, with this info (channel_items): id | channel_id | event_id | position | starttime 1 | 1 | 3 | 1 | 2 | 1 | 5 | 2 | 3 | 1 | 2 | 3 | 4 | 1 | 1 | 4 | [...] After processing it with recalculate_hours get this (all starting 00:00): id | channel_id | event_id | posi...
2010 Aug 19
4
implementing project management and event types
...n. Each project has various events, and each event can be a different type. Some event information is common, such as name, start date, close date, and comments. I have a projects table which has_many events. My plan is to have several sub-event tables, like event_get_access which will contain an event_id field to link it to table events as well as information specific to a "get access" event (remote access, username, passwords, etc). Another event type might be "upgrade" which stores information about the server to be upgraded, etc. So I have: * a project which has_many events...
2020 Feb 07
0
[RFC PATCH v7 64/78] KVM: introspection: add KVMI_EVENT_XSETBV
...ONE(); } @@ -1240,6 +1285,43 @@ static void test_cmd_vm_get_max_gfn(void) DEBUG("max_gfn: 0x%llx\n", rpl.gfn); } +static void test_event_xsetbv(struct kvm_vm *vm) +{ + struct vcpu_worker_data data = { + .vm = vm, + .vcpu_id = VCPU_ID, + .test_id = GUEST_TEST_XSETBV, + }; + __u16 event_id = KVMI_EVENT_XSETBV; + struct kvm_cpuid_entry2 *entry; + struct vcpu_reply rpl = {}; + struct kvmi_msg_hdr hdr; + pthread_t vcpu_thread; + struct kvmi_event ev; + + entry = kvm_get_supported_cpuid_entry(1); + if (!(entry->ecx & X86_FEATURE_XSAVE)) { + DEBUG("XSAVE is not supported, ecx...
2020 Jul 21
0
[PATCH v9 75/84] KVM: introspection: add KVMI_VCPU_CONTROL_MSR and KVMI_EVENT_MSR
...sk, KVMI_NUM_MSR, offset + 1); + + if (offset >= KVMI_NUM_MSR) + break; + + kvm_x86_ops.control_msr_intercept(vcpu, msr_base + offset, + MSR_TYPE_W, false); + } + + bitmap_zero(mask, KVMI_NUM_MSR); +} + int kvmi_arch_cmd_control_intercept(struct kvm_vcpu *vcpu, unsigned int event_id, bool enable) { @@ -460,9 +530,13 @@ void kvmi_arch_breakpoint_event(struct kvm_vcpu *vcpu, u64 gva, u8 insn_len) static void kvmi_arch_restore_interception(struct kvm_vcpu *vcpu) { + struct kvmi_interception *arch_vcpui = vcpu->arch.kvmi; + kvmi_arch_disable_bp_intercept(vcpu); kvmi_ar...
2020 Feb 07
0
[RFC PATCH v7 57/78] KVM: introspection: add KVMI_EVENT_HYPERCALL
...rpl.eax, rpl.ebx, rpl.ecx, rpl.edx); } +static void test_event_hypercall(struct kvm_vm *vm) +{ + struct vcpu_worker_data data = { + .vm = vm, + .vcpu_id = VCPU_ID, + .test_id = GUEST_TEST_HYPERCALL, + }; + struct kvmi_msg_hdr hdr; + struct kvmi_event ev; + struct vcpu_reply rpl = {}; + __u16 event_id = KVMI_EVENT_HYPERCALL; + pthread_t vcpu_thread; + + enable_vcpu_event(vm, event_id); + + vcpu_thread = start_vcpu_worker(&data); + + receive_event(&hdr, &ev, sizeof(ev), event_id); + + DEBUG("Hypercall event, rip 0x%llx\n", + ev.arch.regs.rip); + + reply_to_event(&hdr, &...